Data migration method and device, electronic equipment and readable medium

Through the use of preset migration configuration tables and synchronization details tables, data migration is systematic and controllable, solving the problems of low migration efficiency and poor traceability in the existing technology, and improving the efficiency and reliability of data migration. .

CN118820201APending Publication Date: 2024-10-22BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310410937.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-17
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

Existing data migration solutions cannot achieve automated migration that is configurable, traceable, flow-limiting, retryable, and interruptible, and lacks systematization and optimization during the migration process, resulting in low data migration efficiency, high risk, and traceability. Difference.

Method used

Determine the numerical range of the data to be migrated through the preset migration configuration table, generate a heterogeneous bottom table of data, abstract data features as configuration information, summarize and generate a migration configuration table, perform data migration based on the configuration information, and record the migration in the synchronization details table As a result, data traceability and controllability are achieved.

Benefits of technology

It improves the efficiency, reliability and traceability of data migration, provides a systematic migration plan, reduces human intervention, reduces migration risks, and achieves controllability of the migration process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118820201A_ABST
    Figure CN118820201A_ABST
Patent Text Reader

Abstract

The invention provides a data migration method and device, electronic equipment and a readable medium, and the data migration method comprises the steps that the numerical range of heterogeneous data to be migrated is determined according to a preset migration configuration table, and the migration configuration table is used for recording attribute information of the data to be migrated; and according to a migration process of the migration configuration table, pulling the heterogeneous data corresponding to the numerical range and storing the heterogeneous data to the immigration object. Through the embodiment of the invention, the traceability of the migrated data is improved, and the reliability and efficiency of the data migration scheme are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Currently, data migration (also known as hierarchical storage management, hierarchical storage management, referred to as HSM) is a technology that integrates offline storage and online storage.

[0003] In the related art, data migration is the archiving process of moving rarely used or unused files to auxiliary storage systems. These files are usually image documents or historical information that need to be easily accessed at any time in the future.

[0004] However, the existing migration solutions have at least the following technical defects:

[0005] (1) Most migration solutions cannot simultaneously achieve the effects of configurable, traceable, throttling, retryable, and interruptible automated migration.

[0006] (2) There is no systematic solution and optimization. There are few solutions for the persistence and automation of the migration process. There are too many processes that require human intervention, which increases the probability of errors and increases the risk of data migration. This makes the entire migration process uncontrollable and the migration effect poor.

[0007] (3) After migration, if data comparison or unexpected situations are found, the traceability capability is poor, and the impact and source cannot be estimated. It is impossible to systematically identify all data that does not meet expectations and process this data separately.

[0008] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0009] The purpose of the present disclosure is to provide a data migration method, device, electronic device and readable medium, which are used to overcome the problems of low data migration efficiency caused by the limitations and defects of related technologies at least to a certain extent.

[0010] According to a first aspect of an embodiment of the present disclosure, a data migration method is provided, including: determining a numerical range of heterogeneous data to be migrated according to a preset migration configuration table, wherein the migration configuration table is used to record attribute information of the data to be migrated; and pulling the heterogeneous data corresponding to the numerical range according to the migration process of the migration configuration table and storing it in the migration-in object.

[0011] In an exemplary embodiment of the present disclosure, before determining the value range of the heterogeneous data to be migrated according to the preset migration configuration table, the method further includes:

[0012] Generate a corresponding data heterogeneous base table according to the data to be migrated, wherein the data heterogeneous base table stores the heterogeneous data to be migrated;

[0013] Abstracting the characteristics of the data to be migrated into configuration information;

[0014] The configuration information is aggregated to generate a corresponding migration configuration table, wherein the attribute information includes at least one of a heterogeneous data range field, a heterogeneous data migration range field, whether the configuration information of the data to be migrated is valid, and migration status information of the data to be migrated.

[0015] In an exemplary embodiment of the present disclosure, pulling heterogeneous data corresponding to the value range and storing it in the migration object according to the migration process of the migration configuration table includes:

[0016] Scanning item information corresponding to the data to be migrated;

[0017] Parsing the item information to determine sku information;

[0018] Filter the sku information to obtain the effective configuration information;

[0019] Call RPC to write the execution data range corresponding to the effective configuration information into the migration configuration table;

[0020] The data to be migrated is migrated from the migration-out object to the migration-in object according to the execution data range.

