[go: up one dir, main page]

CN118656357A - Data migration method, device, electronic device, storage medium and product - Google Patents

Data migration method, device, electronic device, storage medium and product Download PDF

Info

Publication number
CN118656357A
CN118656357A CN202410374006.9A CN202410374006A CN118656357A CN 118656357 A CN118656357 A CN 118656357A CN 202410374006 A CN202410374006 A CN 202410374006A CN 118656357 A CN118656357 A CN 118656357A
Authority
CN
China
Prior art keywords
data
migrated
task
data model
indicator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410374006.9A
Other languages
Chinese (zh)
Inventor
江猛
周家林
聂志学
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mashang Consumer Finance Co Ltd
Original Assignee
Mashang Consumer Finance Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mashang Consumer Finance Co Ltd filed Critical Mashang Consumer Finance Co Ltd
Priority to CN202410374006.9A priority Critical patent/CN118656357A/en
Publication of CN118656357A publication Critical patent/CN118656357A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure provides a data migration method, apparatus, electronic device, storage medium and product, the method comprising: obtaining a first index of a task to be migrated and a mapping relation between a first data model and a second data model; acquiring first data of the first index in the first data model and second data of the first index in the second data model, and determining a first difference verification result between the first data and the second data according to an index verification rule; determining a first risk level of the task to be migrated according to the first difference verification result; and according to the first risk level and the mapping relation, migrating the data to be migrated of the task to be migrated in the first data model to the second data model, so that risk assessment is carried out before migration, migration risk is reduced, and efficiency and accuracy are improved.

Description

一种数据迁移方法、装置、电子设备、存储介质及产品Data migration method, device, electronic device, storage medium and product

技术领域Technical Field

本公开涉及数据处理技术领域,特别涉及一种数据迁移方法、装置、电子设备、存储介质及产品。The present disclosure relates to the field of data processing technology, and in particular to a data migration method, device, electronic device, storage medium and product.

背景技术Background Art

数据模型可以表示一种直接面向数据的逻辑信息结构模型,可以为系统运营的分析和决策提供重要依据,但随着业务发展变化,通常会存在数据模型迭代升级的需求,在数据模型迭代升级后,需要进行数据迁移,但是通常系统中信息较为繁杂,迁移过程可能会出现错误,导致迁移失败,降低了迁移效率和稳定性。The data model can represent a logical information structure model that is directly oriented to data, and can provide an important basis for analysis and decision-making of system operations. However, as the business develops and changes, there is usually a need to iterate and upgrade the data model. After the data model is iterated and upgraded, data migration is required. However, the information in the system is usually complex, and errors may occur during the migration process, resulting in migration failure, which reduces migration efficiency and stability.

发明内容Summary of the invention

本公开提供一种数据迁移方法、装置、电子设备、存储介质及产品。The present disclosure provides a data migration method, device, electronic device, storage medium and product.

第一方面,本公开提供了一种数据迁移方法,该数据迁移方法包括:In a first aspect, the present disclosure provides a data migration method, the data migration method comprising:

获得待迁移任务的第一指标,以及第一数据模型和第二数据模型的映射关系;Obtaining a first indicator of the task to be migrated, and a mapping relationship between the first data model and the second data model;

获取所述第一指标在所述第一数据模型中的第一数据,以及所述第一指标在所述第二数据模型中的第二数据,并根据指标校验规则,确定所述第一数据和所述第二数据之间的第一差异校验结果;Acquire first data of the first indicator in the first data model, and second data of the first indicator in the second data model, and determine a first difference verification result between the first data and the second data according to an indicator verification rule;

根据所述第一差异校验结果,确定所述待迁移任务的第一风险等级;Determining a first risk level of the task to be migrated according to the first difference verification result;

根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中。According to the first risk level and the mapping relationship, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model.

第二方面,本公开提供了一种数据迁移装置,该数据迁移装置包括:In a second aspect, the present disclosure provides a data migration device, the data migration device comprising:

获得模块,用于获得待迁移任务的第一指标,以及第一数据模型和第二数据模型的映射关系;An acquisition module, used to obtain a first indicator of the task to be migrated, and a mapping relationship between the first data model and the second data model;

风险评估模块,用于获取所述第一指标在所述第一数据模型中的第一数据,以及所述第一指标在所述第二数据模型中的第二数据,并根据指标校验规则,确定所述第一数据和所述第二数据之间的第一差异校验结果,根据所述第一差异校验结果,确定所述待迁移任务的第一风险等级;a risk assessment module, configured to obtain first data of the first indicator in the first data model and second data of the first indicator in the second data model, and determine a first difference verification result between the first data and the second data according to an indicator verification rule, and determine a first risk level of the task to be migrated according to the first difference verification result;

迁移模块,用于根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中。A migration module is used to migrate the data to be migrated of the task to be migrated in the first data model to the second data model according to the first risk level and the mapping relationship.

第三方面,本公开提供了一种电子设备,该电子设备包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的一个或多个计算机程序,一个或多个所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述的数据迁移方法。In a third aspect, the present disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and one or more of the computer programs are executed by the at least one processor so that the at least one processor can perform the above-mentioned data migration method.

第四方面,本公开提供了一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序在被处理器执行时实现上述的数据迁移方法。In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned data migration method when executed by a processor.

第五方面,本公开提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述的数据迁移方法。In a fifth aspect, the present disclosure provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned data migration method.

本公开实施例所提供的数据迁移方法,自动化进行信息采集,获得待迁移任务的第一指标,以及第一数据模型和第二数据模型的映射关系,进而根据指标校验规则,确定第一指标对应的第一差异校验结果,并根据第一差异校验结果,确定待迁移任务的第一风险等级,根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中,这样,通过针对第一数据模型和第二数据模型的信息采集和差异校验,在迁移前进行风险评估,可以根据风险评估结果指导迁移,从而可以降低迁移风险,使得迁移过程更加平稳和准确,提升迁移效率和迁移性能。The data migration method provided by the embodiment of the present disclosure automatically collects information, obtains the first indicator of the task to be migrated, and the mapping relationship between the first data model and the second data model, and then determines the first difference verification result corresponding to the first indicator according to the indicator verification rule, and determines the first risk level of the task to be migrated according to the first difference verification result, and migrates the data to be migrated of the task to be migrated in the first data model to the second data model according to the first risk level and the mapping relationship. In this way, by collecting information and verifying the differences between the first data model and the second data model, risk assessment is performed before migration, and migration can be guided according to the risk assessment results, thereby reducing migration risks, making the migration process smoother and more accurate, and improving migration efficiency and migration performance.

应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

附图用来提供对本公开的进一步理解,并且构成说明书的一部分,与本公开的实施例一起用于解释本公开,并不构成对本公开的限制。通过参考附图对详细示例实施例进行描述,以上和其他特征和优点对本领域技术人员将变得更加显而易见,在附图中:The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings. In the accompanying drawings:

图1为本公开实施例提供的数据迁移方法和装置的应用场景图;FIG1 is an application scenario diagram of a data migration method and device provided by an embodiment of the present disclosure;

图2为本公开实施例提供的一种数据迁移方法的流程图;FIG2 is a flow chart of a data migration method provided by an embodiment of the present disclosure;

图3为本公开实施例中任务执行信息采集的原理框图;FIG3 is a block diagram of the principle of task execution information collection in an embodiment of the present disclosure;

图4为本公开实施例中信息分析编排的示例图;FIG4 is an example diagram of information analysis arrangement in an embodiment of the present disclosure;

图5为本公开实施例中指标分类的示例图;FIG5 is an example diagram of indicator classification in an embodiment of the present disclosure;

图6为本公开实施例中风险评估的原理示意图;FIG6 is a schematic diagram of the principle of risk assessment in an embodiment of the present disclosure;

图7为本公开实施例中任务迁移的原理示意图;FIG7 is a schematic diagram showing the principle of task migration in an embodiment of the present disclosure;

图8为本公开实施例中数据迁方法的整体架构示意图;FIG8 is a schematic diagram of the overall architecture of the data migration method according to an embodiment of the present disclosure;

图9为本公开实施例中一种数据迁方法的流程示意图;FIG9 is a schematic diagram of a flow chart of a data migration method in an embodiment of the present disclosure;

图10为本公开实施例提供的一种数据迁移装置的框图;FIG10 is a block diagram of a data migration device provided by an embodiment of the present disclosure;

图11为本公开实施例提供的一种电子设备的框图。FIG. 11 is a block diagram of an electronic device provided in an embodiment of the present disclosure.

具体实施方式DETAILED DESCRIPTION

为使本领域的技术人员更好地理解本公开的技术方案,以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

在不冲突的情况下,本公开各实施例及实施例中的各特征可相互组合。In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

如本文所使用的,术语“和/或”包括一个或多个相关列举条目的任何和所有组合。As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.

本文所使用的术语仅用于描述特定实施例,且不意欲限制本公开。如本文所使用的,单数形式“一个”和“该”也意欲包括复数形式,除非上下文另外清楚指出。还将理解的是,当本说明书中使用术语“包括”和/或“由……制成”时,指定存在所述特征、整体、步骤、操作、元件和/或组件,但不排除存在或添加一个或多个其它特征、整体、步骤、操作、元件、组件和/或其群组。“连接”或者“相连”等类似的词语并非限定于物理的或者机械的连接,而是可以包括电性的连接,不管是直接的还是间接的。The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and/or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and/or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and/or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

除非另外限定,否则本文所用的所有术语(包括技术和科学术语)的含义与本领域普通技术人员通常理解的含义相同。还将理解,诸如那些在常用字典中限定的那些术语应当被解释为具有与其在相关技术以及本公开的背景下的含义一致的含义,且将不解释为具有理想化或过度形式上的含义,除非本文明确如此限定。Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

数据模型可以表示一种直接面向数据的逻辑信息结构模型,可以为系统运营的分析和决策提供重要依据,但随着业务发展变化,原数据模型可能无法满足当前需求,导致数据表不断增加和混乱等问题,因此通常会存在数据模型迭代升级的需求,在数据模型迭代升级后,需要进行数据迁移,数据迁移方案对于系统是否正确运营等非常重要,但是通常系统中信息较为繁杂,相关技术中,无法对迁移风险进行评估,而在迁移过程中可能会出现不确定风险和错误,导致迁移出现问题或失败,降低了迁移效率和稳定性。The data model can represent a logical information structure model that is directly oriented to data, and can provide an important basis for analysis and decision-making of system operations. However, as the business develops and changes, the original data model may not meet current needs, resulting in problems such as increasing and confusing data tables. Therefore, there is usually a need for iterative upgrades of the data model. After the data model is iteratively upgraded, data migration is required. The data migration plan is very important for the correct operation of the system. However, the information in the system is usually complex, and related technologies cannot assess the migration risks. Uncertain risks and errors may occur during the migration process, resulting in problems or failures in the migration, reducing the efficiency and stability of the migration.

