Data synchronization method and device, equipment and medium

By using data synchronization methods and cosine similarity algorithms in the banking system, the problem of bank account information not being updated in a timely manner after the company's legal person information is changed is solved, ensuring data consistency, reducing management risks, and improving data reliability and work efficiency.

CN120705221APending Publication Date: 2025-09-26INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510830487.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the banking system, if the bank account information is not updated in a timely manner after the company's legal person information changes, it will lead to inconsistent data, affect management convenience and risks, and may even violate relevant regulations.

Method used

By obtaining data identifiers from the branch server, comparing with the data on the enterprise information comprehensive service platform, and using timestamp and cosine similarity algorithms to synchronize data, data consistency is ensured and a data synchronization report is generated.

Benefits of technology

It achieves consistency and accuracy of data between different systems, reduces management risks, avoids business errors and decision-making deviations, and improves data reliability and work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705221A_ABST
    Figure CN120705221A_ABST
Patent Text Reader

Abstract

The invention provides a data synchronization method. The method can be applied to the technical fields of big data and finance. The method comprises the following steps: acquiring first data and a data identifier of the first data from a website server; and acquiring second data having the same data identifier as the first data from an enterprise information comprehensive service platform. And judging whether the first data is consistent with the second data or not. And if the first data is not consistent with the second data, obtaining the first updating time of the first data and the second updating time of the second data. And judging whether the second updating time is after the first updating time or not. And if the second update time is after the first update time, replacing the first data based on the second data to realize data synchronization. The invention further provides a data synchronization device and equipment, a storage medium and a program product.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of financial technology, specifically to the field of big data technology, and in particular to a data synchronization method, apparatus, device, medium and program product. Background Art

[0002] With the development of the industry, corporate business has gradually increased in businesses, including banks. At branch counters, numerous tasks must be handled daily, including opening accounts and updating bank account information. Furthermore, the operational processes for corporate business are complex, involving multiple departments and various business types. Therefore, this business requires professional personnel, advanced information systems, and a comprehensive risk management system.

[0003] Updating bank account information refers to changes in beneficiaries involving changes to the company's equity structure or legal person, typically requiring a visit to the bank to complete the relevant change procedures. This change may affect the company's bank account information, necessitating a visit to the bank to ensure that the company's bank account information is consistent with the company's articles of association and shareholder register. This service requires the company to proactively provide documentation and visit the bank for processing. If a company has already entered its information at a branch office and then goes to the Administration for Industry and Commerce to change its legal person information, but fails to provide documentation at the bank, the branch office cannot promptly update the information and can only notify the branch office for rectification. This can lead to information errors within the bank system, causing management inconvenience and risks. The company may even violate relevant regulations, leading to misunderstandings that affect insurance payment. Summary of the Invention

[0004] In view of the above problems, the present disclosure provides a data synchronization method, apparatus, device, medium and program product.

[0005] According to the first aspect of the present disclosure, a data synchronization method is provided, which includes: according to an embodiment of the present disclosure, obtaining first data and a data identifier of the first data from a network server; obtaining second data with the same data identifier as the first data from an enterprise information comprehensive service platform; judging whether the first data is consistent with the second data; if the first data is inconsistent with the second data, obtaining a first update time of the first data and a second update time of the second data, wherein the first update time is the most recent update time of the first data, and the second update time is the most recent update time of the second data; judging whether the second update time is after the first update time; and if the second update time is after the first update time, replacing the first data based on the second data to achieve data synchronization.

[0006] According to an embodiment of the present disclosure, the first data includes a first key-value pairs, and the second data includes a second key-value pairs, and the a first key-value pairs and the a second key-value pairs have a one-to-one corresponding a identical keys, wherein a is greater than or equal to 1 and a is an integer, and determining whether the first data is consistent with the second data includes: calculating the weight value in each first key-value pair, obtaining b third key-value pairs with weight values ​​greater than a first preset threshold from the a first key-value pairs, wherein b is greater than or equal to 1 and b is an integer, and b is less than or equal to a; obtaining b fourth key-value pairs with the same keys as the b third key-value pairs from the a second key-value pairs; and determining whether the b third key-value pairs are consistent with the b fourth key-value pairs, so as to determine whether the first data is consistent with the second data.

[0007] According to an embodiment of the present disclosure, calculating the weight value of each first key-value pair includes: obtaining text information of the median value of each first key-value pair; calculating the frequency of occurrence of the text information of the median value of each first key-value pair in the first data; calculating the rarity rate of the text information of the median value of each first key-value pair in the network server; and calculating the product of the frequency of occurrence of the text information of the median value of each first key-value pair in the first data and the rarity rate of the text information of the median value of each first key-value pair in the network server to generate the weight value of each first key-value pair.