[0021] In an exemplary embodiment of the present disclosure, filtering sku information to obtain effective configuration information includes:

[0022] Filter the sku information to obtain configuration information;

[0023] Determining whether the configuration information of the data to be migrated is valid;

[0024] If it is determined that the configuration information of the data to be migrated is valid, determining to execute migration of the data to be migrated;

[0025] If it is determined that the configuration information of the data to be migrated is invalid, it is determined not to perform the migration of the data to be migrated,

[0026] The configuration information includes at least one of a mapping from an outgoing object to an incoming object, a value range of the data heterogeneous base table, a value range of data to be migrated, and whether the migration configuration is effective or not.

[0027] In an exemplary embodiment of the present disclosure, it further includes:

[0028] Detect whether the unique identification information of the data to be migrated already exists in the synchronization details table;

[0029] If the unique identification information of the data to be migrated already exists in the synchronization details table, comparing whether the data to be migrated is consistent with the migrated data;

[0030] If the data to be migrated is consistent with the migrated data, determining not to migrate the data to be migrated;

[0031] If the data to be migrated is inconsistent with the migrated data, determining to migrate the data to be migrated, and inserting a record of the modification type into the synchronization details table;

[0032] If the unique identification information of the data to be migrated does not exist in the synchronization details table, inserting the unique identification information of the data to be migrated into the synchronization details table,

[0033] The unique identification information includes at least one of department, project, site, sku and record creation type.

[0034] In an exemplary embodiment of the present disclosure, it further includes:

[0035] Scan the synchronization details table to determine the field to which the item corresponding to the data to be migrated belongs;

[0036] The data to be migrated is migrated according to the synchronization details table, and a migration result is recorded, wherein the migration result includes the field area.

[0037] In an exemplary embodiment of the present disclosure, it further includes:

[0038] comparing the data to be migrated and the migrated data to see whether they are consistent based on the unique identification information in the synchronization details table;

[0039] If it is determined that the data to be migrated is consistent with the migrated data, then the migration is confirmed to be successful;

[0040] If it is determined that the data to be migrated is inconsistent with the migrated data, the migration failure is confirmed, and an instruction to migrate the data to be migrated is generated again.

[0041] According to a second aspect of an embodiment of the present disclosure, there is provided a data migration device, including:

[0042] a determination module, configured to determine a value range of the heterogeneous data to be migrated according to a preset migration configuration table, wherein the migration configuration table is used to record attribute information of the data to be migrated;

[0043] The migration module is configured to pull the heterogeneous data corresponding to the value range according to the migration process of the migration configuration table and store it in the migration-in object.

[0044] According to a third aspect of the present disclosure, there is provided an electronic device, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute any one of the methods described above based on instructions stored in the memory.

[0045] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a program is stored, and when the program is executed by a processor, the data migration method as described in any one of the above items is implemented.

[0046] The disclosed embodiment provides a systematic data migration solution by determining the numerical range of heterogeneous data to be migrated according to a preset migration configuration table, and pulling the heterogeneous data corresponding to the numerical range according to the migration process of the migration configuration table and storing it in the migration-in object, thereby improving the efficiency, reliability and traceability of data migration.

[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0049] Figure 1 A schematic diagram showing an exemplary system architecture to which a data migration solution according to an embodiment of the present invention can be applied;

[0050] Figure 2 is a flow chart of a data migration method in an exemplary embodiment of the present disclosure;

[0051] Figure 3 is a flow chart of another data migration method in an exemplary embodiment of the present disclosure;

[0052] Figure 4 is a flow chart of another data migration method in an exemplary embodiment of the present disclosure;

[0053] Figure 5 is a flow chart of another data migration method in an exemplary embodiment of the present disclosure;

[0054] Figure 6is a flow chart of another data migration method in an exemplary embodiment of the present disclosure;

[0055] Figure 7 is a flow chart of another data migration method in an exemplary embodiment of the present disclosure;

[0056] Figure 8 is a flow chart of another data migration method in an exemplary embodiment of the present disclosure;

[0057] Fig. 9 is a schematic diagram of a system architecture of a data migration solution in an exemplary embodiment of the present disclosure;

[0058] Fig.10 is a flow chart of another data migration method in an exemplary embodiment of the present disclosure;

[0059] Fig.11 is a flow chart of another data migration method in an exemplary embodiment of the present disclosure;