因此,本公开实施例中提供了一种数据迁移方法,获取待迁移任务的第一指标,以及第一数据模型和第二数据模型的映射关系,并根据指标校验规则,对第一数据模型和第二数据模型进行差异校验,从而确定待迁移任务的第一风险等级,根据第一风险等级和映射关系,对待迁移任务进行数据迁移,这样,通过信息采集和差异校验,进行迁移的风险评估,可以在迁移时先进行风险评估,根据第一风险等级指导迁移,从而降低了迁移风险,使得迁移过程更加平稳和准确,提高迁移效率和准确性,并且提升迁移性能。Therefore, a data migration method is provided in an embodiment of the present disclosure, which obtains a first indicator of the task to be migrated, and a mapping relationship between the first data model and the second data model, and performs a difference check on the first data model and the second data model according to the indicator verification rule, so as to determine the first risk level of the task to be migrated, and performs data migration on the task to be migrated according to the first risk level and the mapping relationship. In this way, a risk assessment of migration is performed through information collection and difference verification. Risk assessment can be performed first during migration, and migration can be guided according to the first risk level, thereby reducing the migration risk, making the migration process smoother and more accurate, improving migration efficiency and accuracy, and enhancing migration performance.

图1示意性地示出了本公开实施例提供的数据迁移方法和装置的应用场景图。FIG1 schematically shows an application scenario diagram of the data migration method and device provided in an embodiment of the present disclosure.

如图1所示,本公开实施例的应用场景可以包括终端设备101,网络103和服务器102。网络103用以在终端设备101和服务器102之间提供通信链路的介质。网络103可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in Fig. 1, the application scenario of the embodiment of the present disclosure may include a terminal device 101, a network 103 and a server 102. The network 103 is used to provide a medium for a communication link between the terminal device 101 and the server 102. The network 103 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

用户可以使用终端设备101通过网络103与服务器102交互,以接收或发送消息等。终端设备101上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等(仅为示例)。The user can use the terminal device 101 to interact with the server 102 through the network 103 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

终端设备101可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The terminal device 101 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.

服务器102可以是提供各种服务的服务器,例如对用户利用终端设备101所浏览的网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的用户请求等数据进行分析等处理,并将处理结果(例如根据用户请求获取或生成的网页、信息、或数据等)反馈给终端设备。The server 102 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the terminal device 101. The background management server may analyze and process received data such as user requests, and feed back processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

需要说明的是,本公开实施例所提供的数据迁移方法和装置可以由服务器102执行。相应地,本公开实施例所提供的数据迁移方法和装置可以设置于服务器102中。本公开实施例所提供的数据迁移方法和装置也可以由不同于服务器102且能够与终端设备101和/或服务器102通信的服务器或服务器集群执行。相应地,本公开实施例所提供的数据迁移方法和装置也可以设置于不同于服务器102且能够与终端设备101和/或服务器102通信的服务器或服务器集群中。It should be noted that the data migration method and apparatus provided in the embodiments of the present disclosure may be executed by the server 102. Accordingly, the data migration method and apparatus provided in the embodiments of the present disclosure may be arranged in the server 102. The data migration method and apparatus provided in the embodiments of the present disclosure may also be executed by a server or server cluster that is different from the server 102 and that can communicate with the terminal device 101 and/or the server 102. Accordingly, the data migration method and apparatus provided in the embodiments of the present disclosure may also be arranged in a server or server cluster that is different from the server 102 and that can communicate with the terminal device 101 and/or the server 102.

应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the number of terminal devices, networks and servers in Figure 1 is only illustrative. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

图2为本公开实施例提供的一种数据迁移方法的流程图,参阅图2所示,该方法包括:FIG2 is a flow chart of a data migration method provided by an embodiment of the present disclosure. Referring to FIG2 , the method includes:

步骤S201:获得待迁移任务的第一指标,以及第一数据模型和第二数据模型的映射关系。Step S201: obtaining a first indicator of a task to be migrated, and a mapping relationship between a first data model and a second data model.

本公开实施例中,主要针对业务系统的数据模型迭代升级场景,数据模型是数据特征的抽象,通常在数据库系统中用以提供信息表示和操作手段的形式构架,数据模型包括数据库数据的结构部分、数据库数据的操作部分和数据库数据的约束条件。数据库系统中包括多个数据表,数据表是数据库系统中用来存储数据的对象,数据表中包括多个字段,通常数据表或数据之间具有上下游依赖关系,而数据通常是由任务执行获得,因此数据之间的依赖可以理解为任务之间的依赖,在对上游任务进行升级或更新时,对具有依赖关系的下游任务可能会有影响。In the disclosed embodiments, the data model iteration upgrade scenario of the business system is mainly targeted. The data model is an abstraction of data features, and is usually used in the database system to provide a formal framework for information representation and operation means. The data model includes the structural part of the database data, the operation part of the database data, and the constraint conditions of the database data. The database system includes multiple data tables. The data table is an object used to store data in the database system. The data table includes multiple fields. Usually, there are upstream and downstream dependencies between data tables or data, and data is usually obtained by task execution. Therefore, the dependency between data can be understood as the dependency between tasks. When the upstream task is upgraded or updated, it may have an impact on the downstream tasks with dependencies.

因此对上游任务进行升级或更新时,在之前旧的第一数据模型基础上构建对应的新数据模型,配置新数据模型和第一数据模型之间的映射关系,进而完成新数据模型的构建,而之前旧的第一数据模型有升级,则依赖第一数据模型的任务需要迁移至新数据模型,其中,任务可以理解为业务流程的执行单元,待迁移任务即为需要迁移至新数据模型的任务,一种可能实施例中,待迁移任务包括下游任务,并且下游任务在第一数据模型中依赖的第一上游任务有更新,这样,可以先确定出待迁移任务,提高迁移效率。Therefore, when the upstream task is upgraded or updated, a corresponding new data model is constructed based on the previous old first data model, and the mapping relationship between the new data model and the first data model is configured to complete the construction of the new data model. If the previous old first data model is upgraded, the tasks that depend on the first data model need to be migrated to the new data model, wherein the task can be understood as the execution unit of the business process, and the task to be migrated is the task that needs to be migrated to the new data model. In a possible embodiment, the tasks to be migrated include downstream tasks, and the first upstream task that the downstream task depends on in the first data model is updated. In this way, the tasks to be migrated can be determined first to improve the migration efficiency.

S202:获取第一指标在第一数据模型中的第一数据,以及第一指标在第二数据模型中的第二数据,并根据指标校验规则,确定第一数据和第二数据之间的第一差异校验结果。S202: Obtain first data of the first indicator in the first data model and second data of the first indicator in the second data model, and determine a first difference verification result between the first data and the second data according to the indicator verification rule.

本公开实施例中,第二数据模型可以表示针对第一数据模型更新后的新数据模型,第一数据模型迭代升级后,第二数据模型和第一数据模型的差异性会影响迁移准确性,可以预先针对不同的第一指标配置相应的指标校验规则,指标校验规则用于指示第一指标的比对方式或比对条件,具体本公开实施例中并不进行限制,可以根据实际情况和需求进行配置,例如某个指标校验规则为:该字段指标在第一数据模型和第二数据模型中的字段类型的差异。In the embodiment of the present disclosure, the second data model can represent a new data model after the first data model is updated. After the first data model is iteratively upgraded, the difference between the second data model and the first data model will affect the migration accuracy. Corresponding indicator verification rules can be configured in advance for different first indicators. The indicator verification rules are used to indicate the comparison method or comparison conditions of the first indicators. The specific embodiments of the present disclosure are not limited and can be configured according to actual conditions and needs. For example, a certain indicator verification rule is: the difference in field types of the field indicator in the first data model and the second data model.

S203:根据第一差异校验结果,确定待迁移任务的第一风险等级。S203: Determine a first risk level of the task to be migrated according to the first difference verification result.

S204:根据第一风险等级和映射关系,将待迁移任务在第一数据模型中的待迁移数据迁移至第二数据模型中。S204: Migrate the data to be migrated of the task to be migrated in the first data model to the second data model according to the first risk level and the mapping relationship.

本公开实施例中,确定待迁移任务和待迁移任务的第一指标,进而根据指标校验规则,确定第一指标在第一数据模型中的第一数据和在第二数据模型中的第二数据之间的第一差异校验结果,并根据第一差异校验结果,确定待迁移任务的第一风险等级,从而根据第一风险等级,以及第一数据模型和第二数据模型的映射关系,对待迁移任务进行迁移,这样,在迁移之前即可以先对待迁移任务进行风险评估,降低迁移风险,使得迁移更加平稳、连续和无影响波动,提高迁移效率。In the disclosed embodiment, a task to be migrated and a first indicator of the task to be migrated are determined, and then according to the indicator verification rule, a first difference verification result between the first data of the first indicator in the first data model and the second data in the second data model is determined, and according to the first difference verification result, a first risk level of the task to be migrated is determined, and then according to the first risk level and the mapping relationship between the first data model and the second data model, the task to be migrated is migrated. In this way, before the migration, the risk assessment of the task to be migrated can be performed, the migration risk can be reduced, the migration can be made smoother, continuous and without impact fluctuations, and the migration efficiency can be improved.

下面对本公开实施例的数据迁移方法进行具体说明。The data migration method of the embodiment of the present disclosure is described in detail below.

如前所述,本公开实施例中,在针对第一数据模型,构建完成升级或更新后的第二数据模型后,针对从第一数据模型向第二数据模型的迁移问题,本公开实施例中先进行信息自动化采集。As described above, in the embodiments of the present disclosure, after the upgraded or updated second data model is constructed for the first data model, information automatic collection is first performed to solve the migration problem from the first data model to the second data model.

具体一种可能实施方式中,针对上述步骤S201中获得待迁移任务的第一指标之前,还可以先确定出待迁移任务,具体提供了一种可能的实施方式,获取第一数据模型中多个任务的第一任务调度信息,以及第二数据模型中多个任务的第二任务调度信息;根据第一任务调度信息中的第一迁移标识和第二任务调度信息中的第二迁移标识,从多个任务中筛选出待迁移任务。In a specific possible implementation manner, before obtaining the first indicator of the task to be migrated in the above step S201, the task to be migrated can also be determined first. Specifically, a possible implementation manner is provided, which obtains first task scheduling information of multiple tasks in the first data model and second task scheduling information of multiple tasks in the second data model; based on the first migration identifier in the first task scheduling information and the second migration identifier in the second task scheduling information, the task to be migrated is screened out from the multiple tasks.