[0008] According to an embodiment of the present disclosure, determining whether the b third key-value pairs are consistent with the b fourth key-value pairs includes: obtaining the values ​​of the b third key-value pairs and the value of the fourth key-value pair having the same key in the b third key-value pairs and the b fourth key-value pairs; converting the values ​​of the b third key-value pairs and the value of the fourth key-value pair having the same key into b first vectors and second vectors with the same key as a mapping relationship; calculating the cosine similarities of the b first vectors and the second vectors with the same key as a mapping relationship to generate b cosine similarities; and determining whether there is a cosine similarity less than a second preset threshold among the b cosine similarities to determine whether the b third key-value pairs are consistent with the b fourth key-value pairs.

[0009] According to an embodiment of the present disclosure, calculating the cosine similarities of the b first vectors and the second vector with the same key as the mapping relationship to generate b cosine similarities includes: calculating the dot product of the b first vectors and the second vector with the same key as the mapping relationship; calculating the modulus of the b first vectors and the second vector with the same key as the mapping relationship; and calculating the quotient of the dot product of the b first vectors and the second vector with the same key as the mapping relationship and the modulus to generate b cosine similarities.

[0010] According to an embodiment of the present disclosure, obtaining second data having the same data identifier as the first data from an enterprise information comprehensive service platform includes: obtaining the key and authorization code of the enterprise information comprehensive service platform; generating interface calling rules of the enterprise information comprehensive service platform based on the key and authorization code of the enterprise information comprehensive service platform; and obtaining second data having the same data identifier as the first data from the enterprise information comprehensive service platform based on the interface calling rules of the enterprise information comprehensive service platform.

[0011] According to an embodiment of the present disclosure, the method also includes: after the second data replaces the first data, generating a data synchronization report for storage and transmission.

[0012] According to the second aspect of the present disclosure, a data synchronization device is provided, which includes: a first acquisition module, used to acquire first data from a network server and acquire a data identifier of the first data; a second acquisition module, used to acquire second data with the same data identifier as the first data from an enterprise information comprehensive service platform; a first judgment module, used to judge whether the first data and the second data are consistent; a third acquisition module, if the first data and the second data are inconsistent, then acquires the first update time of the first data and the second update time of the second data, wherein the first update time is the most recent update time of the first data, and the second update time is the most recent update time of the second data; a second judgment module, used to judge whether the second update time is after the first update time; and a data synchronization module, if the second update time is after the first update time, then replaces the first data based on the second data to achieve data synchronization.

[0013] According to an embodiment of the present disclosure, the second acquisition module includes: a fourth acquisition module, used to obtain the key and authorization code of the enterprise information comprehensive service platform; a first generation module, used to generate the interface calling rules of the enterprise information comprehensive service platform based on the key and authorization code of the enterprise information comprehensive service platform; and a fifth acquisition module, used to obtain second data with the same data identifier as the first data from the enterprise information comprehensive service platform based on the interface calling rules of the enterprise information comprehensive service platform.

[0014] According to an embodiment of the present disclosure, the first data includes a first key-value pairs, and the second data includes a second key-value pairs, and the a first key-value pairs and the a second key-value pairs have a one-to-one corresponding a identical keys, wherein a is greater than or equal to 1 and a is an integer, and the first judgment module includes: a first calculation module, used to calculate the weight value in each first key-value pair, and obtain b third key-value pairs with weight values ​​greater than a first preset threshold from the a first key-value pairs, wherein b is greater than or equal to 1 and b is an integer, and b is less than or equal to a; a sixth acquisition module, used to obtain b fourth key-value pairs with the same keys as the b third key-value pairs from the a second key-value pairs; and a third judgment module, used to judge whether the b third key-value pairs are consistent with the b fourth key-value pairs, so as to determine whether the first data is consistent with the second data.

[0015] According to an embodiment of the present disclosure, the first calculation module includes: a seventh acquisition module, used to obtain the text information of the median value of each first key-value pair; a second calculation module, used to calculate the frequency of occurrence of the text information of the median value of each first key-value pair in the first data; a third calculation module, used to calculate the rarity rate of the text information of the median value of each first key-value pair in the network server; and a fourth calculation module, used to calculate the product of the frequency of occurrence of the text information of the median value of each first key-value pair in the first data and the rarity rate of the text information of the median value of each first key-value pair in the network server, to generate a weight value for each first key-value pair.

