Data state synchronization method and device, equipment, medium and program product
Patent Information
- Application Number
- CN202410763869.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-10-15
AI Technical Summary
In the process of updating and upgrading historical versions of database products, there is a high risk that data modification will lead to test failure or deployment failure, which reduces the efficiency of upgrades.
During the development process of the module set, the code status of each module is obtained, the difference status is determined, and target data synchronization is triggered based on the association between modules, ensuring that the synchronized module set matches the demand set, and reducing the risk of data out of synchronization. Risk of failure.
It achieves real-time tracking and targeted synchronization of module collections, improves the efficiency of database product development, and reduces the risk of failure in testing and deployment.
Smart Images

Figure CN118778997A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of database development, and in particular to a data status synchronization method, device, equipment, medium and program product. Background Art
[0002] During the development of database products, after new business requirements are launched, the historical versions of the database products need to be updated and upgraded according to the new business requirements. In the related art, after the update and upgrade of the historical versions of the database products are completed, they are submitted to the test environment and the deployment environment to perform the test and deployment operations respectively. However, during the above version update and upgrade process, it may involve the modification of various data of the database product. The above modification has a high probability of causing the database product to fail the test or the deployment to fail, thereby reducing the efficiency of the database product upgrade. Summary of the invention
[0003] Based on the above technical problems, the embodiments of the present application provide a data status synchronization method, device, equipment, medium and program product.
[0004] The technical solution provided by the embodiment of the present application is as follows:
[0005] The present application embodiment first provides a data status synchronization method, the method comprising:
[0006] In the development process of the module set, the mth code state of the kth module in the module set is obtained; wherein the kth module is associated with the kth requirement in the requirement set of the database; k is an integer greater than or equal to 1 and less than or equal to K; K is an integer greater than 1 and is the number of modules included in the module set; m is an integer greater than 1;
[0007] Determining a kth difference state between an mth code state of the kth module and an m-1th code state of the kth module;
[0008] Based on the kth difference state and the association relationship between the modules in the module set, trigger the first target data in the module set to be synchronized to the kth target state so that the synchronized module set matches the requirement set; wherein the first target data and the kth target state are associated with the kth difference state.
[0009] In some embodiments, before triggering synchronization of the first target data in the module set to the kth target state based on the kth difference state and the association relationship between the modules in the module set, the method further includes:
[0010] Determine second target data associated with the kth difference state from the data elements included in the kth module;
[0011] Based on the association relationship and the second target data, the first target data is determined from the module set.
[0012] In some embodiments, the second target data includes at least one data element included in a Structured Query Language (SQL) statement; and determining the first target data from the module set based on the association relationship and the second target data includes:
[0013] Based on the association parameters corresponding to the at least one data element in the association relationship, determining at least one of an associated SQL statement, an associated database, an associated table, and an associated field associated with the at least one data element from the module set;
[0014] Determine at least one of the associated SQL statement, the associated database, the associated table, and the associated field as the first target data.
[0015] In some embodiments, determining the first target data from the module set based on the association relationship and the second target data includes:
[0016] Based on the association relationship, determining an associated module in the module set that is associated with the kth module;
[0017] The data included in the association module and associated with the second target data is determined to be the first target data.
[0018] In some embodiments, after triggering synchronization of the first target data in the module set to the kth target state based on the kth difference state and the association relationship between the modules in the module set, the method further includes:
[0019] Obtaining a status synchronization result for the first target data;
[0020] If the state synchronization result indicates that the first target data is successfully synchronized, each module in the module set after the state synchronization is tested to obtain a test result;
[0021] Based on the test result, the module set after state synchronization is processed.
[0022] In some embodiments, the processing of the module set after state synchronization based on the test result includes:
[0023] If the test result indicates that at least some modules in the module set after the state synchronization have passed the test, integration processing is performed on at least some modules to obtain module integration results; wherein the module integration results are used for deployment to the user terminal device.
[0024] The embodiment of the present application further provides a data state synchronization device, the data state synchronization device comprising:
[0025] An acquisition module, used for acquiring the mth code state of the kth module in the module set during the development process of the module set; wherein the kth module is associated with the kth requirement in the requirement set of the database; k is an integer greater than or equal to 1 and less than or equal to K; K is an integer greater than 1 and is the number of modules included in the module set; m is an integer greater than 1;
[0026] a determination module, configured to determine a kth difference state between an mth code state of the kth module and an m-1th code state of the kth module;
[0027] A synchronization module, used to trigger the synchronization of the first target data in the module set to the kth target state based on the kth difference state and the association relationship between the modules in the module set, so that the synchronized module set matches the requirement set; wherein the first target data and the kth target state are associated with the kth difference state.
[0028] An embodiment of the present application further provides a data status synchronization device, which includes a processor and a memory, wherein a computer program is stored in the memory; when the computer program is executed by the processor, it can implement any of the data status synchronization methods described above.
[0029] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored; when the computer program is executed by a processor of an electronic device, the data status synchronization method as described above can be implemented.
[0030] An embodiment of the present application further provides a computer program product, which includes a computer program; when the computer program is executed by a processor of an electronic device, it can implement any of the data status synchronization methods described above.
[0031] The data status synchronization method provided in the embodiment of the present application obtains the mth code state of the kth module in the module set during the development process of the module set, and the kth module is associated with the kth requirement in the requirement set of the database, k is an integer greater than or equal to 1 and less than or equal to K, and K is the number of modules included in the module set. In this way, through the above operation, the code state of each module can be tracked in real time during the development process of the module set; and the kth difference state between the mth code state of the kth module and the m-1th code state of the kth module is determined. When the m-1th code state is the historical state of the mth code state, the above operation can realize real-time tracking and detection of the change process of the code state of any module; on this basis, based on the kth state and the association relationship between the modules in the module set, the module set is triggered. The first target data in the module set is synchronized to the k-th target state, thereby realizing targeted and precise synchronization of the first target data; on the other hand, since the first target data and the k-th target state are both associated with the k-th difference state, the matching degree between the synchronized module set and the k-th difference state can be improved; at the same time, by triggering the synchronization of the first target data in the module set to the k-th target state, so that the synchronized module set matches the requirement set, through the above operation, in the development stage of the module set, it is possible to realize the targeted and real-time synchronization of the first target data contained in other modules in the module set according to the code state of any module in the module set, thereby reducing the risk of failure of the module set in the testing and deployment stages due to data asynchrony, and thus improving the development efficiency of the database product corresponding to the requirement set. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A flowchart of a data status synchronization method provided in an embodiment of the present application;
[0033] Figure 2 A structural diagram of the data state synchronization method provided in the embodiment of the present application;
[0034] Figure 3 A schematic diagram of the process structure of the database product provided in the embodiment of the present application from requirement confirmation to deployment;
[0035] Figure 4 A schematic diagram of the structure of the database DevOps process technology implementation provided in the embodiment of the present application;
[0036] Figure 5 A schematic diagram of the structure of a data state synchronization device provided in an embodiment of the present application;
[0037] Figure 6 A schematic diagram of the structure of a data status synchronization device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0039] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0040] When new business requirements for the database are proposed, R&D personnel are usually required to develop and change the database algorithm and / or data structure. After the above development and change process is completed, an updated database product can be obtained; and, under normal circumstances, the process of launching new business requirements and synchronous development includes the upgrade of the application and the corresponding upgrade and adjustment of the database product; therefore, different business requirements may cause conflicts in the scope and / or impact of changes in the data structure of the database.
[0041] In the related technology, professional technicians develop corresponding SQL files for implementing database upgrades according to new business needs, and submit the SQL files to testers for integration testing of the upgraded SQL files in the test environment. After the integration test is passed, the testers submit the SQL files to the operation and maintenance personnel for installation and deployment. In the above process, there are many manual operations and offline operations, and it may involve the modification of various data. Therefore, after problems occur in the testing or deployment phase, it is easy to encounter problems such as difficulty in rollback and / or conflicts in cross tables, and it is also easy to encounter problems such as asynchronous data modification, which leads to an increase in the risk of instability in version updates and upgrades of database products, and then leads to a decrease in the efficiency of updates and upgrades of database products.
[0042] Based on the above technical problems, the embodiments of the present application provide a data status synchronization method, device, equipment, medium and program product.
[0043] The present application embodiment first provides a data status synchronization method. Figure 1 A flow chart of a data state synchronization method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method may include the following steps:
[0044] Step 101: During the development of a module set, obtain the mth code state of the kth module in the module set.
[0045] Among them, the kth module is associated with the kth requirement in the requirement set of the database; k is an integer greater than or equal to 1 and less than or equal to K; K is an integer greater than 1 and is the number of modules included in the module set; m is an integer greater than 1.
[0046] In one embodiment, the requirement set may represent a set of update requirements for the data management performance and / or data management function dimensions of a database product; exemplarily, the data management performance may include the efficiency of the database product in data addition, deletion, modification, and query operations, etc.; exemplarily, the database management function may include at least one of the types and quantities of data elements that the database product can manage and the business types associated with the above-mentioned data elements.
[0047] In one embodiment, the requirement set may include a requirement to change or update the type, quantity, associated business type, and value range of at least one data element of the database product.
[0048] In one implementation, the modules in the module set and the requirements in the requirement set may correspond one to one.
[0049] In one implementation, the modules in the module set may correspond to the functions included in the database product or requirement set, that is, the kth module may correspond to the kth function.
[0050] In one implementation, the degree of coupling between modules in the module set may be less than or equal to a degree threshold.
[0051] In one implementation, the mth code state may be obtained in the following manner:
[0052] The historical code state of the kth module is edited or updated according to the kth requirement, and the edited or updated historical code state of the kth module is determined as the mth code state.
[0053] In one implementation, the mth code state may differ from the historical code state in at least one data element dimension.
[0054] Step 102: Determine a kth difference state between the mth code state of the kth module and the (m-1)th code state of the kth module.
[0055] In one implementation, the (m-1)th code state of the kth module may be the historical code state of the kth module in the aforementioned embodiment.
[0056] In one implementation, the (m-1)th code state of the k-th module may represent a historical code state of the k-th module adjacent to the (m)th code state.
[0057] In one implementation, the kth difference state may be determined in the following manner:
[0058] Determine the degree of difference in the data element dimension between the mth code represented by the mth code state of the kth module and the m-1th code represented by the m-1th code state of the kth module, and determine the above-mentioned difference degree as the kth difference state; illustratively, the above-mentioned data elements may include at least one of a field, a form and an SQL statement.
[0059] Step 103: Based on the kth difference state and the association relationship between the modules in the module set, trigger the synchronization of the first target data in the module set to the kth target state, so that the synchronized module set matches the requirement set.
[0060] The first target data and the kth target state are associated with the kth difference state.
[0061] In one embodiment, the association relationship may represent the referenced and referenced relationship between different modules in the module set in the data element dimension; illustratively, the referenced and referenced relationship may be reflected through the upstream and downstream relationship of the same data element in different modules.
[0062] In one implementation, the first target data may include at least one data element in the module set corresponding to the kth difference state and to be synchronously updated or modified.
[0063] In one implementation, the kth target state may include the state of the data elements that the module set should have, that correspond to the kth difference state, and that match the corresponding requirements in the requirement set.
[0064] In one implementation, the synchronization of the first target data in the trigger module set to the kth target state can be achieved by any of the following methods:
[0065] Based on the kth difference state and the above-mentioned association relationship, the first target data is determined from the modules excluding the kth module in the module set, and then the first target data is synchronously modified based on the kth difference state or the requirements in the requirement set, so that the first target data is synchronized to the kth target state.
[0066] If the kth difference state is detected, a prompt message including the kth difference state and the associated relationship is sent to the electronic device, so that professional technical developers associated with the electronic device can synchronously modify the first target data based on the kth difference state or the requirements in the requirement set to synchronize the first target data to the kth target state.
[0067] From the above, it can be seen that the data status synchronization method provided in the embodiment of the present application obtains the mth code state of the kth module in the module set during the development process of the module set, and the kth module is associated with the kth requirement in the requirement set of the database, k is an integer greater than or equal to 1 and less than or equal to K, and K is the number of modules included in the module set. In this way, through the above operation, it is possible to achieve real-time tracking of the code status of each module during the development process of the module set; and determine the kth difference state between the mth code state of the kth module and the m-1th code state of the kth module. When the m-1th code state is the historical state of the mth code state, through the above operation, it is possible to achieve real-time tracking and detection of the change process of the code state of any module; on this basis, based on the kth state and the association relationship between the modules in the module set, the module is triggered. The first target data in the block set is synchronized to the kth target state, thereby realizing targeted and precise synchronization of the first target data; on the other hand, since the first target data and the kth target state are both associated with the kth difference state, the matching degree between the synchronized module set and the kth difference state can be improved; at the same time, by triggering the synchronization of the first target data in the module set to the kth target state, so that the synchronized module set matches the requirement set, through the above operations, in the development stage of the module set, it is possible to realize targeted and real-time synchronization of the first target data contained in other modules in the module set according to the code state of any module in the module set, thereby reducing the risk of failure of the module set in the testing and deployment stages due to data asynchrony, and thus improving the development efficiency of the database product corresponding to the requirement set.
[0068] Based on the foregoing embodiment, the data state synchronization method provided in the embodiment of the present application may further perform the following steps before triggering synchronization of the first target data in the module set to the kth target state based on the kth difference state and the association relationship between the modules in the module set:
[0069] Step A1: Determine the second target data associated with the kth difference state from the data elements included in the kth module.
[0070] In one implementation, the second target data may include at least one data element, and / or the second target data may include at least one data element.
[0071] In one implementation, the second target data may be determined by:
[0072] Based on the kth difference state, the difference data between the mth version and the m-1th version of the kth module is determined, and then the above difference data is determined as the second target data; exemplarily, the mth version can be the code version of the kth module corresponding to the mth code state, and the m-1th version can be the code version of the kth module corresponding to the m-1th code state.
[0073] Step A2: Determine the first target data from the module set based on the association relationship and the second target data.
[0074] In one implementation, the first target data may be determined in the following manner:
[0075] The association relationship may include the distribution status of the same data elements in the module set in different modules. After determining the second target data, the data elements that are identical to the data elements represented by the second target data can be determined based on the above distribution status, and then the data elements that are identical to the data elements represented by the second target data can be determined as the first target data.
[0076] As can be seen from the above, in the data state synchronization method provided by the embodiment of the present application, after determining the second target data associated with the kth difference state from the data elements contained in the kth module, the first target data is determined from the module set based on the association relationship and the second target data. In this way, through the above method, not only can the correlation between the second target data and the kth difference state be improved, thereby improving the accuracy of the second target data, but also the correlation between the first target data and the kth difference state can be improved, thereby improving the accuracy of the first target data.
[0077] Based on the foregoing embodiment, in the data state synchronization method provided in the embodiment of the present application, the second target data includes at least one data element contained in the SQL statement.
[0078] In one implementation, the at least one data element included in the SQL statement may include at least one of a database, a table, a column, and a row.
[0079] Accordingly, based on the association relationship and the second target data, determining the first target data from the module set can be achieved by the following steps:
[0080] Step B1: Based on the association parameters corresponding to at least one data element in the association relationship, at least one of an associated SQL statement, an associated database, an associated table, and an associated field associated with at least one data element is determined from a module set.
[0081] In one embodiment, the association parameter may include whether there is association or the degree of association.
[0082] In one implementation, the associated SQL statement may include an SQL statement in the module set that is associated with a data element in the second target data.
[0083] In one implementation, the associated database may include a database in the module set that is associated with the data elements in the second target data.
[0084] In one implementation, the association table may include a form in the module set that is associated with the data elements in the second target data.
[0085] In one implementation, the associated field may include a related field in a column or row in the module set that contains the same field as that contained in the second target data.
[0086] In one implementation, at least one of the associated SQL statement, the associated database, the associated table, and the associated field may be determined in the following manner:
[0087] If the association parameter indicates that the second target data has an association with other modules in the module set except the kth module, and the strength of the above association is greater than or equal to the degree threshold, then at least one of the associated SQL statement, associated database, associated table and associated field associated with the second target data can be determined from other modules based on the association parameter.
[0088] Step B2: Determine at least one of the associated SQL statement, the associated database, the associated table, and the associated field as the first target data.
[0089] From the above, it can be seen that in the data state synchronization method provided in the embodiment of the present application, the second target data includes at least one data element contained in the SQL statement, and based on the association parameters corresponding to the at least one data element in the association relationship, at least one of the associated SQL statements, associated databases, associated tables and associated fields associated with the at least one data element is determined from the module set, thereby improving the comprehensiveness and integrity of the associated SQL statements, associated databases, associated tables and associated fields; and, by determining that at least one of the associated SQL statements, associated databases, associated tables and associated fields is the first target data, the comprehensiveness and integrity of the first target data can also be improved.
[0090] Based on the foregoing embodiment, in the data state synchronization method provided in the embodiment of the present application, the first target data is determined from the module set based on the association relationship and the second target data, which can also be implemented in the following manner:
[0091] Based on the association relationship, an association module associated with the kth module in the module set is determined; and data associated with the second target data contained in the association module is determined to be the first target data.
[0092] In one implementation, the associated module may include at least one module in the module set that is associated with the kth module.
[0093] In one implementation, the association module and the kth module may be associated with each other in at least one of a database dimension, a form dimension, a row dimension, or a column dimension.
[0094] In one implementation, the association module may be determined in the following manner:
[0095] Based on the existence and strength of the association represented in the association relationship, the modules in the module set that are associated with the kth module and whose association is greater than a degree threshold are determined as associated modules.
[0096] In one implementation, the first target data may be determined in the following manner:
[0097] The data elements contained in the associated module that are the same as the second target data, or the data elements that have a data processing relationship with the second target data, are determined as the first target data; illustratively, the above-mentioned data processing relationship may include a reference or a referenced relationship.
[0098] Figure 2 A schematic diagram of a structure for implementing a data state synchronization method provided in an embodiment of the present application, such as Figure 2 As shown, the above data state synchronization method can be implemented by the table structure management unit 202, the editing unit 203, the lineage analysis unit 204 and the upstream and downstream synchronization unit 205 set in the database management center (Database Management Center) 201. Among them, the database management center 201 is used to develop scripts related to database products, and can generate scripts through visual modeling.
[0099] Specifically, the above process may include the following steps:
[0100] Step C1: Online visual modification generates SQL statements.
[0101] Exemplarily, online visual modification operations can be performed through the human-computer interaction environment provided by the editing unit 203; exemplary, the editing unit 203 can be a submodule or subunit of the table structure management unit 202, which is not limited in the embodiments of the present application.
[0102] Exemplarily, the online visual modification SQL statement may be executed for the kth module in the module set, and after executing the above modification, the kth module may be in the mth code state.
[0103] Step C2: Perform lineage analysis based on the changed tables, fields, and modification types.
[0104] Exemplarily, the table structure management unit 202 may analyze the mth code state and the m-1th code state to determine the kth difference state, and determine the changed table, field, and modification type corresponding to the kth difference state.
[0105] Exemplarily, the changed table, field, and modification type corresponding to the kth difference state may be the first target data in the aforementioned embodiment.
[0106] Exemplarily, the process of lineage analysis may be the process of determining the first target data in the aforementioned embodiment; in the field of data management and information technology, lineage analysis is used to track the relationship between data elements, which helps to track the source, flow and conversion process of data.
[0107] Exemplarily, the blood relationship analysis may be performed by the blood relationship analysis unit 204 .
[0108] Exemplarily, the basis for the lineage analysis unit 204 to perform lineage analysis is the SQL upstream and downstream relationship table 206, which may include sql_id, sys_id, sys_name, direction, database_name, table_code and field_code; wherein the above data are respectively used to represent the original identifier of the SQL statement contained in the second target data, the system identifier of the database system involved in the second target data, the system name of the database system involved in the second target data, the upstream and downstream directions associated with the second target data, the name of the database associated with the second target data, the name of the form associated with the second target data, and the field name of the data element associated with the second target data.
[0109] Exemplarily, the SQL upstream and downstream relationship table may be the association relationship in the aforementioned embodiment.
[0110] Step C3: trigger the upstream and downstream synchronization process according to the blood relationship analysis results.
[0111] Exemplarily, the upstream and downstream synchronization process may be performed by the upstream and downstream synchronization unit 205 .
[0112] Exemplarily, the data basis of the upstream and downstream synchronization process may be interface 207, wherein interface 207 may be the association module and data related to the association module in the aforementioned embodiment.
[0113] Exemplarily, interface 207 may include sqlpackName for representing the name of the database artifact, approveOpinion for representing the approval opinion, sqlPackUrl for representing the database artifact (Database Artefacts) link, impacts[] for representing the upstream and downstream impacts, cmdbld for representing the database system identifier, cmdbName for representing the database system name, type for representing the upstream or downstream type, and item for representing the confirmation matter.
[0114] Exemplarily, the approval opinion may represent the opinion on the approval of the execution result of the upstream and downstream synchronization process, and the above approval may be performed by professional technicians.
[0115] Exemplarily, a database artifact is a series of scripts and other related resources created and generated during the database design and development process, which are installed along with the program when the database system goes online; database artifacts typically include table structures, stored procedures, functions, and initialization scripts (Database Initialization Script), etc.; and the initialization script includes a series of SQL statement sets for inserting initial data.
[0116] Through the various functional units provided by the database management center, in the process of developing a module set corresponding to a requirement set, if an editing or updating operation is performed on any module in the module set through the editing unit, the lineage analysis unit and the upstream and downstream synchronization units can be used to realize real-time lineage analysis and synchronization of data elements corresponding to the editing or updating operations on other modules in the module set, thereby reducing the risk of data asynchrony between modules during database product development and improving the efficiency of database product development.
[0117] As can be seen from the above, in the data state synchronization method provided in the embodiment of the present application, based on the association relationship, the associated module associated with the kth module in the module set is determined, and then the data associated with the second target data in the associated module is determined as the first target data. In this way, through the above operation, the module range for determining the first target data can be narrowed, thereby improving the efficiency of the process of determining the first target data.
[0118] Based on the foregoing embodiment, in the data state synchronization method provided in the embodiment of the present application, based on the kth difference state and the association relationship between the modules in the module set, after the first target data in the trigger module set is synchronized to the kth target state, the following steps may also be performed:
[0119] Obtain a state synchronization result for the first target data; if the state synchronization result indicates that the first target data is successfully synchronized, test each module in the state-synchronized module set to obtain a test result; based on the test result, process the state-synchronized module set.
[0120] Exemplarily, if the status synchronization result indicates that the synchronization of the first target data has failed or has not been completed, then the test may not be performed on each module in the module set after the status synchronization.
[0121] In one implementation, the status synchronization result may include whether the first target data is fully synchronized or correctly synchronized.
[0122] In one implementation, the status synchronization result may be determined by detecting the synchronization process of the first target data and by checking the synchronized first target data.
[0123] In one implementation, if the first target data is synchronized successfully, each module in the module set may be submitted to a test phase, so that a tester can test the synchronized module set in a test environment to obtain a test result.
[0124] In one embodiment, the test result may include two results: test pass and test fail.
[0125] In one implementation, processing the module set based on the test results may be implemented in any of the following ways:
[0126] If the test result is failure, the failed modules in the module set and the reasons for failure can be sent to the R&D link for professional developers to update or modify the failed modules, and the next data status synchronization process and test process can be started through the data status synchronization method provided in the embodiment of the present application.
[0127] If the test result is passed, the module set with synchronized deployment status is provided for user use.
[0128] From the above, it can be seen that in the data state synchronization method provided in the embodiment of the present application, the state synchronization result for the first target data is obtained. If the state synchronization result indicates that the synchronization of the first target data is successful, each module in the module set after state synchronization is tested to obtain the test result. In this way, through the above links, real-time testing of the module set after state synchronization can be achieved; and, based on the test results, the module set after state synchronization is processed, thereby achieving targeted and precise control of the processing of the module set after state synchronization.
[0129] Based on the foregoing embodiment, in the data state synchronization method provided in the embodiment of the present application, based on the test results, the module set after state synchronization is processed, which can be implemented in the following manner:
[0130] If the test result indicates that at least some modules in the module set after state synchronization have passed the test, integration processing is performed on at least some modules to obtain module integration results.
[0131] The module integration result is used to be deployed to the user-end device.
[0132] Accordingly, if the test result indicates that at least some modules in the module set have passed the test, at least some modules may not be processed by integration.
[0133] In one embodiment, the user terminal device may include a physical machine device or a virtual machine device.
[0134] Figure 3 The schematic diagram of the process structure of the database product provided in the embodiment of the present application from demand confirmation to deployment. Figure 3 As shown, the process may include a demand confirmation step 301 , a research and development step 302 , a testing step 303 , and an operation and maintenance step 304 .
[0135] Exemplarily, in the demand confirmation stage 301, the following operations may be performed:
[0136] After the demand analysis, a demand set including demand A to demand C can be obtained, and a demand review is performed on the above demand set. After the demand review is passed, the demand review submission R&D operation is executed to trigger the start and execution of the R&D link 302.
[0137] Exemplarily, in the R&D stage 302, development can be performed by the database management center according to requirements A to C in the requirement set to obtain modules A to C respectively; exemplary, modules A to C can be the module set in the aforementioned embodiment.
[0138] In an embodiment of the present application, the database management center is used to generate and maintain database-related statements, including visual modeling of table structures, generation of data definition language (DDL) SQL statement changes based on model changes, maintenance of the life cycle of stored procedures and functions, and management of initialization scripts; and, the database management center can also generate and maintain the above-mentioned SQL around the business system, the version of the business system, and the requirement module, and provide a unified maintenance view for R&D, testing, and operation and maintenance links, thereby improving the efficiency of SQL R&D, testing, and operation and maintenance.
[0139] For example, in the R&D stage 302, it can be determined whether the code status of any module from module A to module C has changed. If it is determined that a change has occurred, a lineage analysis is initiated to determine the first target data associated with the second target data that has changed, and a synchronization operation is performed on the first target data based on requirements A to requirement C and the second target data.
[0140] Exemplarily, in the R&D stage 302, after the above-mentioned synchronization operation is completed, an upstream and downstream synchronization review can be performed to determine whether the synchronization operation for the first target data is complete and successful; exemplarily, if the synchronization operation for the first target data is complete and successful, the synchronized modules A to C can be packaged into a standard database product through a continuous integration (CI) tool to obtain a requirement A database product to a requirement C database product, and each database product can include table structures, functions, stored procedures and other SQL scripts corresponding to their respective requirements.
[0141] Among them, CI tools are designed to deliver high-quality software faster and more reliably by integrating code changes into a shared repository and automatically building, testing, and deploying applications. In an embodiment of the present application, the CI tool is used to continuously integrate changes to database artifacts into the database artifact repository to provide a system with continuous build capabilities.
[0142] In the embodiment of the present application, the CI tool is responsible for continuous integration, mainly based on the execution of the workflow set by the business system, by calling the database artifact generation interface exposed by the database management center, continuously generating the corresponding version of the database artifact, and pushing it to the database artifact warehouse of the continuous delivery (CD) tool; and, by continuously integrating SQL to form database artifacts, the release efficiency of the database artifact can be improved, thereby improving the efficiency of repairing database problems and launching new functions.
[0143] A table in a table structure is a basic data storage unit in a relational database, used to store a collection of related data; and the definition of a table structure usually includes the table name, column name, column data type, and column constraints.
[0144] A stored procedure is a set of predefined SQL statements in a database that can obtain input parameters and return results. It can be used to complete complex data processing and business logic.
[0145] A database function is a reusable code block encapsulated in a database to complete a specific calculation or processing logic. In actual applications, a function can receive input parameters and return a calculation result.
[0146] Exemplarily, in the R&D phase 302, the CD tool can also be used to perform the operation of continuously deploying the development library, thereby obtaining a development database. The CD tool is used to continuously deploy database products to database instances, providing a system with continuous deployment capabilities; in the embodiment of the present application, the CD tool is mainly based on the needs of deploying database products in the R&D phase, the testing phase, and the operation and maintenance phase, and uniquely locates a database product according to the business system and the database product version number parameters, and obtains it from the product warehouse and deploys it to the corresponding database instance.
[0147] Illustratively, in the R&D phase 302, after obtaining the development database, the aforementioned database products contained in the development database can be tested to determine whether the execution is successful. If the execution is successful, it can switch to the testing phase 303; if the execution is not successful, it can trigger the R&D team's repair operation to re-execute the preceding steps in the R&D phase 302.
[0148] Exemplarily, in the test phase 303, the CI tool can be used to advance the database product after a successful test to a test-state product, thereby obtaining the test-state requirement A database product to the requirement C database product. The CD tool can also be used to perform continuous deployment of the test library operation on each test-state database product, and automatically copy the simulation database to create a requirement database; wherein, the requirement A test database to the requirement C test database of the test-state products in the requirement database can be isolated from each other, and tests can be performed on the requirement A test database to the requirement C test database respectively, and it can be determined whether the execution is successful and the test passes. If the execution is unsuccessful or the test fails, it can be switched to the R&D phase to perform the R&D team's repair operation. If the execution is successful and the test passes, the above-mentioned test database can be integrated into a pre-release product.
[0149] For example, if the test database for requirement A and the test database for requirement B are executed successfully and the test passes, the test database for requirement A and the test database for requirement B can be processed into database A product and database B product in the pre-release state through the CI tool, and the pre-release database A product and database B product can be tested again; and, if the pre-release database A product and database B product are executed successfully and the test passes, switch to the operation and maintenance link 304; if the execution is not successful and the test passes, switch to the R&D link to execute the R&D team's repair operation.
[0150] Exemplarily, for the operation and maintenance link 304, the database A product in the pre-release state and the database B product can be advanced to the production state product to obtain the production state database A product corresponding to the requirement A, and the database B product corresponding to the requirement B; exemplarily, the production library can be automatically deployed through the CD tool to obtain the production database, and the production database can be tested or verified. If the test or verification is successful, the production upgrade is completed. If the test or verification fails, it switches to the R&D link 302 and performs repairs by the R&D team.
[0151] Through the CI tools and CD tools in the above figure, it is possible to achieve automatic switching of database products from the demand confirmation stage to the operation and maintenance stage, thereby improving the efficiency of database product development, testing, and deployment.
[0152] Moreover, in the above process, by building a database management center, the automated management of module development, testing, operation and maintenance as required is realized in the database DevOps process, and finally the functions of database change development, testing, operation and maintenance change, and database rollback are realized as required modules, which greatly improves the efficiency of database change and system launch, and reduces the various risks caused by database change.
[0153] At the same time, by disassembling the requirements set and configuring the R&D tasks in the R&D stage, R&D, testing, and operation and maintenance can manage the various types of database scripts and their life cycles generated in the R&D process from a unified perspective and a unified entrance according to the requirements in the requirements set; for example, in the R&D stage, by managing database changes online according to the requirements modularization, any modification to the table structure can be immediately discovered and triggered for lineage analysis, so as to synchronize upstream and downstream system changes according to the requirements module, thereby reducing the impact on the development progress of other requirements modules and improving the efficiency of synchronization of different modules; for example, by building a CI tool, the database scripts of the database management center can be continuously packaged into standard database products through the DevOps pipeline according to the requirements module; for example, by building a CD tool, the continuous deployment of the development database, test database, and production database corresponding to each link including R&D, testing, and operation and maintenance can be connected in series, and the isolation of the demand database can be achieved to weaken the mutual influence between modules during the testing of database products and the online process.
[0154] From the above figure, the database management center, CI tools, and CD tools together constitute the necessary tool chain of the database DevOps process, realizing modular R&D, testing, and operation and maintenance management executed on demand in the database change process.
[0155] Figure 4A schematic diagram of the structure of the database DevOps process technology implementation provided in the embodiment of the present application.
[0156] like Figure 4 As shown, the process may include the following steps:
[0157] Step D1: Generate relevant SQL statements.
[0158] Exemplarily, the relevant SQL statement 401 may be generated by a visual development tool provided by the database management center 201; exemplarily, after the SQL statement is generated, a code state change of the kth module in the module set may be triggered.
[0159] Exemplarily, the relevant SQL statement 401 may include a table structure, a stored procedure, a function, an initialization script, and the like.
[0160] Step D2: Call the packaging interface of the database management center.
[0161] Exemplarily, the database-related packaging workflow of CI tool 402 may call database artifact generation interface 403 , thereby triggering the execution of step D3 .
[0162] Step D3: Collect SQL of the corresponding system and version in the database management center.
[0163] Exemplarily, the above SQL may include the related SQL statement 401 generated by step D1.
[0164] Exemplarily, the operation of downloading the database artifact may also be performed through the database artifact generation interface to trigger the execution of step D4.
[0165] Step D4: Pack the database product into a compressed file according to its format.
[0166] Exemplarily, the format of the compressed file may be *.ZIP.
[0167] Exemplarily, the database product file structure 404 represented by the format of the data product may include elements such as first_execute for representing the prefix script, operation for representing the main script, table for representing the table structure, procedure for representing the stored procedure, function for representing the function, init for representing the initialization script, temporary for representing the test-only running script, product for representing the production-only running script, last_execute for representing the post-script, rollback for representing the rollback script, and backup for representing the backup script.
[0168] Step D5: Push to the database artifact warehouse of the CD tool.
[0169] Exemplarily, after the database artifact warehouse of the CD tool 405 obtains the database artifact file in the compressed file format, step D6 may be triggered through the database deployment workflow.
[0170] Step D6: Call the database product deployment interface according to the release pipeline of the corresponding environment.
[0171] Exemplarily, by calling the database artifact deployment interface in the database artifact deployment interface 406 , the specified database artifact can be deployed to the specified database instance, thereby obtaining the development database 407 , the test database 408 , and the production database 409 .
[0172] Through the above process, with the help of CI tools and CD tools, the state switching from SQL statement development to various forms of database products is realized, and the automated deployment from database products to development databases, test databases and production databases is also realized, thereby improving the automation and intelligence level of the operation process from SQL statements to database deployment.
[0173] When the data state synchronization method provided in the embodiment of the present application is applied to actual database development and upgrade, the efficiency of database development and deployment can be improved; and the database management center can lower the development threshold by visually generating scripts; at the same time, by generating standard database products, the standardization level of database deployment is improved; on the other hand, the CI tool ensures that the latest database products can be generated in real time by continuously executing the packaging workflow, which accelerates the development and submission test of database scripts; on this basis, the CD tool ensures that the latest database products can be quickly and automatically deployed to the corresponding database environment by continuously executing the deployment workflow, reducing the operational risks of manual deployment and improving deployment efficiency.
[0174] Therefore, the data state synchronization method provided in the embodiment of the present application realizes the automation and independent management of each link of R&D, testing and operation and maintenance by performing modular development according to the requirement set in the database change process, and solves the problems of slow integration and testing and large rollback range caused by the mutual influence of various requirement modules of database changes; and, through online, visual and standardized table structure modification, and real-time lineage analysis of table structure modification, the risk of inconsistent online data structure of upstream and downstream systems caused by table structure changes is solved; at the same time, through the standardized directory structure of database products, the use of automated tools becomes possible, which solves the problems of more manual intervention, longer script installation time and lower delivery efficiency in related technologies; on the other hand, through CI tools and CD tools, new database products are continuously packaged and deployed, and the test database is copied, so that each requirement module does not affect each other in the test environment, thereby solving the problem of inconsistent test progress and low test efficiency caused by the mutual influence of each requirement module.
[0175] In summary, the method provided in the embodiment of the present application can solve the technical problems of more manual intervention, longer script installation time and low delivery efficiency in the database development and upgrade process in the related technology, and can also solve the technical problem of needing to re-execute the development process after problems occur during database testing or deployment, thereby facilitating the rapid repair of problems in the database research and development, testing and deployment links; and, it can also achieve unified processing of the formats of SQL files developed by different business systems and development teams, and can also reduce the probability of errors in SQL script files manually delivered in different links; on the other hand, it can also reduce the probability of version rollback exceptions caused by abnormal database script changes in a single module, and affect the testing and deployment of other modules; it can also perform upstream and downstream impact analysis in real time according to the table structure update status after the table structure of a single module is updated, thereby reducing the risk of upstream and downstream system abnormalities.
[0176] Based on the above embodiments, the present application also provides a data status synchronization device. Figure 5 A schematic diagram of the structure of a data state synchronization device provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the data state synchronization device 5 may include:
[0177] The acquisition module 501 is used to acquire the mth code state of the kth module in the module set during the development process of the module set; wherein the kth module is associated with the kth requirement in the requirement set of the database; k is an integer greater than or equal to 1 and less than or equal to K; K is an integer greater than 1 and is the number of modules included in the module set; m is an integer greater than 1;
[0178] A determination module 502, configured to determine a kth difference state between an mth code state of a kth module and an m-1th code state of a kth module;
[0179] The synchronization module 503 is used to trigger the synchronization of the first target data in the module set to the kth target state based on the kth difference state and the association relationship between the modules in the module set, so that the synchronized module set matches the requirement set; wherein the first target data and the kth target state are associated with the kth difference state.
[0180] In some embodiments, the determination module 502 is used to determine the second target data associated with the kth difference state from the data elements included in the kth module; and determine the first target data from the module set based on the association relationship and the second target data.
[0181] In some embodiments, the second target data includes at least one data element included in a structured query language SQL statement;
[0182] Determination module 502 is used to determine at least one of the associated SQL statements, associated databases, associated tables and associated fields associated with at least one data element from a module set based on the associated parameters corresponding to at least one data element in the association relationship; and determine at least one of the associated SQL statements, associated databases, associated tables and associated fields as the first target data.
[0183] In some embodiments, the determination module 502 is used to determine, based on the association relationship, an associated module associated with the kth module in the module set; and determine that the data associated with the second target data contained in the associated module is the first target data.
[0184] In some embodiments, the acquisition module 501 is used to acquire a state synchronization result for the first target data;
[0185] The determination module 502 is used to test each module in the state-synchronized module set to obtain a test result if the state synchronization result indicates that the first target data is successfully synchronized; and process the state-synchronized module set based on the test result.
[0186] In some embodiments, the determination module 502 is used to integrate at least some of the modules to obtain module integration results if the test results indicate that at least some of the modules in the module set after status synchronization have passed the test; wherein the module integration results are used to deploy to the user terminal device.
[0187] Based on the above embodiments, the present application also provides a data status synchronization device. Figure 6 A schematic diagram of the structure of a data state synchronization device provided in an embodiment of the present application, such as Figure 6As shown, the data state synchronization device 6 includes a processor 601 and a memory 602, and the memory 602 stores a computer program; when the computer program is executed by the processor 601, it can implement any of the above-mentioned data state synchronization methods.
[0188] Based on the foregoing embodiments, the embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored; when the computer program is executed by a processor of an electronic device, it can implement the data status synchronization method as described in any of the foregoing.
[0189] Based on the foregoing embodiments, an embodiment of the present application further provides a computer program product, which includes a computer program; when the computer program is executed by a processor of an electronic device, it can implement any of the data status synchronization methods described above.
[0190] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0191] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0192] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0193] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0194] It should be noted that the above-mentioned computer-readable storage medium can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM) and other memories; it can also be various electronic devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0195] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0196] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0197] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus necessary general hardware nodes, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0198] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0199] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0200] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0201] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A data status synchronization method, It is characterized in that The method comprises: In the development process of the module set, the mth code state of the kth module in the module set is obtained; wherein the kth module is associated with the kth requirement in the requirement set of the database; k is an integer greater than or equal to 1 and less than or equal to K; K is an integer greater than 1 and is the number of modules included in the module set; m is an integer greater than 1; Determining a kth difference state between an mth code state of the kth module and an m-1th code state of the kth module; Based on the kth difference state and the association relationship between the modules in the module set, trigger the first target data in the module set to be synchronized to the kth target state so that the synchronized module set matches the requirement set; wherein the first target data and the kth target state are associated with the kth difference state.
2. The method according to claim 1, It is characterized in that Before triggering synchronization of the first target data in the module set to the kth target state based on the kth difference state and the association relationship between the modules in the module set, the method further includes: Determine second target data associated with the kth difference state from the data elements included in the kth module; Based on the association relationship and the second target data, the first target data is determined from the module set.
3. The method according to claim 2, It is characterized in that The second target data includes at least one data element included in a structured query language SQL statement; The determining the first target data from the module set based on the association relationship and the second target data includes: Based on the association parameters corresponding to the at least one data element in the association relationship, determining at least one of an associated SQL statement, an associated database, an associated table, and an associated field associated with the at least one data element from the module set; Determine at least one of the associated SQL statement, the associated database, the associated table, and the associated field as the first target data.
4. The method according to claim 2, It is characterized in that The determining the first target data from the module set based on the association relationship and the second target data includes: Based on the association relationship, determining an associated module in the module set that is associated with the kth module; The data included in the association module and associated with the second target data is determined to be the first target data.
5. The method according to claim 1, It is characterized in that After triggering synchronization of the first target data in the module set to the kth target state based on the kth difference state and the association relationship between the modules in the module set, the method further includes: Obtaining a status synchronization result for the first target data; If the state synchronization result indicates that the first target data is successfully synchronized, each module in the module set after the state synchronization is tested to obtain a test result; Based on the test result, the module set after state synchronization is processed.
6. The method according to claim 5, It is characterized in that The processing of the module set after state synchronization based on the test result includes: If the test result indicates that at least some modules in the module set after the state synchronization have passed the test, integration processing is performed on at least some modules to obtain module integration results; wherein the module integration results are used for deployment to the user terminal device.
7. A data status synchronization device, It is characterized in that The data state synchronization device comprises: An acquisition module, used for acquiring the mth code state of the kth module in the module set during the development process of the module set; wherein the kth module is associated with the kth requirement in the requirement set of the database; k is an integer greater than or equal to 1 and less than or equal to K; K is an integer greater than 1 and is the number of modules included in the module set; m is an integer greater than 1; a determination module, configured to determine a kth difference state between an mth code state of the kth module and an m-1th code state of the kth module; A synchronization module, used to trigger the synchronization of the first target data in the module set to the kth target state based on the kth difference state and the association relationship between the modules in the module set, so that the synchronized module set matches the requirement set; wherein the first target data and the kth target state are associated with the kth difference state.
8. A data status synchronization device, It is characterized in that The data status synchronization device includes a processor and a memory, wherein a computer program is stored in the memory; when the computer program is executed by the processor, the data status synchronization method according to any one of claims 1 to 6 can be implemented.
9. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program; when the computer program is executed by a processor of an electronic device, the data status synchronization method as described in any one of claims 1 to 6 can be implemented.
10. A computer program product, It is characterized in that The program product includes a computer program; when the computer program is executed by a processor of an electronic device, it can implement the data status synchronization method as described in any one of claims 1 to 6.