为便于描述,将第一任务调度信息和第二任务调度信息统称为任务调度信息,任务调度信息表征任务调度的规则策略或条件等,可以基于任务调度信息自动触发和执行任务,例如,任务调度信息可以包括:迁移标识、任务的依赖链路关系、任务与数据表的关系、任务资源消耗情况、任务的启动时间、第一数据模型中第一上游任务的完成时间、第二数据模型中第二上游任务的完成时间、任务的服务级别协议(Service Level Agreement,SLA)时间和重要级别等,具体本公开实施例中并不进行限制,可以根据实际需求进行信息采集和筛选使用,其中,迁移标识用于指示是否迁移,在基于第一数据模型构建第二数据模型时,是能够获知哪些任务进行了更新,进而也就可以配置该任务相应的下游任务是否需迁移至第二数据模型。例如,参阅表1所示,为本公开实施例中任务调度信息的示例。For ease of description, the first task scheduling information and the second task scheduling information are collectively referred to as task scheduling information. The task scheduling information represents the rules, policies or conditions of task scheduling, etc., and can automatically trigger and execute tasks based on the task scheduling information. For example, the task scheduling information may include: migration identification, the dependency link relationship of the task, the relationship between the task and the data table, the task resource consumption, the start time of the task, the completion time of the first upstream task in the first data model, the completion time of the second upstream task in the second data model, the service level agreement (SLA) time and importance level of the task, etc., which are not limited in the specific embodiments of the present disclosure, and can be used for information collection and screening according to actual needs, wherein the migration identification is used to indicate whether to migrate. When the second data model is constructed based on the first data model, it is possible to know which tasks have been updated, and then it is possible to configure whether the corresponding downstream tasks of the task need to be migrated to the second data model. For example, refer to Table 1, which is an example of task scheduling information in the embodiments of the present disclosure.

表1.Table 1.

如表1可知,任务A在第一数据模型中依赖的第一上游任务为任务B,该任务B进行了升级或更新,对应更新后的在第二数据模型中的为任务B’,任务B有更新,因此依赖任务B的下游任务A对应的迁移标识为是,即该任务A为待迁移任务,另外表1中SLA时间表示可允许的最晚启动时间,作用是为了能够保证提供的服务满足需求。As can be seen from Table 1, the first upstream task that Task A depends on in the first data model is Task B. Task B has been upgraded or updated, and the corresponding updated task in the second data model is Task B'. Task B has been updated, so the migration flag corresponding to the downstream task A that depends on Task B is yes, that is, Task A is a task to be migrated. In addition, the SLA time in Table 1 indicates the latest allowable startup time, which is to ensure that the provided services meet the needs.

需要说明的是,表1中仅列举了几种可能的任务调度信息,不应对本公开实施例进行限制,在实际中,可以采集不同或更多其它的任务调度信息。It should be noted that Table 1 only lists several possible task scheduling information, which should not limit the embodiments of the present disclosure. In practice, different or more other task scheduling information may be collected.

一种可能实施方式中,针对上述步骤S201中获得待迁移任务的第一指标,具体可以包括:In a possible implementation manner, the first indicator of the task to be migrated obtained in the above step S201 may specifically include:

1)获取待迁移任务针对第一数据模型的第一任务执行信息,以及针对第二数据模型的第二任务执行信息;根据第一任务执行信息,确定执行待迁移任务的第一数据表和第一字段;根据第二任务执行信息,确定执行待迁移任务的第二数据表和第二字段。1) Obtain first task execution information of the task to be migrated for the first data model, and second task execution information of the task to be migrated for the second data model; determine the first data table and the first field for executing the task to be migrated according to the first task execution information; determine the second data table and the second field for executing the task to be migrated according to the second task execution information.

本公开实施例中,可以通过采集任务执行产生的结构化查询语言(StructuredQuery Language,SQL)日志,SQL日志是数据库管理系统中用于记录数据库操作的日志文件,可以记录数据库的所有修改操作,包括插入、更新、删除等操作,以及事务的开始和提交等操作,对SQL日志进行解析,获得执行待迁移任务的数据表和字段,即可以获知该待迁移任务执行时使用了哪些数据表和数据表中哪些字段,这样在后续进行风险评估时,可以仅针对使用的数据表和字段进行差异校验,而无需对所有数据表或字段进行差异校验,可以提高效率,并且还可以解析获得使用数据的限制条件或数据范围等其它信息,也可以用于后续的风险差异校验或迁移时的测试校验,例如参阅图3所示,为本公开实施例中任务执行信息采集的原理框图,从资源管理系统(例如资源管理集群)中,获取任务执行产生的SQL日志,并对SQL日志进行解析,例如SQL关键字分离、标识切分、元数据映射、语法分析处理等,其中,关键字例如为选择(select)等,标识例如为自定义的名字、变量等,可以对SQL日志中的段落、子查询等进行拆分,从而可以解析出SQL日志中所涉及的数据表、字段、限制条件等信息。In the disclosed embodiment, the Structured Query Language (SQL) log generated by the execution of the acquisition task can be parsed to obtain the data tables and fields for executing the task to be migrated, that is, it can be known which data tables and fields in the data tables are used when the task to be migrated is executed. In this way, when performing risk assessment later, it is only necessary to perform difference check on the used data tables and fields, without performing difference check on all data tables or fields, which can improve efficiency, and it is also possible to parse and obtain the restriction conditions or data of the used data. Other information such as scope can also be used for subsequent risk difference verification or test verification during migration. For example, refer to Figure 3, which is a principle block diagram of task execution information collection in the embodiment of the present disclosure. The SQL log generated by the task execution is obtained from the resource management system (such as the resource management cluster), and the SQL log is parsed, such as SQL keyword separation, identifier segmentation, metadata mapping, syntax analysis processing, etc., where the keyword is, for example, select (select), etc., and the identifier is, for example, a custom name, variable, etc., and the paragraphs, subqueries, etc. in the SQL log can be split, so that the data table, field, restriction conditions and other information involved in the SQL log can be parsed.

2)获取第一数据表和第一字段的第一元数据,以及第二数据表和第二字段的第二元数据。2) Acquire first metadata of the first data table and the first field, and second metadata of the second data table and the second field.

其中,元数据表示记录描述数据相关信息的数据,包含数据的属性(例如名称、大小、数据类型)、结构(例如长度、字段、索引)、特征信息等,本公开实施例中,分别获取第一数据模型对应的第一元数据和第二数据模型对应的第二元数据,还可以用于后续的风险差异校验或迁移时的测试校验。Among them, metadata refers to data that records and describes data-related information, including data attributes (such as name, size, data type), structure (such as length, field, index), feature information, etc. In the embodiment of the present disclosure, the first metadata corresponding to the first data model and the second metadata corresponding to the second data model are obtained respectively, which can also be used for subsequent risk difference verification or test verification during migration.

例如,参阅表2所示,为本公开实施例中元数据的示例。For example, see Table 2, which is an example of metadata in an embodiment of the present disclosure.

表2.Table 2.

本公开实施例中,可以获取元数据中记录的数据表信息、字段信息、字段类型、存储是否分区、存储周期等信息,表2中仅是一种可能的元数据示例,可以对应于第一数据模型或第二数据模型,这里仅是为了便于说明,将第一元数据和第二元数据,统称为元数据。In the embodiment of the present disclosure, data table information, field information, field type, whether the storage is partitioned, storage period and other information recorded in the metadata can be obtained. Table 2 is only a possible metadata example, which can correspond to the first data model or the second data model. Here, for the sake of convenience of explanation, the first metadata and the second metadata are collectively referred to as metadata.

3)根据第一任务调度信息和第二任务调度信息、第一数据表和第一字段、第二数据表和第二字段、第一元数据以及第二元数据,生成待迁移任务的关联信息。3) Generate association information of the task to be migrated according to the first task scheduling information and the second task scheduling information, the first data table and the first field, the second data table and the second field, the first metadata and the second metadata.

其中,本公开实施例中还可以预先划分多个信息维度,该关联信息表征归类于所属信息维度下的信息,信息维度表征预设的用于描述信息的内容类别。Among them, in the embodiment of the present disclosure, multiple information dimensions can also be pre-divided, and the associated information represents the information classified under the corresponding information dimension, and the information dimension represents the preset content category for describing the information.

本公开实施例中,可以定期或根据一定的触发条件等,采集前述的第一数据模型和第二数据模型对应的任务调度信息、任务执行信息、元数据等,进而对采集的信息进行分析编排,其中,分析编排可以表征在数据处理过程中对数据进行整理、组织和管理的过程,例如包含对数据的清洗、转换、聚合、筛选、合并等操作,将数据进行分析分类、建模和可视化等,进而本公开实施例中,采集的信息中待迁移任务可能有多个,可以分别针对每个待迁移任务进行分析编排,获得每个待迁移任务的关联信息,这样便于对待迁移任务进行后续分析处理等操作。In the embodiments of the present disclosure, task scheduling information, task execution information, metadata, etc. corresponding to the aforementioned first data model and second data model may be collected periodically or based on certain trigger conditions, and then the collected information may be analyzed and arranged, wherein the analysis and arrangement may represent the process of sorting, organizing, and managing data during data processing, such as including operations such as cleaning, converting, aggregating, filtering, and merging data, analyzing, classifying, modeling, and visualizing the data, and then, in the embodiments of the present disclosure, there may be multiple tasks to be migrated in the collected information, and each task to be migrated may be analyzed and arranged separately to obtain the associated information of each task to be migrated, which facilitates subsequent analysis and processing of the tasks to be migrated.

例如,参阅图4所示,为本公开实施例中信息分析编排的示例图,如图4所示,获取任务调度信息、任务执行信息和元数据等,例如包括待迁移任务信息、任务血缘信息、任务执行信息、任务与数据表关联关系、第一数据模型和第二数据模型之间的映射关系、第一数据模型和第二数据模型的存储信息、数据表信息、数据表存储信息、数据表血缘关系、任务与字段关联关系、重要级别等信息,进而以任务为维度,分别针对每个待迁移任务,生成每个待迁移任务在多个信息维度下的关联信息,如图4所示,例如信息维度包括任务信息、数据表信息、执行待迁移任务的第一数据表和第二数据表、所关联的第一字段和第二字段等维度,具体本公开实施例中并不进行限制,这样对各种信息进行多个信息维度的分类编排整理,提高信息管理和处理的效率。For example, refer to Figure 4, which is an example diagram of information analysis and arrangement in the embodiment of the present disclosure. As shown in Figure 4, task scheduling information, task execution information and metadata are obtained, such as information of tasks to be migrated, task lineage information, task execution information, the relationship between tasks and data tables, the mapping relationship between the first data model and the second data model, storage information of the first data model and the second data model, data table information, data table storage information, data table lineage, the relationship between tasks and fields, importance levels and other information. Then, taking the task as the dimension, for each task to be migrated, the associated information of each task to be migrated in multiple information dimensions is generated, as shown in Figure 4. For example, the information dimensions include task information, data table information, the first data table and the second data table that execute the task to be migrated, the associated first field and the second field and other dimensions. The specific embodiment of the present disclosure is not limited thereto. In this way, various information is classified, arranged and sorted in multiple information dimensions to improve the efficiency of information management and processing.