[0060] Fig.12 is a block diagram of a data migration device in an exemplary embodiment of the present disclosure;

[0061] Fig.13 is a block diagram of an electronic device in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0062] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0063] In addition, the accompanying drawings are only schematic diagrams of the present disclosure, and the same reference numerals in the drawings represent the same or similar parts, so their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities, which do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0064] Figure 1 A schematic diagram showing an exemplary system architecture to which the data migration solution according to an embodiment of the present invention can be applied is shown.

[0065] like Figure 1 As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0066] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.

[0067] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, etc.

[0068] In some embodiments, the data migration method provided in the embodiments of the present invention is generally performed by the server 105, and accordingly, the data migration device is generally set in the terminal device 103 (or the terminal device 101 or 102). In other embodiments, some terminals may have functions similar to those of the server device to perform the method.

[0069] The exemplary embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0070] Figure 2 is a flow chart of a data migration method in an exemplary embodiment of the present disclosure.

[0071] refer to Figure 2 , data migration methods may include:

[0072] Step S202: determining a value range of the heterogeneous data to be migrated according to a preset migration configuration table, wherein the migration configuration table is used to record attribute information of the data to be migrated.

[0073] Step S204: Pull heterogeneous data corresponding to the value range and store it in the migration object according to the migration process of the migration configuration table.

[0074] The disclosed embodiment provides a systematic data migration solution by determining the numerical range of heterogeneous data to be migrated according to a preset migration configuration table, and pulling the heterogeneous data corresponding to the numerical range according to the migration process of the migration configuration table and storing it in the migration-in object, thereby improving the efficiency, reliability and traceability of data migration.

[0075] The following describes each step of the data migration method in detail.

[0076] In an exemplary embodiment of the present disclosure, Figure 3 As shown, before determining the value range of the heterogeneous data to be migrated according to the preset migration configuration table, the following steps are also included:

[0077] Step S302: Generate a corresponding data heterogeneous base table according to the data to be migrated, wherein the data heterogeneous base table stores the heterogeneous data to be migrated.

[0078] Step S304: abstracting the characteristics of the data to be migrated into configuration information.

[0079] Step S306, summarizing the configuration information to generate a corresponding migration configuration table, wherein the attribute information includes at least one of a heterogeneous data range field, a heterogeneous data migration range field, whether the configuration information of the data to be migrated is valid, and migration status information of the data to be migrated.

[0080] In an exemplary embodiment of the present disclosure, Figure 4 As shown, pulling heterogeneous data corresponding to the value range and storing it in the migration object according to the migration process of the migration configuration table includes:

[0081] Step S402: Scan the item information corresponding to the data to be migrated.

[0082] Step S404: parsing the item information to determine sku (Stock Keeping Unit) information.

[0083] Step S406: Filter the sku information to obtain effective configuration information.

[0084] Step S408, calling RPC (Remote Procedure Call Protocol) to write the execution data range corresponding to the effective configuration information into the migration configuration table.

[0085] Step S410 , migrating the data to be migrated from the migration-out object to the migration-in object according to the execution data range.

[0086] In an exemplary embodiment of the present disclosure, Figure 5As shown, filtering the sku information to obtain the effective configuration information includes:

[0087] Step S502: Filter the sku information to obtain configuration information.

[0088] Step S504: determine whether the configuration information of the data to be migrated is valid.

[0089] Step S506: If it is determined that the configuration information of the data to be migrated is valid, then it is determined to execute the migration of the data to be migrated.

[0090] Step S508: If it is determined that the configuration information of the data to be migrated is invalid, then it is determined not to perform the migration of the data to be migrated.

[0091] The configuration information includes at least one of a mapping from an outgoing object to an incoming object, a value range of the data heterogeneous base table, a value range of data to be migrated, and whether the migration configuration is effective or not.

[0092] In an exemplary embodiment of the present disclosure, Figure 6 As shown, the data migration method further includes:

[0093] Step S602: Detect whether the unique identification information of the data to be migrated already exists in the synchronization details table.

[0094] Step S604: if the unique identification information of the data to be migrated already exists in the synchronization details table, then compare the data to be migrated with the migrated data to see whether they are consistent.

[0095] Step S606: If the data to be migrated is consistent with the migrated data, it is determined not to migrate the data to be migrated.