[0016] According to an embodiment of the present disclosure, the third judgment module includes: a seventh acquisition module, used to obtain the values ​​of b third key-value pairs and the value of the fourth key-value pair with the same key in the b third key-value pairs and the b fourth key-value pairs; a vector conversion module, used to convert the values ​​of the b third key-value pairs and the value of the fourth key-value pair with the same key into b first vectors and second vectors with the same key as the mapping relationship; a fifth calculation module, used to calculate the cosine similarities of the b first vectors and the second vectors with the same key as the mapping relationship to generate b cosine similarities; and a fourth judgment module, used to determine whether there is a cosine similarity less than a second preset threshold among the b cosine similarities, so as to determine whether the b third key-value pairs are consistent with the b fourth key-value pairs.

[0017] According to an embodiment of the present disclosure, the fifth calculation module includes: a sixth calculation module, used to calculate the dot product of the b first vectors and the second vector with the same key as the mapping relationship; a seventh calculation module, used to calculate the modulus of the b first vectors and the second vector with the same key as the mapping relationship; and an eighth calculation module, used to calculate the quotient of the dot product of the b first vectors and the second vector with the same key as the mapping relationship and the modulus, to generate b cosine similarities.

[0018] According to an embodiment of the present disclosure, the device further includes: a sending module, configured to generate a data synchronization report for storage and sending after the second data replaces the first data.

[0019] According to a third aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned data synchronization method.

[0020] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which executable instructions or computer programs are stored. When the instructions or computer programs are executed by a processor, the processor executes the above-mentioned data synchronization method.

[0021] According to a fifth aspect of the present disclosure, a computer program product is also provided, including a computer program, which implements the above-mentioned data synchronization method when executed by a processor.

[0022] According to the embodiment of the present disclosure, by comparing the data of the enterprise information comprehensive service platform with the internal enterprise data of the bank to obtain enterprise change information, the consistency and accuracy of data between different systems can be ensured, and the data synchronization mechanism of the timestamp can keep the data up to date, thereby improving the reliability of the data. At the same time, it brings convenience to bank management, reduces risks, and avoids the technical effects of business errors and decision-making deviations caused by data version differences. It can solve the problem that when a company has recorded information at an outlet and then changed the legal person information, but it did not come to the bank to provide information, then the outlet cannot make changes to the information in a timely manner and can only notify the branch to make rectifications, resulting in information errors in the bank system, bringing inconvenience and risks in management, and the company may even violate relevant regulations, affecting the technical problem of misunderstandings in insurance payment. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0024] Figure 1 The following schematically illustrates an application scenario of the data synchronization method and device according to an embodiment of the present disclosure;

[0025] Figure 2 The following schematically shows a flow chart of a data synchronization method according to an embodiment of the present disclosure;

[0026] Figure 3 Schematically shows a flow chart of obtaining second data in a data synchronization method according to an embodiment of the present disclosure;

[0027] Figure 4 Schematically shows a flow chart of determining consistency between first data and second data in a data synchronization method according to an embodiment of the present disclosure;

[0028] Figure 5 A flowchart of generating a weight value of each first key-value pair in a data synchronization method according to an embodiment of the present disclosure is schematically shown;

[0029] Figure 6 Schematically illustrates a flow chart for determining consistency between b third key-value pairs and b fourth key-value pairs in a data synchronization method according to an embodiment of the present disclosure;

[0030] Figure 7 Schematically shows a flow chart of generating b cosine similarities in a data synchronization method according to an embodiment of the present disclosure;

[0031] Figure 8 Schematically shows a structural block diagram of a data synchronization device according to an embodiment of the present disclosure; and

[0032] Figure 9 A block diagram of an electronic device suitable for implementing a data synchronization method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0033] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0034] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0035] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0036] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0037] The accompanying drawings illustrate some block diagrams and / or flow charts. It should be understood that some blocks in the block diagrams and / or flow charts, or combinations thereof, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable control device, so that when executed by the processor, these instructions may create a device for implementing the functions / operations described in the block diagrams and / or flow charts.

[0038] First, let’s explain the technical terms that appear in this article as follows:

[0039] URL: (Uniform Resource Locator), used to locate and access resource addresses on the Internet.

[0040] JSON data: (JavaScript Object Notation) is a lightweight data exchange format, mainly used to transmit structured data between clients and servers.

[0041] An embodiment of the present disclosure provides a data synchronization method, the method comprising: obtaining first data and a data identifier of the first data from a network server. Obtaining second data having the same data identifier as the first data from an enterprise information integrated service platform. Determining whether the first data and the second data are consistent. If the first data and the second data are inconsistent, obtaining a first update time of the first data and a second update time of the second data. The first update time is the most recent update time of the first data, and the second update time is the most recent update time of the second data. Determining whether the second update time is after the first update time. If the second update time is after the first update time, replacing the first data based on the second data to achieve data synchronization.