4)根据预配置需校验的指标集,从关联信息中筛选出待迁移任务的第一指标。4) According to the pre-configured indicator set to be verified, the first indicator of the task to be migrated is selected from the associated information.

本公开实施例中,由于获取的信息通常较为繁杂,对于风险评估不一定所有信息都可用或有效,因此本公开实施例中,可以根据经验或需求,预先配置需校验的指标集,其中,指标即表示某个信息,例如,某个字段,需校验的指标集中指标数量也不进行限制,例如配置需校验的指标集中有10个需校验指标,进而可以基于待迁移任务的关联信息,从中筛选出这10个需校验指标(即筛选出的待迁移任务的第一指标),需校验的指标集仅是一种参考,可以统一针对多个待迁移任务,不一定必须要求能够筛选出指标集中的所有指标,只要从中筛选出待迁移任务的全部或部分指标,即可以用于后续的风险评估。In the embodiments of the present disclosure, since the information obtained is usually complicated, not all information may be available or valid for risk assessment. Therefore, in the embodiments of the present disclosure, a set of indicators to be verified can be pre-configured based on experience or needs, where an indicator represents a certain information, for example, a certain field. The number of indicators in the indicator set to be verified is not limited. For example, the indicator set to be verified is configured to have 10 indicators to be verified, and then these 10 indicators to be verified (that is, the first indicator of the task to be migrated that is filtered out) can be screened out based on the associated information of the task to be migrated. The indicator set to be verified is only a reference and can be unified for multiple tasks to be migrated. It is not necessarily required to be able to filter out all the indicators in the indicator set. As long as all or part of the indicators of the task to be migrated are filtered out, it can be used for subsequent risk assessment.

进而本公开实施例中,可以基于自动化采集的信息进行编排分析,对待迁移任务进行风险评估,一种可能的实施方式中,具体针对上述步骤S202,本公开提供了一种可能的实施方式,包括:按照预设板块类型,将第一指标分类到对应的板块类型中;获取预设时间段内第一指标在第一数据模型中的第一数据,以及第一指标在第二数据模型中的第二数据;根据板块类型对应的指标校验规则,对第一指标对应的第一数据和第二数据进行比对,确定第一数据和第二数据之间的第一差异校验结果。Furthermore, in an embodiment of the present disclosure, an orchestration analysis can be performed based on the automatically collected information to conduct a risk assessment on the migration task. In a possible implementation, specifically with respect to the above-mentioned step S202, the present disclosure provides a possible implementation, including: classifying the first indicator into the corresponding section type according to the preset section type; obtaining the first data of the first indicator in the first data model within a preset time period, and the second data of the first indicator in the second data model; comparing the first data and the second data corresponding to the first indicator according to the indicator verification rule corresponding to the section type, and determining a first difference verification result between the first data and the second data.

本公开实施例中,可以预先进行板块类型划分和指标校验规则的配置,其中,板块类型可以基于需要进行划分,例如板块类型包括任务板块、数据板块、字段板块和其它板块,任务板块表示面向应用者的指标信息,数据板块主要表示面向开发者的指标信息,字段板块表示字段类型的指标信息,这样,统一将指标分类到不同板块类型中,提高信息处理效率,可以基于不同板块类型,相应设置对应的板块权重,也便于后续风险评估和风险追溯等。In the disclosed embodiments, the section type division and the configuration of the indicator verification rules can be performed in advance, wherein the section types can be divided based on needs, for example, the section types include task sections, data sections, field sections and other sections, the task sections represent the indicator information for the users, the data sections mainly represent the indicator information for the developers, and the field sections represent the indicator information of the field types. In this way, the indicators are uniformly classified into different section types to improve the efficiency of information processing, and the corresponding section weights can be set based on the different section types, which is also convenient for subsequent risk assessment and risk tracing.

例如,参阅图5所示,为本公开实施例中指标分类的示例图,如图5所示,基于获取的待迁移任务的关联信息,筛选出第一指标,并将第一指标分类到不同板块类型中,针对不同板块类型,配置相应的指标校验规则,也可支持对指标校验规则进行动态调整,一个指标校验规则可以涉及多个指标,一个指标也可以对应多个指标校验规则,本公开实施例中并不进行限制,例如,任务板块对应的指标校验规则包括:规则1,下游任务启动时间与第二数据模型中上游任务的完成时间比较,规则2,第二数据模型中上游任务的完成时间与第一数据模型中上游任务完成时间比较,又例如,字段板块对应的指标校验规则包括:规则1,该字段在第一数据模型和第二数据模型中的字段类型的差异,规则2,该字段在第一数据模型和第二数据模型中的数据差异等。进而本公开实施例中,基于指标校验规则,可以选择某预设时间段内第一数据模型的第一数据和第二数据模型的第二数据,分别针对每个待迁移任务,并行计算待迁移任务下多个第一指标的第一差异校验结果,进而还可以基于待迁移任务、板块类型和第一指标,将第一差异校验结果进行统一存储,例如,如表3所示,为本公开实施例中第一差异校验结果的示例。For example, refer to Figure 5, which is an example diagram of indicator classification in the embodiment of the present disclosure. As shown in Figure 5, based on the obtained associated information of the task to be migrated, the first indicator is screened out and the first indicator is classified into different section types. For different section types, corresponding indicator verification rules are configured, and dynamic adjustment of indicator verification rules can also be supported. An indicator verification rule can involve multiple indicators, and an indicator can also correspond to multiple indicator verification rules, which is not limited in the embodiment of the present disclosure. For example, the indicator verification rules corresponding to the task section include: Rule 1, the start time of the downstream task is compared with the completion time of the upstream task in the second data model, Rule 2, the completion time of the upstream task in the second data model is compared with the completion time of the upstream task in the first data model. For another example, the indicator verification rules corresponding to the field section include: Rule 1, the difference in field type of the field in the first data model and the second data model, Rule 2, the data difference of the field in the first data model and the second data model, etc. Furthermore, in the embodiment of the present disclosure, based on the indicator verification rule, the first data of the first data model and the second data of the second data model within a preset time period can be selected, and for each task to be migrated, the first difference verification results of multiple first indicators under the task to be migrated can be calculated in parallel. Furthermore, the first difference verification results can also be uniformly stored based on the task to be migrated, the sector type and the first indicator. For example, as shown in Table 3, this is an example of the first difference verification result in the embodiment of the present disclosure.

表3.Table 3.

如表3所示,例如针对待迁移任务A,板块类型为字段板块,第一指标为客户标识,所使用的指标校验规则为规则1,第一差异校验结果为1,类型为01,权重为1,其中,第一差异校验结果中差异分值越高说明差异越高,类型表示风险级别,如01表示中等风险,02表示高风险,03表示低风险等,权重表示该指标在待迁移任务的风险评估中的重要程度。As shown in Table 3, for example, for the task A to be migrated, the section type is the field section, the first indicator is the customer identifier, the indicator verification rule used is rule 1, the first difference verification result is 1, the type is 01, and the weight is 1, wherein the higher the difference score in the first difference verification result, the higher the difference, and the type indicates the risk level, such as 01 for medium risk, 02 for high risk, 03 for low risk, etc. The weight indicates the importance of the indicator in the risk assessment of the task to be migrated.

针对上述步骤S203,本公开提供了一种可能的实施方式,包括:获取第一指标对应的风险参数信息;根据第一差异校验结果和风险参数信息,确定第一指标的风险分值,并根据第一指标的风险分值,确定待迁移任务的第一风险等级。For the above-mentioned step S203, the present disclosure provides a possible implementation method, including: obtaining risk parameter information corresponding to the first indicator; determining the risk score of the first indicator based on the first difference verification result and the risk parameter information, and determining the first risk level of the task to be migrated based on the risk score of the first indicator.

其中,风险参数信息表征用于评估风险等级的预设参数信息,例如风险参数信息可以包括以下至少一种:指标权重、待迁移任务的重要级别、差异修正信息。The risk parameter information represents preset parameter information for evaluating the risk level. For example, the risk parameter information may include at least one of the following: indicator weight, importance level of the task to be migrated, and difference correction information.

例如,参阅图6所示,为本公开实施例中风险评估的原理示意图,如图6所示,可以将计算出的第一差异校验结果,以及多个风险参数信息,输入已训练好的风险评估模型中,其中,风险参数信息例如包括待迁移任务的重要级别、指标权重、差异修正信息,差异修正信息可以根据历史时间段内第二数据模型和第一数据模型之间的样本数据差异或差异趋势确定、和/或根据指标的差异偏移分值而确定,还可以包括其它预设信息,如板块类型、板块权重、特殊字段判断标准等,进而基于风险评估模型,对待迁移任务进行风险评估,获得待迁移任务的第一风险等级。For example, refer to Figure 6, which is a schematic diagram of the principle of risk assessment in the embodiment of the present disclosure. As shown in Figure 6, the calculated first difference verification result and multiple risk parameter information can be input into a trained risk assessment model, wherein the risk parameter information, for example, includes the importance level of the task to be migrated, the indicator weight, and the difference correction information. The difference correction information can be determined based on the sample data difference or difference trend between the second data model and the first data model in the historical time period, and/or based on the difference offset score of the indicator. It can also include other preset information, such as sector type, sector weight, special field judgment criteria, etc., and then based on the risk assessment model, the risk assessment of the task to be migrated is performed to obtain the first risk level of the task to be migrated.

本公开实施例中,针对每个待迁移任务,分别确定其第一风险等级,进而可以生成包括多个待迁移任务的风险评估报告,基于该风险评估报告可以指导迁移,则针对上述步骤S204,还提供了几种可能的实施例:In the embodiment of the present disclosure, for each task to be migrated, the first risk level is determined respectively, and then a risk assessment report including multiple tasks to be migrated can be generated. Based on the risk assessment report, migration can be guided. For the above step S204, several possible embodiments are also provided:

一种可能的实施例中,根据第一风险等级和映射关系,将待迁移任务在第一数据模型中的待迁移数据迁移至第二数据模型中,包括:在第一风险等级小于预设等级的情况下,根据映射关系,确定迁移规则;根据迁移规则,将待迁移任务在第一数据模型中的待迁移数据迁移至第二数据模型中。In a possible embodiment, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model according to the first risk level and the mapping relationship, including: when the first risk level is less than the preset level, determining the migration rule according to the mapping relationship; and migrating the data to be migrated of the task to be migrated in the first data model to the second data model according to the migration rule.