[0096] Step S608: If the data to be migrated is inconsistent with the migrated data, it is determined to migrate the data to be migrated, and a record of the modification type is inserted into the synchronization details table.

[0097] Step S610: If the unique identification information of the data to be migrated does not exist in the synchronization details table, the unique identification information of the data to be migrated is inserted into the synchronization details table, wherein the unique identification information includes at least one of department, project, site, sku and record creation type.

[0098] In an exemplary embodiment of the present disclosure, Figure 7 As shown, the data migration method further includes:

[0099] Step S702: Scan the synchronization details table to determine the field to which the item corresponding to the data to be migrated belongs.

[0100] Step S704: Migrate the data to be migrated according to the synchronization details table and record a migration result, wherein the migration result includes the field area.

[0101] In an exemplary embodiment of the present disclosure, Figure 8 As shown, the data migration method further includes:

[0102] Step S802: comparing the data to be migrated with the migrated data to see whether they are consistent based on the unique identification information in the synchronization details table.

[0103] Step S804: If it is determined that the data to be migrated is consistent with the migrated data, then the migration is confirmed to be successful.

[0104] Step S806: If it is determined that the data to be migrated is inconsistent with the migrated data, the migration failure is confirmed, and an instruction to migrate the data to be migrated is generated again.

[0105] like Fig. 9 As shown, taking commodity information as data to be migrated, the architecture 900 of the data migration solution of the embodiment of the present disclosure is specifically described.

[0106] The design principles of the data migration solution of the embodiment of the present disclosure include:

[0107] Configurable: Which department data to migrate out can be configured in the configuration table.

[0108] Traceability: The details table records the synchronization process.

[0109] Current limitable: The configuration center controls the synchronization speed.

[0110] Retryable: The configuration center configures the number of retries, or manually inserts data through the details table to retry.

[0111] Interruptible: The configuration center configures whether to interrupt the execution.

[0112] A synchronization configuration table is created based on the type information in the product information, as shown in Table 1.

[0113] Record creation type: 1 Initialization, 2 New, 3 Product Update, 4 Base Price Update. The trigger condition type for inserting data into the synchronization details table, the biased product dimension, and the category commission.

[0114] Record data types: 1 Purchase (commodity + price), 2 Commission (commodity + price), 3 Category commission, which are distinguished by this identifier.

[0115] Product type: 1 self-operated, 2 pop.

[0116] Furthermore, a synchronization details table is generated according to the synchronization process, and the data to be synchronized is heterogeneously stored in the table. Then, the worker scans the table to complete the synchronization. The role of the record creation type is to take into account the scenario where subsequent incremental changes also need to be synchronized incrementally. The scenarios of incremental changes include adding new products or editing products, which are similar to zipper tables, and skuIds will be repeated.

[0117] The indexes of the synchronization details table include: departNo+projectid+buId+skuId, departNo+projectid+buId+firstCategory+secondCategroy+thirdCategory+br and.

[0118] As shown in Table 1, the header of the synchronization details table may include "id, departNo, projectId, buId, skuId, firstCategory, secondCategory, thirdCategory, brand, synchronization status (0 not synchronized, 1 synchronization successful, 2 synchronization failed), synchronization time, synchronization return result, record creation type (1 initialization, 2 new creation, 3 product update, 4 base price update), record data type (1 purchase, 2 commission, 3 category commission), record data source (1 self-operated 2 POP), creation time, modification time, wjDetail, bmallDetail", and other attributes include "json format" and "salesperson, sales position, whether channelized", etc., but are not limited to these.

[0119] In an exemplary embodiment of the present disclosure, the specific steps of the data migration solution based on the synchronization details table are as follows: Fig.10 As shown:

[0120] Step S1002, obtaining the data to be synchronized.

[0121] Step S1004, query B mall data.

[0122] Step S1006, determine whether the B mall data exists, if it exists, execute step S1014, if it does not exist, execute step S1008.

[0123] Step S1008, insert B mall data.

[0124] Step S1010, judging the processing result of inserting the B mall data, if the insertion is successful, executing step S1012, if the insertion fails, executing step S1014.

[0125] Table 1

[0126]

[0127] Step S1012, synchronization details table update result: synchronization successful.

[0128] Step S1014, synchronization details table update result: already exists.