[0042] According to the disclosed embodiment, by comparing the data of the enterprise information comprehensive service platform with the internal enterprise data of the bank to obtain enterprise change information, the consistency and accuracy of data between different systems can be ensured, and the data synchronization mechanism of the timestamp can keep the data up to date, thereby improving the reliability of the data. At the same time, it brings convenience to bank management, reduces risks, and avoids the technical effects of business errors and decision-making deviations caused by data version differences. It can solve the problem that when a company has recorded information at an outlet and then changed the legal person information, but it did not come to the bank to provide information, then the outlet cannot make changes to the information in a timely manner and can only notify the branch to make rectifications, resulting in information errors in the bank system, bringing inconvenience and risks in management, and the company may even violate relevant regulations, affecting the technical problem of misunderstandings in insurance payment.

[0043] Figure 1 The following diagram schematically illustrates an application scenario of the data synchronization method and device according to an embodiment of the present disclosure. Figure 1 The examples shown are merely examples of scenarios in which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0044] like Figure 1 As shown, the application scenario 100 according to this embodiment may include an application scenario of data synchronization. A network 104 is used as a medium for providing a communication link between a first terminal device 101, a second terminal device 102, a third terminal device 103, and a server 105. The network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0045] A user may use a first terminal device 101, a second terminal device 102, or a third terminal device 103 to interact with a server 105 via a network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (for example only).

[0046] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0047] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process received data such as user requests, and feed back processing results (e.g., web pages, information, or data obtained or generated based on user requests) to the terminal devices.

[0048] It should be noted that the data synchronization method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the data synchronization device provided in the embodiment of the present disclosure can generally be set in the server 105. The data synchronization method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the data synchronization device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.

[0049] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0050] The following will be based on Figure 1 The scene described by Figures 2 to 7 The data synchronization method of the disclosed embodiment is described in detail. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.

[0051] Figure 2 The flowchart of the data synchronization method according to the embodiment of the present disclosure is schematically shown.

[0052] like Figure 2 As shown, the method 200 includes steps S201 to S206.

[0053] Step S201: Acquire first data and a data identifier of the first data from a network server.

[0054] Step S202: Acquire second data having the same data identifier as the first data from the enterprise information comprehensive service platform.

[0055] Figure 3The flowchart of obtaining the second data in the data synchronization method according to an embodiment of the present disclosure is schematically shown.

[0056] like Figure 3 As shown, the method 300 includes steps S301 to S303.

[0057] Step S301: Obtain the key and authorization code of the enterprise information comprehensive service platform.

[0058] For example, you can visit the official website of the Enterprise Information Comprehensive Service Platform to register information and obtain the interface key and authorization code.

[0059] Step S302: Generate interface call rules of the enterprise information comprehensive service platform based on the key and authorization code of the enterprise information comprehensive service platform.

[0060] For example, based on the key and authorization code of the enterprise information integrated service platform, the development environment software can be installed and the interface calling rules of the enterprise information integrated service platform can be obtained.

[0061] Step S303: Based on the interface calling rules of the enterprise information comprehensive service platform, second data having the same data identifier as the first data is obtained from the enterprise information comprehensive service platform.

[0062] For example, a request URL can be constructed, a request header can be set, a request can be sent, and a response can be processed to obtain JSON data. Based on the interface document description, the returned JSON data can be parsed to extract the second data except for the data identifier that is the same as the first data.

[0063] By obtaining and using keys and authorization codes, the compliance of interface calls is ensured, thereby improving the security and reliability of obtaining second data with the same data identifier as the first data from the enterprise information comprehensive service platform.

[0064] Return to reference Figure 2 In step S203, it is determined whether the first data is consistent with the second data.

[0065] For example, the first data includes a first key-value pairs, the second data includes a second key-value pairs, the a first key-value pairs and the a second key-value pairs have a one-to-one correspondence of a identical keys, where a is greater than or equal to 1 and a is an integer.

[0066] Figure 4 The flowchart of determining the consistency between first data and second data in the data synchronization method according to an embodiment of the present disclosure is schematically shown.

[0067] like Figure 4 As shown, the method 400 includes steps S401 to S403.

[0068] Step S401, calculate the weight value in each first key-value pair, and obtain b third key-value pairs with weight values ​​greater than a first preset threshold from the a first key-value pairs, where b is greater than or equal to 1, and b is an integer, and b is less than or equal to a.

[0069] Figure 5 The flowchart of generating the weight value of each first key-value pair in the data synchronization method according to an embodiment of the present disclosure is schematically shown.

[0070] like Figure 5 As shown, the method 500 includes steps S501 to S504.

[0071] Step S501: Obtain text information of the value in each first key-value pair.

[0072] Step S502: Calculate the frequency of occurrence of the text information of the value in each first key-value pair in the first data.