本公开实施例中,对于风险较小的待迁移任务,可以生成迁移脚本直接进行迁移,其中,迁移脚本中迁移规则例如包括数据表映射关系、字段映射关系等,进而可以将第一数据模型中待迁移任务的待迁移数据通过该迁移规则处理后,传递至第二数据模型中。In the disclosed embodiment, for tasks to be migrated with relatively low risks, a migration script can be generated to directly perform the migration, wherein the migration rules in the migration script include, for example, data table mapping relationships, field mapping relationships, etc., and then the data to be migrated of the tasks to be migrated in the first data model can be processed by the migration rules and then passed to the second data model.

一种可能的实施例中,根据第一风险等级和映射关系,将待迁移任务在第一数据模型中的待迁移数据迁移至第二数据模型中,包括:1)在第一风险等级大于或等于预设等级的情况下,根据第一差异校验结果,从第一指标中筛选出符合差异条件的第二指标;2)根据预配置的降级处理策略,对第二指标的指标校验规则进行调整,得到调整后的指标校验规则;3)获取第二指标在第一数据模型中的第三数据,以及第二指标在第二数据模型中的第四数据,并根据调整后的指标校验规则,确定第三数据和第四数据之间的第二差异校验结果;4)根据第二差异校验结果,确定待迁移任务的第二风险等级;5)在第二风险等级小于预设等级的情况下,根据映射关系,将待迁移任务在第一数据模型中的待迁移数据迁移至第二数据模型中。In a possible embodiment, according to the first risk level and the mapping relationship, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model, including: 1) when the first risk level is greater than or equal to the preset level, according to the first difference verification result, the second indicator that meets the difference condition is screened out from the first indicator; 2) according to the preconfigured downgrade processing strategy, the indicator verification rule of the second indicator is adjusted to obtain the adjusted indicator verification rule; 3) the third data of the second indicator in the first data model and the fourth data of the second indicator in the second data model are obtained, and according to the adjusted indicator verification rule, the second difference verification result between the third data and the fourth data is determined; 4) according to the second difference verification result, the second risk level of the task to be migrated is determined; 5) when the second risk level is less than the preset level, according to the mapping relationship, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model.

本公开实施例中,对于风险较高的待迁移任务,可以根据第一差异校验结果,获知哪些第一指标是差异较大或有风险的,进而筛选出这些符合差异条件的第二指标,再对这些第二指标进行降级处理,例如降级处理策略包括对第二指标在第一数据模型和第二数据模型中的字段类型进行转换,以使该第二指标在第一数据模型和第二数据模型中对应的字段类型相同;又例如,对第二指标在第一数据模型或第二数据模型中为无效乱码的数据进行清理、重新筛选新的数据、缩小数据比对范围统计等,又例如,对任务板块中设定指标的差异进行降级,如设置任务的启动时间可根据任务执行时长延长最晚启动时间,具体本公开实施例中并不进行限制,也可以动态进行调整,目的是为了将一些风险影响较小或不影响的指标,降低其差异校验要求或风险判断要求,进而对指标进行调整处理后,再次进行指标的差异校验计算和对待迁移任务的风险评估,如果调整后风险较小了,就可以进行数据迁移了,但若调整后风险仍较高,并且基于降级处理策略已不能继续对第二指标进行调整了,则说明该待迁移任务的风险确实很高,直接迁移会造成数据错误、迁移失败等问题,因此这时不对该待迁移任务进行迁移,可以推送给相关人员进行人工判定分析,以确定更加合适和准确的处理策略。In the disclosed embodiment, for tasks to be migrated with higher risks, it is possible to determine which first indicators are more different or risky based on the first difference check result, and then screen out the second indicators that meet the difference conditions, and then downgrade these second indicators. For example, the downgrade strategy includes converting the field type of the second indicator in the first data model and the second data model so that the corresponding field types of the second indicator in the first data model and the second data model are the same; for example, the data that is invalid and garbled for the second indicator in the first data model or the second data model is cleaned up, new data is re-screened, and the data comparison range is narrowed down for statistics; for example, the difference of the indicators set in the task section is downgraded, such as setting the start time of the task to be delayed according to the task execution time. The latest startup time is not limited in the specific embodiments of the present disclosure and can also be adjusted dynamically. The purpose is to reduce the difference verification requirements or risk judgment requirements for some indicators with little or no risk impact, and then after the indicator is adjusted, the difference verification calculation of the indicator and the risk assessment of the migration task are performed again. If the risk is smaller after adjustment, data migration can be performed. However, if the risk is still high after adjustment, and the second indicator can no longer be adjusted based on the downgrade processing strategy, it means that the risk of the task to be migrated is indeed very high, and direct migration will cause data errors, migration failures and other problems. Therefore, the task to be migrated will not be migrated at this time, and it can be pushed to relevant personnel for manual judgment and analysis to determine a more appropriate and accurate processing strategy.

这样,本公开实施例中,在迁移过程中,可以提前进行风险评估,并且对于风险较高的待迁移任务,能够及时并准确地对差异问题进行定位跟踪,进而进行适配性处理,提高迁移效率和准确性。In this way, in the embodiment of the present disclosure, risk assessment can be performed in advance during the migration process, and for tasks to be migrated with higher risks, difference problems can be located and tracked in a timely and accurate manner, and then adaptive processing can be performed to improve migration efficiency and accuracy.

一种可能的实施例中,根据第一风险等级和映射关系,将待迁移任务在第一数据模型中的待迁移数据迁移至第二数据模型中,包括:在第一风险等级大于或等于预设等级的情况下,发送提示信息,提示信息用于提示对风险等级进行调整;接收基于提示信息所输入的调整信息,其中,调整信息中至少包括针对第一风险等级对应修改后的第三风险等级;在第三风险等级小于预设等级的情况下,根据映射关系,将待迁移任务在第一数据模型中的待迁移数据迁移至第二数据模型中。In a possible embodiment, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model according to the first risk level and the mapping relationship, including: when the first risk level is greater than or equal to the preset level, sending a prompt message, the prompt message is used to prompt to adjust the risk level; receiving adjustment information input based on the prompt message, wherein the adjustment information at least includes a modified third risk level corresponding to the first risk level; when the third risk level is less than the preset level, migrating the data to be migrated of the task to be migrated in the first data model to the second data model according to the mapping relationship.

本公开实施例中,风险较高时还可以直接提示给相关人员进行分析判定,若相关人员确定该风险较小,可以修改其第一风险等级,进而就可以基于映射关系进行迁移。In the disclosed embodiment, when the risk is high, relevant personnel may be directly prompted to conduct analysis and determination. If the relevant personnel determine that the risk is small, the first risk level may be modified, and migration may be performed based on the mapping relationship.

进一步地,本公开实施例中,生成迁移脚本时,还可以根据映射关系和任务执行信息进行生成,生成的迁移脚本中不仅包括迁移规则,还可以包括校验规则,该校验规则可以用于对迁移后数据进行正确性的核验。Furthermore, in the disclosed embodiment, when generating a migration script, it can also be generated based on the mapping relationship and task execution information. The generated migration script includes not only migration rules but also verification rules, which can be used to verify the correctness of the migrated data.

也就是说,本公开实施例中,通过风险评估报告,可以对不同风险等级的待迁移任务进行相应处理,以保证迁移的正确性,例如,参阅图7所示,为本公开实施例中任务迁移的原理示意图,如图7所示,对于第一风险等级小于预设等级情况下,生成迁移脚本,基于迁移脚本中迁移规则进行测试迁移,并基于迁移脚本中校验规则对测试迁移中迁移后数据进行正确性核验,核验通过后完成该待迁移任务的迁移;对于第一风险等级大于或等于预设等级的情况下,可以通过人工分析判定和/或基于降级处理策略进行处理,进而重新进行风险评估,或者人工分析判定风险较小,可以修改第一风险等级以强制生成迁移脚本并进行迁移,从而完成整个第一数据模型中待迁移任务至第二数据模型的迁移。That is to say, in the embodiment of the present disclosure, through the risk assessment report, corresponding processing can be performed on the tasks to be migrated with different risk levels to ensure the correctness of the migration. For example, refer to Figure 7, which is a schematic diagram of the principle of task migration in the embodiment of the present disclosure. As shown in Figure 7, when the first risk level is less than the preset level, a migration script is generated, and a test migration is performed based on the migration rules in the migration script. The correctness of the migrated data in the test migration is verified based on the verification rules in the migration script. After the verification is passed, the migration of the task to be migrated is completed; when the first risk level is greater than or equal to the preset level, it can be processed through manual analysis and/or based on the downgrade processing strategy, and then the risk assessment can be re-performed, or if the manual analysis determines that the risk is small, the first risk level can be modified to force the generation of a migration script and perform migration, thereby completing the migration of the tasks to be migrated in the entire first data model to the second data model.

这样,本公开实施例中在迁移前进行迁移风险评估,提前了解迁移风险,减少迁移过程中可能出现的未知风险,并且风险评估基于各个指标的校验结果,指标来源于待迁移任务本身使用情况的采集观测,风险评估更加全面细化,也更加符合待迁移任务自身需求,准确性更高,从而可以准确获知待迁移任务的迁移风险,以及待迁移任务中指标的风险定位,进而可以快速地进行相应的响应和调整,可以对第二数据模型进行修正,并且对风险高的待迁移任务进行跟踪对应处理,降低迁移风险,提升整个迁移过程的效率、完整性和准确性。In this way, in the embodiment of the present disclosure, a migration risk assessment is performed before migration, so that the migration risk can be understood in advance and unknown risks that may occur during the migration process can be reduced. In addition, the risk assessment is based on the verification results of various indicators, and the indicators are derived from the collection and observation of the usage of the task to be migrated itself. The risk assessment is more comprehensive and detailed, and more in line with the needs of the task to be migrated itself, with higher accuracy. Therefore, the migration risk of the task to be migrated and the risk positioning of the indicators in the task to be migrated can be accurately known, and corresponding responses and adjustments can be made quickly. The second data model can be corrected, and the tasks to be migrated with high risks can be tracked and processed accordingly, so as to reduce the migration risk and improve the efficiency, completeness and accuracy of the entire migration process.

下面采用具体应用场景对本公开实施例中数据迁移方法进行说明。参阅图8所示,为本公开实施例中数据迁方法的整体架构示意图。The data migration method in the embodiment of the present disclosure is described below using a specific application scenario. Referring to FIG8 , it is a schematic diagram of the overall architecture of the data migration method in the embodiment of the present disclosure.

本公开实施例中,随着系统中业务发展,描述系统的数据库中数据结构的数据模型也需不断迭代更新,如图8,本公开实施例中,可以应用于任意业务系统,如报表系统场景、变量管理场景等,根据业务需求,在第一数据模型基础上,设计和构建第二数据模型,为保证业务系统稳定可用,需将第一数据模型中待迁移任务迁移至第二数据模型,具体地可以包括以下几部分。In the embodiments of the present disclosure, as the business in the system develops, the data model describing the data structure in the database of the system also needs to be continuously iterated and updated, as shown in Figure 8. In the embodiments of the present disclosure, it can be applied to any business system, such as a reporting system scenario, a variable management scenario, etc. According to business needs, a second data model is designed and constructed based on the first data model. In order to ensure the stability and availability of the business system, the tasks to be migrated in the first data model need to be migrated to the second data model, which may specifically include the following parts.