[0129] Furthermore, a synchronization progress statistics table is generated based on the synchronization results. The statistics of the synchronization results include which departments and projects have synchronized how many records to which fields, including id, departNo, projectId, buId, record data type (1 procurement, 2 commission, 3 category commission), number of successful synchronizations, number of failed synchronizations, creation time and modification time, but not limited to these.

[0130] In an exemplary embodiment of the present disclosure, the specific steps of the data migration solution based on the comparison details table are as follows: Fig.11 As shown:

[0131] Step S1102, obtaining the data to be compared.

[0132] Step S1104, query B mall data.

[0133] Step S1106, determine whether the B mall data exists, if it exists, execute step S1108, if it does not exist, execute step S1114.

[0134] Step S1108, compare the data to see if they are consistent, if they are consistent, execute step S1112, if they are inconsistent, execute step S1110.

[0135] Step S1110, modify B mall data.

[0136] Step S1112, comparison details table update result: comparison / update successful.

[0137] Step S1114, compare the update results of the details table: to be synchronized.

[0138] like Fig. 9 As shown in the figure, based on the synchronization configuration table, synchronization details table, and synchronization progress statistics table, the steps of the data migration solution include:

[0139] 1. Obtain information about the department to be migrated and the site to be migrated from the migration team: obtain the embedded configuration of the migration team; the synchronization configuration is to synchronize only one item at a time.

[0140] 2. Insert into the synchronization configuration table through JSF. JavaServer Faces (JSF) is a standard framework for building Java Web applications (JSR-127 standard stipulated by Java Community Process). It provides a component-centric user interface (UI) construction method, thus simplifying the development of Java server-side applications.

[0141] 3. Message monitoring: monitor full messages and monitor incremental messages.

[0142] 4. The products that need to be migrated to the department are inserted into the data synchronization table.

[0143] Check whether the record exists in the details table. The only conditions are: department, project, site, skuId, and record creation type: if it does not exist, insert it; if it exists, compare the data for consistency; if it is consistent, ignore the record; if it is inconsistent, insert a record of the modification type; if it exists, insert a new update record.

[0144] 4.1. Before synchronization, traverse the base table to find out the products that already exist in Mall B, either in the market or in the sub-channel, and mark them. The subsequent synchronization and comparison process will ignore this part of the data.

[0145] 5. Worker 1 scans the synchronization details table, synchronizes to the product platform according to the field and synchronization status, and fills in the synchronization results; queries the configuration table before worker execution; current limiting control; determines whether it is interrupted, and stops the loop execution if it is interrupted; queries the records to be synchronized according to the configuration; queries the product platform records to determine whether they exist; if they exist, the synchronization result is that Mall B already exists; if they do not exist, insert the product platform and update the synchronization status to successful synchronization. If it fails (the number of retries is reached), the reason for the failure is recorded.

[0146] 6. Synchronous scanning of the synchronization details table: compare the data of Mall B with the synchronization status according to the field, department and product type; query the product data in Mall B; if it does not exist, update the synchronization status to pending synchronization; if it exists, compare the data in the details table with the data of Mall B; if the comparison is consistent, the update status comparison is successful; if the comparison is inconsistent, update the data of Mall B once, and the update status is updated successfully.

[0147] 7. Worker 2 scans the synchronization details table, counts the current synchronization progress, and summarizes it in the statistics table.

[0148] 8. Testing.

[0149] 9. After the test passes, change the synchronization configuration and synchronize the entire data.

[0150] In an exemplary embodiment of the present disclosure, the external interface dependencies of the data migration solution include:

[0151] 1. When there is no purchase price for the purchased goods, query the JD.com minimum price interface.

[0152] 2. Purchase goods, query, add and modify.

[0153] 3. Query, add and modify commission products.

[0154] 4. Category commission, query, add and modify.

[0155] Only insert non-existent data, do not modify existing data, check back after insertion, and call the modification interface if there is inconsistency.

[0156] In an exemplary embodiment of the present disclosure, all data to be synchronized are heterogeneously stored in the data synchronization details table, and each piece of data contains all the information required for data synchronization. The table is designed as a department and commodity basic information field, and the commodity extended attributes are stored in a field in Json format, plus synchronization status, time result, wjDetail and bmallDetail and other fields that record the synchronization process are used to identify the synchronization process and traceability. The process of synchronizing the base table is divided into two steps: scanning the commodity table to send a full message and consuming commodity messages to add base table data.