[0073] For example, the number of times the text information of the value in each first key-value pair appears in the first data may be calculated as the frequency of occurrence of the text information of the value in each first key-value pair in the first data.

[0074] Step S503 , calculating the rarity rate of the text information of each first key-value pair in the network server.

[0075] For example, the inverse document frequency of the text information of each first key-value pair in the website server may be calculated as the rarity rate of the text information of each first key-value pair in the website server.

[0076] Step S504 : Calculate the product of the occurrence frequency of the text information of each first key-value pair in the first data and the rarity rate of the text information of each first key-value pair in the network server to generate a weight value of each first key-value pair.

[0077] The accuracy of generated weights can be improved by analyzing the frequency of occurrence of the text information in each first key-value pair within the first data and the rarity of the text information in each first key-value pair within the branch server. Weights can be used to filter out noisy data and reduce invalid synchronizations caused by misjudgments. Furthermore, assigning weights to text information can determine push priorities, improve push accuracy, and accurately identify related information. For example, a company may have a large amount of information recorded in the system. Prioritizing different information changes based on text weights can help identify key content within these changes, avoid pushing unimportant or misjudged information, reduce information noise, and improve push accuracy and effectiveness. Furthermore, changes to information such as company name, legal representative, and registered capital, which have a significant impact and involve important business or regulatory requirements, can be assigned higher weights. During push notifications, the system can prioritize these key information changes, ensuring staff are informed of the most critical content in a timely and accurate manner, avoiding business risks or compliance issues caused by untimely or missed information pushes. Furthermore, text weights can help the system identify correlations between information changes. In business operations, a single change can trigger a chain reaction of changes to other related information. By analyzing text weights, related information changes can be integrated and pushed, improving the scientific nature and accuracy of decision-making.

[0078] Return to reference Figure 4 In step S402, b fourth key-value pairs having the same key as the b third key-value pairs are obtained from the a second key-value pairs.

[0079] Step S403 : Determine whether the b third key-value pairs are consistent with the b fourth key-value pairs, so as to determine whether the first data is consistent with the second data.

[0080] Figure 6 The flowchart of determining the consistency between b third key-value pairs and b fourth key-value pairs in the data synchronization method according to an embodiment of the present disclosure is schematically shown.

[0081] like Figure 6 As shown, the method 600 includes steps S601 to S604.

[0082] Step S601: Obtain the values ​​of the b third key-value pairs and the value of the fourth key-value pair having the same key among the b third key-value pairs and the b fourth key-value pairs.

[0083] Step S602: Convert the values ​​of the b third key-value pairs and the value of the fourth key-value pair having the same key into b first vectors and b second vectors having the same key as a mapping relationship.

[0084] Step S603 : Calculate the cosine similarities between the b first vectors and the second vectors with the same key as the mapping relationship, and generate b cosine similarities.

[0085] Figure 7 The flowchart of generating b cosine similarities in the data synchronization method according to an embodiment of the present disclosure is schematically shown.

[0086] like Figure 7 As shown, the method 700 includes steps S701 to S703.

[0087] Step S701 : Calculate the dot product of the b first vectors and the second vector with the same key as the mapping relationship.

[0088] Step S702 : Calculate the module lengths of the b first vectors and second vectors with the same key as the mapping relationship.

[0089] Step S703 : Calculate the quotient of the dot product of the b first vectors and the second vectors with the same key as the mapping relationship and the module length to generate b cosine similarities.

[0090] For example, the closer the cosine value of the angle between two vectors is to 1, the more similar the two vectors are. It can be used to detect changes in text information such as company names and business scope. Assume that the legal person of a company in January 2023 is Li Si and the legal person in April 2024 is Zhang San. They are represented as vectors V(Li Si) and V(Zhang San). The cosine similarity calculation formula is shown in formula (1):

[0091] Formula (1)

[0092] Since the dot product and modulus length operations of vectors have low computational complexity, they can be used in high-frequency scenarios. This improves computational efficiency and saves computational memory and CPU resources while also improving the accuracy of cosine degree generation.

[0093] Return to reference Figure 6 In step S604, it is determined whether there is a cosine similarity less than a second preset threshold among the b cosine similarities to determine whether the b third key-value pairs are consistent with the b fourth key-value pairs.

[0094] For example, when the cosine similarity is lower than the second preset threshold, the third key-value pair is determined to be inconsistent with the fourth key-value pair, that is, the first data and the second data are inconsistent, and the company information has changed. When the cosine similarity is greater than or equal to the second preset threshold, the third key-value pair is determined to be consistent with the fourth key-value pair, that is, the first data and the second data are consistent, and the company information has not changed.