1)第一部分:信息采集和分析编排,该部分主要是用于进行多种信息采集,所采集的对象包括第二数据模型、第一数据模型、元数据、调度系统、资源管理系统和下游业务系统。1) The first part: information collection and analysis and arrangement. This part is mainly used for collecting various information. The collected objects include the second data model, the first data model, metadata, scheduling system, resource management system and downstream business system.

具体地,本公开实施例中,可以获取第一数据模型和第二数据模型之间的映射关系,获取第一数据模型的第一元数据和第二数据模型的第二元数据,以及从调度系统获取任务调度信息,从资源管理系统获取任务执行信息,另外还可以从下游业务系统获取所涉及的数据表或字段的使用情况等,以用于判断数据表或字段的重要性,或者用于进行迁移测试验证等,进而根据采集的多种信息,进行编排处理。Specifically, in the embodiments of the present disclosure, it is possible to obtain a mapping relationship between a first data model and a second data model, obtain first metadata of the first data model and second metadata of the second data model, obtain task scheduling information from a scheduling system, obtain task execution information from a resource management system, and in addition, obtain usage of the data tables or fields involved from downstream business systems, etc., in order to determine the importance of the data tables or fields, or to perform migration testing and verification, etc., and then perform orchestration processing based on the various information collected.

这样,本公开实施例中,可以线上自动化进行信息采集,不需要依赖人工,提高信息采集效率和准确性。In this way, in the embodiments of the present disclosure, information collection can be performed automatically online without relying on manual labor, thereby improving the efficiency and accuracy of information collection.

2)第二部分:生成风险评估报告,该部分主要是基于编排后信息,筛选出第一指标,并将第一指标分类到对应的板块类型中,进而根据指标校验规则,确定第一数据模型和第二数据模型之间的第一差异校验结果,进而确定待迁移任务的第一风险等级,以生成风险评估报告。2) The second part: Generate a risk assessment report. This part is mainly based on the arranged information, screens out the first indicator, and classifies the first indicator into the corresponding section type, and then determines the first difference verification result between the first data model and the second data model according to the indicator verification rule, and then determines the first risk level of the task to be migrated to generate a risk assessment report.

3)第三部分:生成迁移脚本,该部分主要是根据不同的第一风险等级,对待迁移任务进行相应处理,以生成迁移脚本,进而根据迁移脚本,进行待迁移任务的迁移,其中迁移脚本中至少包括迁移规则。3) The third part: generating a migration script. This part mainly processes the task to be migrated according to different first risk levels to generate a migration script, and then migrates the task to be migrated according to the migration script, wherein the migration script at least includes a migration rule.

本公开实施例中,自动化进行信息采集,并且在迁移前进行风险评估,可以减少迁移导致的高风险或不确定风险,对于高风险待迁移任务能够快速定位和调整,对于低风险待迁移任务可以直接生成迁移脚本并进行迁移,提高迁移准确性,并且减少上游任务更新后对应下游的待迁移任务的维护投入成本,减少了资源消耗和迁移风险,整个迁移过程可以自动化进行,也减少了多方相关人员的参与过程和参与成本,进一步提高迁移效率和准确性。In the disclosed embodiments, information collection is automated and risk assessment is performed before migration, which can reduce high risks or uncertain risks caused by migration. High-risk tasks to be migrated can be quickly located and adjusted, and migration scripts can be directly generated and migrated for low-risk tasks to be migrated, thereby improving migration accuracy and reducing maintenance investment costs for downstream tasks to be migrated after upstream tasks are updated, reducing resource consumption and migration risks. The entire migration process can be automated, reducing the participation process and costs of multiple relevant personnel, and further improving migration efficiency and accuracy.

基于上述实施例,参阅图9所示,为本公开实施例中一种数据迁方法的流程示意图,如图9所示,该数据迁移方法,包括:Based on the above embodiment, refer to FIG. 9 , which is a flow chart of a data migration method in an embodiment of the present disclosure. As shown in FIG. 9 , the data migration method includes:

S901:信息采集。S901: Information collection.

如图9所示,本公开实施例中信息采集可以包括第一数据模型和第二数据模型的映射关系、任务调度信息、任务执行信息和元数据等。As shown in FIG. 9 , in the embodiment of the present disclosure, information collection may include a mapping relationship between a first data model and a second data model, task scheduling information, task execution information, metadata, and the like.

例如,采集第一数据模型和第二数据模型的数据表、字段、存储周期等元数据,可以分析数据表、字段等映射关系;采集任务调度信息,可以基于采集的任务调度信息,获取待迁移任务关联的任务血缘关系,还可以分析依赖该待迁移任务的下游任务的后期扩展使用等;采集任务执行信息,可以基于待迁移任务的执行命令,获取执行所关联的数据表和字段,并且还可以分析字段血缘关系等。For example, by collecting metadata such as data tables, fields, storage cycles, etc. of the first data model and the second data model, the mapping relationship between data tables and fields can be analyzed; by collecting task scheduling information, the task lineage relationship associated with the task to be migrated can be obtained based on the collected task scheduling information, and the later expansion and use of downstream tasks that depend on the task to be migrated can be analyzed; by collecting task execution information, the data tables and fields associated with the execution can be obtained based on the execution command of the task to be migrated, and the field lineage relationship can be analyzed.

S902:信息编排汇总。S902: Information compilation and summary.

本公开实施例中,可以对采集的信息进行拆分、聚合、分类等编排处理,获得每个待迁移任务的关联信息。In the disclosed embodiment, the collected information may be split, aggregated, classified, and arranged to obtain associated information of each task to be migrated.

S903:指标校验规则配置。S903: Configure indicator verification rules.

本公开实施例中,可以基于待迁移任务的关联信息,筛选出需校验的第一指标,并按照预设板块类型,将第一指标分类到对应的板块类型中,并且本公开实施例中针对不同板块类型和第一指标,可以配置相应的指标校验规则。In the embodiment of the present disclosure, the first indicator to be verified can be screened out based on the associated information of the task to be migrated, and the first indicator can be classified into the corresponding block type according to the preset block type. In addition, in the embodiment of the present disclosure, corresponding indicator verification rules can be configured for different block types and first indicators.

S904:指标差异校验结果计算。S904: Calculate the indicator difference verification result.

具体地,获取第一指标在第一数据模型中的第一数据和在第二数据模型中的第二数据,并根据指标校验规则,确定第一数据和第二数据之间的第一差异校验结果。Specifically, first data of the first indicator in the first data model and second data in the second data model are obtained, and a first difference verification result between the first data and the second data is determined according to the indicator verification rule.

S905:生成风险评估报告。S905: Generate a risk assessment report.

其中,风险评估报告中至少包括每个待迁移任务对应的第一风险等级。The risk assessment report at least includes the first risk level corresponding to each task to be migrated.

具体地,可以根据第一指标对应的第一差异校验结果和风险参数信息,确定第一指标的风险分值,并根据第一指标的风险分值,确定待迁移任务的第一风险等级。Specifically, the risk score of the first indicator may be determined according to the first difference verification result and risk parameter information corresponding to the first indicator, and the first risk level of the task to be migrated may be determined according to the risk score of the first indicator.

另外,如图9所示,还可以基于人工所设置的特殊字段比对标准等信息,输入风险评估模型进行风险评估,可以提高风险评估准确性。In addition, as shown in FIG9 , risk assessment can also be performed by inputting risk assessment models based on information such as special field comparison standards set manually, thereby improving the accuracy of risk assessment.

S906:生成迁移脚本。S906: Generate a migration script.

本公开实施例中,在确定待迁移任务的第一风险等级小于预设等级的情况下,即可以直接生成迁移脚本,从而基于迁移脚本,进行迁移。In the embodiment of the present disclosure, when it is determined that the first risk level of the task to be migrated is less than the preset level, a migration script can be directly generated, so that migration is performed based on the migration script.

进一步地,在确定待迁移任务的第一风险等级大于或等于预设等级的情况下,还可以对风险指标进行定位和跟踪,相应进行适配性调整,降低迁移风险。Furthermore, when it is determined that the first risk level of the task to be migrated is greater than or equal to the preset level, the risk indicator can be located and tracked, and adaptive adjustments can be made accordingly to reduce the migration risk.

S907:基于迁移脚本,进行迁移。S907: Perform migration based on the migration script.

本公开实施例中,可以针对待迁移任务进行信息采集、编排汇总、指标校验规则配置、指标差异校验结果计算、风险评估和迁移等处理,并且需校验的指标来源是针对待迁移任务本身实际线上执行、下游字段和数据的传递使用情况,自动化采集,提高了效率,对于风险评估的全面性和准确性,并且迁移前进行风险评估,降低了迁移风险。In the disclosed embodiments, information collection, arrangement and summary, indicator verification rule configuration, indicator difference verification result calculation, risk assessment and migration can be performed for the tasks to be migrated, and the sources of the indicators to be verified are the actual online execution of the tasks to be migrated themselves, the transmission and use of downstream fields and data, and automated collection improves efficiency, the comprehensiveness and accuracy of risk assessment, and risk assessment is performed before migration to reduce migration risks.

需要说明的是,本公开实施例中数据迁移方法,对于应用场景并不进行限制,例如,数据仓库的升级改造项目、金融账务系统升级改造项目等,以数据仓库的升级改造项目为例,针对数据仓库在完成了新数据模型(即第二数据模型)的改造过程,配置了第二数据模型和第一数据模型的映射关系后,基于该映射关系采集待迁移任务的任务调度信息、任务执行信息、元数据等信息,并进行编排汇总,对采集的信息进行指标分类,根据指标校验规则,进行差异校验结果的计算,从而根据差异校验结果,确定待迁移任务的风险等级,最终生成风险评估报告,然后基于风险评估报告对下游的待迁移任务的迁移进行指导执行。It should be noted that the data migration method in the disclosed embodiment does not limit the application scenarios, for example, data warehouse upgrade and transformation projects, financial account system upgrade and transformation projects, etc. Taking the data warehouse upgrade and transformation project as an example, after the data warehouse completes the transformation process of the new data model (i.e., the second data model) and configures the mapping relationship between the second data model and the first data model, the task scheduling information, task execution information, metadata and other information of the task to be migrated are collected based on the mapping relationship, and the information is compiled and summarized. The collected information is classified by indicators, and the difference verification results are calculated according to the indicator verification rules. Therefore, according to the difference verification results, the risk level of the task to be migrated is determined, and finally a risk assessment report is generated, and then the migration of downstream tasks to be migrated is guided based on the risk assessment report.