[0157] In an exemplary embodiment of the present disclosure, the jmq decoupling technology is used to asynchronously drop the commodity data into the bottom table. Before commodity data is added or updated to the bottom table, a series of data assembly is required. In order to improve system efficiency and facilitate control, the use of asynchrony makes the operations of the two tables (data source and data synchronization details table) not interfere with each other. The step time of scanning the data source is significantly shorter. When the sent message is consumed, the consumption rate and interruption of heterogeneous data falling into the data synchronization details table can be controlled.

[0158] First, scan the product table to be synchronized (data source to be migrated) and send a full set of product messages. The message body structure is consistent with the data source table structure, and one message is sent for one sku.

[0159] Secondly, after the consumer parses the message body, it filters the sku. Query the configuration table (cache) and determine in turn whether the current message (product information) has a configuration that is currently in effect. This step needs to determine: whether the current product information has a review status of passed, whether the current product meets the product type constraint (purchase / commission) in the configuration, whether the current product meets the product source constraint (self-operated / POP) in the configuration, and whether the current product meets the product first-level category constraint in the configuration. If the current product information does not have a matching configuration, it means that this product is not the target product we need to synchronize, and the message processing is completed.

[0160] Finally, the sku supplementary information, query the price, store, shelf and delisting information required for synchronization, and the extended information field falls into the synchronization details table as a data. The synchronization status of this data is 0, which indicates that it is not synchronized.

[0161] The above operation is for the synchronization of stock information, that is, data that already exists in the data source. For incremental data, that is, changes in product data after initial synchronization from the data source to the bottom table, the embodiment of the present disclosure sets a switch. The switch refers to a judgment logic in the code, which is implemented using the configuration center. When the switch is turned on, the bottom table supports updates, that is, if a piece of product information exists in the bottom table, the system will obtain the latest product data to update the bottom table. When the switch is turned off, the products that already exist in the bottom table do not support updates and no operation is performed.

[0162] The synchronization data step of the embodiment of the present disclosure refers to synchronizing the data written in the previous step or the data expected to be synchronized in the synchronization data table to the target system according to the configuration. The synchronization data step can be divided into two parts. One is to encapsulate the expected data to be synchronized into a message and send it out, and the other end receives and consumes the message for synchronization. The specific steps are as follows:

[0163] First, the data to be synchronized is pulled from the data synchronization details table through worker timing or manual triggering, and an MQ message is sent and counted with a counter. Each time a message is sent, the counter increases by one. In the embodiment of the present disclosure, manual triggering is achieved through a page button.

[0164] Secondly, pull the effective configuration and synchronize each configuration. In the core step of synchronization, first read the synchronization range data of the current configuration to determine whether the id in the data synchronization details table is specified in the configuration. If yes, then after pulling the data, send the current data message and the process ends. If no id is specified, then determine the data range to be synchronized based on the configured department and field fields and pull it.

[0165] Finally, the following judgment is made for each piece of data: If a limit on the number of synchronized data is configured, determine whether the current counter exceeds the limit. If so, the process ends. If the synchronization status of the data is not pending synchronization, it is discarded. If the product type or product source is configured, the data is discarded if it does not meet the requirements. After the entire process is completed, all the expected data messages to be synchronized are sent.

[0166] Corresponding to the above method embodiments, the present disclosure also provides a data migration device, which can be used to execute the above method embodiments.

[0167] Fig.12 is a block diagram of a data migration device in an exemplary embodiment of the present disclosure.

[0168] refer to Fig.12 , the data migration device 1200 may include:

[0169] The determination module 1202 is configured to determine a value range of the heterogeneous data to be migrated according to a preset migration configuration table, where the migration configuration table is used to record attribute information of the data to be migrated.

[0170] The migration module 1204 is configured to pull the heterogeneous data corresponding to the value range according to the migration process of the migration configuration table and store it in the migration-in object.

[0171] In an exemplary embodiment of the present disclosure, before determining the numerical range of heterogeneous data to be migrated according to a preset migration configuration table, the determination module 1202 is further configured to: generate a corresponding data heterogeneous base table according to the data to be migrated, wherein the heterogeneous data to be migrated is stored in the data heterogeneous base table; abstract the characteristics of the data to be migrated into configuration information; summarize the configuration information to generate a corresponding migration configuration table, wherein the attribute information includes at least one of a heterogeneous data range field, a heterogeneous data migration range field, whether the configuration information of the data to be migrated is valid, and migration status information of the data to be migrated.