[0095] By converting the value of the key-value pair into a vector and then using cosine similarity for similarity matching, the semantic or feature similarity can be measured. This is not a simple character or numerical match, avoiding the misjudgment caused by traditional character or numerical matching, and improving the accuracy of similarity judgment in complex scenarios. Furthermore, by weighting and screening out b third key-value pairs and corresponding b fourth key-value pairs, rather than all a key-value pairs, the server's computational complexity can be significantly reduced, saving memory and CPU resources. At the same time, this technical solution only requires data processing for high-weighted key-value pairs, shortening the decision-making process and further improving computational efficiency.

[0096] Return to reference Figure 2 In step S204, if the first data is inconsistent with the second data, the first update time of the first data and the second update time of the second data are obtained, wherein the first update time is the most recent update time of the first data, and the second update time is the most recent update time of the second data.

[0097] Step S205: determine whether the second update time is after the first update time.

[0098] For example, if the second update time is after the first update time, it indicates that the second data is the latest updated data and data synchronization is required. If the second update time is not after the first update time, it indicates that the second data is not the latest updated data and data synchronization is not required.

[0099] Step S206: If the second update time is after the first update time, the first data is replaced based on the second data to achieve data synchronization.

[0100] Furthermore, after the second data replaces the first data, a data synchronization report is generated, stored, and sent. This data synchronization report can be sent to the email addresses of the branch manager, operations manager, and corporate customer service manager. Once the corporate customer service manager receives the modification information, they can promptly contact the customer and ask them to provide relevant information to update the data.

[0101] Generating and storing data synchronization reports supports long-term traceability and improves data synchronization reliability. Generating and sending data synchronization reports allows relevant staff to obtain data synchronization information in a timely manner, avoiding repeated references. This dual storage and sending mechanism improves the reliability and transparency of data synchronization, facilitates data management and team collaboration, and improves staff work efficiency.

[0102] Figure 8 The structure block diagram of the data synchronization device according to the embodiment of the present disclosure is schematically shown.

[0103] like Figure 8 As shown, the device 800 includes: a first acquisition module 801 , a second acquisition module 802 , a first judgment module 803 , a third acquisition module 804 , a second judgment module 805 and a data synchronization module 806 .

[0104] The first acquisition module 801 is configured to acquire first data and a data identifier of the first data from a network server. In one embodiment, the first acquisition module 801 may be configured to execute step S201 described above, which will not be described in detail here.

[0105] The second acquisition module 802 is configured to acquire second data having the same data identifier as the first data from the enterprise information integrated service platform. In one embodiment, the second acquisition module 802 may be configured to execute step S202 described above.

[0106] The second acquisition module 802 includes: a fourth acquisition module, a first generation module and a fifth acquisition module.

[0107] The fourth acquisition module is used to obtain the key and authorization code of the enterprise information integrated service platform. In one embodiment, the fourth acquisition module can be used to execute step S301 described above, which will not be repeated here.

[0108] The first generation module is used to generate the interface call rules of the enterprise information integrated service platform based on the key and authorization code of the enterprise information integrated service platform. In one embodiment, the first generation module can be used to execute step S302 described above, which will not be repeated here.

[0109] The fifth acquisition module is used to obtain second data having the same data identifier as the first data from the enterprise information integrated service platform based on the interface call rules of the enterprise information integrated service platform. In one embodiment, the fifth acquisition module can be used to execute step S303 described above, which will not be repeated here.

[0110] The first judgment module 803 is configured to judge whether the first data and the second data are consistent. In one embodiment, the first judgment module 803 may be configured to execute step S203 described above.

[0111] The first judgment module 803 includes: a first calculation module, a sixth acquisition module and a third judgment module.

[0112] A first calculation module is configured to calculate a weight value in each first key-value pair, and obtain b third key-value pairs from the a first key-value pairs, each having a weight value greater than a first preset threshold, where b is greater than or equal to 1, b is an integer, and b is less than or equal to a. In one embodiment, the first calculation module can be configured to execute step S401 described above.

[0113] The first calculation module includes: a seventh acquisition module, a second calculation module, a third calculation module and a fourth calculation module.

[0114] The seventh acquisition module is configured to acquire the text information of the value in each first key-value pair. In one embodiment, the seventh acquisition module may be configured to execute step S501 described above, which will not be described in detail here.

[0115] The second calculation module is configured to calculate the frequency of occurrence of the text information of the value in each first key-value pair in the first data. In one embodiment, the second calculation module can be configured to execute step S502 described above, which will not be described in detail here.

[0116] The third calculation module is used to calculate the rarity rate of the text information of each first key-value pair in the network server. In one embodiment, the third calculation module can be used to execute step S503 described above, which will not be repeated here.

