Method, system, electronic device and computer-readable storage medium for handling data collisions
The method addresses data collision issues in business service systems by comparing and processing data tables to ensure smooth migration, enhancing update efficiency and reducing developer workload.
Patent Information
- Application Number
- JP2025502414
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-07-18
- Filing Date
- 2023-05-31
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2043-05-31
AI Technical Summary
In complex business service systems, configuration data release to a target environment often fails due to unique key conflicts, missing foreign keys, and database field changes, leading to inefficient updates and increased developer workload.
A method involving a business configuration module, derivation module, and introduction module to handle data conflicts by comparing data tables in the configuration and target environments, generating a data description file, and performing necessary data processing to ensure smooth data migration.
Ensures smooth release of configuration data to the target environment, reducing the risk of data collision failures and improving the efficiency of business service updates without requiring developer intervention.
Smart Images

Figure 2025525551000001_ABST
Abstract
Description
[Technical Field]
[0001] This application claims priority to a Chinese patent application filed with the China Patent Office on July 18, 2022, bearing application number 202210842930.6 and entitled "Method, system, electronic device and computer-readable storage medium for handling data collisions," the entire contents of which are incorporated herein by reference.
[0002] The present invention relates to the field of computer technology, and more particularly to a method, system, electronic device and computer-readable storage medium for handling data collisions. [Background technology]
[0003] In some highly integrated and complex business service systems, in order to isolate and manage the security of configuration data set according to business needs, the configuration data is usually set in a pre-established independent configuration environment. For example, in an insurance business system, a business analyst providing insurance contract services may need to set configuration data according to business needs, including insurance products, insurance plans, premium tables, insurance policy generation rules, translations, code tables, index configurations, etc. These configuration data must first be set in an independent configuration environment and then released to the target environment running the insurance business system using a data migration tool.
[0004] However, during the process of releasing configuration data to the target environment, problems such as unique key conflicts or corresponding database field changes often occur between the corresponding business data tables in the configuration environment and the target environment. 1) The version of the configuration environment is higher than that of the target environment. In the data migration process, if you only release the configuration data but do not upgrade the application or corresponding database to the target environment, the database fields used in the configuration environment will be missing in the target environment. 2) The main key of the data table in the target environment for the same business data has already been modified, which causes a collision between the unique key of the data table for the non-configuration data awaiting release in the configuration environment and the corresponding business data in the target environment; 3) The foreign key data corresponding to some data in the configuration data does not exist in the target environment, causing the configuration data to be missing. For example, in the insurance business audit field, the accounting auditor "Zhang San" does not exist in the target environment. Includes.
[0005] Due to the above problems, during the process of releasing configuration data, some scripts in the data migration tool may fail to run, thus preventing the process of releasing configuration data to the target environment from being completed successfully, further increasing the workload of developers. Summary of the Invention [Problem to be solved by the invention]
[0006] The embodiments of the present application provide a method, system, electronic device, and computer-readable storage medium for handling data conflicts, which solve the problem of configuration data release failure due to data conflicts, ensure that configuration data in a configuration environment is released smoothly to a target environment, ensure that configuration data is migrated smoothly from the configuration environment to the target environment, and improve the efficiency of business service updates and releases. [Means for solving the problem]
[0007] According to a first aspect, an embodiment of the present invention provides a method for handling data conflicts used in a system having a business configuration module, a derivation module running in a configuration environment, and a deployment module running in a target environment, the method comprising: a step of the business configuration module responding to the detected derivation operation and sending a derivation request for target configuration data to the derivation module, the target configuration data being data generated by a user setting parameters for a business service provided by the system; a derivation module responding to the derivation request by obtaining target configuration data and a data description file generated corresponding to the target configuration data, and sending the data description file to the business configuration module, the data description file including descriptions of source datasets related to the target configuration data and association relationships between data tables in each source dataset; the business configuration module responding to the detected release operation by sending the received configuration data, the data description file, and a release request to the installation module; The method for handling data conflicts includes the steps of: an introduction module responding to a release request, determining a processing result for data in a data table having a data conflict in the target environment based on a data description file, and applying the received target configuration data to the processed data in the data table.
[0008] That is, when the configuration data set for the corresponding business service in the business service system, such as related data such as the set insurance products, insurance plans, premium tables, insurance policy generation rules, etc., needs to be released to the target environment for processing the front-end business data, the system can first compare the data contents of the data tables of each dataset related to the target configuration data in the target environment with the data contents of the data tables of each dataset related to the configuration data in the configuration environment, and then perform corresponding processing on the data tables with conflicts in the target environment, and then introduce the configuration data that needs to be released into the target environment.
[0009] In this way, it is possible to ensure that the configuration data is smoothly released to the target environment, and release failures caused by conflicts in the data contents of some data tables between the target environment and the configuration environment will not occur, thereby improving the efficiency of updating business services. In addition, the above technical measures are convenient for business operators, and do not require the involvement of developers. Business operators can independently complete the process of setting up business-related configuration data and releasing the corresponding configuration data, thereby improving the management efficiency of business operators.
[0010] In one possible embodiment of the above first aspect, the derivation module includes preset configuration data derivation rules, and the derivation module responds to a derivation request and generates a data description file corresponding to the target configuration data based on the derivation rules.
[0011] The derivation rule may be, for example, a preset template of a data description file, which defines the content of the data description file required to be generated when deriving the configuration data. The format of the data description file may be, for example, an XML file, and is not limited here.
[0012] In one possible embodiment of the above first aspect, the derivation rule includes at least pre-establishing at least one association relationship for each data table in the configuration environment database, and determining, for each pre-established association relationship, a base table corresponding to a business service provided to the system.
[0013] In one possible embodiment of the first aspect above, the base table and the associated data table in each association relationship are related via a foreign key.
[0014] In one possible embodiment of the above first aspect, determining a processing result for data in a data table having a data conflict in the target environment based on the data description file includes: an introduction module acquiring a target dataset corresponding to each source dataset from the target environment database based on a description of the association relationships between the data tables in each source dataset in the data description file, wherein the association relationships between the data tables in the target dataset match the description of the association relationships between the data tables in the corresponding source dataset; and the introduction module comparing the target dataset with the corresponding source dataset, and determining a processing result for data in the data table having a data conflict in the target environment based on the comparison result.
[0015] In one possible embodiment of the first aspect, comparing the target dataset with the corresponding source dataset and determining a processing result for data in a data table having a data conflict in the target environment based on the comparison result includes: determining that if the unique key of the target dataset base table matches the unique key of the source dataset base table and the main key of the target dataset base table matches the main key of the source dataset base table, and if the source dataset base table and the target dataset base table contain other fields that do not match, to update the data content of the target dataset base table with the data content of the source dataset base table; If the unique key of the target dataset base table matches the unique key of the source dataset base table, but the main key of the target dataset base table does not match the main key of the source dataset base table, determine to update the data content of the target dataset base table with the data content of the source dataset base table, and modify the main key of the target dataset base table to the main key of the source dataset base table; determining that if the unique key of the target dataset base table does not match the unique key of the source dataset base table and the target dataset base table does not have a first field corresponding to the unique key of the source dataset base table, insert the first field into the target dataset base table to update the data content of the unique key field in the source dataset base table into the target dataset base table; If the unique key of the target dataset base table does not match the unique key of the source dataset base table and the source dataset base table does not have a second field corresponding to the unique key of the source dataset base table, determining to delete the second field and the data content in the second field from the target dataset base table.
[0016] It may be understood that, under the condition that the unique key of the target dataset base table matches the unique key of the source dataset base table and the main key of the target dataset base table matches the main key of the source dataset base table, if there are other fields that do not match between the source dataset base table and the target dataset base table, it is necessary to further determine whether to re-update the contents of the target dataset base table. Here, the other fields that do not match refer to a situation where the values of other fields do not match but the corresponding field names are the same, i.e., the values of fields with the same names are different. In this way, it is possible to avoid the situation where the data contents need to be updated when all other fields in the source dataset base table and the target dataset base table match, thereby saving data processing resources and improving the efficiency of releasing configuration data.
[0017] It should also be understood that the above "first field" and "second field" are merely descriptions of fields corresponding to unique keys under different execution conditions, and both refer to fields in the target dataset base table that correspond to the unique keys of the source dataset base table.
[0018] In one possible embodiment of the above first aspect, comparing the target dataset with the corresponding source dataset and determining a processing result for data in a data table having a data conflict in the target environment based on the comparison result further includes: determining, if a unique key is not defined in the target dataset base table, to set the main key of the target dataset base table as the unique key of the target dataset base table.
[0019] In some embodiments, when comparing the source dataset and the target dataset, for example, first determine whether a unique key is defined in the base table of the target dataset, and then further determine the unique keys and main keys of the base tables of the source dataset and the target dataset, thereby ensuring a more comprehensive analysis of the data content of the base table of the target dataset, which is beneficial to the effectiveness and accuracy of the comparison.
[0020] In one possible embodiment of the above first aspect, comparing the target dataset with the corresponding source dataset and determining a processing result for data in a data table having a data conflict in the target environment based on the comparison result further includes: comparing the data content of the associated data table in the target dataset with the data content of the associated data table in the source data table based on a foreign key in the target dataset base table; and determining a processing result for the data content of the associated data table in the target dataset based on the comparison result.
[0021] In one possible embodiment of the first aspect, determining a processing result of the data content of the associated data table in the target dataset based on the comparison result includes: determining that if the unique key of the related data table in the target dataset matches the unique key of the related data table in the source dataset and the main key of the related data table in the target dataset matches the main key of the related data table in the source dataset, and if the related data table in the source dataset and the related data table in the target dataset contain other fields that do not match, to update the data content of the related data table in the target dataset with the data content of the related data table in the source dataset; If the unique key of the related data table in the target dataset is consistent with the unique key of the related data table in the source dataset, but the main key of the related data table in the target dataset is not consistent with the main key of the related data table in the source dataset, determine to update the data content of the related data table in the target dataset with the data content of the related data table in the source dataset, and modify the main key of the related data table in the target dataset with the main key of the related data table in the source dataset; determining that if the unique key of the related data table in the target dataset does not match the unique key of the related data table in the source dataset, and the related data table in the target dataset does not have a third field corresponding to the unique key of the related data table in the source dataset, insert a third field into the related data table in the target dataset, and update the data content in the unique key field in the related data table in the source dataset into the related data table in the target dataset; determining, if the unique key of the related data table in the target dataset does not match the unique key of the related data table in the source dataset and the related data table in the source dataset does not have a fourth field corresponding to the unique key of the related data table in the source dataset, to delete the fourth field and the data content in the fourth field from the related data table in the target dataset.
[0022] The process of comparing the related data tables is the process of updating the data contents in each data table in the target data set in a cascade manner as described in the following embodiments, and the description thereof is omitted here.
[0023] It may be understood that, under the condition that the unique key of the related dataset in the target dataset matches the unique key of the related dataset in the source dataset and the main key of the related dataset in the target dataset matches the main key of the related dataset in the source dataset, if there are other fields that do not match between the related dataset in the source dataset and the related dataset in the target dataset, it is necessary to further determine that the content of the related dataset in the target dataset needs to be updated again. Here, the other fields that do not match refer to a situation where the values of other fields do not match and the corresponding field names are the same, i.e., the values of fields with the same names are different. In this way, the situation where the data content needs to be updated when all other fields of the related dataset in the source dataset and the related dataset in the target dataset match can be avoided, thereby saving data processing resources and improving the efficiency of releasing configuration data.
[0024] It should also be understood that the above "third field" and "fourth field" are merely descriptions of fields corresponding to unique keys under different execution conditions, and both refer to fields in the target dataset base table that correspond to the unique keys of the source dataset base table.
[0025] According to a second aspect, an embodiment of the present application provides a business service system including a business configuration module, a derivation module, and an introduction module, wherein the business configuration module is used to send a derivation request for target configuration data to the derivation module in response to a detected derivation operation, the target configuration data being data generated by a user setting parameters for a business service provided by the system, and the business configuration module is used to send the received configuration data and a data description file to the introduction module in response to a detected release operation; The derivation module is used to respond to a derivation request sent from the business configuration module, obtain target configuration data and a data description file generated corresponding to the target configuration data, and send them to the business configuration module, the data description file including descriptions of source datasets related to the target configuration data and association relationships between data tables in each source dataset; The introduction module is used to determine the processing result for the data in the data table having data conflicts in the target environment based on the data description file, and apply the received target configuration data to the data in the data table after processing.
[0026] According to a third aspect, an embodiment of the present application provides an electronic device comprising one or more processors and one or more memories, wherein one or more programs are stored in the one or more memories, and the one or more programs, when executed by the one or more processors, cause the electronic device to perform the method for handling data collisions provided in the first aspect above.
[0027] According to a fourth aspect, embodiments of the present application provide a computer-readable storage medium comprising computer programs / instructions which, when executed by a processor, implement the method for handling data collisions provided in the first aspect above. [Brief explanation of the drawings]
[0028] [Figure 1] FIG. 1 shows a scene in which business-related configuration data is released in a target environment. [Figure 2] FIG. 2 is a diagram showing a scene in which business-related configuration data is released in a target environment provided by an embodiment of the present invention. [Figure 3] FIG. 3 is a flow chart illustrating the implementation of the method for handling data collisions provided by the embodiment of the present invention. [Figure 4]FIG. 4 is a diagram showing the determination and processing flow of data collisions related to step 310 in the flow shown in FIG. [Figure 5] FIG. 5 is a schematic diagram of the data set provided by the present embodiment. [Figure 6] FIG. 6 is a schematic diagram of a business service system provided by the embodiment of the present invention. [Figure 7] FIG. 7 is a schematic diagram of the configuration of a server provided in the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0029] In order to facilitate understanding of the technical solutions provided by the embodiments of the present application, the meanings of some terms in the relevant fields related to the embodiments of the present application will be explained below.
[0030] (1) A database is used to store large amounts of data entities, and database design refers to the process of normalizing and structuring the data entities and the relationships between these data entities in a database.
[0031] (2) A data table consists of three parts: the table name, the fields in the table, and the table records. Designing a data table structure (hereinafter referred to as table structure) means defining the data table file name, determining which fields are included in the data table, and the field name, field type, and width of each field, and then inputting this data into a computer.
[0032] (3) A dataset refers to a collection of multiple interrelated data tables.
[0033] (4) A base table is a base table in a dataset that is associated with other data tables via a foreign key.
[0034] (5) A primary key refers to one column or a combination of columns in a data table, the value of which can uniquely identify each row in the table.
[0035] (6) Unique key refers to a unique identifier field set up to identify the corresponding business field according to business needs. For example, in some insurance policy data tables, the main key may be an identification code (e.g., ID) set for each user in the data table, and the unique key may be set up as the ID number or name of the policyholder in the data table.
[0036] (7) A foreign key refers to a field in one data table that is used to relate to another data table. One data table can be related to the main key of another table through a foreign key, so as to realize a relationship with the other data table and further obtain the contents, such as field text, in the other data table, or insert, delete, change / modify the related data contents in the other table.
[0037] Wherein, if another data table related via a foreign key is a child table of the current data table, the current data table is a parent table of the other related data table.
[0038] In form data, the main key uniquely identifies each record in the data table, the foreign key can be understood as a duplicate of the main key, is copied from the parent table, and is used to establish the relationship between the parent table and the child table, and the unique key ensures the uniqueness of a value in the data table.
[0039] (8) Cascading means creating a relationship between one data table and one or more other data tables in a form, allowing the form to clearly display its related data in a hierarchical view.
[0040] In order to make the objectives, technical means and advantages of the present embodiment clearer, the technical means provided by the present embodiment will be described in detail below in conjunction with the drawings in the specification and specific embodiments.
[0041] FIG. 1 shows a scene in which business-related configuration data is released in a target environment.
[0042] As shown in Figure 1, the scenario includes a terminal and a server, where the configuration server provides a configuration environment for installing business-related configuration data, and the business server provides a target environment for running a business service system. The business service system running in the target environment may be, for example, an insurance business system. The configuration environment may have the same configuration parameters and database as the target environment, so as to provide a simulated target environment for developers to install corresponding configuration data based on business needs feedback from business analysts.
[0043] Referring to the scenario shown in Figure 1, if a business analyst needs to set up business-related configuration data according to business deployment needs, the analyst must first set (or write) the corresponding business configuration data in the corresponding configuration page provided in the configuration environment so that the application on the business service system can be executed in the target environment. After that, the developer must use a data migration tool such as Flyway or Liquibase to release the configuration data in the configuration environment to the target environment.
[0044] Based on the scenario shown in Figure 1 above, as mentioned above, currently, in the process of releasing configuration data to the target environment, there are problems such as unique key collisions or corresponding database field changes between the corresponding business data tables in the configuration environment and the target environment, which will result in the configuration data failing to be released to the target environment, which will increase the workload of developers to complete the configuration data release and reduce the efficiency of the configuration data release.
[0045] To solve the above technical problems, the present application provides a data conflict handling method. Specifically, the method predefines the association relationships between data tables in a configuration environment and defines a base table in a dataset formed by the interrelated data tables. Based on the predefined association relationships and base table, a configuration data derivation rule can be predefined, for example, a data description file template can be predefined to define the content of a data description file that needs to be generated when deriving the configuration data. In this way, when the configuration data needs to be released to a target environment, the configuration data and the corresponding generated data description file can be introduced into the target environment together, and data conflicts between the target environment and the configuration environment can be identified based on the data description file. Furthermore, based on the identified data conflict, the method first performs corresponding data processing on the data in the corresponding data table in the target environment, and then applies the configuration data to the processed data table in the target environment to complete the process of releasing the configuration data to the target environment.
[0046] Wherein, the data description file generated when configuring data may include datasets formed by base tables and associated data tables related to the configured data, table files describing the association relationships of the data tables in each dataset, and derivation conditions corresponding to each dataset, etc., and the base tables and associated data tables may be obtained from the configuration environment database based on the above-defined association relationships and base tables.
[0047] In this way, the configuration data in the configuration environment can be smoothly released to the target environment, thereby avoiding the problem of configuration data release failure due to data collision, ensuring smooth migration of configuration data from the configuration environment to the target environment, and enabling corresponding business services to provide corresponding services based on the related configuration data that is loaded or updated.
[0048] In addition, based on the technical solution of the present application, the business service system can add a release operation related widget to the configuration page for setting business-related configuration data. In this way, after the user completes the setting of the corresponding business configuration data on the configuration page, he can directly perform the release operation to release the configuration data to the target environment, which greatly improves the configuration data release efficiency, reduces the developer's workload, and facilitates the operation of the operator.
[0049] In addition, the above-mentioned business personnel and developers may be understood to be users of the management system of the business service system, that is, such users manage the business services provided to the business service system and set corresponding configuration data for business-related modules.
[0050] Wherein, the configuration data may be generated based on the user's installation operation on the corresponding configuration page before the user triggers the data derivation process. For example, the user can install the configuration data of the corresponding business on the configuration page provided in the business service system executed in the configuration environment. Taking the configuration data of the insurance business as an example, as mentioned above, the configuration data may include contents such as insurance products, insurance plans, premium tables, insurance policy generation rules, translations, code tables, index structures, etc. After completing the installation of the configuration data of the corresponding business on the configuration page, or when other configuration data needs to be introduced into the target environment, the user can select to derive the configuration data on the configuration page, for example, by clicking the data derivation button on the configuration page.
[0051] In some embodiments, the configuration environment may run on a configuration / release server, and the target environment may run on a business server, such as an insurance business server. In other embodiments, the configuration environment and the target environment may run on the same server, although this is not a limitation.
[0052] Moreover, the database corresponding to the configuration environment and the database corresponding to the target environment have the same data table resources, providing data support for the business service system running in each environment. Therefore, each data set (hereinafter referred to as source data) matched from the database corresponding to the configuration environment based on the data description file can be matched with the corresponding data table and data table field contents in the target environment (hereinafter referred to as target data), and fields such as unique keys and main keys in the matched target data can be compared to determine whether a data conflict exists. The data conflict may include, for example, a situation where the unique keys of the corresponding data tables in the source data and the target data match and the main keys match, or a situation where the unique keys of the corresponding data tables in the source data and the target data match but the main keys do not match.
[0053] In the process of introducing the configuration data into the target environment, the various data conflict situations are determined, and then the corresponding data processing is performed on the relevant data tables in the target environment according to the determination results, and the process of introducing the configuration data into the target environment can be completed. The specific data conflicts and the data processing process on the corresponding target data sets will be described in detail later, and will not be described here.
[0054] FIG. 2 is a diagram showing a scene in which business-related configuration data is released in a target environment according to an embodiment of the present invention.
[0055] 2, the scenario includes a terminal 100a, a terminal 100b, a configuration server 200a, and a business server 200b, where the user of the terminal 100a may be a developer, and the user of the terminal 100b may be a business analyst.
[0056] A developer can access the configuration server 200a via the terminal 100a and set derivation rules in advance in the configuration environment provided by the configuration server 200a. For example, the developer may predefine the association relationships between the data tables in the configuration environment and define the base tables in the dataset formed by the associated data tables. Furthermore, the developer may define derivation rules for deriving configuration data. The derivation rules may restrict the need to generate and derive a data description file corresponding to the configuration data when deriving the configuration data.
[0057] For example, in a configuration environment, an XML-type data description file template may be pre-defined, and the template may define the content of a data description file to be generated when deriving configuration data. The file content may include at least one dataset related to the configuration data and a table file describing the relationships between data tables in each dataset. Each dataset may include a base table and other data tables related to the base table. The table file may record the names of the base table and related data tables in each dataset, as well as related parameters such as main keys, unique keys, and foreign keys. The description file may also include derivation conditions for each dataset, such as an ID corresponding to the parent table at the highest level in each dataset.
[0058] In this way, after the business analyst accesses the configuration environment of the configuration server 200a through the terminal 100b and completes the installation of the corresponding business configuration data, he or she can initiate a derivation operation of the corresponding configuration data through the terminal 100b, thereby matching the configuration data in the configuration environment with the corresponding data set according to the preset data description file, and then generating a source data packet together with the configuration data and the data description file and returning it to the terminal 100b.Furthermore, the business analyst can initiate a release operation to release the data packet containing the acquired configuration data and related data set to the target environment provided by the business server 200b, thereby applying the configuration data to the business service system executed in the target environment.
[0059] 2, when a business analyst initiates a derivation operation through terminal 100b, terminal 100b may call a derivation API of the configuration environment to send request parameters for corresponding configuration data to configuration server 200a, where the request parameters may include, for example, the name of the data set that needs to be derived and parameters that meet the derivation conditions of the corresponding data set, where the derived data set is related to the configuration data to be derived. When a business analyst initiates a release operation through terminal 100b, terminal 100b may call an introduction API of the target environment to send the data packet and derivation request to configuration server 200b, thereby triggering a release process such as determining whether data conflicts in the target environment exist, performing corresponding data processing, and completing the application of the configuration data in the target environment. This will be described in detail later and will not be repeated here.
[0060] 2, the data conflict handling means according to the embodiment of the present application can effectively simplify the process for a business analyst to configure corresponding business service data in a business service system. For example, without the need for developer intervention, the business analyst simply sets the configuration data in the corresponding configuration interface provided by the business service system and releases the configuration data to the target environment that executes the business process. The technical solution of the present application can effectively avoid the problem of configuration data release failure due to data conflict, thereby improving the user experience of users such as business analysts.
[0061] In addition, the data conflict handling means according to the present embodiment can effectively reduce the workload of developers. The developer only needs to write the data description file preset by code in the configuration environment in advance as the derivation rule, and then open the corresponding business configuration page to the business analyst, allowing him or her to set the configuration parameters independently. This can meet the needs of the business analyst to set configuration data according to business needs, and greatly improve the efficiency of setting configuration data related to business.
[0062] The business service system to which the data collision handling method according to the present embodiment is applied includes a functional module executed by a business server 200b and a functional module executed by a terminal 100b. In some other embodiments, the business server 200b may be another electronic device that has one or more processors built in or coupled to it, or that can access a network, such as a desktop computer, a laptop computer, a handheld computer, or a netbook, and the terminal 100b may be, for example, a desktop computer, a laptop computer, a tablet computer, a mobile phone, or other electronic device. This is not limiting.
[0063] The terminal 100a for setting the derivation rules in advance in the configuration environment provided to the configuration server 200a may be an electronic device such as a desktop personal computer, a notebook computer, a tablet computer, or a mobile phone, and the configuration server 200a may be a desktop personal computer, a laptop computer, a handheld computer, a netbook, or another electronic device that has one or more processors built in or coupled thereto, or that can access a network.
[0064] Based on the above scenario shown in Fig. 2, Fig. 3 is a diagram illustrating the implementation flow of the method for handling data collisions according to an embodiment of the present invention, where the flow shown in Fig. 3 mainly relates to interactions between the terminal 100b, the configuration server 200a, and the business server 200b.
[0065] Specifically, as shown in FIG. 3, the flow includes the following steps:
[0066] 301: The configuration server 200a obtains a template of a pre-configured data description file for the configuration environment.
[0067] For example, referring to the scenario shown in FIG. 2 , a developer may write code to pre-establish configuration data derivation rules in the configuration environment, for example, to define a data description file template for the configuration data to be derived. The data description file template may, for example, be an XML file that defines the table structure of a dataset, the relationships between data tables in the dataset, and the derivation conditions for the corresponding dataset. When defining the XML file, the developer may specify the XML file format by designing an XML schema definition. In this way, when different business-related configuration data are derived from the configuration server 200a, a source data packet can be generated using a unified XML file format and released to the target environment.
[0068] In the above-mentioned preset data description file, the table structure of the defined dataset refers to the structure of a statistical table that records and describes the name of each dataset, the name of each data table, fields, the relationship between the data tables in each dataset, base table data, derivation conditions, etc. The relationship between the data tables in each dataset may be specifically represented by the name and value of a foreign key. The database in which each data table in a dataset resides includes a database corresponding to the configuration environment and a database corresponding to the target environment, but is not limited thereto.
[0069] The definition of the association relationship of each data table in a dataset is used to determine the association relationship between the base table and each other data table in each dataset in the dataset table through a foreign key, where the base table is the parent table in the corresponding dataset, and the other data tables in the dataset are child tables at different levels of the base table. The main key, unique key, etc. of the base table in one dataset may be considered as the main key, unique key, etc. of the corresponding dataset. The name, main key, unique key, base table data, etc. of each defined dataset may be recorded in the table structure of the defined dataset.
[0070] Referring to the dataset 400 shown in Figure 4, data table A, which is located at the first level of the hierarchy from top to bottom, is the base table, data table B and data table C, which are located at the second level, are child tables of base table A, data table D and data table E, which are located at the third level, are child tables of data table B, and data table F is a child table of data table C, and data tables D, E, and F also belong to the child tables of base table A.
[0071] For example, in a data set corresponding to the configuration data of an insurance policy generation rule, base table A may be a data table that defines rule events. Correspondingly, data table B, which is a child table of data table A, may be a data table that defines rule drives. Data table C may be a data table that defines the type of rule events. Furthermore, data table D, which is a child table of data table B, may be a data table that defines rule groups, and the child tables of data table D may further be data tables that define rules in each rule group. This is not a limitation.
[0072] In one data set, the foreign key in the child table points to the main key in the parent table, and the parent table is the foreign key data table for the child table.
[0073] Furthermore, when creating a configuration page for business analysts to operate, developers can set the names and derivation conditions of each dataset in the dataset table defined above as options in advance, which makes it convenient for business analysts to check the corresponding datasets and derivation conditions as request parameters when operating the release of business-related data themselves.
[0074] The defined dataset derivation conditions are conditions for deriving a certain dataset, and the derivation conditions corresponding to different datasets may be different. For example, in an insurance business system, each lower sub-module of an insurance business configuration module may correspond to one dataset. For example, an insurance rule module may include a rule group sub-module, a rule sub-module, a rule event sub-module, etc., and different sub-modules may each have their corresponding datasets in the database, and these datasets may correspond to different derivation conditions. For example, a dataset corresponding to a rule sub-module may be derived based on a RuleId, a dataset corresponding to a rule group sub-module may be derived based on a GroupId, and a dataset corresponding to a rule event sub-module may be derived based on an EventId.
[0075] The derivation conditions may be set in simple parameters, such as the RuleId. Therefore, when deriving a dataset, there is no need to verify the derivation conditions through various calculations; the corresponding dataset can be derived simply by ensuring that the transmitted parameters meet the pre-set derivation conditions. If there is an error in the transmitted parameters when deriving a dataset, the dataset cannot be derived. For example, if the transmitted RuleId is 0000 when deriving a dataset, but there is no dataset with RuleId 0000 in the database, the corresponding derived dataset will be null.
[0076] Furthermore, after predefining the data description file in the configuration environment, for deriving or releasing the configuration data of different business processes, the developer does not need to configure or define the corresponding derivation rules, thereby reducing the developer's workload.
[0077] The design of the XML schema definition can be constrained by providing the derivation rules that define the criteria for matching the data set with the constituent data and the derivation conditions. For example, the designed XML schema definition can be <keys> , <columns> , <orders> , <exceptions>It may be defined that only the subtag is allowed to appear, and that if any other subtag appears, an error is reported. In this way, the probability of an error occurring when matching a dataset to configuration data can be reduced, and the efficiency of matching datasets can be improved.
[0078] In some other embodiments, in the configuration environment, presetting the configuration data derivation rules may be realized by structured query language (SQL), for example, by prewriting in a ".sql" file, but this is not limiting.
[0079] 302: The terminal 100b detects the derivation operation.
[0080] 2, the business analyst completes the configuration operation on the configuration page provided by the terminal 100b, and generates corresponding configuration data in the configuration server 200a. Then, the business analyst can display a corresponding derivation button on the configuration page of the terminal 100b. In this case, the business analyst can click the derivation button on the configuration page to trigger the terminal 100b to detect the derivation operation and send a derivation request to the configuration server 200a.
[0081] In some other embodiments, the business analyst may check the installed business-related configuration data and related data sets on the configuration page provided by the terminal 100b, and click the Derive button to cause the terminal 100b to send a derivation request to the configuration server 200a.
[0082] 303: The terminal 100b calls the derivation API and sends a derivation request to the configuration server 200a.
[0083] For example, the derivation request includes corresponding request parameters, such as the name of the dataset corresponding to the configuration data requiring release selected by the business analyst on the configuration page and the derivation conditions for the corresponding dataset. When the terminal 100b detects the derivation operation, it may call the derivation API provided by the configuration server 200a and send a derivation request to request the configuration server 200a to derive the configuration data requiring release. In response to the derivation request, the configuration server 200a may return a source data packet generated for the corresponding configuration data to the terminal 100b. This will be described in detail in steps 304 to 306 below, and will not be described here.
[0084] 304: The configuration server 200a generates a corresponding data description file based on the request parameters in the derived request.
[0085] For example, the configuration server 200a may match each dataset related to the configuration data to be released based on the request parameters in the derivation request, and then write the names, data table names, fields, and relationship of each matched dataset into a dataset table based on the definition of the dataset table structure in a preset data description file template, and then associate the dataset table with the relationship and derivation conditions of each data table in the dataset that have been predefined to generate a corresponding data description file.
[0086] In other words, the configuration server 200a may generate a data description file corresponding to the received request parameters based on the data description file template obtained in step 301 above.
[0087] 305: The configuration server 200a derives data in the relevant data table based on the generated data description file to generate a source data packet.
[0088] For example, the configuration server 200a may derive data in the relevant data tables in each data set from the configuration environment database based on the data description file generated in step 304. The data in the data tables may include fields in each data table and values for the corresponding fields, such as main keys and unique key values. For the data in each data table derived from the configuration environment database, the configuration server 200a may correspondingly generate a text file, such as a comma-separated values (CSV) file (also called a character-separated values file), to describe each data table. Furthermore, the configuration server 200a may packetize the data description file and the CSV file describing each data table to generate a source data packet.
[0089] 306: The configuration server 200a returns the source data packet to the terminal 100b.
[0090] Illustratively, the configuration server 200a may transmit the generated source data packet to the terminal 100b in response to a derivation request issued from the terminal 100b.
[0091] 307: The terminal 100b detects the release operation.
[0092] For example, after receiving the source data packet returned from the configuration server 200a, the terminal 100b may jump to a release page, and the business analyst may click a release button on the release page to perform a release operation. After detecting the release operation, the terminal 100b may send the received source data packet to the business server 200b and send a derivation request to the business server 200b.
[0093] 308: The terminal 100b calls the introduction API and transmits the source data packet and a release request to the business server 200b.
[0094] For example, when terminal 100b detects the release operation, it may call the introduction API provided by business server 200b, send a request to release the configuration data, i.e., a derivation request, to business server 200b, and send the received source data packet to business server 200b.
[0095] 309: The business server 200b receives and analyzes the source data packet, and matches a corresponding target dataset from the target environment database based on the base table data and the data in the related sub-data table in the source dataset obtained by the analysis.
[0096] For example, the business server 200b may receive a source data packet, read the source data packet, and parse it into memory. The data description file obtained by parsing the source data packet includes each dataset table and the relationships between the data tables in each dataset. Each CSV file obtained by parsing the source data packet may describe the data in the corresponding data table. For ease of description, each dataset obtained by parsing the source data packet will be referred to as a "source dataset," and the corresponding data table described by each CSV file will be referred to as a "source data table." Furthermore, the business server 200b may load a corresponding target dataset from the target environment database into memory based on the data description file obtained by parsing.
[0097] The process of reading the corresponding target dataset from the target environment database based on the data description file includes first matching base table data corresponding to the base table in the source dataset in the target environment database based on the source dataset and derivation conditions described in the data description file obtained by the business server 200b through analysis, for example, acquiring data tables matching the main key or unique key of the base table of the source dataset into memory and setting them as the base table of the target dataset, and then loading data from all parent tables and all related child tables related to the foreign keys of the base table into memory. Furthermore, the business server 200b may merge the matched base table data and data in related sub-data tables from the target environment database into the target dataset.
[0098] Furthermore, the business server 200b may determine whether the structure of each target data table obtained above is the same as that of a data table with the same name in each data table analyzed in the source data packet. If the source data table name does not match the same target data table name, the business server 200b will ignore the source data table obtained by analysis.
[0099] In addition, the base table in each data set has its foreign key table and foreign key defined, so that the corresponding foreign key table can be found by the foreign key in the base table. Furthermore, in the target environment database, the foreign key field and foreign key value matching each base table data can be determined, and the data in the data table related to the base table, i.e., the data in the foreign key table, can be found by the foreign key value.
[0100] 310: The business server 200b compares the source data set with the target data set, and performs corresponding data processing on each data table in the target data set based on the comparison result.
[0101] For example, the business server 200b compares each source data set in the source data packet parsed into memory with the corresponding target data set loaded into memory from the target environment database. For example, the business server 200b may compare the base table data of the source data set with the base table data of the target data set, including comparing the unique keys and main keys of the source data set base tables with the target data set base tables. In some embodiments of the present application, both unique keys may be compared first, and both main keys may also be compared. The above comparison process and the process of performing corresponding data processing on the target data set based on the comparison result may refer to the judgment processing flow shown in FIG. 5, which includes the following steps:
[0102] 310a. Determine whether the target dataset base table has a unique key defined. If the target dataset base table does not have a unique key defined, that is, if the answer is NO, promote the primary key in the base table to a unique key. If the answer is YES, continue with step 310b below.
[0103] 310b. Determine whether the unique keys and primary keys of the source dataset base table and the target dataset base table match. If the unique keys and primary keys of the source dataset base table and the target dataset base table match, that is, if the answer is YES, then perform step 310c to determine whether other fields match. If the answer is NO, continue to step 310d below.
[0104] 310c. Determine whether the source dataset base table and the target dataset base table contain other fields that do not match. If the result of the determination is YES, update the data content of the target database table, that is, update the data content of the source dataset base table to the data content of the target dataset base table. If the result of the determination is NO, it indicates that the other fields of the source dataset base table and the target dataset base table are consistent, and there is no need to update them, so do not update the data content of the target dataset base table.
[0105] The mismatched other fields refer to the situation where the values of the other fields are mismatched and the names of the corresponding fields are the same, that is, the values of the fields with the same names are different, and the explanation is omitted here.
[0106] 310d. Determine whether the unique keys of the source dataset base table and the target dataset base table match but the primary keys do not match. If the unique keys of the source dataset base table and the target dataset base table match but the primary keys do not match, that is, if the determination result is YES, update the data content of the target database table to correct the primary key of the source dataset base table to the primary key of the target dataset base table. If the determination result is NO, continue to execute step 310e below.
[0107] 310e. Determine whether the unique keys of the source dataset base table and the target dataset base table do not match and the target dataset base table does not have this unique key field. If the unique keys of the source dataset base table and the target dataset base table do not match and the target dataset base table does not have this unique key field, that is, if the determination result is YES, insert the corresponding field of the unique key and the data content of that field into the target dataset base table. If the determination result is NO, continue to execute step 310f below.
[0108] 310f. Determine whether the unique keys of the source dataset base table and the target dataset base table do not match, and the source dataset base table does not have the displacement key field. If the unique keys of the source dataset base table and the target dataset base table do not match, and the displacement key field does not exist in the source dataset base table, that is, if the determination result is YES, delete the unique key field and its data content from the target dataset base table. If the determination result is NO, it is proven that there is no data conflict between the configuration environment and the target environment, and this flow ends. You may continue to execute step 311 below.
[0109] Furthermore, after the above comparison process for the base tables of the source dataset and the corresponding target dataset is completed and the processing for the base table data in the target dataset is completed, the comparison process described in 310a to 310f above may be repeated for all related data tables of each base table in each dataset in a cascading manner, thereby performing corresponding data processing for each data table related to the base table in the target dataset.
[0110] After the processing and updating of the data content in the related data table in the target data set is completed, the business server 200b may further dynamically update the foreign key of the specified table, for example, by adding a foreign key to a specified field in the processed base table. The explanation is omitted here.
[0111] 311: The business server 200b completes the release of the configuration data in the target environment based on the processed target dataset.
[0112] For example, after the business server 200b performs step 310 and completes the corresponding data processing for the target data sets, it may apply the configuration data to be released to each target data set based on the processed target data sets, and update the target environment database. Thus, when responding to a business request from the business service system front end, the business server 200b can access the corresponding data set and the released configuration data in the target environment database to process the corresponding business. This is not described here.
[0113] In addition, the business server 200b may record the data before and after the above-mentioned insert, update, delete, etc. processes, as well as the original data, during the process of performing the corresponding data processing for each target dataset by executing the above-mentioned step 310. For example, the data before and after the above-mentioned insert, update, delete, etc. processes, as well as the original data, may be reported or recorded in JSON format, in which inserted data is recorded as InsertRecordMap, deleted data as DeleteRecordMap, and updated data as UpdateRecordMap. From the viewpoint of saving memory resources, if a data table has a relatively large amount of data content, for example, if the number of data items to be processed in the above-mentioned data processing process exceeds 10,000, it is not necessary to record the data processing process in the data table.
[0114] Based on the implementation flow of steps 301 to 311, the data conflict handling method according to the embodiment of the present application can first ensure that the configuration data in the configuration environment is smoothly released to the target environment, thereby avoiding the problem of configuration data release failure due to data conflict, so that the corresponding business services can provide corresponding services based on the loaded or updated related configuration data. Second, the present application can realize the configuration data release operation directly on the configuration page, which improves the configuration data release efficiency and reduces the developer's workload, and also makes it easy for operators to operate the configuration data release themselves, thereby improving the efficiency of operators' management of corresponding business.
[0115] In addition, the data collision handling method according to the present embodiment only requires the process of presetting the derivation rules to be performed once, i.e., the above step 301 to be performed once when the flow shown in Figure 3 of the first implementation is first implemented. In the subsequent process of releasing the configuration data to the target environment, the configuration server 200a can derive the configuration data and the corresponding data sets according to the predefined derivation rules. When the business server 200b receives the introduced configuration data and the corresponding data sets, it can automatically identify the data collision and perform the corresponding data processing on the corresponding data table in the target environment.
[0116] In other words, in the process of releasing the related configuration data in the configuration environment to the target environment, if data conflicts such as unique key conflicts in the corresponding dataset base tables, non-existence of some fields, or non-existence of foreign keys are encountered, the business service system can automatically handle these data conflicts without requiring human intervention, thereby saving the operation and maintenance costs of the business service system.
[0117] In addition, when the business server 200b performs corresponding data processing based on the identified data collision, the recorded content may further provide details of data changes before and after the data processing, which makes it easier to find related data during subsequent troubleshooting.
[0118] FIG. 6 is a diagram showing a schematic configuration of the software of the business service system according to the embodiment of the present invention.
[0119] 6, the business service system 600 may include a business configuration module 601, a derivation module 602, and an introduction module 603. Illustratively, the business service system 600 may be, for example, but is not limited to, an insurance business system that provides a platform for insurance business.
[0120] Wherein, the business configuration module 601 may be executed on the terminal 100b to provide a configuration page to an operator. The operator can set business-related configuration data on the configuration page, and can also use the configuration page to derive configuration data from the configuration environment and release the configuration data to the target environment. Note that the business configuration module 601 may also be executed on the terminal 100a so that a developer can pre-set derivation rules for configuration data, or so that an operator can set configuration data and release the configuration data in the target environment. For specific functions performed by the derivation module 602, please refer to the relevant descriptions in steps 302 and 303 above. The description will be omitted here.
[0121] The derivation module 602 may be executed by the configuration server 200a and is used to obtain a data description file template preset by a developer in the configuration environment, and interact with the configuration environment database to obtain corresponding configuration data based on the relevant parameters of the derivation request issued by the terminal 100b. It also derives related datasets, data in related data tables in each dataset, and the relationship formed by foreign keys between the base table in each dataset and other related data tables, and generates a corresponding data description file to derive the configuration environment together with the configuration data. For specific functions performed by the derivation module 602, please refer to the relevant descriptions in steps 301, 304, and 306 above. A detailed description will be omitted here.
[0122] The introduction module 603 may be executed on the business server 200b and is used to receive and analyze source data packets transmitted from the terminal 100b, the source data packets including configuration data to be released to the target environment and a correspondingly generated data description file. The introduction module 603 may further interact with the target environment database based on the analyzed data description file to obtain data in the target database table and other related data tables to form a target dataset, and then compare the target dataset with the source dataset and perform related processing on the data in the related data tables in the target dataset based on the comparison result. For specific functions performed by the derivation module 603, please refer to the relevant descriptions in steps 309 to 311 above. Further description is omitted here.
[0123] Furthermore, in a business service system realized based on the data conflict handling means of the present embodiment, in the process of releasing configuration data from the configuration environment to the target environment, the developer does not need to create and implement the code accordingly using a data migration tool, and in the release process, the business service system can handle data conflicts between the configuration environment and the target environment by itself.
[0124] FIG. 7 is a schematic diagram of the configuration of the server 200 according to the embodiment of the present invention.
[0125] In the present embodiment, the server 200 may be a configuration server 200a that provides the configuration environment, or may be a business server that provides the target environment. The server 200 may execute some modules of the business service system. For example, the configuration server may execute the derivation module 602 of the business service system 600 shown in FIG. 6, and the business server may execute the introduction module 603 of the business service system 600 shown in FIG. 6. In some other embodiments, the derivation module 602 and the introduction module 603 of the business service system 600 may be executed by the same server 200, and this is not a limitation.
[0126] As shown in FIG. 7 , in some embodiments, server 200 may include one or more processors 204, system control logic 208 connected to at least one of processors 204, system memory 212 connected to system control logic 208, non-volatile memory (NVM) 212 connected to system control logic 208, and a network interface 220 connected to system control logic 208.
[0127] In some embodiments, processor 204 may include one or more single-core or multi-core processors. In some embodiments, processor 204 may include any combination of general-purpose and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In embodiments in which server 200 employs an Evolved Node B (eNB) 101 or a Radio Access Network (RAN) controller 102, processor 204 may be configured to perform various suitable embodiments, such as those illustrated in FIGS. 2-6.
[0128] In some embodiments, system control logic 208 may include any suitable interface controller to provide any suitable interface to at least one of processors 204 and / or any suitable device or component in communication with system control logic 208.
[0129] In some embodiments, system control logic 208 may include one or more memory controllers to provide an interface coupled to system memory 212. System memory 212 may be used to load and store data and / or instructions. In some embodiments, memory 212 of server 200 may include any suitable volatile memory, such as suitable dynamic random access memory (DRAM).
[0130] NVM / memory 212 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM / memory 212 may include any suitable non-volatile memory, such as flash memory, and / or any suitable non-volatile storage device, for example, at least one of a hard disc drive (HDD), a compact disc (CD) drive, and a digital versatile disc (DVD) drive.
[0131] NVM / memory 212 may comprise a portion of storage resources installed on a device of server 200 or may be accessed by a device, but is not necessarily part of the device. For example, NVM / memory 212 may be accessed over a network via network interface 220.
[0132] In particular, system memory 212 and NVM / memory 212 may include temporary and permanent copies, respectively, of instructions 224. Instructions 224 may include instructions that, when executed by at least one of processors 204, cause server 200 to perform the methods illustrated in Figures 3-4. In some embodiments, instructions 224, hardware, firmware, and / or software components thereof may be located separately / alternatively in system control logic 208, network interface 220, and / or processor 204.
[0133] Network interface 220 may include a transceiver for providing a wireless interface to server 200 and may further communicate with any other suitable devices (e.g., a front-end module, an antenna, etc.) over one or more networks. In some embodiments, network interface 220 may be integrated with other components of server 200. For example, network interface 220 may be integrated with at least one of processor(s) 204's system memory 212, NVM / memory 212, and a firmware device (not shown) having instructions that, when executed by at least one of processor(s) 204, cause server 200 to implement the methods illustrated in FIGS. 2-6 above.
[0134] Network interface 220 may further include any suitable hardware and / or firmware to provide a multiple-input, multiple-output wireless interface. For example, network interface 220 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.
[0135] In one embodiment, at least one of the processors 204 may be packaged with one or more controller logic for the system control logic 208 to form a system-on-a-chip (SiP). In one embodiment, at least one of the processors 204 may be integrated on the same die with one or more controller logic for the system control logic 208 to form a system-on-a-chip (SoC).
[0136] Server 200 may further include input / output (I / O) devices 232. I / O devices 232 may include a user interface to allow a user to interact with server 200, and depending on the design of the peripheral component interfaces, peripheral components may also interact with server 200. In some embodiments, server 200 further includes sensors for determining at least one of environmental conditions and location information associated with server 200.
[0137] In some embodiments, the user interface may include, but is not limited to, a display (e.g., a liquid crystal display, a touchscreen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., a light emitting diode flash), and a keyboard.
[0138] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
[0139] In some embodiments, the sensors may include, but are not limited to, a gyro sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit that may be part of network interface 220 or may interact with network interface 220 to communicate with components of a positioning network (e.g., Global Positioning System (GPS) satellites).
[0140] References in the specification to "one embodiment" or "an embodiment" mean that the specific feature, structure, or characteristic described in connection with the embodiment is included in at least one exemplary embodiment or technology disclosed by the embodiment. Appearances of the phrase "in one embodiment" in various places in the specification do not necessarily all refer to the same embodiment.
[0141] The disclosure of the present embodiments also relates to apparatus for performing the operations described in the text. Such apparatus may be specially constructed for the desired purposes, or it may comprise a general-purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored on a computer-readable medium, including, but not limited to, a floppy disk, an optical disk, a CD-ROM, a magneto-optical disk, a read-only memory (ROM), a random-access memory (RAM), an EPROM, an EEPROM, a magnetic or optical card, an application-specific integrated circuit (ASIC), or any other type of medium suitable for storing electronic instructions, any of which may be coupled to a computer system bus. Additionally, the computers described herein may include a single processor or may employ a multiple-processor architecture for increased computing power.
[0142] Additionally, the language used herein has been chosen primarily for ease of reading and instructional purposes, and may not be chosen to delineate or limit the subject matter disclosed. Accordingly, the disclosure of the present examples is intended to be illustrative, not limiting, of the scope of the concepts discussed herein.< / exceptions> < / orders> < / columns> < / keys> In tags,
Claims
1. 1. A method for handling data conflicts for use in a system having a business configuration module, a derivation module running in a configuration environment, and a deployment module running in a target environment, comprising: a step in which the business configuration module responds to the detected derivation operation by sending a derivation request for target configuration data to the derivation module, the target configuration data being data generated by a user setting parameters for a business service provided by the system; a derivation module, in response to the derivation request, obtaining target configuration data and a data description file generated corresponding to the target configuration data, and sending the data description file to the business configuration module, the data description file comprising a description of source datasets related to the target configuration data and associative relationships between data tables in each source dataset; the business configuration module responding to the detected release operation by sending the received configuration data, the data description file, and a release request to the installation module; The method for handling data conflicts includes a step in which the introduction module responds to the release request, determines a processing result for the data in the data table having a data conflict in the target environment based on the data description file, and applies the received target configuration data to the data in the processed data table.
2. The derivation module includes a preset configuration data derivation rule; The method of claim 1 , wherein the derivation module generates a data description file corresponding to the target configuration data based on the derivation rules in response to the derivation request.
3. The derivation rule includes at least:
3. The method of claim 2, further comprising: pre-establishing at least one relational relationship for each data table in the configuration environment database; and determining, for each pre-established relational relationship, a base table corresponding to a business service provided to the system.
4. 4. The method of claim 3, wherein the base table and the associated data table in each association relationship are related via a foreign key.
5. determining a processing result for data in a data table having a data conflict in the target environment based on the data description file, The introduction module acquires a target dataset corresponding to each source dataset from the target environment database according to the description of the relationship between the data tables in each source dataset in the data description file, and the relationship between the data tables in the target dataset matches the description of the relationship between the data tables in the corresponding source dataset; 2. The method of claim 1, wherein the introduction module includes: comparing the target dataset with a corresponding source dataset; and determining a processing result for data in a data table having a data conflict in the target environment based on the comparison result.
6. comparing the target data set with a corresponding source data set and determining a processing result for data in a data table having a data conflict in the target environment based on the comparison result; determining that if the unique key of the target dataset base table matches the unique key of the source dataset base table and the main key of the target dataset base table matches the main key of the source dataset base table, and if the source dataset base table and the target dataset base table contain other fields that do not match, to update the data content of the target dataset base table with the data content of the source dataset base table; If the unique key of the target dataset base table matches the unique key of the source dataset base table, but the main key of the target dataset base table does not match the main key of the source dataset base table, determine to update the data content of the target dataset base table with the data content of the source dataset base table, and modify the main key of the target dataset base table to the main key of the source dataset base table; If the unique key of the target dataset base table does not match the unique key of the source dataset base table, and the target dataset base table does not have a first field corresponding to the unique key of the source dataset base table, determine to insert the first field into the target dataset base table and update the data content of the unique key field in the source dataset base table into the target dataset base table; 6. The method of claim 5, further comprising: determining, if the unique key of the target dataset base table does not match the unique key of the source dataset base table and the source dataset base table does not have a second field corresponding to the unique key of the source dataset base table, to delete the second field and the data content in the second field from the target dataset base table.
7. comparing the target data set with a corresponding source data set and determining a processing result for data in a data table having a data conflict in the target environment based on the comparison result; The method of claim 6, further comprising: if a unique key is not defined in the target dataset base table, determining that the main key of the target dataset base table is set as the unique key of the target dataset base table.
8. comparing the target data set with a corresponding source data set and determining a processing result for data in a data table having a data conflict in the target environment based on the comparison result; comparing data contents of related data tables in the target dataset with data contents of related data tables in the source data table based on foreign keys in the target dataset base table; 8. The method of claim 7, further comprising: determining a processing result for data content of an associated data table in the target data set based on the result of the comparison.
9. determining a processing result for the data content of the associated data table in the target dataset based on the result of the comparison, determining that if the unique key of the related data table in the target dataset matches the unique key of the related data table in the source dataset and the main key of the related data table in the target dataset matches the main key of the related data table in the source dataset, and if the related data table in the source dataset and the related data table in the target dataset contain other fields that do not match, to update the data content of the related data table in the target dataset with the data content of the related data table in the source dataset; If the unique key of the related data table in the target dataset matches the unique key of the related data table in the source dataset, but the main key of the related data table in the target dataset does not match the main key of the related data table in the source dataset, determine to update the data content of the related data table in the target dataset with the data content of the related data table in the source dataset, and modify the main key of the related data table in the target dataset to the main key of the related data table in the source dataset; If the unique key of the related data table in the target dataset does not match the unique key of the related data table in the source dataset, and the related data table in the target dataset does not have a third field corresponding to the unique key of the related data table in the source dataset, determine to insert the third field into the related data table in the target dataset and update the data content in the unique key field in the related data table in the source dataset to the related data table in the target dataset; 9. The method of claim 8, further comprising: determining, if a unique key of a related data table in the target data set does not match a unique key of a related data table in the source data set, and if the related data table in the source data set does not have a fourth field corresponding to the unique key of the related data table in the source data set, to delete the fourth field and the data content in the fourth field from the related data table in the target data set.
10. A business service system comprising a business configuration module, a derivation module, and an introduction module, The business configuration module is used to respond to the detected derivation operation and send a derivation request for target configuration data to the derivation module, the target configuration data being data generated by a user setting parameters for a business service provided to the system, and the business configuration module is used to respond to the detected release operation and send the received configuration data and the data description file to the installation module; a derivation module, in response to a derivation request sent from the business configuration module, for obtaining target configuration data and a data description file generated corresponding to the target configuration data, and sending the data description file to the business configuration module, the data description file including a description of source datasets related to the target configuration data and an association relationship between data tables in each source dataset; The introduction module is used to determine the processing results for the data in the data table having data conflicts in the target environment based on the data description file, and to apply the received target configuration data to the data in the processed data table.
11. 11. A device comprising one or more processors and one or more memories in which one or more programs are stored, the one or more programs, when executed by the one or more processors, performing the method for handling data collisions according to any one of claims 1 to 10.
12. A computer readable storage medium having stored thereon instructions which, when executed by a computer, cause the computer to perform the method for handling data collisions according to any one of claims 1 to 10.
Citation Information
Patent Citations
Configuration information exporting and importing method based on hierarchical association structure
CN112163024A
Migration system and migration method
JP2014225171A
Data migration system
JP2018109898A
Virtual machine migration tool
US20130007216A1