Configuration data synchronization method, device and electronic device
By obtaining and synchronizing the configuration data version identifier, querying the effective time from the benchmark library and synchronizing the configuration data, the problem of inconsistent configuration data in the offline test system and online environment in the real estate transaction system is solved, and the testing accuracy and reproducing ability of abnormal problems is improved.
Patent Information
- Application Number
- CN202011257692.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-11
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2040-11-11
AI Technical Summary
In the existing real estate transaction systems, the configuration data of the offline testing system and the online environment are often inconsistent, resulting in poor offline testing and difficult to reproduce abnormal problems.
By obtaining the configuration data version identification to be synchronized, query the configuration data entry time from the preset benchmark library, and obtain synchronized configuration data based on the effective time and the benchmark library synchronization time, and synchronize it to the offline test system to make it consistent with the online environment.
Ensure that the configuration data of the offline test system is consistent with the online environment, improve the accuracy of the test results, and provide a reliable basis for the reproduction of abnormal problems.
Smart Images

Figure CN112527628B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data synchronization, and in particular to a configuration data synchronization method, device and electronic device. Background Art
[0002] The real estate transaction process not only involves many departments such as appraisal agencies, banks, and governments, but also different regions have different local policies. Therefore, the existing real estate transaction process is usually set to a configurable mode to support personalized custom transaction processes in cities across the country. Therefore, each city has a personalized real estate transaction system.
[0003] In the entire real estate transaction system, the offline test system and the online environment are often isolated, but all of their controls are based on the configuration data of the online environment. When the configuration data of the offline test system is inconsistent with the configuration data of the online environment, the operation of the offline test system will be inconsistent with the operation of the online environment system, which will affect the test effect of the offline test system. Moreover, it is very easy to have the offline test system run perfectly, but the online environment runs abnormally. Therefore, it is very necessary to ensure the consistency of the configuration data of the online environment and the offline test system. Summary of the invention
[0004] In view of the problems existing in the prior art, the embodiments of the present invention provide a configuration data synchronization method, device and electronic device.
[0005] In a first aspect, an embodiment of the present invention provides a configuration data synchronization method, including:
[0006] Get the version ID of the configuration data to be synchronized to the offline test system;
[0007] Based on the version identifier, query the corresponding configuration data effective time from a preset reference library, wherein the reference library stores configuration data of each version and effective records of the configuration data of each version, and the effective records include the version identifier and the configuration data effective time;
[0008] According to the configuration data effective time and the benchmark library synchronization time, the synchronization configuration data to be synchronized to the offline test system is obtained, and the synchronization configuration data is synchronized to the offline test system, wherein the benchmark library synchronization time refers to the time when the benchmark library last synchronized the configuration data with the offline test system.
[0009] Further, the acquiring of synchronization configuration data to be synchronized to the offline test system according to the configuration data effective time and the reference library synchronization time includes:
[0010] If the configuration data effective time is greater than or equal to the reference library synchronization time, the configuration data between the reference library synchronization time and the configuration data effective time corresponding to the version identifier is extracted from the reference library and used as the synchronized configuration data.
[0011] Further, the acquiring the synchronization configuration data to be synchronized to the offline test system according to the configuration data effective time and the reference library synchronization time also includes:
[0012] If the configuration data effective time is less than the reference library synchronization time, the configuration data corresponding to the version identifier is extracted from the reference library and used as the synchronization configuration data.
[0013] Furthermore, when the version identifier of the configuration data to be synchronized to the offline test system is not obtained, the method further includes:
[0014] Obtaining a screening time, and confirming a current configuration data effective time according to the screening time;
[0015] According to the effective time of the current configuration data, the synchronization configuration data to be synchronized to the offline test system is acquired, and the synchronization configuration data is synchronized to the offline test system.
[0016] Further, the acquiring, according to the effective time of the current configuration data, synchronization configuration data to be synchronized to the offline test system, and synchronizing the synchronization configuration data to the offline test system includes:
[0017] Determine the corresponding current version identifier according to the effective time of the current configuration data;
[0018] The configuration data of the offline test system is synchronized based on the current version identifier.
[0019] Furthermore, the configuration data synchronization method further includes:
[0020] According to the current configuration data effective time and the reference library synchronization time, obtaining the synchronization configuration data to be synchronized to the offline test system includes:
[0021] If the current configuration data effective time is greater than or equal to the reference library synchronization time, the configuration data between the reference library synchronization time and the current configuration data effective time corresponding to the current version identifier is extracted from the reference library and used as the synchronized configuration data.
[0022] Further, the acquiring the synchronization configuration data to be synchronized to the offline test system according to the current configuration data effective time and the reference library synchronization time also includes:
[0023] If the effective time of the current configuration data is less than the synchronization time of the reference library, the configuration data corresponding to the current version identifier is extracted from the reference library and used as the synchronization configuration data.
[0024] In a second aspect, an embodiment of the present invention provides a configuration data synchronization device, including:
[0025] An acquisition module is used to obtain the version identifier of the configuration data to be synchronized to the offline test system;
[0026] A query module, configured to query the corresponding configuration data effective time from a preset reference library based on the version identifier, wherein the reference library stores configuration data of each version and effective records of the configuration data of each version, wherein the effective records include the version identifier and the configuration data effective time;
[0027] A synchronization module is used to obtain the synchronization configuration data to be synchronized to the offline test system according to the configuration data effective time and the benchmark library synchronization time, and synchronize the synchronization configuration data to the offline test system, wherein the benchmark library synchronization time refers to the time when the benchmark library last synchronized the configuration data with the offline test system.
[0028] Furthermore, the synchronization module is also used for:
[0029] If the configuration data effective time is greater than or equal to the reference library synchronization time, the configuration data between the reference library synchronization time and the configuration data effective time corresponding to the version identifier is extracted from the reference library and used as the synchronized configuration data.
[0030] Furthermore, the synchronization module is also used for:
[0031] If the configuration data effective time is less than the reference library synchronization time, the configuration data corresponding to the version identifier is extracted from the reference library and used as the synchronization configuration data.
[0032] Furthermore, the configuration data synchronization device further includes:
[0033] A screening time module, used to obtain the screening time when the version identifier of the configuration data to be synchronized to the offline test system is not obtained, and to confirm the effective time of the current configuration data according to the screening time;
[0034] Correspondingly, the synchronization module is used to obtain the synchronization configuration data to be synchronized to the offline test system according to the effective time of the current configuration data, and synchronize the synchronization configuration data to the offline test system.
[0035] Furthermore, the synchronization module is specifically used for:
[0036] Determine the corresponding current version identifier according to the effective time of the current configuration data;
[0037] The configuration data of the offline test system is synchronized based on the current version identifier.
[0038] Furthermore, the synchronization module is also used for:
[0039] If the current configuration data effective time is greater than or equal to the reference library synchronization time, the configuration data between the reference library synchronization time and the current configuration data effective time corresponding to the current version identifier is extracted from the reference library and used as the synchronized configuration data.
[0040] Furthermore, the synchronization module is also used for:
[0041] If the effective time of the current configuration data is less than the synchronization time of the reference library, the configuration data corresponding to the current version identifier is extracted from the reference library and used as the synchronization configuration data.
[0042] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned configuration data synchronization method when executing the computer program.
[0043] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above-mentioned configuration data synchronization method when executed by a processor.
[0044] An embodiment of the present invention provides a configuration data synchronization method, device and electronic device. The method obtains a version identifier of configuration data to be synchronized to an offline test system, and based on the version identifier, queries the configuration data effectiveness time corresponding to the version identifier from a preset benchmark library, and obtains the synchronization configuration data to be synchronized to the offline test system according to the configuration data effectiveness time and the time when the benchmark library last synchronizes the configuration data with the offline test system. Finally, the synchronization configuration data is synchronized to the offline test system, so that the offline test system is consistent with the online environment configuration data, so as to ensure the accuracy of the test process and verification results of various offline test systems in real usage scenarios, and can provide an accurate and reliable basis for the reproduction of abnormal problem situations, so as to accurately determine the cause of the abnormal situation and facilitate the regulation and management of the real estate transaction system. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, a brief introduction will be given below to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0046] Figure 1 This is a first flow chart of a configuration data synchronization method provided by an embodiment of the present invention;
[0047] Figure 2 is a second flow chart of a configuration data synchronization method provided by an embodiment of the present invention;
[0048] Figure 3 A schematic diagram of the structure of a configuration data synchronization device provided by an embodiment of the present invention;
[0049] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention.
[0050] Reference numerals:
[0051] 301: acquisition module; 302: query module; 303: synchronization module;
[0052] 401: processor; 402: communication interface; 403: memory; 404: communication bus. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] An embodiment of the present invention provides a configuration data synchronization method, the method comprising:
[0055] Get the version ID of the configuration data to be synchronized to the offline test system;
[0056] Based on the version identifier, query the corresponding configuration data effective time from a preset reference library, wherein the reference library stores configuration data of each version and effective records of the configuration data of each version, and the effective records include the version identifier and the configuration data effective time;
[0057] According to the configuration data effective time and the benchmark library synchronization time, the synchronization configuration data to be synchronized to the offline test system is obtained, and the synchronization configuration data is synchronized to the offline test system, wherein the benchmark library synchronization time refers to the time when the benchmark library last synchronized the configuration data with the offline test system.
[0058] The configuration data synchronization method provided by the embodiment of the present invention obtains the version identifier of the configuration data to be synchronized to the offline test system, and based on the version identifier, queries the configuration data effective time corresponding to the version identifier from a preset benchmark library, and obtains the synchronization configuration data to be synchronized to the offline test system according to the configuration data effective time and the time when the benchmark library last synchronizes the configuration data with the offline test system. Finally, the synchronization configuration data is synchronized to the offline test system, so that the offline test system is consistent with the online environment configuration data, so as to ensure the accuracy of the test process and verification results of various offline test systems in real usage scenarios, and can provide an accurate and reliable basis for the reproduction of abnormal problem situations, so as to accurately determine the cause of the abnormal situation and facilitate the regulation and management of the real estate transaction system.
[0059] The configuration data synchronization method provided by the embodiment of the present invention is described in more detail below.
[0060] In a first aspect, an embodiment of the present invention provides a configuration data synchronization method that can be applied to a real estate transaction system. Figure 1 is a first flow chart of a configuration data synchronization method provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:
[0061] S101, obtaining a version identifier of configuration data to be synchronized to an offline test system;
[0062] The version identifier of the configuration data to be synchronized to the offline test system is obtained, and the version identifier is used as a basis for finding the corresponding configuration data. For example, the preset version number md5 is obtained.
[0063] S102: Based on the version identifier, query the corresponding configuration data effective time from a preset reference library, wherein the reference library stores configuration data of each version and effective records of the configuration data of each version, and the effective records include the version identifier and the configuration data effective time;
[0064] In the real estate transaction system, configuration data is usually non-sensitive information data, and configuration data is usually the data that is first configured in the online environment. However, the online environment configuration data needs to be synchronized with the offline test system to ensure the consistency of online and offline data. Setting up a benchmark library as a conversion intermediary for synchronizing data from the online environment to the offline test system can synchronize the configuration data and related information of the online environment to the benchmark library in real time in the early preset stage, so that each subsequent offline test system uses the benchmark library as a benchmark and pulls data from the benchmark library for synchronization.
[0065] That is, the benchmark library will pre-store various versions of the real estate transaction system's configuration data and the effectiveness records of each version of the configuration data. The effectiveness records include a version identifier and the configuration data effectiveness time, and the version identifier of the configuration data is unique. It can be understood that each version of the configuration data has only a unique version number; and the configuration data effectiveness time of each version of the configuration data is also unique. As the version is updated, the effectiveness time is gradually updated each time.
[0066] Based on the determined version number md5, the configuration data effective time of the configuration data corresponding to the version number md5 is queried from a preset reference library.
[0067] S103, according to the configuration data effective time and the reference library synchronization time, obtaining the synchronization configuration data to be synchronized to the offline test system, and synchronizing the synchronization configuration data to the offline test system, wherein the reference library synchronization time refers to the time when the reference library last synchronized the configuration data with the offline test system;
[0068] Each data synchronization process from the benchmark library to the offline test system must be based on the last synchronization, that is, the time when the benchmark library and the offline test system last synchronized configuration data must be determined as the benchmark library synchronization time, and the configuration data effective time determined in step S102 is compared with the benchmark library synchronization time. Through the comparison result of the two, the time period when data synchronization was not performed or the configuration data that was not synchronized is determined, so as to determine the synchronization configuration data and synchronize it to the offline test system, so that the data of the offline test system is consistent with the data in the benchmark library.
[0069] Specifically, if the configuration data effective time is greater than or equal to the reference library synchronization time, the time period in which data synchronization is not performed is the first time period starting from the reference library synchronization time and ending at the configuration data effective time, and the data in the reference library corresponding to the first time period is pulled out as the synchronization configuration data and synchronized to the offline test system;
[0070] If the configuration data effective time is less than the reference database synchronization time, the configuration data that has not been synchronized is the configuration data of the version corresponding to the configuration data effective time, and is used as the synchronization configuration data and synchronized to the offline test system.
[0071] The configuration data synchronization method provided in the embodiment of the present invention can be understood as synchronizing the configuration data of the offline test system in real time by specifying the configuration data version number, obtaining the version identifier of the configuration data to be synchronized to the offline test system, and based on the version identifier, querying the configuration data effective time corresponding to the version identifier from the preset benchmark library, according to the configuration data effective time and the time when the benchmark library last synchronized the configuration data with the offline test system, obtaining the synchronization configuration data to be synchronized to the offline test system, and finally synchronizing the synchronization configuration data to the offline test system, so that the offline test system is consistent with the online environment configuration data, so as to ensure the accuracy of the test process and verification results of various offline test systems in real usage scenarios, and can provide an accurate and reliable basis for the reproduction of abnormal problem situations, so as to accurately determine the cause of the abnormal situation and facilitate the regulation and management of the real estate transaction system.
[0072] Figure 2 is a second flow chart of a configuration data synchronization method provided by an embodiment of the present invention, such as Figure 2 As shown, this method Figure 1 Based on the embodiment shown, in step S103 (see Figure 2 The step of obtaining the synchronization configuration data to be synchronized to the offline test system according to the configuration data effective time and the reference library synchronization time includes:
[0073] If the configuration data effective time is greater than or equal to the reference library synchronization time, the configuration data between the reference library synchronization time and the configuration data effective time corresponding to the version identifier is extracted from the reference library and used as the synchronized configuration data.
[0074] If the configuration data effective time is greater than or equal to the benchmark library synchronization time, then the time period without data synchronization is the first time period starting from the benchmark library synchronization time and ending at the configuration data effective time. Then the configuration data corresponding to the first time period and between the benchmark library synchronization time and the configuration data effective time corresponding to the version identifier is pulled out from the benchmark library and used as the synchronization configuration data, and finally the determined synchronization configuration data is synchronized to the offline test system. The synchronization configuration data can be understood as the incremental data after the benchmark library has been synchronized to the offline test system. At this time, only the incremental data needs to be synchronized to the offline test system, and the benchmark data that has been synchronized to the offline test system by the benchmark library does not need to be synchronized again, which reduces the amount of data calculations during the synchronization process and reduces the operating burden.
[0075] And if Figure 2 As shown, this method Figure 1 Based on the embodiment shown, in step S103 (see Figure 2 The method further comprises: obtaining synchronization configuration data to be synchronized to the offline test system according to the configuration data effective time and the reference library synchronization time.
[0076] If the configuration data effective time is less than the reference library synchronization time, the configuration data corresponding to the version identifier is extracted from the reference library and used as the synchronization configuration data.
[0077] Finally, the confirmed synchronization configuration data will be synchronized to the offline test system.
[0078] If the configuration data effective time is less than the benchmark library synchronization time, the configuration data that has not been synchronized is the configuration data of the version corresponding to the configuration data effective time. The configuration data of the version corresponding to the time end point is pulled out from the benchmark library and used as the synchronization configuration data. Finally, the determined synchronization configuration data is synchronized to the offline test system. The synchronization configuration data can be understood as all the configuration data of a certain version before the benchmark library is synchronized to the offline test system. At this time, all the configuration data corresponding to the version needs to be synchronized to the offline test system, and even all the configuration data corresponding to the version and the versions before it can be synchronized to the offline test system.
[0079] On the basis of the above embodiment, when the version identifier of the configuration data to be synchronized to the offline test system is not obtained, the configuration data synchronization method further includes:
[0080] Obtaining a screening time, and confirming a current configuration data effective time according to the screening time;
[0081] In this embodiment, when the version identifier of the configuration data to be synchronized to the offline test system is not obtained, it can be understood that the configuration data version number is not specified. At this time, a screening time is obtained or a screening time is customized. The screening time can be customized according to the time when abnormal problems are automatically reported in the online environment. The most recent configuration data effective time before the screening time is confirmed as the current configuration data effective time.
[0082] According to the effective time of the current configuration data, acquiring synchronization configuration data to be synchronized to the offline test system, and synchronizing the synchronization configuration data to the offline test system;
[0083] The effective time of the determined current configuration data is compared with the synchronization time of the benchmark library. Through the comparison result of the two, the time period when data synchronization was not performed or the configuration data that was not synchronized is determined to determine the synchronized configuration data, and synchronize it to the offline test system, so that the data of the offline test system is consistent with the data in the benchmark library.
[0084] On the basis of the above embodiment, the step of acquiring the synchronization configuration data to be synchronized to the offline test system according to the effective time of the current configuration data, and synchronizing the synchronization configuration data to the offline test system includes:
[0085] Determine the corresponding current version identifier according to the effective time of the current configuration data; and synchronize the configuration data of the offline test system based on the current version identifier.
[0086] The corresponding current version identifier, which is also a uniquely determined version number, is determined according to the effective time of the current configuration data. According to the determined version number, the configuration data effective time (which is the same as the effective time of the current configuration data) of the configuration data corresponding to the version number is queried from the preset benchmark library. Then, according to the comparison result of the effective time of the current configuration data and the synchronization time of the benchmark library, the time period in which data synchronization has not been performed is determined or the configuration data in which data synchronization has not been performed is determined, so as to determine the synchronized configuration data and synchronize it to the offline test system, so that the data of the offline test system and the data in the benchmark library are consistent.
[0087] Based on the above embodiment, the configuration data synchronization method further includes:
[0088] According to the current configuration data effective time and the reference library synchronization time, the synchronization configuration data to be synchronized to the offline test system is obtained, including:
[0089] If the current configuration data effective time is greater than or equal to the reference library synchronization time, the configuration data between the reference library synchronization time and the current configuration data effective time corresponding to the current version identifier is extracted from the reference library and used as the synchronized configuration data.
[0090] The principle of this step is Figure 2 The principle of sub-step 1 (shown in the left box content in the dotted box) in step S103 of the method shown is exactly the same and will not be repeated here.
[0091] On the basis of the above embodiment, the step of acquiring the synchronization configuration data to be synchronized to the offline test system according to the current configuration data effective time and the reference library synchronization time further includes:
[0092] If the effective time of the current configuration data is less than the synchronization time of the reference library, the configuration data corresponding to the current version identifier is extracted from the reference library and used as the synchronization configuration data.
[0093] The principle of this step is Figure 2 The principle of sub-step 2 (shown in the right box content in the dotted box) in step S103 of the method shown is exactly the same and will not be repeated here.
[0094] Based on the above embodiment, the configuration data synchronization method further includes:
[0095] If neither the version identifier nor the effective time of the current configuration data can be determined, then after the synchronization time of the benchmark library, the latest version of the configuration data after the synchronization time of the benchmark library will be used as the synchronization configuration data, and dynamically and in real time synchronized to the offline test system, so that the data of the offline test system is consistent with the data in the benchmark library.
[0096] In a second aspect, an embodiment of the present invention provides a configuration data synchronization device that can be applied to a real estate transaction system. Figure 3 A schematic diagram of the structure of a configuration data synchronization device provided by an embodiment of the present invention, such as Figure 3 As shown, the device includes: an acquisition module 301, a query module 302 and a synchronization module 303.
[0097] in:
[0098] The acquisition module 301 is used to acquire the version identifier of the configuration data to be synchronized to the offline test system. For example, the version identifier of the configuration data currently required to be synchronized to the offline test system is acquired, and the version identifier is used as a basis for finding the corresponding configuration data. For example, the preset version number md5 is acquired.
[0099] A query module 302 is used to query the corresponding configuration data effective time from a preset reference library based on the version identifier, wherein the reference library stores configuration data of each version and effective records of the configuration data of each version, and the effective records include the version identifier and the configuration data effective time;
[0100] The benchmark library will pre-store various versions of configuration data of the real estate transaction system and the effectiveness records of various versions of the configuration data. The effectiveness records include the version identifier and the configuration data effectiveness time, and the version identifier of the configuration data is unique. It can be understood that each version of the configuration data has only a unique version number; and the configuration data effectiveness time of each version of the configuration data is also unique. As the version is updated, the effectiveness time is gradually updated each time.
[0101] The query module 302 queries the configuration data effective time of the configuration data corresponding to the version number md5 from a preset reference library based on the determined version number md5.
[0102] Synchronization module 303, used for obtaining synchronization configuration data to be synchronized to the offline test system according to the configuration data effective time and the reference library synchronization time, and synchronizing the synchronization configuration data to the offline test system, wherein the reference library synchronization time refers to the time when the reference library last synchronized the configuration data with the offline test system;
[0103] Each data synchronization process from the benchmark library to the offline test system must be based on the last synchronization, that is, the time when the benchmark library and the offline test system last synchronized configuration data must be determined as the benchmark library synchronization time. The synchronization module 303 compares the configuration data effective time determined by the query module 302 with the benchmark library synchronization time. Through the comparison result of the two, the time period when data synchronization was not performed or the configuration data that was not synchronized is determined, so as to determine the synchronization configuration data and synchronize it to the offline test system, so that the data of the offline test system is consistent with the data in the benchmark library.
[0104] Specifically, if the configuration data effective time is greater than or equal to the reference library synchronization time, the time period in which data synchronization is not performed is the first time period starting from the reference library synchronization time and ending at the configuration data effective time, and the data in the reference library corresponding to the first time period is pulled out as the synchronization configuration data and synchronized to the offline test system;
[0105] If the configuration data effective time is less than the reference database synchronization time, the configuration data that has not been synchronized is the configuration data of the version corresponding to the configuration data effective time, and is used as the synchronization configuration data and synchronized to the offline test system.
[0106] The configuration data synchronization device provided by the embodiment of the present invention has various modules connected in sequence and working in cooperation with each other, so that the device obtains the version identification of the configuration data to be synchronized to the offline test system, and based on the version identification, queries the configuration data effectiveness time corresponding to the version identification from the preset benchmark library, and obtains the synchronization configuration data to be synchronized to the offline test system according to the configuration data effectiveness time and the time when the benchmark library last synchronizes the configuration data with the offline test system. Finally, the synchronization configuration data is synchronized to the offline test system, so that the offline test system is consistent with the online environment configuration data, so as to ensure the accuracy of the test process and verification results of various offline test systems in real usage scenarios, and can provide an accurate and reliable basis for the reproduction of abnormal problem situations, so as to accurately determine the cause of the abnormal situation and facilitate the regulation and management of the real estate transaction system.
[0107] Based on the above embodiment, the synchronization module 303 is further used for:
[0108] If the configuration data effective time is greater than or equal to the reference library synchronization time, the configuration data between the reference library synchronization time and the configuration data effective time corresponding to the version identifier is extracted from the reference library and used as the synchronized configuration data.
[0109] Based on the above embodiment, the synchronization module 303 is further used for:
[0110] If the configuration data effective time is less than the reference library synchronization time, the configuration data corresponding to the version identifier is extracted from the reference library and used as the synchronization configuration data.
[0111] Based on the above embodiment, the configuration data synchronization device further includes:
[0112] Filter time module( Figure 3 ), for obtaining the screening time when the version identification of the configuration data to be synchronized to the offline test system is not obtained, and confirming the effective time of the current configuration data according to the screening time;
[0113] Correspondingly, the synchronization module 303 is used to obtain the synchronization configuration data to be synchronized to the offline test system according to the effective time of the current configuration data, and synchronize the synchronization configuration data to the offline test system.
[0114] Based on the above embodiment, the synchronization module 303 is specifically used for:
[0115] Determine the corresponding current version identifier according to the effective time of the current configuration data;
[0116] The configuration data of the offline test system is synchronized based on the current version identifier.
[0117] Based on the above embodiment, the synchronization module 303 is further used for:
[0118] If the current configuration data effective time is greater than or equal to the reference library synchronization time, the configuration data between the reference library synchronization time and the current configuration data effective time corresponding to the current version identifier is extracted from the reference library and used as the synchronized configuration data.
[0119] Based on the above embodiment, the synchronization module 303 is further used for:
[0120] If the effective time of the current configuration data is less than the synchronization time of the reference library, the configuration data corresponding to the current version identifier is extracted from the reference library and used as the synchronization configuration data.
[0121] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned configuration data synchronization method when executing the computer program. Figure 4 The physical structure diagram of the electronic device is shown as an example. Figure 4 As shown, the electronic device includes: a processor (processor) 401, a communication interface (Communications Interface) 402, a memory (memory) 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 communicate with each other through the communication bus 404. The processor 401 can call the logic instructions in the memory 403 to execute the configuration data synchronization method provided by the above-mentioned method embodiments, and the method includes:
[0122] Get the version ID of the configuration data to be synchronized to the offline test system;
[0123] Based on the version identifier, query the corresponding configuration data effective time from a preset reference library, wherein the reference library stores configuration data of each version and effective records of the configuration data of each version, and the effective records include the version identifier and the configuration data effective time;
[0124] According to the configuration data effective time and the benchmark library synchronization time, the synchronization configuration data to be synchronized to the offline test system is obtained, and the synchronization configuration data is synchronized to the offline test system, wherein the benchmark library synchronization time refers to the time when the benchmark library last synchronized the configuration data with the offline test system.
[0125] In addition, the logic instructions in the above-mentioned memory 403 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the configuration data synchronization method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0126] In addition, an embodiment of the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the computer can execute the configuration data synchronization method provided by the above-mentioned method embodiments, the method comprising:
[0127] Get the version ID of the configuration data to be synchronized to the offline test system;
[0128] Based on the version identifier, query the corresponding configuration data effective time from a preset reference library, wherein the reference library stores configuration data of each version and effective records of the configuration data of each version, and the effective records include the version identifier and the configuration data effective time;
[0129] According to the configuration data effective time and the benchmark library synchronization time, the synchronization configuration data to be synchronized to the offline test system is obtained, and the synchronization configuration data is synchronized to the offline test system, wherein the benchmark library synchronization time refers to the time when the benchmark library last synchronized the configuration data with the offline test system.
[0130] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the configuration data synchronization method provided in the above embodiments are implemented, and the method includes:
[0131] Get the version ID of the configuration data to be synchronized to the offline test system;
[0132] Based on the version identifier, query the corresponding configuration data effective time from a preset reference library, wherein the reference library stores configuration data of each version and effective records of the configuration data of each version, and the effective records include the version identifier and the configuration data effective time;
[0133] According to the configuration data effective time and the benchmark library synchronization time, the synchronization configuration data to be synchronized to the offline test system is obtained, and the synchronization configuration data is synchronized to the offline test system, wherein the benchmark library synchronization time refers to the time when the benchmark library last synchronized the configuration data with the offline test system.
[0134] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A configuration data synchronization method, characterized in that: include: Get the version ID of the configuration data to be synchronized to the offline test system; Based on the version identifier, query the corresponding configuration data effective time from the preset benchmark library, wherein the benchmark library stores configuration data of each version and effective records of configuration data of each version, and the effective records include the version identifier and the configuration data effective time; the benchmark library is an intermediary for synchronizing data from the online environment to the offline test system, and the configuration data and related information of the online environment are synchronized to the benchmark library in real time in the early preset stage, so that each subsequent offline test system takes the benchmark library as a benchmark and pulls data from the benchmark library for synchronization; According to the configuration data effective time and the reference library synchronization time, the synchronization configuration data to be synchronized to the offline test system is obtained, and the synchronization configuration data is synchronized to the offline test system, wherein the reference library synchronization time refers to the time when the reference library last synchronized the configuration data with the offline test system; The acquiring, according to the configuration data effective time and the reference library synchronization time, synchronization configuration data to be synchronized to the offline test system comprises: If the configuration data effective time is greater than or equal to the reference library synchronization time, extracting configuration data between the reference library synchronization time and the configuration data effective time corresponding to the version identifier from the reference library, and using it as the synchronization configuration data; The step of acquiring the synchronization configuration data to be synchronized to the offline test system according to the configuration data effective time and the reference library synchronization time also includes: If the configuration data effective time is less than the reference library synchronization time, extracting the configuration data corresponding to the version identifier from the reference library and using it as the synchronization configuration data; When the version identifier of the configuration data to be synchronized to the offline test system is not obtained, the method further includes: Obtaining a screening time, and confirming a current configuration data effective time according to the screening time; According to the effective time of the current configuration data, the synchronization configuration data to be synchronized to the offline test system is acquired, and the synchronization configuration data is synchronized to the offline test system.
2. The configuration data synchronization method according to claim 1, characterized in that: The acquiring, according to the effective time of the current configuration data, synchronization configuration data to be synchronized to the offline test system, and synchronizing the synchronization configuration data to the offline test system, comprises: Determine the corresponding current version identifier according to the effective time of the current configuration data; The configuration data of the offline test system is synchronized based on the current version identifier.
3. The configuration data synchronization method according to claim 2, characterized in that: Also includes: According to the current configuration data effective time and the reference library synchronization time, obtaining the synchronization configuration data to be synchronized to the offline test system includes: If the current configuration data effective time is greater than or equal to the reference library synchronization time, the configuration data between the reference library synchronization time and the current configuration data effective time corresponding to the current version identifier is extracted from the reference library and used as the synchronized configuration data.
4. The configuration data synchronization method according to claim 3, characterized in that: The step of acquiring the synchronization configuration data to be synchronized to the offline test system according to the current configuration data effective time and the reference library synchronization time also includes: If the effective time of the current configuration data is less than the synchronization time of the reference library, the configuration data corresponding to the current version identifier is extracted from the reference library and used as the synchronization configuration data.
5. A configuration data synchronization device, characterized in that: include: An acquisition module is used to obtain the version identifier of the configuration data to be synchronized to the offline test system; A query module is used to query the corresponding configuration data effective time from a preset benchmark library based on the version identifier, wherein the benchmark library stores configuration data of each version and effective records of the configuration data of each version, and the effective records include the version identifier and the configuration data effective time; the benchmark library is an intermediary for synchronizing data from the online environment to the offline test system, and the configuration data and related information of the online environment are synchronized to the benchmark library in real time in the early preset stage, so that each subsequent offline test system takes the benchmark library as a benchmark and pulls data from the benchmark library for synchronization; A synchronization module, used to obtain synchronization configuration data to be synchronized to the offline test system according to the configuration data effective time and the reference library synchronization time, and synchronize the synchronization configuration data to the offline test system, wherein the reference library synchronization time refers to the time when the reference library last synchronized the configuration data with the offline test system; The acquiring, according to the configuration data effective time and the reference library synchronization time, synchronization configuration data to be synchronized to the offline test system comprises: If the configuration data effective time is greater than or equal to the reference library synchronization time, extracting configuration data between the reference library synchronization time and the configuration data effective time corresponding to the version identifier from the reference library, and using it as the synchronization configuration data; The step of acquiring the synchronization configuration data to be synchronized to the offline test system according to the configuration data effective time and the reference library synchronization time also includes: If the configuration data effective time is less than the reference library synchronization time, extracting the configuration data corresponding to the version identifier from the reference library and using it as the synchronization configuration data; When the version identifier of the configuration data to be synchronized to the offline test system is not obtained, the synchronization module is further used to: Obtaining a screening time, and confirming a current configuration data effective time according to the screening time; According to the effective time of the current configuration data, the synchronization configuration data to be synchronized to the offline test system is acquired, and the synchronization configuration data is synchronized to the offline test system.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the configuration data synchronization method according to any one of claims 1 to 4 are implemented.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the configuration data synchronization method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Configuration file update method, system, electronic device and storage medium
CN109101381A