[0117] The fourth calculation module is configured to calculate the product of the frequency of occurrence of the text information in each first key-value pair in the first data and the rarity of the text information in each first key-value pair within the network server, thereby generating a weight value for each first key-value pair. In one embodiment, the fourth calculation module may be configured to execute step S504 described above and will not be further described here.

[0118] The sixth acquisition module is configured to acquire b fourth key-value pairs having the same key as the b third key-value pairs from the a second key-value pairs. In one embodiment, the fifth acquisition module may be configured to execute step S402 described above, which will not be described in detail here.

[0119] The third judgment module is configured to judge whether the b third key-value pairs are consistent with the b fourth key-value pairs, so as to determine whether the first data is consistent with the second data. In one embodiment, the third judgment module may be configured to execute step S403 described above.

[0120] The third judgment module includes: a seventh acquisition module, a vector conversion module, a fifth calculation module and a fourth judgment module.

[0121] The seventh acquisition module is configured to obtain the values ​​of the b third key-value pairs and the fourth key-value pairs that have the same key in the b third key-value pairs and the b fourth key-value pairs. In one embodiment, the seventh acquisition module may be configured to execute step S601 described above, which will not be described in detail herein.

[0122] A vector conversion module is configured to convert the values ​​of the b third key-value pairs and the value of the fourth key-value pair having the same key into b first vectors and second vectors having the same key as a mapping relationship. In one embodiment, the vector conversion module can be configured to execute step S602 described above and will not be further described here.

[0123] The fifth calculation module is configured to calculate the cosine similarities of the b first vectors and the second vectors with the same key as the mapping relationship, and generate b cosine similarities. In one embodiment, the fifth calculation module can be configured to execute step S603 described above.

[0124] The fifth computing module includes: a sixth computing module, a seventh computing module and an eighth computing module.

[0125] The sixth calculation module is configured to calculate the dot product of the b first vectors and the second vectors having the same key as the mapping relationship. In one embodiment, the sixth calculation module may be configured to execute step S701 described above, which will not be described in detail here.

[0126] The seventh calculation module is used to calculate the module lengths of the b first vectors and second vectors with the same key as the mapping relationship. In one embodiment, the seventh calculation module can be used to execute step S702 described above, which will not be repeated here.

[0127] The eighth calculation module is used to calculate the dot product of the b first vectors and the second vectors with the same key as the mapping relationship and the quotient of the module length to generate b cosine similarities. In one embodiment, the eighth calculation module can be used to perform step S703 described above, which is not repeated here.

[0128] A determination module is configured to determine whether any of the b cosine similarities has a cosine similarity less than a second preset threshold, thereby determining whether the b third key-value pairs are consistent with the b fourth key-value pairs. In one embodiment, the fourth determination module may be configured to execute step S604 described above, which will not be further described herein.

[0129] The third acquisition module 804 is configured to, if the first data and the second data are inconsistent, acquire a first update time of the first data and a second update time of the second data, where the first update time is the time when the first data was most recently updated, and the second update time is the time when the second data was most recently updated. In one embodiment, the third acquisition module 804 may be configured to execute step S204 described above, and will not be further described herein.

[0130] The second judgment module 805 is configured to judge whether the second update time is after the first update time. In one embodiment, the second judgment module 805 may be configured to execute the aforementioned step S205, which will not be described in detail herein.

[0131] The data synchronization module 806 is configured to replace the first data based on the second data if the second update time is after the first update time to achieve data synchronization. In one embodiment, the data synchronization module 806 may be configured to execute step S206 described above, which will not be described in detail here.

[0132] In addition, the device further includes: a sending module, configured to generate a data synchronization report for storage and sending after the second data replaces the first data.

[0133] According to embodiments of the present disclosure, any multiple of the first acquisition module 801, the second acquisition module 802, the first determination module 803, the third acquisition module 804, the second determination module 805, and the data synchronization module 806 can be combined into a single module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present disclosure, at least one of the first acquisition module 801, the second acquisition module 802, the first determination module 803, the third acquisition module 804, the second determination module 805, and the data synchronization module 806 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware through any other reasonable means of circuit integration or packaging, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or any appropriate combination of any of these. Alternatively, at least one of the first acquisition module 801, the second acquisition module 802, the first judgment module 803, the third acquisition module 804, the second judgment module 805 and the data synchronization module 806 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.

[0134] Figure 9 A block diagram of an electronic device suitable for implementing a data synchronization method according to an embodiment of the present disclosure is schematically shown.

[0135] like Figure 9As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage unit 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.

[0136] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0137] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or a modem. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. Removable media 911, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 910 as needed, so that computer programs read from the removable media can be installed in the storage section 908 as needed.

