Information synchronization method and device, equipment and storage medium
By introducing an intermediate server during the information synchronization process, the system dictionary data of the second resource server is transmitted to the first resource server, dictionary mapping relationship is established and synchronized resource information is processed, and the inefficient information synchronization caused by inconsistent information construction in different institutions is solved, and efficient and complete information synchronization is achieved.
Patent Information
- Application Number
- CN202411522689.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-25
AI Technical Summary
When the degree of information construction of different institutions is inconsistent, information synchronization will lead to different data structures, increase data processing needs, increase server pressure, and affect information synchronization efficiency.
The system dictionary data uploaded by the second resource server is sent to the first resource server through the intermediate server, and the first resource server uses the first resource server to establish a dictionary mapping relationship in the local dictionary data according to the reception standards formulated by the system dictionary data, and processes the resource information to be synchronized in the local resource information as standard synchronization information, and sends it to the intermediate server, and the intermediate server then transmits the standard synchronization information to the second resource server.
It reduces the system storage pressure of the second resource server, reduces the workload of information synchronization, improves the efficiency of information synchronization, and ensures the integrity of information synchronization.
Smart Images

Figure CN119513196A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to an information synchronization method, device, equipment and storage medium. Background Art
[0002] With the rapid development of big data and mobile Internet, more and more enterprises are using digital products to improve operational efficiency. When enterprises build or use different information management systems, there is often a need for information synchronization between multiple servers.
[0003] In the related technology, due to the inconsistent degree of information construction of different servers and the inconsistent information systems used, the data structure of the information will be different, resulting in a large amount of data processing requirements when information is synchronized. If different servers have information synchronization requirements at the same time, the server pressure of the information management system will be significantly increased, the workload of information synchronization will increase, and the efficiency of information synchronization will be affected. Summary of the invention
[0004] In view of this, the present application provides an information synchronization method, device, equipment and storage medium, the main purpose of which is to solve the problem in the prior art that if different institutions have information synchronization needs at the same time, it will significantly increase the server pressure of the information management system, increase the workload of information synchronization, and affect the efficiency of information synchronization.
[0005] According to a first aspect of the present application, there is provided an information synchronization method, which is applied to a first resource server and includes:
[0006] Receive system dictionary data forwarded by the intermediate server;
[0007] Synchronize the system dictionary data maintained synchronously according to the latest received system dictionary data to obtain synchronized system dictionary data;
[0008] Establishing a dictionary mapping relationship in the local dictionary data according to the synchronized system dictionary data, wherein the dictionary mapping relationship is used to bind dictionary items in the local dictionary data to dictionary items in the synchronized system dictionary data;
[0009] After the resource information to be synchronized in the local resource information is processed into standard synchronization information according to the dictionary mapping relationship, the standard synchronization information is sent to the intermediate server.
[0010] Further, the system dictionary data includes dictionary items of different fields, each dictionary item corresponds to a dictionary attribute, and the synchronized system dictionary data is synchronized according to the latest received system dictionary data to obtain the synchronized system dictionary data, including:
[0011] Selecting a preset dictionary item in the latest received system dictionary data;
[0012] The preset dictionary items are compared with dictionary items in the synchronously maintained system dictionary data according to the dictionary attributes, so as to perform synchronization processing on the synchronously maintained system dictionary data according to the comparison result.
[0013] Further, the dictionary attributes include a dictionary code, a dictionary name, a dictionary identifier, and a modification status identifier. When the dictionary identifier of the preset dictionary item is in an effective state, the preset dictionary item is compared with the dictionary item in the synchronously maintained system dictionary data according to the dictionary attributes, so as to synchronize the synchronously maintained system dictionary data according to the comparison result, including:
[0014] Determining whether there is a dictionary item having the same dictionary item code as the preset dictionary item in the system dictionary data maintained synchronously;
[0015] If it does not exist, inserting the preset dictionary item into the synchronously maintained system dictionary data to generate the preset dictionary item in the synchronously maintained system dictionary data, and updating the modification status mark of the preset dictionary item in the synchronously maintained system dictionary data to be added;
[0016] If so, obtaining a target dictionary item having the same dictionary item code as the preset dictionary item but a different dictionary item name from the synchronously maintained system dictionary data, updating the dictionary item name of the target dictionary item to the dictionary item name of the preset dictionary item, and updating the modification status flag of the target dictionary item in the synchronously maintained system dictionary data to be changed;
[0017] When the dictionary identifier of the preset dictionary item is in an ineffective state, comparing the preset dictionary item with a dictionary item in the synchronously maintained system dictionary data according to the dictionary attribute, and performing synchronization processing on the synchronously maintained system dictionary data according to the comparison result, includes:
[0018] A target dictionary item having the same dictionary item code as the preset dictionary item is obtained from the synchronously maintained system dictionary data, and a modification status mark of the target dictionary item in the synchronously maintained system dictionary data is updated to be invalid.
[0019] Further, the establishing a dictionary mapping relationship in the local dictionary data according to the synchronized system dictionary data includes:
[0020] Traversing the modification status identifiers of the dictionary items to be mapped in the synchronized system dictionary data;
[0021] According to the modification status identifier of the dictionary item to be mapped, a dictionary mapping relationship is established in the local dictionary data, so as to bind the dictionary item in the local dictionary data to the dictionary item in the synchronized system dictionary data through the dictionary mapping relationship.
[0022] Furthermore, the step of establishing a dictionary mapping relationship in the local dictionary data according to the modification status identifier of the dictionary item to be mapped includes:
[0023] For a dictionary item to be mapped whose modification status is a new one, a new dictionary item is generated in the local dictionary data, and a dictionary mapping relationship is established according to the new item, and the dictionary mapping relationship is used to bind the new dictionary item to the dictionary item to be mapped; or an existing dictionary item is selected in the local dictionary data, and a dictionary mapping relationship is established according to the existing dictionary item, and the dictionary mapping relationship is used to bind the existing dictionary item to the dictionary item to be mapped;
[0024] For the dictionary item to be mapped whose modification status is marked as changed, a new dictionary item is generated in the local dictionary data, and a dictionary mapping relationship is established according to the new item, and the dictionary mapping relationship is used to bind the new dictionary item to the dictionary item to be mapped, or an existing dictionary item is selected in the local dictionary data, and a dictionary mapping relationship is established according to the existing dictionary item, and the dictionary mapping relationship is used to bind the existing dictionary item to the dictionary item to be mapped, and at the same time, the original dictionary item is queried in the local dictionary data, and a dictionary mapping relationship is established according to the original dictionary item, and the original dictionary item is an existing dictionary item in the local dictionary data that is originally bound to the dictionary item to be mapped, and the dictionary mapping relationship is used to rebind the original dictionary item in the local dictionary data to other dictionary items in the synchronized system dictionary data or delete the dictionary item with a historical mapping relationship in the local dictionary data;
[0025] For dictionary items to be mapped whose modification status is marked as invalid, the original dictionary items are queried in the local dictionary data, and a dictionary mapping relationship is established based on the original dictionary items. The original dictionary items are existing dictionary items in the local dictionary data that are originally bound to the dictionary items to be mapped. The dictionary mapping relationship is used to rebind the original dictionary items in the local dictionary data to other dictionary items in the synchronized system dictionary data or to delete the dictionary items in the local dictionary data that have historical mapping relationships.
[0026] Furthermore, before processing the resource information to be synchronized in the local resource information into standard synchronization information according to the dictionary mapping relationship, the method further includes:
[0027] According to the synchronization information recorded in the push log table, the latest changed resource information is obtained from the local resource information as the resource information to be synchronized;
[0028] The method of obtaining the latest changed resource information in the local resource information as the resource information to be synchronized according to the synchronization information recorded in the push log table includes:
[0029] According to the synchronization information recorded in the push log table, obtain the synchronization time corresponding to the most recent information push and the largest incremental key value in the local resource information when the synchronization starts, as the basis for querying the resource information to be synchronized this time;
[0030] According to the basis of the query of the resource information to be synchronized this time, the incremental key values in the local resource information that meet the push conditions are inserted into the queue list to be pushed, and the incremental key values that meet the push conditions include the incremental key values in the local resource information that are greater than the maximum incremental key value and the incremental key values that are less than or equal to the maximum incremental key value and whose editing time is greater than the synchronization time;
[0031] Select corresponding resource information from the local resource information according to the incremental key value in the queue list to be pushed as the resource information to be synchronized in the local resource information;
[0032] Correspondingly, after processing the resource information to be synchronized in the local resource information into standard synchronization information according to the dictionary mapping relationship, the method further includes:
[0033] Select a unique identifier representing the information from the resource information to be synchronized;
[0034] According to the unique identifier of the representation information, query the storage status of each piece of information in the resource information to be synchronized;
[0035] If the storage status of the information is deleted, the synchronization operation flag of the corresponding information in the resource information to be synchronized is adjusted to a deleted status; otherwise, the synchronization operation flag of the corresponding information in the resource information to be synchronized is adjusted to a added or updated status.
[0036] According to a second aspect of the present application, there is provided an information synchronization method, which is applied to an intermediate server and includes:
[0037] Receiving system dictionary data uploaded by the second resource server;
[0038] In response to a data acquisition instruction from the first resource server, the system dictionary data is sent to the first resource server, so that the first resource server processes the resource information to be synchronized in the local resource information into standard synchronization information according to a pre-established dictionary mapping relationship, wherein the dictionary mapping relationship is a binding relationship between the synchronized system dictionary data and the local dictionary data, and the synchronized system dictionary data is obtained by synchronizing the synchronized and maintained system dictionary data according to the latest received system dictionary data;
[0039] Receiving standard synchronization information sent by the first resource server;
[0040] The standard synchronization information is sent to the second resource server, so that the second resource server performs synchronization processing on the system resource information according to the standard synchronization information.
[0041] Further, after receiving the standard synchronization information sent by the first resource server, the method further includes:
[0042] Verifying the standard synchronization information using the latest received system dictionary data;
[0043] Correspondingly, if the verification result is a verification failure, the standard synchronization information of the verification failure is fed back to the first resource server; if the verification result is a verification success, the standard synchronization information of the verification success is stored in the intermediate server to wait for the second resource server to obtain the information.
[0044] According to a third aspect of the present application, there is provided an information synchronization device, comprising:
[0045] A first receiving unit, configured to receive system dictionary data forwarded by an intermediate server, wherein the system dictionary data corresponds to a timestamp sequence;
[0046] A synchronization unit, used for synchronizing the system dictionary data maintained synchronously according to the latest received system dictionary data to obtain synchronized system dictionary data;
[0047] an establishing unit, configured to establish a dictionary mapping relationship in the local dictionary data according to the synchronized system dictionary data, wherein the dictionary mapping relationship is used to bind dictionary items in the local dictionary data to dictionary items in the synchronized system dictionary data;
[0048] The first sending unit is used to process the resource information to be synchronized in the local resource information into standard synchronization information according to the dictionary mapping relationship, and then send the standard synchronization information to the intermediate server.
[0049] Furthermore, the system dictionary data includes dictionary items of different fields, each dictionary item corresponds to a dictionary attribute, and the synchronization unit is specifically used for:
[0050] Selecting a preset dictionary item in the latest received system dictionary data;
[0051] The preset dictionary items are compared with dictionary items in the synchronously maintained system dictionary data according to the dictionary attributes, so as to perform synchronization processing on the synchronously maintained system dictionary data according to the comparison result.
[0052] Furthermore, the dictionary attributes include a dictionary code, a dictionary name, a dictionary identifier, and a modification status identifier. When the dictionary identifier of the preset dictionary item is in a valid state, the synchronization unit is further configured to:
[0053] Determining whether there is a dictionary item having the same dictionary item code as the preset dictionary item in the system dictionary data maintained synchronously;
[0054] If it does not exist, inserting the preset dictionary item into the synchronously maintained system dictionary data to generate the preset dictionary item in the synchronously maintained system dictionary data, and updating the modification status mark of the preset dictionary item in the synchronously maintained system dictionary data to be added;
[0055] If so, obtaining a target dictionary item having the same dictionary item code as the preset dictionary item but a different dictionary item name from the synchronously maintained system dictionary data, updating the dictionary item name of the target dictionary item to the dictionary item name of the preset dictionary item, and updating the modification status flag of the target dictionary item in the synchronously maintained system dictionary data to be changed;
[0056] When the dictionary identifier of the preset dictionary item is in an ineffective state, the synchronization unit is further configured to:
[0057] A target dictionary item having the same dictionary item code as the preset dictionary item is obtained from the synchronously maintained system dictionary data, and a modification status mark of the target dictionary item in the synchronously maintained system dictionary data is updated to be invalid.
[0058] Furthermore, the establishing unit is specifically used for:
[0059] Traversing the modification status identifiers of the dictionary items to be mapped in the synchronized system dictionary data;
[0060] According to the modification status identifier of the dictionary item to be mapped, a dictionary mapping relationship is established in the local dictionary data, so as to bind the dictionary item in the local dictionary data to the dictionary item in the synchronized system dictionary data through the dictionary mapping relationship.
[0061] Furthermore, the establishing unit is further configured to:
[0062] For a dictionary item to be mapped whose modification status is a new one, a new dictionary item is generated in the local dictionary data, and a dictionary mapping relationship is established according to the new item, and the dictionary mapping relationship is used to bind the new dictionary item to the dictionary item to be mapped; or an existing dictionary item is selected in the local dictionary data, and a dictionary mapping relationship is established according to the existing dictionary item, and the dictionary mapping relationship is used to bind the existing dictionary item to the dictionary item to be mapped;
[0063] For the dictionary item to be mapped whose modification status is marked as changed, a new dictionary item is generated in the local dictionary data, and a dictionary mapping relationship is established according to the new item, and the dictionary mapping relationship is used to bind the new dictionary item to the dictionary item to be mapped, or an existing dictionary item is selected in the local dictionary data, and a dictionary mapping relationship is established according to the existing dictionary item, and the dictionary mapping relationship is used to bind the existing dictionary item to the dictionary item to be mapped, and at the same time, the original dictionary item is queried in the local dictionary data, and a dictionary mapping relationship is established according to the original dictionary item, and the original dictionary item is an existing dictionary item in the local dictionary data that is originally bound to the dictionary item to be mapped, and the dictionary mapping relationship is used to rebind the original dictionary item in the local dictionary data to other dictionary items in the synchronized system dictionary data or delete the dictionary item with a historical mapping relationship in the local dictionary data;
[0064] For dictionary items to be mapped whose modification status is marked as invalid, the original dictionary items are queried in the local dictionary data, and a dictionary mapping relationship is established based on the original dictionary items. The original dictionary items are existing dictionary items in the local dictionary data that are originally bound to the dictionary items to be mapped. The dictionary mapping relationship is used to rebind the original dictionary items in the local dictionary data to other dictionary items in the synchronized system dictionary data or to delete the dictionary items in the local dictionary data that have historical mapping relationships.
[0065] Furthermore, the device also includes:
[0066] an acquisition unit, configured to acquire the latest changed resource information in the local resource information as the resource information to be synchronized according to the synchronization information recorded in the push log table before processing the resource information to be synchronized in the local resource information as the standard synchronization information according to the dictionary mapping relationship;
[0067] The acquisition unit is specifically used for:
[0068] According to the synchronization information recorded in the push log table, obtain the synchronization start time corresponding to the most recent information push and the largest incremental key value in the local resource information at the start of synchronization as the basis for querying the resource information to be synchronized this time;
[0069] According to the basis of the query of the resource information to be synchronized this time, the incremental key values in the local resource information that meet the push conditions are inserted into the queue list to be pushed, and the incremental key values that meet the push conditions include the incremental key values in the local resource information that are greater than the maximum incremental key value and the incremental key values that are less than or equal to the maximum incremental key value and whose editing time is greater than the synchronization time;
[0070] Select corresponding resource information from the local resource information according to the incremental key value in the queue list to be pushed as the resource information to be synchronized in the local resource information;
[0071] Accordingly, the device further comprises:
[0072] A selection unit, configured to select a unique identifier representing information in the resource information to be synchronized after processing the resource information to be synchronized in the local resource information into standard synchronization information according to the dictionary mapping relationship;
[0073] A query unit, configured to query the storage status of each piece of information in the resource information to be synchronized according to the unique identifier of the representation information;
[0074] The adjustment unit is used to adjust the synchronization operation flag of the corresponding information in the resource information to be synchronized to a deleted state if the storage state of the information is deleted, otherwise, adjust the synchronization operation flag of the corresponding information in the resource information to be synchronized to a new or updated state.
[0075] According to a fourth aspect of the present application, there is provided an information synchronization device, including:
[0076] A second receiving unit, configured to receive system dictionary data uploaded by a second resource server, wherein the system dictionary data corresponds to a timestamp sequence;
[0077] a second sending unit, configured to send the system dictionary data to the first resource server in response to a data acquisition instruction of the first resource server, so that the first resource server processes the resource information to be synchronized in the local resource information into standard synchronization information according to a pre-established dictionary mapping relationship, wherein the dictionary mapping relationship is a binding relationship between the synchronized system dictionary data and the local dictionary data, and the synchronized system dictionary data is obtained by synchronizing the synchronized maintained system dictionary data according to the latest received system dictionary data;
[0078] A third receiving unit, configured to receive standard synchronization information sent by the first resource server;
[0079] The third sending unit is configured to send the standard synchronization information to the second resource server, so that the second resource server performs synchronization processing on the system resource information according to the standard synchronization information.
[0080] Furthermore, the device also includes:
[0081] A verification unit, configured to verify the standard synchronization information using the latest received system dictionary data after receiving the standard synchronization information sent by the first resource server;
[0082] Accordingly, the third sending unit is specifically configured to:
[0083] If the verification result is a verification failure, the standard synchronization information of the verification failure is fed back to the first resource server; if the verification result is a verification success, the standard synchronization information of the verification success is stored in the intermediate server to wait for the second resource server to obtain the information.
[0084] According to a fifth aspect of the present application, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect when executing the computer program.
[0085] According to a sixth aspect of the present application, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0086] By means of the above technical scheme, the present application provides an information synchronization method, device, equipment and storage medium. Compared with the current information synchronization method based on the inconsistent information construction levels of different institutions, the present application sends the system dictionary data uploaded by the second resource server to the first resource server through the intermediate server, so that the first resource server establishes a dictionary mapping relationship in the local dictionary data according to the receiving standard formulated by the system dictionary data. The dictionary mapping relationship is used to map the dictionary items in the local dictionary data to the dictionary items in the synchronized system dictionary data. After the resource information to be synchronized in the local resource information is processed into standard synchronization information according to the dictionary mapping relationship, the standard synchronization information is sent to the intermediate server, so that the intermediate server can transmit the standard synchronization information fed back by the first resource server to the second resource server in real time, so that the second resource server synchronizes the system resource information. The entire process separates the first resource server and the second resource server through an intermediate server, so that the system storage pressure of the second resource server is transferred to the intermediate server, reducing the system storage pressure of the second resource server. At the same time, the intermediate server allows the second resource server to publish the synchronization standard of resource information more conveniently, so that the first resource server can obtain the corresponding synchronization standard from the intermediate server at any time, which can reduce the workload of information synchronization while ensuring the integrity of information synchronization, thereby improving the efficiency of information synchronization.
[0087] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0089] Figure 1 It is a flowchart of an information synchronization method provided by an embodiment of the present application;
[0090] Figure 2 yes Figure 1 A schematic flow chart of a specific implementation of step 102;
[0091] Figure 3 yes Figure 1 A schematic flow chart of a specific implementation of step 103;
[0092] Figure 4 yes Figure 1 A schematic diagram of a specific implementation process before step 104;
[0093] Figure 5 yes Figure 4 A schematic flow chart of a specific implementation of step 401;
[0094] Figure 6 is a flowchart of an information synchronization method provided by another embodiment of the present application;
[0095] Figure 7 is a flowchart of an information synchronization method provided by another embodiment of the present application;
[0096] Figure 8 It is a structural diagram of an information synchronization device according to an embodiment of the present application;
[0097] Fig. 9 It is a structural diagram of an information synchronization device according to another embodiment of the present application. DETAILED DESCRIPTION
[0098] Now the content of the present invention will be discussed with reference to several exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and thus implement the content of the present invention, rather than implying any limitation on the scope of the present invention.
[0099] As used herein, the term "including" and variations thereof are to be interpreted as open-ended terms meaning "including but not limited to." The term "based on" is to be interpreted as "based, at least in part, on." The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment." The term "another embodiment" is to be interpreted as "at least one other embodiment."
[0100] In the related art, information synchronization between different systems can be achieved by directly exposing an open interface by the information pusher or the information receiver. Since the headquarters system and the branch structure system usually use different data standards and data structures when storing information, this leads to the information pusher or the information receiver needing to manually save the mapping relationship between the information fields between the different systems in advance, and create messages according to the standards of the open interface provider and the mapping relationship of the information fields manually during personnel synchronization. If the information synchronization modifies, deletes or adds the original information and the newly added information in the branch structure system, it often requires calling different open interfaces, which increases the complexity of the information synchronization process. When the headquarters system receives the above message, it also needs to perform a lot of data standardization verification work. If the above message cannot pass the verification, it needs to re-perform the above message sending process. When the headquarters system needs to synchronize information with the systems of multiple branches, the above message sending process will make the synchronization workload large, and there are problems such as greater difficulty in successful synchronization and low synchronization efficiency.
[0101] In order to solve the above problems, this embodiment provides an information synchronization method, such as Figure 1 As shown, the method is applied to the first resource server and includes the following steps:
[0102] 101. Receive system dictionary data forwarded by the intermediate server.
[0103] In this embodiment, the intermediate server serves as an intermediate management platform for information to be synchronized, and is used to interact with different resource servers respectively. That is to say, there is no interaction between different resource servers, but information transmission is achieved through the intermediate server. Specifically, any resource server can upload the information synchronization standard to the intermediate server, and other resource servers that need information synchronization can obtain the corresponding information synchronization standard through the intermediate server, and then map the information to be synchronized according to the information synchronization standard and upload it to the intermediate server, so that the intermediate server can transmit the information to be synchronized that meets the information synchronization standard to the corresponding resource server for information synchronization.
[0104] Taking the application scenario of synchronizing personnel information as an example, the resource server corresponding to the headquarters system can send the synchronization standards of personnel information to the intermediate server. After receiving the synchronization standards of personnel information, the intermediate server sends the synchronization standards of personnel information to the resource servers corresponding to each branch department, so that the resource servers corresponding to each branch department process the information to be synchronized according to the synchronization standards of personnel information issued by the headquarters, so that the information to be synchronized meets the synchronization standards of personnel information issued by the headquarters.
[0105] The above-mentioned information synchronization standards can be described by dictionary data. The data items, data structures, data flows, data storage and processing logic in the information can be defined and described through dictionary data. In other words, the system dictionary data here is equivalent to sending the format of the local storage information to the resource server, which is equivalent to the information synchronization standard provided by the resource server.
[0106] In this embodiment, the first resource server is equivalent to a resource server that receives information synchronization standards. Considering that the dictionary data in the resource server that publishes the information synchronization standards may change, in order to publish the latest information synchronization standards to the intermediate server, the resource server that publishes the information synchronization standards here may send the system dictionary data to the intermediate server at a set time interval, and correspondingly, the intermediate server may send the system dictionary data to the first resource server at a set time interval. Of course, in order to save transmission resources, the resource server that publishes the information synchronization standards may send the system dictionary data to the intermediate server when the system dictionary data changes, and correspondingly, the intermediate server sends the changed system dictionary data to the first resource server.
[0107] 102. Synchronize the synchronously maintained system dictionary data according to the latest received system dictionary data to obtain synchronized system dictionary data.
[0108] In this embodiment, the most recently received system dictionary data is equivalent to the most recently received information synchronization standard by the first resource server. In order to facilitate changes and maintenance of the information synchronization standard, the first resource server will perform dictionary maintenance on the system dictionary data after each receipt of the system dictionary data, so as to represent the changed information synchronization standard through the synchronously maintained system dictionary data. Here, the synchronously maintained system dictionary data is obtained by the first resource server based on the last time the system dictionary data was received and synchronously maintained.
[0109] Specifically, the system dictionary data includes dictionary items of different fields, each dictionary item has dictionary attributes, and the dictionary items in the synchronously maintained system dictionary data can be synchronously modified according to the dictionary attributes of the dictionary items in the latest received system dictionary data, and the modification status identifier of the corresponding dictionary item can be updated.
[0110] For example, the dictionary items of the school field in the system dictionary data include School A, School B, and School C1, and the dictionary items of the school field in the synchronously maintained system dictionary data include School A and School B. At this time, the dictionary item of School C can be inserted into the synchronously maintained dictionary item, and the modification status indicator corresponding to the dictionary item of School C can be marked as "newly added".
[0111] For another example, the dictionary items of the school field in the system dictionary data include School A, School B, and School C1, and the dictionary items of the school field in the synchronously maintained system dictionary data include School A, School B, and School C2. Here, School C1 and School C2 have the same dictionary code and different dictionary names. At this time, the dictionary name of School C2 in the synchronously maintained dictionary item can be updated to the dictionary name of School C1, and the modification status flag corresponding to the dictionary item of School C2 can be marked as "changed".
[0112] 103. Establish a dictionary mapping relationship in the local dictionary data according to the synchronized system dictionary data.
[0113] The dictionary mapping relationship is used to map dictionary items in the local dictionary data to dictionary items in the synchronized system dictionary data. The local dictionary data here refers to the dictionary data stored locally by the first resource server, which is equivalent to the format of the first resource server describing the locally stored information, and the synchronized system dictionary data refers to the latest information synchronization standard after synchronization processing. The dictionary mapping relationship can be established in the local dictionary data through the latest information synchronization standard, so that the local dictionary data can bind the corresponding dictionary items to the dictionary items in the synchronized system dictionary data through the dictionary mapping relationship, so that the local dictionary data can meet the information synchronization standard after passing the dictionary mapping standard.
[0114] Since the synchronized system dictionary data has undergone multiple synchronization processes on the first resource server, after each synchronization process, for the system dictionary data with changes, the modification status identifiers of the corresponding dictionary items will change. In other words, the dictionary items with changes in the synchronized system dictionary data have modification status identifiers corresponding to them. Specifically, a dictionary mapping relationship can be established in the local dictionary data based on the modification status identifiers corresponding to the dictionary items in the synchronized system dictionary data.
[0115] For example, the modification status of the school C1 dictionary item in the synchronized system dictionary data is marked as "newly added", indicating that the school C1 dictionary item is a newly added dictionary item in the system dictionary data. The following dictionary mapping relationship can be established in the local dictionary data: create a new dictionary item in the local dictionary data, and bind the new dictionary item to the school C1 dictionary item in the synchronized system dictionary data. The following dictionary mapping relationship can also be established in the local dictionary data: select the existing dictionary item school C2 in the local dictionary data and rebind it to the school C1 dictionary item in the synchronized system dictionary data.
[0116] For another example, the modification status of the school C1 dictionary item in the synchronized system dictionary data is marked as "invalid", indicating that the school C1 dictionary item is a deleted dictionary item in the system dictionary data. The following dictionary mapping relationship can be established in the local dictionary data: the existing dictionary item school C3 originally bound to the school C1 dictionary item in the local dictionary data is rebinded to other dictionary items in the synchronized system dictionary data or the existing dictionary item school C3 is deleted.
[0117] 104. After processing the resource information to be synchronized in the local resource information into standard synchronization information according to the dictionary mapping relationship, the standard synchronization information is sent to the intermediate server.
[0118] In this embodiment, considering that the first resource server may push the resource information to be synchronized to the intermediate server multiple times, the corresponding push information will be recorded in the process of each push of the resource information to be synchronized, and an identification query will be performed in the local resource information based on the push information to insert the information identification that meets the push conditions into the push pair list, and the corresponding resource information in the local resource information will be inserted into the resource information to be synchronized based on the information identification recorded in the push pair list.
[0119] Specifically, in the process of processing the resource information to be synchronized in the local resource information into standard synchronization information according to the dictionary mapping relationship, two dictionary items with binding association are determined according to the dictionary mapping relationship, and the resource information to be synchronized corresponding to one of the dictionary items with binding association is bound to the other dictionary item with binding association to obtain standard synchronization information. For example, the dictionary mapping relationship is to create a new dictionary item in the local dictionary data, and bind the new dictionary item to the dictionary item of school C1 in the synchronized system dictionary data. Then, correspondingly, by binding the resource information to be synchronized corresponding to the new dictionary item to school C1, standard synchronization information will be obtained.
[0120] In the above embodiment, the system dictionary data includes dictionary items of different fields, and each dictionary item corresponds to a dictionary attribute, specifically, Figure 2 As shown, step 102 includes the following steps:
[0121] 201. Select a preset dictionary item from the latest received system dictionary data.
[0122] 202. Compare the preset dictionary items with dictionary items in the synchronously maintained system dictionary data according to the dictionary attributes, and perform synchronization processing on the synchronously maintained system dictionary data according to the comparison result.
[0123] The dictionary attributes include dictionary code, dictionary name, dictionary identifier and modification status identifier. It should be noted that the dictionary code, dictionary name and dictionary identifier are dictionary attributes of the system dictionary data, and the modification status identifier is obtained by marking the first resource server according to the latest received system dictionary data. The modification status identifier includes normal, new, changed and invalid.
[0124] In this embodiment, the preset dictionary item can be any dictionary item in the most recently received system dictionary data. Specifically, it can be determined based on the dictionary attribute corresponding to the preset dictionary item whether there is a dictionary item with the corresponding dictionary attribute in the synchronously maintained system dictionary data, so as to compare the preset dictionary item with the dictionary item in the synchronously maintained system dictionary data.
[0125] When the dictionary identifier of the preset dictionary item is in the effective state, the preset dictionary item is compared with the dictionary item in the synchronously maintained system dictionary data according to the dictionary attribute, and the process of synchronizing the synchronously maintained system dictionary data according to the comparison result includes the following steps: first, determining whether there is a dictionary item with the same dictionary item code as the preset dictionary item in the synchronously maintained system dictionary data; if not, inserting the preset dictionary item into the synchronously maintained system dictionary data to generate the preset dictionary item in the synchronously maintained system dictionary data, and updating the modification status identifier of the preset dictionary item in the synchronously maintained system dictionary data to be added; if so, obtaining a target dictionary item with the same dictionary item code as the preset dictionary item but a different dictionary item name in the synchronously maintained system dictionary data, updating the dictionary item name of the target dictionary item to the dictionary item name of the preset dictionary item, and updating the modification status identifier of the target dictionary item in the synchronously maintained system dictionary data to be changed;
[0126] When the dictionary identifier of a preset dictionary item is in an invalid state, the preset dictionary item is compared with the dictionary items in the synchronously maintained system dictionary data according to the dictionary attributes, and the process of synchronizing the synchronously maintained system dictionary data according to the comparison result includes the following steps: obtaining a target dictionary item having the same dictionary item code as the preset dictionary item in the synchronously maintained system dictionary data, and updating the modification status identifier of the target dictionary item in the synchronously maintained system dictionary data to be invalid.
[0127] In an actual application scenario, the process of comparing the latest received system dictionary data D1 with the synchronously maintained system dictionary data D0 according to the dictionary attributes includes the following process: first, the preset dictionary item DI1 is determined in the latest received system dictionary data DI. When the dictionary identifier of the preset dictionary item DI1 is in the effective state, but there is no dictionary item with the same dictionary item code as the preset dictionary item DI1 in the synchronously maintained system dictionary data D0, the preset dictionary item DI1 is inserted into the synchronously maintained system dictionary data D0 to generate a dictionary item DI2, and the modification status identifier of DI2 is marked as "new". When the dictionary identifier of the preset dictionary item DI1 is in the effective state, and there is a dictionary item DI2 with the same dictionary item code as the preset dictionary item DI1 in the synchronously maintained system dictionary data D0, but the dictionary item names of the preset dictionary item DI1 and the dictionary item DI2 are different, the dictionary item name of the dictionary item DI2 in the synchronously maintained system dictionary data D0 is updated to the dictionary item name of the preset dictionary item DI1, and the modification status identifier of the dictionary item DI2 is marked as "changed". When the dictionary identifier of the preset dictionary item DI1 is in the invalid state, if there is a dictionary item DI2 with the same dictionary item code as the preset dictionary item DI1 in the synchronously maintained system dictionary data D0, the modification status identifier of the dictionary item DI2 in the synchronously maintained system dictionary data D0 is marked as 'invalid'.
[0128] In the above embodiment, considering that data synchronization needs to ensure the consistency of information fields, the first resource server stores local dictionary data corresponding to the local resource information. In order to ensure that the resource information has the same dictionary items during information synchronization, it is necessary to establish a mapping relationship in the local dictionary data according to the synchronized system dictionary data. Specifically, Figure 3 As shown, step 103 includes the following steps:
[0129] 301. Traverse the modification status identifiers of the dictionary items to be mapped in the synchronized system dictionary data.
[0130] 302. Establish a dictionary mapping relationship in the local dictionary data according to the modification status identifier of the dictionary item to be mapped, so as to bind the dictionary item in the local dictionary data to the dictionary item in the synchronized system dictionary data through the dictionary mapping relationship.
[0131] In this embodiment, the local dictionary data and the synchronized system dictionary data have different dictionary attributes. Since the synchronized system dictionary data has been synchronized and maintained, the corresponding dictionary data has a dictionary attribute with a modification status mark, while the local dictionary data has not been synchronized and maintained, the corresponding dictionary data does not have a dictionary attribute with a modification status mark. Since the unchanged dictionary items can be directly bound to the corresponding dictionary items in the synchronized system dictionary data, and the changed dictionary items need to establish a dictionary mapping relationship, the changed dictionary items can be specifically screened out according to the modification status mark of the dictionary items in the dictionary data, and a dictionary mapping relationship can be established for the changed dictionary items.
[0132] Specifically, for dictionary items to be mapped whose modification status is marked as newly added, a newly added dictionary item is generated in the local dictionary data, and a dictionary mapping relationship is established based on the newly added item, where the dictionary mapping relationship is used to bind the newly added dictionary item to the dictionary item to be mapped, or an existing dictionary item is selected in the local dictionary data, and a dictionary mapping relationship is established based on the existing dictionary item, where the dictionary mapping relationship is used to bind the existing dictionary item to the dictionary item to be mapped; for dictionary items to be mapped whose modification status is marked as changed, a newly added dictionary item is generated in the local dictionary data, and a dictionary mapping relationship is established based on the newly added item, where the dictionary mapping relationship is used to bind the newly added dictionary item to the dictionary item to be mapped, or an existing dictionary item is selected in the local dictionary data, and a dictionary mapping relationship is established based on the existing dictionary item, where the dictionary mapping relationship is used to bind the existing dictionary item to the dictionary item to be mapped, When the original dictionary item is queried in the local dictionary data, a dictionary mapping relationship is established based on the original dictionary item, where the original dictionary item is an existing dictionary item in the local dictionary data that is originally bound to the dictionary item to be mapped, and the dictionary mapping relationship is used to rebind the original dictionary item in the local dictionary data to other dictionary items in the synchronized system dictionary data or to delete the dictionary items with historical mapping relationships in the local dictionary data; for the dictionary items to be mapped whose modification status is marked as invalid, the original dictionary item is queried in the local dictionary data, and a dictionary mapping relationship is established based on the original dictionary item, where the original dictionary item is an existing dictionary item in the local dictionary data that is originally bound to the dictionary item to be mapped, and the dictionary mapping relationship is used to rebind the original dictionary item in the local dictionary data to other dictionary items in the synchronized system dictionary data or to delete the dictionary items with historical mapping relationships in the local dictionary data.
[0133] Taking the process of establishing a dictionary mapping relationship in the local dictionary data DS as an example, first obtain the modification status identifier of the dictionary item DI3 of D0 in the synchronized system dictionary data. For the dictionary item DI3 with the modification status identifier of 'new', a new dictionary item DSI0 can be created in the local dictionary data DS, and the dictionary mapping relationship is to bind the dictionary item DSI0 to the dictionary item DI3. Alternatively, an existing dictionary item DSI1 can be selected in the local dictionary data DS, and the dictionary mapping relationship is to rebind the existing dictionary item DSI1 to the dictionary item DI3. For the dictionary item DI3 with the modification status identifier of 'change', a new dictionary item DSI0 can be created in the local dictionary data DS, and the dictionary mapping relationship is to bind the dictionary item DSI0 to the dictionary item DI3. Alternatively, an existing dictionary item DSI1 can be selected in the local dictionary data DS, and the dictionary mapping relationship is to rebind the existing dictionary item DSI1 to the dictionary item DI3. At the same time, the existing dictionary item DSI2 originally bound to the dictionary item DI3 is selected in the local dictionary data DS, and the dictionary mapping relationship is to rebind the existing dictionary item DSI2 to other dictionary items in the local dictionary item data D0 or delete the dictionary item DSI2. For the dictionary item DI3 whose modification status is marked as 'invalid', the existing dictionary item DSI2 originally bound to the dictionary item DI3 can be selected in the local dictionary data DS, and the dictionary mapping relationship is to rebind the existing dictionary item DSI2 to other dictionary items in the local dictionary item data D0 or delete the dictionary item DSI2.
[0134] In the above embodiment, the dictionary mapping relationship is used to establish field associations in different resource information. Through the dictionary mapping relationship, the resource information to be synchronized of the corresponding dictionary item can be processed into resource information with information synchronization standards. In order to accurately obtain the resource information to be synchronized in the local resource information, further, such as Figure 4 As shown, before step 104, the method further includes the following steps:
[0135] 401. According to the synchronization information recorded in the push log table, the resource information with the latest changes is obtained from the local resource information as the resource information to be synchronized.
[0136] In this embodiment, the push log table records the corresponding push information of the first resource server after each information push, specifically including the current synchronization time T and the maximum auto-increment primary key ID of the integer type in the local resource information at the start of this synchronization. Considering that the acquisition of the resource information to be synchronized during this information push is based on the push information recorded in the previous information push, the maximum auto-increment primary key here is equivalent to the key value identifier of the newly added push information based on the previous information push. For example, when the first information push is performed, the maximum auto-increment primary key of the resource information to be pushed is 10, indicating that this information push includes 10 pieces of information. When the next information push is performed, the auto-increment primary key of the corresponding resource information to be pushed is based on the key value identifier 10, that is, starting with the key value identifier 11.
[0137] Specifically, Figure 5 As shown, step 401 includes the following steps:
[0138] 501. According to the synchronization information recorded in the push log table, obtain the synchronization time corresponding to the most recent information push and the largest incremental key value in the local resource information when the synchronization starts, as a basis for querying the resource information to be synchronized this time.
[0139] 502. According to the basis of the query of the resource information to be synchronized this time, the incremental key value that meets the push condition in the local resource information is inserted into the queue list to be pushed.
[0140] 503. Select corresponding resource information from the local resource information according to the incremental key value in the queue list to be pushed as the resource information to be synchronized in the local resource information.
[0141] In this embodiment, for this information push process, first obtain the synchronization time corresponding to the most recent information push and the largest incremental key value in the local resource information when the synchronization starts, perform a first screening in the local resource information according to the largest incremental key value to obtain a first target key value greater than the largest incremental key value, and then perform a second screening in the local resource information according to the synchronization time to obtain a second target key value whose editing time is greater than the synchronization time from the key values that are less than or equal to the largest incremental key value, and insert the first target key value and the second target key value into the queue to be pushed.
[0142] It should be noted that the synchronization time corresponding to the most recent information push and the largest incremental key value in the local resource information when the synchronization starts are used as the basis for this query of the resource information to be synchronized. Accordingly, it is also necessary to record the synchronization time corresponding to this information push and the largest incremental key value in the local resource information when the synchronization starts, and use the synchronization time and maximum incremental key value of this information push as the basis for the next query of the resource information to be synchronized. Similarly, while recording the synchronization time and maximum incremental key value of this information push, use the synchronization time and maximum incremental key value of the most recent information push to query the resource information to be synchronized.
[0143] Correspondingly, after the resource information to be synchronized in the local resource information is processed as standard synchronization information according to the dictionary mapping relationship, taking into account the different storage states of each piece of information in the resource information to be synchronized, a unique identifier representing the information can be selected in the resource information to be synchronized, and the storage state of each piece of information in the resource information to be synchronized can be queried based on the unique identifier representing the information. If the storage state of the information is deleted, the synchronization operation identifier of the corresponding information in the resource information to be synchronized is adjusted to the deletion state; otherwise, the synchronization operation identifier of the corresponding information in the resource information to be synchronized is adjusted to the addition or update state.
[0144] Specifically, each auto-increment primary key in the queue list to be pushed has corresponding information in the local resource information. According to the queue list to be pushed, the corresponding information can be obtained in the local resource information as the resource information to be pushed, and the information to be pushed is processed into a standard format. The standard format may include a unique identifier to represent the information, resource information content, and a synchronization operation identifier. For example, the unique identifier uses an identity identifier, and the corresponding standard data format is the resource information of the person corresponding to the identity identifier and the synchronization operation identifier.
[0145] For example, select the auto-increment primary key ID from the queue list Q to be pushed, query person U0 from the local resource information according to the auto-increment primary key ID, add the identity identifier of person U0 to the queue list to be pushed, use the identity identifier of person U0 as the unique identifier, query the corresponding resource information of person U0 in the local resource information, if person U0 is deleted in the local resource information, then mark the synchronization operation identifier corresponding to the resource information to be pushed as "delete" status, otherwise, mark the synchronization operation identifier corresponding to the resource information to be pushed as "new or updated".
[0146] Compared with the current information synchronization method based on the inconsistent information construction level of different institutions, the information synchronization method provided by the embodiment of the present application sends the system dictionary data uploaded by the second resource server to the first resource server through the intermediate server, so that the first resource server can establish a dictionary mapping relationship in the local dictionary data according to the reception standard formulated by the system dictionary data, and the dictionary mapping relationship is used to map the dictionary items in the local dictionary data to the dictionary items in the synchronized system dictionary data. After the resource information to be synchronized in the local resource information is processed into standard synchronization information according to the dictionary mapping relationship, the standard synchronization information is sent to the intermediate server, so that the intermediate server can transmit the standard synchronization information fed back by the first resource server to the second resource server in real time, so that the second resource server can synchronize the system resource information. The whole process separates the first resource server and the second resource server through the intermediate server, so that the system storage pressure of the second resource server is transferred to the intermediate server, reducing the system storage pressure of the second resource server. At the same time, the intermediate server allows the second resource server to publish the synchronization standard of the resource information more conveniently, so that the first resource server can obtain the corresponding synchronization standard from the intermediate server at any time, which can reduce the workload of information synchronization while ensuring the integrity of information synchronization, thereby improving the efficiency of information synchronization.
[0147] It should be noted that the above implementation processes are all information synchronization processes described with the first resource server as the execution subject. For the application scenario where the information synchronization process is described with the intermediate server as the execution subject, this embodiment provides another information synchronization method, such as Figure 6 As shown, the method is applied to the intermediate server and includes the following steps:
[0148] 601. Receive system dictionary data uploaded by a second resource server.
[0149] 602. In response to a data acquisition instruction from the first resource server, send the system dictionary data to the first resource server.
[0150] The acquisition instruction may be sent periodically by the first resource server to the intermediate server, for example, the first resource server sends the acquisition instruction to the intermediate server every 2 hours, and may also be automatically triggered when the system dictionary data in the intermediate server changes. The acquisition instruction allows the first resource server to process the resource information to be synchronized in the local resource information into standard synchronization information according to the pre-established dictionary mapping relationship, and the dictionary mapping relationship is the binding relationship between the synchronized system dictionary data and the local dictionary data, and the synchronized system dictionary data is obtained by synchronizing the synchronized and maintained system dictionary data according to the latest received system dictionary data.
[0151] 603. Receive standard synchronization information sent by the first resource server.
[0152] In this embodiment, the standard synchronization information is the resource information to be synchronized obtained after the first resource server binds the local dictionary data to the synchronized system dictionary data through the dictionary mapping relationship, and the standard synchronization information complies with the information synchronization standard issued by the second resource server.
[0153] In actual application scenarios, considering the accuracy of the transmission of the marked synchronization information, after receiving the standard synchronization information sent by the first resource server, the intermediate server can use the latest received system dictionary data to verify the standard synchronization information. Correspondingly, if the verification result is a verification failure, the standard synchronization information that failed the verification is fed back to the first resource server; if the verification result is a verification success, the standard synchronization information that succeeded the verification is stored in the intermediate server to wait for the second resource server to obtain the information.
[0154] It can be understood that, for the standard synchronization information that fails the verification, it means that this part of the standard synchronization information does not meet the synchronization standard and cannot be synchronized in the second resource server. Accordingly, this part of the standard synchronization information is fed back to the first resource server. For the standard synchronization information that succeeds the verification, it means that this part of the standard synchronization information meets the synchronization standard and can be synchronized in the second resource server. Accordingly, this part of the standard synchronization information is sent to the second resource server.
[0155] 604. Send the standard synchronization information to the second resource server, so that the second resource server synchronizes the system resource information according to the standard synchronization information.
[0156] In this embodiment, after the second resource server obtains the standard synchronization information, since the system resource data is stored locally, it can specifically perform corresponding synchronization processing on the system resource information according to the synchronization operation identifier. For information with the synchronization identifier as the "delete" state, it is deleted in the system resource information. For information with the synchronization operation identifier as the "update or add" state, it is queried in the system resources according to the unique identifier corresponding to the information. If there is information with the same unique identifier, the information is updated. If there is no information with the same unique identifier, new information is created in the system resource information.
[0157] In one embodiment, Figure 7 As shown, an information synchronization method is provided, which is described by taking the method applied to a first resource server, an intermediate server, and a second resource server as an example, and includes the following steps:
[0158] 701. The second resource server uploads system dictionary data to the intermediate server.
[0159] 702. The intermediate server receives the system dictionary data, and sends the system dictionary data to the first resource server.
[0160] 703. The first resource server processes the resource information to be synchronized in the local resource information into standard synchronization information according to the pre-established dictionary mapping relationship, and sends the standard synchronization information to the intermediate server.
[0161] 704. The intermediate server receives the standard synchronization information, and sends the standard synchronization information to the second resource server.
[0162] 705. The second resource server synchronizes the system resource information according to the standard synchronization information.
[0163] The dictionary mapping relationship is a binding relationship between the synchronized system dictionary data and the local dictionary data, and the synchronized system dictionary data is obtained by performing synchronization processing on the synchronized and maintained system dictionary data according to the latest received system dictionary data.
[0164] In this embodiment, by introducing the intermediate server, the second resource server can publish the information synchronization standard to the first resource server in a more convenient way, so that the first resource server can obtain the latest resource information to be synchronized at any time, ensuring the integrity of data push during the information synchronization process. At the same time, during the information synchronization process, both the second resource server and the first resource server interact with the intermediate server, thereby transferring the processing pressure of the second resource server to the first resource server, reducing the processing pressure of the second resource server.
[0165] Further, as Figure 1-5 The specific implementation of the method, the embodiment of the present application provides an information synchronization device, such as Figure 8 As shown, the device includes: a first receiving unit 81, a synchronization unit 82, an establishing unit 83, and a first sending unit 84.
[0166] A first receiving unit 81 is used to receive system dictionary data forwarded by an intermediate server, wherein the system dictionary data corresponds to a timestamp sequence;
[0167] A synchronization unit 82, configured to synchronize the synchronized and maintained system dictionary data according to the latest received system dictionary data to obtain synchronized system dictionary data;
[0168] An establishing unit 83, configured to establish a dictionary mapping relationship in the local dictionary data according to the synchronized system dictionary data, wherein the dictionary mapping relationship is used to bind dictionary items in the local dictionary data to dictionary items in the synchronized system dictionary data;
[0169] The first sending unit 84 is configured to process the resource information to be synchronized in the local resource information into standard synchronization information according to the dictionary mapping relationship, and then send the standard synchronization information to the intermediate server.
[0170] In a specific application scenario, the system dictionary data includes dictionary items of different fields, each dictionary item corresponds to a dictionary attribute, and the synchronization unit is specifically used to:
[0171] Selecting a preset dictionary item in the latest received system dictionary data;
[0172] The preset dictionary items are compared with dictionary items in the synchronously maintained system dictionary data according to the dictionary attributes, so as to perform synchronization processing on the synchronously maintained system dictionary data according to the comparison result.
[0173] In a specific application scenario, the dictionary attributes include a dictionary code, a dictionary name, a dictionary identifier, and a modification status identifier. When the dictionary identifier of the preset dictionary item is in a valid state, the synchronization unit is further configured to:
[0174] Determining whether there is a dictionary item having the same dictionary item code as the preset dictionary item in the system dictionary data maintained synchronously;
[0175] If it does not exist, inserting the preset dictionary item into the synchronously maintained system dictionary data to generate the preset dictionary item in the synchronously maintained system dictionary data, and updating the modification status mark of the preset dictionary item in the synchronously maintained system dictionary data to be added;
[0176] If so, obtaining a target dictionary item having the same dictionary item code as the preset dictionary item but a different dictionary item name from the synchronously maintained system dictionary data, updating the dictionary item name of the target dictionary item to the dictionary item name of the preset dictionary item, and updating the modification status flag of the target dictionary item in the synchronously maintained system dictionary data to be changed;
[0177] When the dictionary identifier of the preset dictionary item is in an ineffective state, the synchronization unit is further configured to:
[0178] A target dictionary item having the same dictionary item code as the preset dictionary item is obtained from the synchronously maintained system dictionary data, and a modification status mark of the target dictionary item in the synchronously maintained system dictionary data is updated to be invalid.
[0179] In a specific application scenario, the establishing unit is specifically used to:
[0180] Traversing the modification status identifiers of the dictionary items to be mapped in the synchronized system dictionary data;
[0181] According to the modification status identifier of the dictionary item to be mapped, a dictionary mapping relationship is established in the local dictionary data, so as to bind the dictionary item in the local dictionary data to the dictionary item in the synchronized system dictionary data through the dictionary mapping relationship.
[0182] In a specific application scenario, the establishing unit is further used to:
[0183] For a dictionary item to be mapped whose modification status is a new one, a new dictionary item is generated in the local dictionary data, and a dictionary mapping relationship is established according to the new item, and the dictionary mapping relationship is used to bind the new dictionary item to the dictionary item to be mapped; or an existing dictionary item is selected in the local dictionary data, and a dictionary mapping relationship is established according to the existing dictionary item, and the dictionary mapping relationship is used to bind the existing dictionary item to the dictionary item to be mapped;
[0184] For the dictionary item to be mapped whose modification status is marked as changed, a new dictionary item is generated in the local dictionary data, and a dictionary mapping relationship is established according to the new item, and the dictionary mapping relationship is used to bind the new dictionary item to the dictionary item to be mapped, or an existing dictionary item is selected in the local dictionary data, and a dictionary mapping relationship is established according to the existing dictionary item, and the dictionary mapping relationship is used to bind the existing dictionary item to the dictionary item to be mapped, and at the same time, the original dictionary item is queried in the local dictionary data, and a dictionary mapping relationship is established according to the original dictionary item, and the original dictionary item is an existing dictionary item in the local dictionary data that is originally bound to the dictionary item to be mapped, and the dictionary mapping relationship is used to rebind the original dictionary item in the local dictionary data to other dictionary items in the synchronized system dictionary data or delete the dictionary item with a historical mapping relationship in the local dictionary data;
[0185] For dictionary items to be mapped whose modification status is marked as invalid, the original dictionary items are queried in the local dictionary data, and a dictionary mapping relationship is established based on the original dictionary items. The original dictionary items are existing dictionary items in the local dictionary data that are originally bound to the dictionary items to be mapped. The dictionary mapping relationship is used to rebind the original dictionary items in the local dictionary data to other dictionary items in the synchronized system dictionary data or to delete the dictionary items in the local dictionary data that have historical mapping relationships.
[0186] In a specific application scenario, the device further includes:
[0187] an acquisition unit, configured to acquire the latest changed resource information in the local resource information as the resource information to be synchronized according to the synchronization information recorded in the push log table before processing the resource information to be synchronized in the local resource information as the standard synchronization information according to the dictionary mapping relationship;
[0188] The acquisition unit is specifically used for:
[0189] According to the synchronization information recorded in the push log table, obtain the synchronization time corresponding to the most recent information push and the largest incremental key value in the local resource information when the synchronization starts, as the basis for querying the resource information to be synchronized this time;
[0190] According to the basis of the query of the resource information to be synchronized this time, the incremental key values in the local resource information that meet the push conditions are inserted into the queue list to be pushed, and the incremental key values that meet the push conditions include the incremental key values in the local resource information that are greater than the maximum incremental key value and the incremental key values that are less than or equal to the maximum incremental key value and whose editing time is greater than the synchronization time;
[0191] Select corresponding resource information from the local resource information according to the incremental key value in the queue list to be pushed as the resource information to be synchronized in the local resource information;
[0192] Accordingly, the device further comprises:
[0193] A selection unit, configured to select a unique identifier representing information in the resource information to be synchronized after processing the resource information to be synchronized in the local resource information into standard synchronization information according to the dictionary mapping relationship;
[0194] A query unit, configured to query the storage status of each piece of information in the resource information to be synchronized according to the unique identifier of the representation information;
[0195] The adjustment unit is used to adjust the synchronization operation flag of the corresponding information in the resource information to be synchronized to a deleted state if the storage state of the information is deleted, otherwise, adjust the synchronization operation flag of the corresponding information in the resource information to be synchronized to a new or updated state.
[0196] It should be noted that for other corresponding descriptions of the functional units involved in the information synchronization device provided in this embodiment, reference can be made to Figure 1-Figure 5 The corresponding description in will not be repeated here.
[0197] Further, as Figure 6 The specific implementation of the method, the embodiment of the present application provides an information synchronization device, such as Fig. 9 As shown, the device includes: a second receiving unit 91, a second sending unit 92, a third receiving unit 93, and a third sending unit 94.
[0198] A second receiving unit 91 is used to receive system dictionary data uploaded by a second resource server, wherein the system dictionary data corresponds to a timestamp sequence;
[0199] The second sending unit 92 is used to send the system dictionary data to the first resource server in response to the data acquisition instruction of the first resource server, so that the first resource server processes the resource information to be synchronized in the local resource information into standard synchronization information according to the pre-established dictionary mapping relationship, wherein the dictionary mapping relationship is a binding relationship between the synchronized system dictionary data and the local dictionary data, and the synchronized system dictionary data is obtained by synchronizing the synchronized maintained system dictionary data according to the latest received system dictionary data;
[0200] The third receiving unit 93 is used to receive the standard synchronization information sent by the first resource server;
[0201] The third sending unit 94 is configured to send the standard synchronization information to the second resource server, so that the second resource server performs synchronization processing on the system resource information according to the standard synchronization information.
[0202] In a specific application scenario, the device further includes:
[0203] A verification unit, configured to verify the standard synchronization information using the latest received system dictionary data after receiving the standard synchronization information sent by the first resource server;
[0204] Accordingly, the third sending unit is specifically configured to:
[0205] If the verification result is a verification failure, the standard synchronization information of the verification failure is fed back to the first resource server; if the verification result is a verification success, the standard synchronization information of the verification success is stored in the intermediate server to wait for the second resource server to obtain the information.
[0206] It should be noted that for other corresponding descriptions of the functional units involved in the information synchronization device provided in this embodiment, reference can be made to Figure 6 The corresponding description in will not be repeated here.
[0207] Based on the above Figure 1-Figure 5 The method shown in the embodiment of the present application accordingly provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned Figure 1-Figure 5 The information synchronization method shown in FIG. Figure 6 The method shown in the embodiment of the present application accordingly provides another storage medium on which a computer program is stored, and when the program is executed by the processor, the above-mentioned Figure 6 The information synchronization method shown.
[0208] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0209] Based on the above Figure 1-Figure 6 The method shown, and Figure 8-9 In order to achieve the above-mentioned purpose, the embodiment of the present application also provides a physical device for information synchronization, which can be a computer, a smart phone, a tablet computer, a smart watch, a server, or a network device, etc. The physical device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1-Figure 6 The information synchronization method shown.
[0210] Optionally, the physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0211] Those skilled in the art will appreciate that the information synchronization entity device structure provided in this embodiment does not constitute a limitation on the entity device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0212] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device for the above-mentioned information synchronization, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.
[0213] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware. By applying the technical solution of the present application, compared with the current existing methods, the present application separates the first resource server and the second resource server through an intermediate server, so that the system storage pressure of the second resource server is transferred to the intermediate server, reducing the system storage pressure of the second resource server. At the same time, the intermediate server can allow the second resource server to publish the synchronization standard of resource information more conveniently, so that the first resource server can obtain the corresponding synchronization standard from the intermediate server at any time, which can reduce the workload of information synchronization while ensuring the integrity of information synchronization, thereby improving the efficiency of information synchronization.
[0214] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.
[0215] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.
Claims
1. An information synchronization method, characterized in that: The method is applied to a first resource server, and the method includes: Receive system dictionary data forwarded by the intermediate server; Synchronize the system dictionary data maintained synchronously according to the latest received system dictionary data to obtain synchronized system dictionary data; Establishing a dictionary mapping relationship in the local dictionary data according to the synchronized system dictionary data, wherein the dictionary mapping relationship is used to bind dictionary items in the local dictionary data to dictionary items in the synchronized system dictionary data; After the resource information to be synchronized in the local resource information is processed into standard synchronization information according to the dictionary mapping relationship, the standard synchronization information is sent to the intermediate server.
2. The method according to claim 1, characterized in that The system dictionary data includes dictionary items of different fields, each dictionary item corresponds to a dictionary attribute, and the synchronized system dictionary data is synchronized according to the latest received system dictionary data to obtain synchronized system dictionary data, including: Selecting a preset dictionary item in the latest received system dictionary data; The preset dictionary items are compared with dictionary items in the synchronously maintained system dictionary data according to the dictionary attributes, so as to perform synchronization processing on the synchronously maintained system dictionary data according to the comparison result.
3. The method according to claim 2, characterized in that The dictionary attributes include a dictionary code, a dictionary name, a dictionary identifier, and a modification status identifier. When the dictionary identifier of the preset dictionary item is in an effective state, the preset dictionary item is compared with the dictionary item in the synchronously maintained system dictionary data according to the dictionary attributes, so as to synchronize the synchronously maintained system dictionary data according to the comparison result, including: Determining whether there is a dictionary item having the same dictionary item code as the preset dictionary item in the system dictionary data maintained synchronously; If it does not exist, inserting the preset dictionary item into the synchronously maintained system dictionary data to generate the preset dictionary item in the synchronously maintained system dictionary data, and updating the modification status mark of the preset dictionary item in the synchronously maintained system dictionary data to be added; If so, obtaining a target dictionary item having the same dictionary item code as the preset dictionary item but a different dictionary item name from the synchronously maintained system dictionary data, updating the dictionary item name of the target dictionary item to the dictionary item name of the preset dictionary item, and updating the modification status flag of the target dictionary item in the synchronously maintained system dictionary data to be changed; When the dictionary identifier of the preset dictionary item is in an ineffective state, comparing the preset dictionary item with a dictionary item in the synchronously maintained system dictionary data according to the dictionary attribute, and performing synchronization processing on the synchronously maintained system dictionary data according to the comparison result, includes: A target dictionary item having the same dictionary item code as the preset dictionary item is obtained from the synchronously maintained system dictionary data, and a modification status mark of the target dictionary item in the synchronously maintained system dictionary data is updated to be invalid.
4. The method according to claim 1, characterized in that: The step of establishing a dictionary mapping relationship in the local dictionary data according to the synchronized system dictionary data includes: Traversing the modification status identifiers of the dictionary items to be mapped in the synchronized system dictionary data; According to the modification status identifier of the dictionary item to be mapped, a dictionary mapping relationship is established in the local dictionary data, so as to bind the dictionary item in the local dictionary data to the dictionary item in the synchronized system dictionary data through the dictionary mapping relationship.
5. The method according to claim 4, characterized in that The step of establishing a dictionary mapping relationship in the local dictionary data according to the modification status identifier of the dictionary item to be mapped includes: For a dictionary item to be mapped whose modification status is a new one, a new dictionary item is generated in the local dictionary data, and a dictionary mapping relationship is established according to the new item, and the dictionary mapping relationship is used to bind the new dictionary item to the dictionary item to be mapped; or an existing dictionary item is selected in the local dictionary data, and a dictionary mapping relationship is established according to the existing dictionary item, and the dictionary mapping relationship is used to bind the existing dictionary item to the dictionary item to be mapped; For the dictionary item to be mapped whose modification status is marked as changed, a new dictionary item is generated in the local dictionary data, and a dictionary mapping relationship is established according to the new item, and the dictionary mapping relationship is used to bind the new dictionary item to the dictionary item to be mapped, or an existing dictionary item is selected in the local dictionary data, and a dictionary mapping relationship is established according to the existing dictionary item, and the dictionary mapping relationship is used to bind the existing dictionary item to the dictionary item to be mapped, and at the same time, the original dictionary item is queried in the local dictionary data, and a dictionary mapping relationship is established according to the original dictionary item, and the original dictionary item is an existing dictionary item in the local dictionary data that is originally bound to the dictionary item to be mapped, and the dictionary mapping relationship is used to rebind the original dictionary item in the local dictionary data to other dictionary items in the synchronized system dictionary data or delete the dictionary item with a historical mapping relationship in the local dictionary data; For dictionary items to be mapped whose modification status is marked as invalid, the original dictionary items are queried in the local dictionary data, and a dictionary mapping relationship is established based on the original dictionary items. The original dictionary items are existing dictionary items in the local dictionary data that are originally bound to the dictionary items to be mapped. The dictionary mapping relationship is used to rebind the original dictionary items in the local dictionary data to other dictionary items in the synchronized system dictionary data or to delete the dictionary items in the local dictionary data that have historical mapping relationships.
6. The method according to any one of claims 1 to 5, characterized in that Before processing the resource information to be synchronized in the local resource information into standard synchronization information according to the dictionary mapping relationship, the method further includes: According to the synchronization information recorded in the push log table, the latest changed resource information is obtained from the local resource information as the resource information to be synchronized; The method of obtaining the latest changed resource information in the local resource information as the resource information to be synchronized according to the synchronization information recorded in the push log table includes: According to the synchronization information recorded in the push log table, obtain the synchronization time corresponding to the most recent information push and the largest incremental key value in the local resource information when the synchronization starts, as the basis for querying the resource information to be synchronized this time; According to the basis of the query of the resource information to be synchronized this time, the incremental key values in the local resource information that meet the push conditions are inserted into the queue list to be pushed, and the incremental key values that meet the push conditions include the incremental key values in the local resource information that are greater than the maximum incremental key value and the incremental key values that are less than or equal to the maximum incremental key value and whose editing time is greater than the synchronization time; Select corresponding resource information from the local resource information according to the incremental key value in the queue list to be pushed as the resource information to be synchronized in the local resource information; Correspondingly, after processing the resource information to be synchronized in the local resource information into standard synchronization information according to the dictionary mapping relationship, the method further includes: Select a unique identifier representing the information from the resource information to be synchronized; According to the unique identifier of the representation information, query the storage status of each piece of information in the resource information to be synchronized; If the storage status of the information is deleted, the synchronization operation flag of the corresponding information in the resource information to be synchronized is adjusted to a deleted status; otherwise, the synchronization operation flag of the corresponding information in the resource information to be synchronized is adjusted to a added or updated status.
7. An information synchronization method, characterized in that: The method is applied to an intermediate server, and the method comprises: Receiving system dictionary data uploaded by the second resource server; In response to a data acquisition instruction of the first resource server, the system dictionary data is sent to the first resource server, so that the first resource server processes the resource information to be synchronized in the local resource information into standard synchronization information according to a pre-established dictionary mapping relationship, wherein the dictionary mapping relationship is a binding relationship between the synchronized system dictionary data and the local dictionary data, and the synchronized system dictionary data is obtained by synchronizing the synchronized and maintained system dictionary data according to the latest received system dictionary data; Receiving standard synchronization information sent by the first resource server; The standard synchronization information is sent to the second resource server, so that the second resource server performs synchronization processing on the system resource information according to the standard synchronization information.
8. The method according to claim 7, characterized in that After receiving the standard synchronization information sent by the first resource server, the method further includes: Verifying the standard synchronization information using the latest received system dictionary data; Correspondingly, if the verification result is a verification failure, the standard synchronization information of the verification failure is fed back to the first resource server; if the verification result is a verification success, the standard synchronization information of the verification success is stored in the intermediate server to wait for the second resource server to obtain the information.
9. An information synchronization device, characterized in that: include: A first receiving unit, configured to receive system dictionary data forwarded by an intermediate server, wherein the system dictionary data corresponds to a timestamp sequence; A synchronization unit, used for synchronizing the system dictionary data maintained synchronously according to the latest received system dictionary data to obtain synchronized system dictionary data; an establishing unit, configured to establish a dictionary mapping relationship in the local dictionary data according to the synchronized system dictionary data, wherein the dictionary mapping relationship is used to bind dictionary items in the local dictionary data to dictionary items in the synchronized system dictionary data; The first sending unit is used to process the resource information to be synchronized in the local resource information into standard synchronization information according to the dictionary mapping relationship, and then send the standard synchronization information to the intermediate server.
10. An information synchronization device, characterized in that: include: A second receiving unit, configured to receive system dictionary data uploaded by a second resource server, wherein the system dictionary data corresponds to a timestamp sequence; a second sending unit, configured to send the system dictionary data to the first resource server in response to a data acquisition instruction of the first resource server, so that the first resource server processes the resource information to be synchronized in the local resource information into standard synchronization information according to a pre-established dictionary mapping relationship, wherein the dictionary mapping relationship is a binding relationship between the synchronized system dictionary data and the local dictionary data, and the synchronized system dictionary data is obtained by synchronizing the synchronized maintained system dictionary data according to the latest received system dictionary data; A third receiving unit, configured to receive standard synchronization information sent by the first resource server; The third sending unit is configured to send the standard synchronization information to the second resource server, so that the second resource server performs synchronization processing on the system resource information according to the standard synchronization information.