[0172] In an exemplary embodiment of the present disclosure, the migration module 1204 is also configured to: scan the item information corresponding to the data to be migrated; parse the item information to determine the sku information; filter the sku information to obtain the effective configuration information; call RPC to write the execution data range corresponding to the effective configuration information into the migration configuration table; migrate the data to be migrated from the migration-out object to the migration-in object according to the execution data range.

[0173] In an exemplary embodiment of the present disclosure, the migration module 1204 is also configured to: filter the sku information to obtain configuration information; determine whether the configuration information of the data to be migrated is valid; if it is determined that the configuration information of the data to be migrated is valid, determine to execute the migration of the data to be migrated; if it is determined that the configuration information of the data to be migrated is invalid, determine not to execute the migration of the data to be migrated, wherein the configuration information includes at least one of a mapping from an out-of-migration object to an in-migration object, a numerical range of the data heterogeneous base table, a numerical range of the data to be migrated, and a migration configuration taking effect and a migration configuration being invalid.

[0174] In an exemplary embodiment of the present disclosure, the data migration device 1200 is also used to: detect whether the unique identification information of the data to be migrated already exists in the synchronization details table; if the unique identification information of the data to be migrated already exists in the synchronization details table, compare whether the data to be migrated is consistent with the data that has been migrated; if the data to be migrated is consistent with the data that has been migrated, determine not to migrate the data to be migrated; if the data to be migrated is inconsistent with the data that has been migrated, determine to migrate the data to be migrated, and insert a record of the modification type into the synchronization details table; if the unique identification information of the data to be migrated does not exist in the synchronization details table, insert the unique identification information of the data to be migrated into the synchronization details table, wherein the unique identification information includes at least one of the department, project, site, sku and record creation type.

[0175] In an exemplary embodiment of the present disclosure, the data migration device 1200 is also used to: scan the synchronization details table to determine the site to which the items corresponding to the data to be migrated belong; migrate the data to be migrated according to the synchronization details table, and record the migration result, which includes the site.

[0176] In an exemplary embodiment of the present disclosure, the data migration device 1200 is also used to: compare whether the data to be migrated and the data that has been migrated are consistent based on the unique identification information in the synchronization details table; if it is determined that the data to be migrated and the data that has been migrated are consistent, confirm that the migration is successful; if it is determined that the data to be migrated and the data that has been migrated are inconsistent, confirm that the migration has failed, and generate an instruction to migrate the data to be migrated again.

[0177] Since the functions of the device 1200 have been described in detail in the corresponding method embodiments, the present disclosure will not elaborate on them here.

[0178] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0179] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0180] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0181] Refer to the following Fig.13 An electronic device 1300 according to this embodiment of the present invention is described. Fig.13 The electronic device 1300 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0182] like Fig.13 As shown, the electronic device 1300 is in the form of a general computing device. The components of the electronic device 1300 may include but are not limited to: at least one processing unit 1310, at least one storage unit 1320, and a bus 1330 connecting different system components (including the storage unit 1320 and the processing unit 1310).

[0183] The storage unit stores program codes, which can be executed by the processing unit 1310, so that the processing unit 1310 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 1310 can perform the method shown in the embodiment of the present disclosure.

[0184] The storage unit 1320 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 13201 and / or a cache storage unit 13202 , and may further include a read-only storage unit (ROM) 13203 .

[0185] The storage unit 1320 may also include a program / utility 13204 having a set (at least one) of program modules 13205, such program modules 13205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0186] Bus 1330 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0187] The electronic device 1300 may also communicate with one or more external devices 1340 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1300, and / or communicate with any device that enables the electronic device 1300 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1350. Furthermore, the electronic device 1300 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1360. As shown, the network adapter 1360 communicates with other modules of the electronic device 1300 via a bus 1330. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0188] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0189] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0190] The program product for implementing the above method according to an embodiment of the present invention can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0191] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0192] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0193] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0194] The program code for performing the operation of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages, such as Java, C++, etc., and also conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed completely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device, partially on the remote computing device, or completely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).

[0195] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be, for example, migrated or asynchronously executed in multiple modules.