这样,本公开实施例中,整个数据迁移过程,自动化执行,减少了迁移时间和成本,并且在迁移时先进行风险评估,迁移风险精准把控,可以高效快速并且准确地完成整个迁移项目。In this way, in the disclosed embodiment, the entire data migration process is automatically executed, which reduces the migration time and cost. In addition, risk assessment is performed first during migration, and migration risks are accurately controlled, so that the entire migration project can be completed efficiently, quickly and accurately.

可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.

此外,本公开还提供了数据迁移装置、电子设备、计算机可读存储介质,上述均可用来实现本公开提供的任一种数据迁移方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。In addition, the present disclosure also provides a data migration device, an electronic device, and a computer-readable storage medium, all of which can be used to implement any data migration method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be repeated here.

图10为本公开实施例提供的一种数据迁移装置的框图,参照图10,本公开实施例提供了一种数据迁移装置,该数据迁移装置包括:FIG10 is a block diagram of a data migration device provided by an embodiment of the present disclosure. Referring to FIG10 , an embodiment of the present disclosure provides a data migration device, the data migration device comprising:

获得模块1010,用于获得待迁移任务的第一指标,以及第一数据模型和第二数据模型的映射关系;An obtaining module 1010 is used to obtain a first indicator of the task to be migrated, and a mapping relationship between the first data model and the second data model;

风险评估模块1020,用于获取所述第一指标在所述第一数据模型中的第一数据,以及所述第一指标在所述第二数据模型中的第二数据,并根据指标校验规则,确定所述第一数据和所述第二数据之间的第一差异校验结果,根据所述第一差异校验结果,确定所述待迁移任务的第一风险等级;The risk assessment module 1020 is used to obtain first data of the first indicator in the first data model and second data of the first indicator in the second data model, and determine a first difference verification result between the first data and the second data according to an indicator verification rule, and determine a first risk level of the task to be migrated according to the first difference verification result;

迁移模块1030,用于根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中。The migration module 1030 is used to migrate the data to be migrated of the task to be migrated in the first data model to the second data model according to the first risk level and the mapping relationship.

一种可选实施例中,所述获得待迁移任务的第一指标之前,获得模块1010还用于:In an optional embodiment, before obtaining the first indicator of the task to be migrated, the obtaining module 1010 is further used to:

获取所述第一数据模型中多个任务的第一任务调度信息,以及所述第二数据模型中多个任务的第二任务调度信息;Acquire first task scheduling information of a plurality of tasks in the first data model, and second task scheduling information of a plurality of tasks in the second data model;

根据所述第一任务调度信息中的第一迁移标识和所述第二任务调度信息中的第二迁移标识,从所述多个任务中筛选出待迁移任务。Tasks to be migrated are screened out from the multiple tasks according to the first migration identifier in the first task scheduling information and the second migration identifier in the second task scheduling information.

一种可选实施例中,所述获得待迁移任务的第一指标时,获得模块1010用于:In an optional embodiment, when obtaining the first indicator of the task to be migrated, the obtaining module 1010 is used to:

获取所述待迁移任务针对所述第一数据模型的第一任务执行信息,以及针对所述第二数据模型的第二任务执行信息;Acquire first task execution information of the task to be migrated for the first data model, and second task execution information of the task to be migrated for the second data model;

根据所述第一任务执行信息,确定执行所述待迁移任务的第一数据表和第一字段;Determine, according to the first task execution information, a first data table and a first field for executing the task to be migrated;

根据所述第二任务执行信息,确定执行所述待迁移任务的第二数据表和第二字段;Determine, according to the second task execution information, a second data table and a second field for executing the task to be migrated;

获取所述第一数据表和所述第一字段的第一元数据,以及所述第二数据表和所述第二字段的第二元数据;Acquire first metadata of the first data table and the first field, and second metadata of the second data table and the second field;

根据所述第一任务调度信息和所述第二任务调度信息、所述第一数据表和所述第一字段、所述第二数据表和所述第二字段、所述第一元数据以及所述第二元数据,生成所述待迁移任务的关联信息;generating association information of the task to be migrated according to the first task scheduling information and the second task scheduling information, the first data table and the first field, the second data table and the second field, the first metadata and the second metadata;

根据预配置需校验的指标集,从所述关联信息中筛选出所述待迁移任务的第一指标。According to a preconfigured indicator set to be verified, the first indicator of the task to be migrated is filtered out from the associated information.

一种可选实施例中,所述根据所述第一差异校验结果,确定所述待迁移任务的第一风险等级时,风险评估模块1020用于:In an optional embodiment, when determining the first risk level of the task to be migrated according to the first difference verification result, the risk assessment module 1020 is used to:

获取所述第一指标的风险参数信息;Obtaining risk parameter information of the first indicator;

根据所述第一差异校验结果和所述风险参数信息,确定所述第一指标的风险分值;Determining a risk score of the first indicator according to the first difference verification result and the risk parameter information;

根据所述第一指标的风险分值,确定所述待迁移任务的第一风险等级。A first risk level of the task to be migrated is determined according to the risk score of the first indicator.

一种可选实施例中,所述根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中时,迁移模块1030用于:In an optional embodiment, when migrating the data to be migrated of the task to be migrated in the first data model to the second data model according to the first risk level and the mapping relationship, the migration module 1030 is used to:

在所述第一风险等级小于预设等级的情况下,根据所述映射关系,确定迁移规则;When the first risk level is lower than a preset level, determining a migration rule according to the mapping relationship;

根据所述迁移规则,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中。According to the migration rule, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model.

一种可选实施例中,所述根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中时,迁移模块1030用于:In an optional embodiment, when migrating the data to be migrated of the task to be migrated in the first data model to the second data model according to the first risk level and the mapping relationship, the migration module 1030 is used to:

在所述第一风险等级大于或等于预设等级的情况下,根据所述第一差异校验结果,从所述第一指标中筛选出符合差异条件的第二指标;When the first risk level is greater than or equal to a preset level, selecting a second indicator that meets a difference condition from the first indicator according to the first difference verification result;

根据预配置的降级处理策略,对所述第二指标的指标校验规则进行调整,得到调整后的指标校验规则;According to a preconfigured degradation processing strategy, adjusting the indicator verification rule of the second indicator to obtain an adjusted indicator verification rule;

获取所述第二指标在所述第一数据模型中的第三数据,以及所述第二指标在所述第二数据模型中的第四数据,并根据调整后的指标校验规则,确定所述第三数据和所述第四数据之间的第二差异校验结果;Acquire third data of the second indicator in the first data model, and fourth data of the second indicator in the second data model, and determine a second difference verification result between the third data and the fourth data according to the adjusted indicator verification rule;

根据所述第二差异校验结果,确定所述待迁移任务的第二风险等级;Determining a second risk level of the task to be migrated according to the second difference verification result;

在所述第二风险等级小于预设等级的情况下,根据所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中。When the second risk level is lower than a preset level, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model according to the mapping relationship.

一种可选实施例中,所述根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中时,迁移模块1030用于:In an optional embodiment, when migrating the data to be migrated of the task to be migrated in the first data model to the second data model according to the first risk level and the mapping relationship, the migration module 1030 is used to:

在所述第一风险等级大于或等于预设等级的情况下,发送提示信息,所述提示信息用于提示对风险等级进行调整;When the first risk level is greater than or equal to a preset level, sending a prompt message, wherein the prompt message is used to prompt to adjust the risk level;

接收基于所述提示信息所输入的调整信息,其中,所述调整信息中至少包括针对所述第一风险等级对应修改后的第三风险等级;receiving adjustment information input based on the prompt information, wherein the adjustment information at least includes a third risk level modified corresponding to the first risk level;

在所述第三风险等级小于预设等级的情况下,根据所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中。When the third risk level is lower than a preset level, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model according to the mapping relationship.

上述数据迁移装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above data migration device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

图11为本公开实施例提供的一种电子设备的框图。FIG. 11 is a block diagram of an electronic device provided in an embodiment of the present disclosure.

参照图11,本公开实施例提供了一种电子设备,该电子设备包括:至少一个处理器1101;至少一个存储器1102,以及一个或多个I/O接口1103,连接在处理器1101与存储器1102之间;其中,存储器1102存储有可被至少一个处理器1101执行的一个或多个计算机程序,一个或多个计算机程序被至少一个处理器1101执行,以使至少一个处理器1101能够执行上述的数据迁移方法。11 , an embodiment of the present disclosure provides an electronic device, which includes: at least one processor 1101; at least one memory 1102, and one or more I/O interfaces 1103, which are connected between the processor 1101 and the memory 1102; wherein the memory 1102 stores one or more computer programs that can be executed by at least one processor 1101, and the one or more computer programs are executed by at least one processor 1101 so that the at least one processor 1101 can execute the above-mentioned data migration method.

上述电子设备中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above electronic device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

本公开实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序在被处理器执行时实现上述的数据迁移方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。The present disclosure also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program implements the above-mentioned data migration method when executed by a processor. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.

本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述数据迁移方法。The embodiment of the present disclosure also provides a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above-mentioned data migration method.

本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读存储介质上,计算机可读存储介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules/units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读程序指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM)、静态随机存取存储器(SRAM)、闪存或其他存储器技术、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读程序指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing/processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and/or edge servers. The network adapter card or network interface in each computing/processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device.

用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

这里所描述的计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software DevelopmentKit,SDK)等等。The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Various aspects of the present disclosure are described herein with reference to the flowcharts and/or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and/or block diagram and the combination of each box in the flowchart and/or block diagram can be implemented by computer-readable program instructions.

这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions/actions specified in one or more boxes in the flowchart and/or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and/or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions/actions specified in one or more boxes in the flowchart and/or block diagram.

也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions/actions specified in one or more boxes in the flowchart and/or block diagram.

附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and/or flow chart, and the combination of the square boxes in the block diagram and/or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其他实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and/or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and/or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims (11)