[0138] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.

[0139] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above, and / or one or more memories other than ROM 902 and RAM 903.

[0140] The embodiments of the present disclosure also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the data synchronization method provided by the embodiments of the present disclosure.

[0141] The computer program executes the above functions defined in the system / device of the embodiment of the present disclosure when the processor 901 executes the computer program. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0142] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0143] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0144] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0146] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or couplings are intended to fall within the scope of this disclosure.

[0147] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A data synchronization method, characterized in that: The method includes: Obtaining first data and a data identifier of the first data from the network site server; Acquire second data having the same data identifier as the first data from the enterprise information comprehensive service platform; determining whether the first data is consistent with the second data; If the first data and the second data are inconsistent, obtaining a first update time of the first data and a second update time of the second data, wherein the first update time is the time when the first data was last updated, and the second update time is the time when the second data was last updated; determining whether the second update time is after the first update time; and If the second update time is after the first update time, the first data is replaced based on the second data to achieve data synchronization.

2. The method according to claim 1, characterized in that The first data includes a first key-value pairs, and the second data includes a second key-value pairs, the a first key-value pairs and the a second key-value pairs have a one-to-one correspondence of a identical keys, where a is greater than or equal to 1 and a is an integer. Determining whether the first data and the second data are consistent includes: Calculating a weight value in each first key-value pair, and obtaining b third key-value pairs having weight values ​​greater than a first preset threshold from the a first key-value pairs, where b is greater than or equal to 1, b is an integer, and b is less than or equal to a; Obtaining b fourth key-value pairs having the same key as the b third key-value pairs from the a second key-value pairs; and It is determined whether the b third key-value pairs are consistent with the b fourth key-value pairs to determine whether the first data is consistent with the second data.

3. The method according to claim 2, characterized in that Calculate the weight of each first key-value pair, including: Get the text information of the value in each first key-value pair; Calculate the frequency of occurrence of the text information of the value in each first key-value pair in the first data; Calculating the rarity rate of the text information of each first key-value pair in the website server; and The product of the occurrence frequency of the text information of the value in each first key-value pair in the first data and the rarity rate of the text information of the value in each first key-value pair in the network server is calculated to generate a weight value of each first key-value pair.

4. The method according to claim 2, characterized in that Determining whether the b third key-value pairs are consistent with the b fourth key-value pairs includes: Obtaining the values ​​of b third key-value pairs and the value of the fourth key-value pair having the same key among the b third key-value pairs and the b fourth key-value pairs; Convert the values ​​of the b third key-value pairs and the value of the fourth key-value pair having the same key into b first vectors and second vectors having the same key as a mapping relationship; Calculating the cosine similarities between the b first vectors and the second vector having the same key as a mapping relationship, to generate b cosine similarities; and It is determined whether there is a cosine similarity less than a second preset threshold among the b cosine similarities to determine whether the b third key-value pairs are consistent with the b fourth key-value pairs.

5. The method according to claim 4, characterized in that Calculating the cosine similarities of the b first vectors and the second vectors having the same key as a mapping relationship to generate b cosine similarities includes: Calculate the dot product of the b first vectors and the second vector having the same key as the mapping relationship; Calculating the module lengths of the b first vectors and the second vectors having the same key as the mapping relationship; and The quotient of the dot product of the b first vectors and the second vectors with the same key as the mapping relationship and the module length is calculated to generate b cosine similarities.

6. The method according to any one of claims 1 to 5, characterized in that Acquiring second data having the same data identifier as the first data from the enterprise information integrated service platform includes: Obtain the key and authorization code of the enterprise information comprehensive service platform; Generate an interface call rule for the enterprise information comprehensive service platform based on the key and authorization code of the enterprise information comprehensive service platform; and Based on the interface calling rules of the enterprise information comprehensive service platform, second data having the same data identifier as the first data is obtained from the enterprise information comprehensive service platform.

7. The method according to any one of claims 1 to 5, characterized in that The method includes: After the second data replaces the first data, a data synchronization report is generated for storage and transmission.

8. A data synchronization device, characterized in that: The device includes: A first acquisition module is used to acquire first data from the network server and obtain a data identifier of the first data; A second acquisition module acquires second data having the same data identifier as the first data from the enterprise information integrated service platform; A first judgment module, judging whether the first data is consistent with the second data; a third acquisition module, if the first data and the second data are inconsistent, acquiring a first update time of the first data and a second update time of the second data, wherein the first update time is the time when the first data was last updated, and the second update time is the time when the second data was last updated; A second determination module is configured to determine whether the second update time is after the first update time; and The data synchronization module replaces the first data based on the second data to achieve data synchronization if the second update time is after the first update time.

9. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.