[0196] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and concept of the present disclosure are indicated by the claims.

Claims

1. A data migration method, It is characterized in that include: Determining a value range of the heterogeneous data to be migrated according to a preset migration configuration table, wherein the migration configuration table is used to record attribute information of the data to be migrated; According to the migration process of the migration configuration table, the heterogeneous data corresponding to the value range is pulled and stored in the migration object.

2. The data migration method according to claim 1, It is characterized in that Before determining the value range of the heterogeneous data to be migrated according to the preset migration configuration table, the following steps are also included: Generate a corresponding data heterogeneous base table according to the data to be migrated, wherein the data heterogeneous base table stores the heterogeneous data to be migrated; Abstracting the characteristics of the data to be migrated into configuration information; The configuration information is aggregated to generate a corresponding migration configuration table, wherein the attribute information includes at least one of a heterogeneous data range field, a heterogeneous data migration range field, whether the configuration information of the data to be migrated is valid, and migration status information of the data to be migrated.

3. The data migration method according to claim 2, It is characterized in that Pulling heterogeneous data corresponding to the value range and storing it in the migration object according to the migration process of the migration configuration table includes: Scanning item information corresponding to the data to be migrated; Parsing the item information to determine sku information; Filter the sku information to obtain the effective configuration information; Calling RPC to write the execution data range corresponding to the effective configuration information into the migration configuration table; The data to be migrated is migrated from the migration-out object to the migration-in object according to the execution data range.

4. The data migration method according to claim 3, It is characterized in that Filtering sku information to obtain effective configuration information includes: Filter the sku information to obtain configuration information; Determining whether the configuration information of the data to be migrated is valid; If it is determined that the configuration information of the data to be migrated is valid, determining to execute migration of the data to be migrated; If it is determined that the configuration information of the data to be migrated is invalid, it is determined not to perform the migration of the data to be migrated, The configuration information includes at least one of a mapping from an outgoing object to an incoming object, a value range of the data heterogeneous base table, a value range of data to be migrated, and whether the migration configuration is effective or not.

5. The data migration method according to any one of claims 1 to 4, It is characterized in that Also includes: Detect whether the unique identification information of the data to be migrated already exists in the synchronization details table; If the unique identification information of the data to be migrated already exists in the synchronization details table, comparing whether the data to be migrated is consistent with the migrated data; If the data to be migrated is consistent with the migrated data, determining not to migrate the data to be migrated; If the data to be migrated is inconsistent with the migrated data, determining to migrate the data to be migrated, and inserting a record of the modification type into the synchronization details table; If the unique identification information of the data to be migrated does not exist in the synchronization details table, inserting the unique identification information of the data to be migrated into the synchronization details table, The unique identification information includes at least one of department, project, site, sku and record creation type.

6. The data migration method according to claim 5, It is characterized in that Also includes: Scan the synchronization details table to determine the field to which the item corresponding to the data to be migrated belongs; The data to be migrated is migrated according to the synchronization details table, and a migration result is recorded, wherein the migration result includes the field area.

7. The data migration method according to claim 5, It is characterized in that Also includes: comparing the data to be migrated and the migrated data to see whether they are consistent based on the unique identification information in the synchronization details table; If it is determined that the data to be migrated is consistent with the migrated data, then the migration is confirmed to be successful; If it is determined that the data to be migrated is inconsistent with the migrated data, the migration failure is confirmed, and an instruction to migrate the data to be migrated is generated again.

8. A data migration device, It is characterized in that include: a determination module, configured to determine a value range of the heterogeneous data to be migrated according to a preset migration configuration table, wherein the migration configuration table is used to record attribute information of the data to be migrated; The migration module is configured to pull the heterogeneous data corresponding to the value range according to the migration process of the migration configuration table and store it in the migration-in object.

9. An electronic device, It is characterized in that include: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the data migration method according to any one of claims 1 to 7 based on instructions stored in the memory.

10. A computer-readable storage medium having a program stored thereon, wherein when the program is executed by a processor, the data migration method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Data migration method, device and system

    CN110765069A

  • Method, system and equipment for batch migration of big data tables between databases and medium

    CN114153813A

  • Data migration method and device for heterogeneous database and computer readable medium

    CN114281798A

  • Data migration method and device, electronic equipment and storage medium

    CN115599769A