1.一种数据迁移方法,其特征在于,包括:1. A data migration method, comprising: 获得待迁移任务的第一指标,以及第一数据模型和第二数据模型的映射关系;Obtaining a first indicator of the task to be migrated, and a mapping relationship between the first data model and the second data model; 获取所述第一指标在所述第一数据模型中的第一数据,以及所述第一指标在所述第二数据模型中的第二数据,并根据指标校验规则,确定所述第一数据和所述第二数据之间的第一差异校验结果;Acquire first data of the first indicator in the first data model, and second data of the first indicator in the second data model, and determine a first difference verification result between the first data and the second data according to an indicator verification rule; 根据所述第一差异校验结果,确定所述待迁移任务的第一风险等级;Determining a first risk level of the task to be migrated according to the first difference verification result; 根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中。According to the first risk level and the mapping relationship, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model. 2.根据权利要求1所述的数据迁移方法,其特征在于,所述获得待迁移任务的第一指标之前,所述方法还包括:2. The data migration method according to claim 1, characterized in that before obtaining the first indicator of the task to be migrated, the method further comprises: 获取所述第一数据模型中多个任务的第一任务调度信息,以及所述第二数据模型中多个任务的第二任务调度信息;Acquire first task scheduling information of a plurality of tasks in the first data model, and second task scheduling information of a plurality of tasks in the second data model; 根据所述第一任务调度信息中的第一迁移标识和所述第二任务调度信息中的第二迁移标识,从所述多个任务中筛选出待迁移任务。Tasks to be migrated are screened out from the multiple tasks according to the first migration identifier in the first task scheduling information and the second migration identifier in the second task scheduling information. 3.根据权利要求2所述的数据迁移方法,其特征在于,所述获得待迁移任务的第一指标,包括:3. The data migration method according to claim 2, wherein obtaining the first indicator of the task to be migrated comprises: 获取所述待迁移任务针对所述第一数据模型的第一任务执行信息,以及针对所述第二数据模型的第二任务执行信息;Acquire first task execution information of the task to be migrated for the first data model, and second task execution information of the task to be migrated for the second data model; 根据所述第一任务执行信息,确定执行所述待迁移任务的第一数据表和第一字段;Determine, according to the first task execution information, a first data table and a first field for executing the task to be migrated; 根据所述第二任务执行信息,确定执行所述待迁移任务的第二数据表和第二字段;Determine, according to the second task execution information, a second data table and a second field for executing the task to be migrated; 获取所述第一数据表和所述第一字段的第一元数据,以及所述第二数据表和所述第二字段的第二元数据;Acquire first metadata of the first data table and the first field, and second metadata of the second data table and the second field; 根据所述第一任务调度信息和所述第二任务调度信息、所述第一数据表和所述第一字段、所述第二数据表和所述第二字段、所述第一元数据以及所述第二元数据,生成所述待迁移任务的关联信息;generating association information of the task to be migrated according to the first task scheduling information and the second task scheduling information, the first data table and the first field, the second data table and the second field, the first metadata and the second metadata; 根据预配置需校验的指标集,从所述关联信息中筛选出所述待迁移任务的第一指标。According to a preconfigured indicator set to be verified, the first indicator of the task to be migrated is filtered out from the associated information. 4.根据权利要求1所述的数据迁移方法,其特征在于,所述根据所述第一差异校验结果,确定所述待迁移任务的第一风险等级,包括:4. The data migration method according to claim 1, wherein determining the first risk level of the task to be migrated according to the first difference verification result comprises: 获取所述第一指标的风险参数信息;Obtaining risk parameter information of the first indicator; 根据所述第一差异校验结果和所述风险参数信息,确定所述第一指标的风险分值;Determining a risk score of the first indicator according to the first difference verification result and the risk parameter information; 根据所述第一指标的风险分值,确定所述待迁移任务的第一风险等级。A first risk level of the task to be migrated is determined according to the risk score of the first indicator. 5.根据权利要求1-4任一项所述的数据迁移方法,其特征在于,所述根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中,包括:5. The data migration method according to any one of claims 1 to 4, characterized in that the step of migrating the data to be migrated of the task to be migrated in the first data model to the second data model according to the first risk level and the mapping relationship comprises: 在所述第一风险等级小于预设等级的情况下,根据所述映射关系,确定迁移规则;When the first risk level is lower than a preset level, determining a migration rule according to the mapping relationship; 根据所述迁移规则,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中。According to the migration rule, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model. 6.根据权利要求1-4任一项所述的数据迁移方法,其特征在于,所述根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中,包括:6. The data migration method according to any one of claims 1 to 4, characterized in that the step of migrating the data to be migrated of the task to be migrated in the first data model to the second data model according to the first risk level and the mapping relationship comprises: 在所述第一风险等级大于或等于预设等级的情况下,根据所述第一差异校验结果,从所述第一指标中筛选出符合差异条件的第二指标;When the first risk level is greater than or equal to a preset level, selecting a second indicator that meets a difference condition from the first indicator according to the first difference verification result; 根据预配置的降级处理策略,对所述第二指标的指标校验规则进行调整,得到调整后的指标校验规则;According to a preconfigured degradation processing strategy, adjusting the indicator verification rule of the second indicator to obtain an adjusted indicator verification rule; 获取所述第二指标在所述第一数据模型中的第三数据,以及所述第二指标在所述第二数据模型中的第四数据,并根据调整后的指标校验规则,确定所述第三数据和所述第四数据之间的第二差异校验结果;Acquire third data of the second indicator in the first data model, and fourth data of the second indicator in the second data model, and determine a second difference verification result between the third data and the fourth data according to the adjusted indicator verification rule; 根据所述第二差异校验结果,确定所述待迁移任务的第二风险等级;Determining a second risk level of the task to be migrated according to the second difference verification result; 在所述第二风险等级小于预设等级的情况下,根据所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中。When the second risk level is lower than a preset level, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model according to the mapping relationship. 7.根据权利要求1-4任一项所述的数据迁移方法,其特征在于,所述根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中,包括:7. The data migration method according to any one of claims 1 to 4, characterized in that the step of migrating the data to be migrated of the task to be migrated in the first data model to the second data model according to the first risk level and the mapping relationship comprises: 在所述第一风险等级大于或等于预设等级的情况下,发送提示信息,所述提示信息用于提示对风险等级进行调整;When the first risk level is greater than or equal to a preset level, sending a prompt message, wherein the prompt message is used to prompt to adjust the risk level; 接收基于所述提示信息所输入的调整信息,其中,所述调整信息中至少包括针对所述第一风险等级对应修改后的第三风险等级;receiving adjustment information input based on the prompt information, wherein the adjustment information at least includes a third risk level modified corresponding to the first risk level; 在所述第三风险等级小于预设等级的情况下,根据所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中。When the third risk level is lower than a preset level, the data to be migrated of the task to be migrated in the first data model is migrated to the second data model according to the mapping relationship. 8.一种数据迁移装置,其特征在于,包括:8. A data migration device, comprising: 获得模块,用于获得待迁移任务的第一指标,以及第一数据模型和第二数据模型的映射关系;An acquisition module, used to obtain a first indicator of the task to be migrated, and a mapping relationship between the first data model and the second data model; 风险评估模块,用于获取所述第一指标在所述第一数据模型中的第一数据,以及所述第一指标在所述第二数据模型中的第二数据,并根据指标校验规则,确定所述第一数据和所述第二数据之间的第一差异校验结果,根据所述第一差异校验结果,确定所述待迁移任务的第一风险等级;a risk assessment module, configured to obtain first data of the first indicator in the first data model and second data of the first indicator in the second data model, and determine a first difference verification result between the first data and the second data according to an indicator verification rule, and determine a first risk level of the task to be migrated according to the first difference verification result; 迁移模块,用于根据所述第一风险等级和所述映射关系,将所述待迁移任务在所述第一数据模型中的待迁移数据迁移至所述第二数据模型中。A migration module is used to migrate the data to be migrated of the task to be migrated in the first data model to the second data model according to the first risk level and the mapping relationship. 9.一种电子设备,其特征在于,包括:9. An electronic device, comprising: 至少一个处理器;以及at least one processor; and 与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein, 所述存储器存储有可被所述至少一个处理器执行的一个或多个计算机程序,所述一个或多个计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1-7中任一项所述的数据迁移方法。The memory stores one or more computer programs executable by the at least one processor, and the one or more computer programs are executed by the at least one processor so that the at least one processor can perform the data migration method according to any one of claims 1 to 7. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序在被处理器执行时实现如权利要求1-7中任一项所述的数据迁移方法。10. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the data migration method according to any one of claims 1 to 7. 11.一种计算机程序产品,其特征在于,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行如权利要求1-7中任一项所述的数据迁移方法。11. A computer program product, characterized in that it includes a computer-readable code, or a non-volatile computer-readable storage medium carrying a computer-readable code, and when the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the data migration method as described in any one of claims 1-7.
CN202410374006.9A 2024-03-28 2024-03-28 Data migration method, device, electronic device, storage medium and product Pending CN118656357A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410374006.9A CN118656357A (en) 2024-03-28 2024-03-28 Data migration method, device, electronic device, storage medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410374006.9A CN118656357A (en) 2024-03-28 2024-03-28 Data migration method, device, electronic device, storage medium and product

Publications (1)

Publication Number Publication Date
CN118656357A true CN118656357A (en) 2024-09-17

Family

ID=92702877

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410374006.9A Pending CN118656357A (en) 2024-03-28 2024-03-28 Data migration method, device, electronic device, storage medium and product

Country Status (1)

Country Link
CN (1) CN118656357A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119088760A (en) * 2024-11-07 2024-12-06 联想凌拓科技有限公司 Method, device, equipment, medium and product for data migration

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119088760A (en) * 2024-11-07 2024-12-06 联想凌拓科技有限公司 Method, device, equipment, medium and product for data migration
CN119088760B (en) * 2024-11-07 2025-02-18 联想凌拓科技有限公司 Method, apparatus, device, medium and product for data migration

Similar Documents

Publication Publication Date Title
US11163731B1 (en) Autobuild log anomaly detection methods and systems
Kosińska et al. Toward the observability of cloud-native applications: The overview of the state-of-the-art
US9135559B1 (en) Methods and systems for predictive engine evaluation, tuning, and replay of engine performance
US11263188B2 (en) Generation and management of an artificial intelligence (AI) model documentation throughout its life cycle
EP3975482B1 (en) Quantitative network testing framework for 5g and subsequent generation networks
US10963232B2 (en) Constructing and enhancing a deployment pattern
US8495583B2 (en) System and method to determine defect risks in software solutions
US9037552B2 (en) Methods for analyzing a database and devices thereof
US11314553B2 (en) Method, apparatus, and computer program product for determining usage change rate of storage system
CN110275861A (en) Data storage method and device, storage medium, electronic device
US9706005B2 (en) Providing automatable units for infrastructure support
US20220206786A1 (en) Code library selection management
US10713070B2 (en) Systems and methods for capturing and visualizing user interactions across devices
CN111522729A (en) Method, device and system for determining rule release
CN118656357A (en) Data migration method, device, electronic device, storage medium and product
US12282419B2 (en) Re-usable web-objects for use with automation tools
US20230289241A1 (en) Automatic data pipeline generation
JP7305641B2 (en) Methods and systems for tracking application activity data from remote devices and generating corrective behavior data structures for remote devices
CN119987829A (en) Automated code review method, computer and storage medium
WO2025130478A1 (en) Intelligent evaluation method and apparatus for mobile phone applications
CN115033639A (en) Method and related device for generating relation graph for data sharing among clusters
CN103714066B (en) Template-based database analyzer
US12242437B2 (en) Automated determination of accurate data schema
CN116401140A (en) Data processing method, device, equipment, readable medium and software product
US20250258756A1 (en) Automation tool for entity manipulation language (eml) scenarios

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination