CN116775110A - Data synchronization method, device, equipment, medium and product - Google Patents

Data synchronization method, device, equipment, medium and product Download PDF

Info

Publication number
CN116775110A
CN116775110A CN202310774924.6A CN202310774924A CN116775110A CN 116775110 A CN116775110 A CN 116775110A CN 202310774924 A CN202310774924 A CN 202310774924A CN 116775110 A CN116775110 A CN 116775110A
Authority
CN
China
Prior art keywords
called
version information
equipment
calling
call
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310774924.6A
Other languages
Chinese (zh)
Inventor
杨斌
程浩
谢晖
朱力克
朱传明
张怀天
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202310774924.6A priority Critical patent/CN116775110A/en
Publication of CN116775110A publication Critical patent/CN116775110A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data synchronization method, a device, equipment, a medium and a product, wherein the method comprises the following steps: sending a query request to the second device, wherein the query request is used for querying first version information of an object to be called in the first device, and the object to be called is an object marked as a preset mark; receiving first version information sent by second equipment, wherein the first version information is recorded in a main register of the second equipment; sending a calling request to the second device under the condition that the second version information of the object to be called recorded in the auxiliary register of the first device is different from the first version information, wherein the calling request is used for acquiring the latest data of the object to be called in the second device; and updating the original data of the object to be called stored on the first device by adopting the latest data of the object to be called, and updating the version information of the object to be called recorded in the auxiliary register into first version information. By adopting the steps, the data calling frequency can be reduced, and the utilization rate of system resources can be improved.

Description

Data synchronization method, device, equipment, medium and product
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data synchronization method, apparatus, device, medium, and product.
Background
Along with the rapid development of software technology, application systems are more and more huge, the realization of business often needs the cooperation of a plurality of calling party systems to be completed, and a great deal of data interaction exists between a main system and the calling party systems. In a large amount of data interaction, some data are not changed frequently and are relatively stable, but once the data are changed, the consistency of the data among the systems needs to be maintained in real time. The data interaction between the calling party system and the main system is common practice that the main system issues a data interface to call the calling party system in real time to acquire data, but if the part of data is relatively stable, the data is not changed in the period of multiple times of calling by the calling party, so that multiple times of calling results in the period are not different, and when the calling party is numerous and the calling party calls frequently, a large number of repeated data requests are generated, and the problems of system resource, network resource waste and the like are caused.
Disclosure of Invention
The data synchronization method, the device, the equipment, the medium and the product provided by the application can improve the utilization rate of system resources and network resources by reducing the data calling frequency.
In a first aspect, an embodiment of the present application provides a data synchronization method, where the method includes:
Sending a query request to second equipment, wherein the query request is used for querying first version information of an object to be called in the first equipment, and the object to be called is an object marked as a preset mark;
receiving the first version information sent by the second device, wherein the first version information is recorded in a main register of the second device;
sending a calling request to a second device under the condition that second version information of the object to be called recorded in a secondary register of the first device is different from the first version information, wherein the calling request is used for acquiring the latest data of the object to be called in the second device;
and updating the original data of the object to be called stored on the first device by adopting the latest data of the object to be called, and updating the version information of the object to be called recorded in the auxiliary register into the first version information.
In a second aspect, an embodiment of the present application provides a data synchronization method, where the method includes:
receiving a query request sent by first equipment, wherein the query request is used for querying first version information of an object to be called in the first equipment, and the object to be called is an object marked as a preset mark;
Transmitting first version information corresponding to the query request, wherein the first version information is recorded in a main register of the second device;
receiving a call request sent by a first device, wherein the call request is used for acquiring the latest data of the object to be called in the second device;
and sending the latest data of the object to be called corresponding to the call request to the first equipment.
In a third aspect, an embodiment of the present application provides a data synchronization apparatus, including:
the first sending module is used for sending a query request to the second equipment, wherein the query request is used for querying first version information of an object to be called in the first equipment, and the object to be called is an object marked as a preset mark;
a first receiving module, configured to receive the first version information sent by the second device, where the first version information is recorded in a main registry of the second device;
the second sending module is used for sending a calling request to the second equipment when the second version information of the object to be called recorded in the auxiliary register of the first equipment is different from the first version information, wherein the calling request is used for acquiring the latest data of the object to be called in the second equipment;
And the first updating module is used for updating the original data of the object to be called stored on the first equipment by adopting the latest data of the object to be called, and updating the version information of the object to be called recorded in the auxiliary register into the first version information.
In a fourth aspect, an embodiment of the present application provides a data synchronization apparatus, including:
the second receiving module is used for receiving a query request sent by first equipment, wherein the query request is used for querying first version information of an object to be called in the first equipment, and the object to be called is an object marked as a preset mark;
a third sending module, configured to send first version information corresponding to the query request, where the first version information is recorded in a main registry of the second device;
a fourth receiving module, configured to receive a call request sent by a first device, where the call request is used to obtain latest data of the object to be called in the second device;
and the fourth sending module is used for sending the latest data of the object to be called, which corresponds to the call request, to the first equipment.
In a fifth aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory storing computer program instructions;
The processor when executing the computer program instructions implements a data synchronization method as in any one of the embodiments of the first aspect.
In a sixth aspect, embodiments of the present application provide a computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement a data synchronization method as in any of the embodiments of the first aspect.
In a seventh aspect, embodiments of the present application provide a computer program product, instructions in which, when executed by a processor of an electronic device, cause the electronic device to perform a method of data synchronization implementing an embodiment of any one of the first aspects described above.
According to the data synchronization method, the device, the equipment, the medium and the product, the auxiliary register is built in the first equipment, the main register is built in the second equipment, the version information of the calling object is recorded in the main register and the auxiliary register, and the first equipment can call the latest data to the second equipment under the condition that the version information in the main register and the version information in the auxiliary register are different through information interaction between the main register and the auxiliary register, so that data synchronization between the first equipment and the second equipment is realized, the data synchronization frequency between the first equipment and the second equipment can be reduced, and the utilization rate of resources and network resources of the equipment is improved.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings that are needed to be used in the embodiments of the present application will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
FIG. 1 is a schematic flow interaction diagram of a data synchronization method according to an embodiment of the present application;
FIG. 2 is a flow chart of an example of a data synchronization method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a data synchronization device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a data synchronization device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In addition, the technical scheme of the application can acquire, store, use, process and the like the data, which accords with the relevant regulations of national laws and regulations.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
In order to solve the problems in the prior art, the embodiment of the application provides a data synchronization method, a device, equipment, a medium and a product. The following first describes a data synchronization method provided by an embodiment of the present application.
Fig. 1 is a schematic flow chart of a data synchronization method according to an embodiment of the present application. As shown in fig. 1, the method specifically may include the following steps:
step 101, a first device sends a query request to a second device, wherein the query request is used for querying first version information of an object to be called in the first device, and the object to be called is an object marked as a preset mark;
the application can be applied to data synchronization between two devices, for example, a payment system and a merchant background system use terminal data of the same merchant to complete payment collection and merchant refund. The payment system can be a first device, the merchant background system can be a second device, and the process of payment collection and merchant refund is the process of data synchronization.
The object to be called can be data to be called, and the preset mark can adopt characters as marks. As an example, the object to be invoked with higher invoking heat may be marked by a preset mark, so that the first device may actively send a query request to the second device only when detecting that the invoking heat of the object to be invoked is higher, so as to complete subsequent data synchronization.
As another example, the object to be invoked with higher importance may be marked by a preset mark, so that the first device may actively send a query request to the second device only when detecting that the importance of the invoking object is higher, so as to complete the data synchronization after that.
Step 102, a second device receives a query request sent by a first device, where the query request is used to query first version information of an object to be invoked in the first device, and the object to be invoked is an object marked as a preset mark;
step 103, the second device sends first version information corresponding to the query request, wherein the first version information is recorded in a main register of the second device;
in the present embodiment, the main registry is a data registry, which can be used to register the business category of data, unique identification of classified data (e.g., customer ID, user number, merchant number), version information. The method is divided into a main register and a subsidiary register. The main register is maintained by the second device, and data version information of data in the second device is recorded; the secondary registry is maintained by the first device and records version information of the data currently in use by the second device.
In step 103, as an example, the second device may determine the first version information corresponding to the query request based on the service class and the unique identification of the classification data in the query request; and the second equipment sends the first version information corresponding to the query request.
Step 104, the first device receives the first version information sent by the second device, and the first version information is recorded in a main register of the second device;
step 105, the first device sends a call request to the second device when the second version information of the object to be called recorded in the secondary registry of the first device is different from the first version information, where the call request is used to obtain the latest data of the object to be called in the second device;
it will be appreciated that, since the first version information and the second version information are different, it is indicated that the called object in the first device is updated, so that the version information in the main registry is changed, and therefore, the first device needs to call the second device with the called object of the latest version to complete data synchronization between the first device and the second device.
Step 106, the second device sends the latest data of the object to be called corresponding to the call request to the first device;
the calling request comprises the unique identification of the service class and the classification data of the object to be called;
as one example, the second device determines the latest data of the object to be invoked stored in the second device based on the service class and the unique identification of the classification data;
the second device sends the latest data of the object to be invoked to the first device.
Step 107, the first device updates the original data of the object to be invoked stored on the first device by adopting the latest data of the object to be invoked, and updates the version information of the object to be invoked recorded in the auxiliary register into the first version information;
after receiving the latest data of the object to be invoked sent by the second device, the first device may store the latest data in the database, and delete the data of the original object to be invoked or directly overlay the latest data with the latest data, so as to complete updating of the data of the object to be invoked in the first device.
Additionally, in some embodiments, the data synchronization method may further include the steps of:
Step a, a first device sends a query request to a second device, wherein the query request is used for querying a first update time of an object to be called in the first device, and the object to be called is an object marked as a preset mark;
step b, the second device receives a query request sent by the first device, wherein the query request is used for querying a first update time of an object to be called in the first device, and the object to be called is an object marked as a preset mark;
step c, the second equipment sends a first updating time corresponding to the query request, and the first updating time is recorded in a main register of the second equipment;
step d, the first device receives the first updating time sent by the second device, and the first updating time is recorded in a main register of the second device;
step e, the first device sends a calling request to the second device when the second updating time of the object to be called recorded in the auxiliary register of the first device is different from the first updating time, wherein the calling request is used for acquiring the latest data of the object to be called in the second device;
step f, the second device sends the latest data of the object to be called corresponding to the call request to the first device;
And g, updating the original data of the object to be called stored on the first device by adopting the latest data of the object to be called, and updating the updating time of the object to be called recorded in the auxiliary register as the first updating time.
In this embodiment, the first update time may be the latest update time of the called object recorded in the primary registry, and the second update time may be the current update time of the called object recorded in the secondary registry. Under the condition that the first updating time is the same as the second updating time, the called object in the second device is not updated; when the first update time is different from the second update time, it is indicated that the invoked object in the second device is updated, and data synchronization between the first device and the second device is required.
In the application, the auxiliary register is established in the first equipment, the main register is established in the second equipment, the version information or the updating time of the calling object is recorded in the main register and the auxiliary register, and the first equipment can call the latest data to the second equipment under the condition that the version information in the main register and the version information in the auxiliary register are different through the information interaction between the main register and the auxiliary register so as to realize the data synchronization between the first equipment and the second equipment, thereby reducing the data synchronization frequency between the first equipment and the second equipment and improving the utilization rate of the resources and network resources of the equipment.
In an embodiment of the present application, after the receiving the first version information sent by the second device, the method further includes:
and acquiring the data of the object to be called from the first device under the condition that the second version information of the object to be called recorded in the auxiliary register of the first device is the same as the first version information.
It can be understood that in the case that the first version information and the second version information are different, it is indicated that the object to be invoked is not updated, and the first device does not need to invoke the latest data of the object to be invoked to the second device, so that the data of the object to be invoked can be invoked directly from the database in the first device.
In this embodiment, when the first version information and the second version information are different, the data is directly called from the first device, so that the number of times that the first device sends a call request to the second device can be reduced, the synchronization frequency between the first device and the second device is reduced, and the working efficiency of the first device is improved.
In an embodiment of the present application, before the sending the query request to the second device, the method further includes:
receiving call hotness of a call object sent by second equipment, wherein the call object is stored in the first equipment and the second equipment;
Adding the preset mark to the calling object under the condition that the calling heat is greater than or equal to a first preset threshold value;
acquiring a service to be processed of the first equipment;
and determining an object to be called corresponding to the service to be processed in the call objects.
In this embodiment, the call object is stored in the first device and the second device, and it is understood that the call object is stored in the first device and the second device, and version information of the call object in the first device and version information of the call object in the second device may be different. The number of the call objects may be 1 or plural, and the present application is not limited herein.
And under the condition that the calling heat is equal to or higher than a first preset threshold value, the calling heat of the calling object is higher, namely the preset mark can be added to the calling object, and after the preset mark is added, the calling object is higher. The calling heat can be represented by the calling frequency, and the first preset threshold value corresponds to the calling heat and can also be represented by the frequency threshold value.
The service to be processed is the service being processed by the first device, and the service to be processed can be obtained by monitoring an operation instruction of a user on the first device. In an exemplary embodiment, when the first device is a payment system and the second device is a merchant background system, the payment system performs a payment operation to the merchant background system, and the payment operation is a service to be processed of the first device.
When the first device processes the service to be processed, various data are required to be related, and the object to be invoked is various data related to the service to be processed. For example, when the service to be processed is a payment operation, the object to be invoked may be a name of a merchant, an account number of the merchant, or the like.
In this embodiment, by adding a preset flag indicating the heat degree to the call object and determining the object to be called in the call object, the first device can flag the call object with high heat degree, and further can actively synchronize data to the second device under the condition that the heat degree of the call object is high.
In an embodiment of the present application, before the receiving the query request sent by the first device, the method further includes:
and under the condition that the updating of the calling object in the second equipment is detected, recording the updated first version information of the calling object into a main register book in the second equipment, wherein the calling object comprises any calling object in all calling objects stored in the second equipment.
It can be understood that, since the data stored in the second device is updated, that is, the calling object is updated, when the second device detects that the calling object is updated, the second device needs to record the updated first version information of the calling object into the main register, so that the first device can determine whether the object to be called needs to be updated based on the version information recorded in the main register and the auxiliary register, and the synchronization frequency between the first device and the second device can be reduced by updating the main register, thereby improving the utilization rate of system resources and network resources.
In an embodiment of the present application, after the first version information of the updated calling object is recorded in the main registry in the second device in the case that the updating of the calling object in the second device is detected, before the receiving the query request sent by the first device, the method further includes:
acquiring the historical call frequency of the call object, wherein the historical call frequency is obtained based on the number of times that the call object is called in a preset period;
determining the calling heat of the calling object based on the historical calling frequency and a preset relation between the historical calling frequency and the calling heat;
sending the call hotness to the first device; and
and sending the calling object to the first equipment under the condition that the calling heat is greater than or equal to a second preset threshold value.
In this embodiment, the history call frequency is the number of times of calling the call object in a preset period, where the preset period may be a time interval from the time when the call object is called for the first time to the time when the call object is called for the last time, or a time interval from the time when the call object is called for the first time to the current time, or may be a fixed time period.
The historical call frequencies are in one-to-one correspondence with call hotness, and in the process of determining the call hotness of the call object, the corresponding call hotness can be searched based on the historical call frequencies. For example, the historical call frequency is 1 time/min, and the call heat is 5 if the heat corresponding to 1 time/min is found to be 5 through the preset relation. It should be noted that the historical call frequency may be an interval, and each interval corresponds to a call hotness. After determining the call hotness of the surrogate object in the second device, the call hotness may be sent to the first device.
In some embodiments, the call hotness may also be obtained based on a history update number, and in particular, the history update number of the call object may be obtained; and determining the call hotness of the call object based on the history updating times and the preset relation between the history updating times and the call hotness. Wherein the historical update times can be obtained based on the update times of the calling object in the time interval of the first update time and the last update time. The more frequently the call object is updated, the more important the call object is, so that the call hotness of the call object can be obtained based on the historical update times of the call object, the more the historical update times are, the higher the call hotness is, and otherwise, the lower the call hotness is.
In order to reduce the number of call requests sent by the first device, therefore, the second device may actively send the call object to the first device to make the first device call when the call hotness is greater than or equal to the second preset threshold. The second preset threshold is used for judging whether the calling heat is higher, and under the condition that the calling heat exceeds the second preset threshold, the first equipment is indicated to call the calling object frequently, so that the second equipment actively sends the calling object with higher heat to the first equipment, calling requests of the first equipment can be reduced, the working efficiency of the first equipment and the second equipment is improved, and the utilization rate of system resources and network resources is improved.
In an embodiment of the present application, after determining the call hotness of the call object based on the historical call frequency and the preset relationship between the historical call frequency and the call hotness, the method further includes:
acquiring the update times of the calling object under the condition that the calling heat is smaller than the second preset threshold value;
and sending the calling object to the first equipment under the condition that the updating times are larger than or equal to a preset third threshold value.
In order to further reduce the call request of the first device, avoid frequent call of the first device and generate a large number of repeated data requests, in this embodiment, when the call hotness is smaller than the second preset threshold, the call object may be sent to the first device according to the accumulated update times of the call object. It should be noted that, when the number of updates reaches the preset third threshold, the calling object is illustrated to be in a frequently updated state. Thus, the call object may be sent to the first device, thereby reducing call requests by the first device.
For better understanding of the present application, fig. 2 is a schematic flow chart of a data synchronization method according to an embodiment of the present application.
The main system in fig. 2 is the second device in the present application; the calling party system is the first device in the application; the calling party register is the auxiliary register in the application; the main register version information and the main system data version information are both first version information; the version information of the local register is the second version information.
Fig. 3 is a schematic structural diagram of a data synchronization device according to an embodiment of the present application, and for convenience of explanation, only a portion related to the embodiment of the present application is shown.
Referring to fig. 3, the data synchronization apparatus 300 may include:
a first sending module 301, configured to send a query request to a second device, where the query request is used to query first version information of an object to be invoked in the first device, where the object to be invoked is an object marked as a preset mark;
a first receiving module 302, configured to receive the first version information sent by the second device, where the first version information is recorded in a main registry of the second device;
a second sending module 303, configured to send a call request to a second device, where the second version information of the object to be called recorded in the secondary registry of the first device is different from the first version information, where the call request is used to obtain the latest data of the object to be called in the second device;
and a first updating module 304, configured to update the original data of the object to be invoked stored on the first device by using the latest data of the object to be invoked, and update the version information of the object to be invoked recorded in the secondary registry to the first version information.
Optionally, the data synchronization device 300 further includes:
The first acquisition module is used for acquiring the data of the object to be called from the first device under the condition that the second version information of the object to be called recorded in the auxiliary register of the first device is the same as the first version information.
Optionally, the data synchronization device 300 further includes:
a fifth receiving module, configured to receive a call hotness of a call object sent by a second device, where the call object is stored in the first device and the second device;
the adding module is used for adding the preset mark to the calling object under the condition that the calling heat is greater than or equal to a first preset threshold value;
the second acquisition module is used for acquiring the service to be processed of the first equipment;
and the first determining module is used for determining an object to be called corresponding to the service to be processed in the calling objects.
Fig. 4 is a schematic structural diagram of a data synchronization device according to an embodiment of the present application, and for convenience of explanation, only a portion related to the embodiment of the present application is shown.
Referring to fig. 4, the data synchronization apparatus 400 may include:
a second receiving module 401, configured to receive a query request sent by a first device, where the query request is used to query first version information of an object to be invoked in the first device, where the object to be invoked is an object marked as a preset mark;
A third sending module 402, configured to send first version information corresponding to the query request, where the first version information is recorded in a main registry of the second device;
a fourth receiving module 403, configured to receive a call request sent by a first device, where the call request is used to obtain the latest data of the object to be called in the second device;
and a fourth sending module 404, configured to send, to the first device, the latest data of the object to be invoked corresponding to the invocation request.
Optionally, the data synchronization device 400 further includes:
and the recording module is used for recording the updated first version information of the calling object into a main register book in the second equipment under the condition that the updating of the calling object in the second equipment is detected, wherein the calling object comprises any calling object in all calling objects stored in the second equipment.
Optionally, the data synchronization device 400 further includes:
the third acquisition module is used for acquiring the historical call frequency of the call object, wherein the historical call frequency is obtained based on the number of times that the call object is called in a preset period;
the second determining module is used for determining the calling heat of the calling object based on the historical calling frequency and the preset relation between the historical calling frequency and the calling heat;
A fifth sending module, configured to send the call hotness to the first device; and
and the sixth sending module is used for sending the calling object to the first equipment under the condition that the calling heat is greater than or equal to a second preset threshold value.
Optionally, the data synchronization device 400 further includes:
a third obtaining module, configured to obtain the number of updates of the calling object when the calling heat is less than the second preset threshold;
a seventh sending module, configured to send the calling object to the first device when the update number of times is greater than or equal to a preset third threshold.
The data synchronization device provided by the embodiment of the application can realize each process realized by the embodiment of the method, and in order to avoid repetition, the description is omitted here.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Fig. 5 shows a schematic hardware structure of an electronic device according to an embodiment of the present application.
The device may include a processor 501 and a memory 502 in which program instructions are stored.
The steps of any of the various method embodiments described above are implemented when the processor 501 executes a program.
By way of example, a program may be partitioned into one or more modules/units that are stored in the memory 502 and executed by the processor 501 to accomplish the present application. One or more of the modules/units may be a series of program instruction segments capable of performing specific functions to describe the execution of the program in the device.
In particular, the processor 501 may include a Central Processing Unit (CPU), or a specific integrated circuit (ApplicationSpecificIntegratedCircuit, ASIC), or may be configured as one or more integrated circuits implementing embodiments of the present application.
Memory 502 may include mass storage for data or instructions. By way of example, and not limitation, memory 502 may comprise a hard disk drive (HardDiskDrive, HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or universal serial bus (UniversalSerialBus, USB) drive, or a combination of two or more of these. Memory 502 may include removable or non-removable (or fixed) media, where appropriate. Memory 502 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 502 is a non-volatile solid state memory.
The memory may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors) it is operable to perform the operations described with reference to methods in accordance with aspects of the present disclosure.
The processor 501 implements any one of the methods of the above embodiments by reading and executing program instructions stored in the memory 502.
In one example, the electronic device may also include a communication interface 503 and a bus 510. The processor 501, the memory 502, and the communication interface 503 are connected to each other via a bus 510 and perform communication with each other.
The communication interface 503 is mainly used to implement communication between each module, apparatus, unit and/or device in the embodiments of the present application.
Bus 510 includes hardware, software, or both that couple the components of the online data flow billing device to each other. By way of example, and not limitation, the buses may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel architecture (MCa) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus, or a combination of two or more of the above. Bus 510 may include one or more buses, where appropriate. Although embodiments of the application have been described and illustrated with respect to a particular bus, the application contemplates any suitable bus or interconnect.
In addition, in combination with the method in the above embodiment, the embodiment of the present application may be implemented by providing a storage medium. The storage medium has program instructions stored thereon; the program instructions, when executed by a processor, implement any of the methods of the embodiments described above.
The embodiment of the application further provides a chip, the chip comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions, the processes of the embodiment of the method can be realized, the same technical effects can be achieved, and the repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
Embodiments of the present application provide a computer program product stored in a storage medium, where the program product is executed by at least one processor to implement the respective processes of the above method embodiments, and achieve the same technical effects, and for avoiding repetition, a detailed description is omitted herein.
It should be understood that the application is not limited to the particular arrangements and instrumentality described above and shown in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after appreciating the spirit of the present application.
The functional blocks shown in the above block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer grids such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this disclosure describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, or may be performed in a different order from the order in the embodiments, or several steps may be performed simultaneously.
Aspects of the present disclosure are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to being, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware which performs the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the foregoing, only the specific embodiments of the present application are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present application is not limited thereto, and any equivalent modifications or substitutions can be easily made by those skilled in the art within the technical scope of the present application, and they should be included in the scope of the present application.

Claims (12)

1. A method of data synchronization, applied to a first device, the method comprising:
sending a query request to second equipment, wherein the query request is used for querying first version information of an object to be called in the first equipment, and the object to be called is an object marked as a preset mark;
receiving the first version information sent by the second device, wherein the first version information is recorded in a main register of the second device;
sending a calling request to a second device under the condition that second version information of the object to be called recorded in a secondary register of the first device is different from the first version information, wherein the calling request is used for acquiring the latest data of the object to be called in the second device;
and updating the original data of the object to be called stored on the first device by adopting the latest data of the object to be called, and updating the version information of the object to be called recorded in the auxiliary register into the first version information.
2. The data synchronization method of claim 1, wherein after the receiving the first version information sent by the second device, the method further comprises:
And acquiring the data of the object to be called from the first device under the condition that the second version information of the object to be called recorded in the auxiliary register of the first device is the same as the first version information.
3. The data synchronization method of claim 1, wherein prior to the sending the query request to the second device, the method further comprises:
receiving call hotness of a call object sent by second equipment, wherein the call object is stored in the first equipment and the second equipment;
adding the preset mark to the calling object under the condition that the calling heat is greater than or equal to a first preset threshold value;
acquiring a service to be processed of the first equipment;
and determining an object to be called corresponding to the service to be processed in the call objects.
4. A method of data synchronization, applied to a second device, the method comprising:
receiving a query request sent by first equipment, wherein the query request is used for querying first version information of an object to be called in the first equipment, and the object to be called is an object marked as a preset mark;
transmitting first version information corresponding to the query request, wherein the first version information is recorded in a main register of the second device;
Receiving a call request sent by a first device, wherein the call request is used for acquiring the latest data of the object to be called in the second device;
and sending the latest data of the object to be called corresponding to the call request to the first equipment.
5. The method for synchronizing data according to claim 4, wherein prior to receiving the query request sent by the first device, the method further comprises:
and under the condition that the updating of the calling object in the second equipment is detected, recording the updated first version information of the calling object into a main register book in the second equipment, wherein the calling object comprises any calling object in all calling objects stored in the second equipment.
6. The data synchronization method according to claim 5, wherein, in the case where an update of the calling object in the second device is detected, after recording the first version information of the updated calling object in the main registry in the second device, before the receiving the query request sent by the first device, the method further comprises:
acquiring the historical call frequency of the call object, wherein the historical call frequency is obtained based on the number of times that the call object is called in a preset period;
Determining the calling heat of the calling object based on the historical calling frequency and a preset relation between the historical calling frequency and the calling heat;
sending the call hotness to the first device; and
and sending the calling object to the first equipment under the condition that the calling heat is greater than or equal to a second preset threshold value.
7. The data synchronization method of claim 6, wherein after determining the call hotness of the call object based on the historical call frequency and a preset relationship between the historical call frequency and call hotness, the method further comprises:
acquiring the update times of the calling object under the condition that the calling heat is smaller than the second preset threshold value;
and sending the calling object to the first equipment under the condition that the updating times are larger than or equal to a preset third threshold value.
8. A data synchronization device, the device comprising:
the first sending module is used for sending a query request to the second equipment, wherein the query request is used for querying first version information of an object to be called in the first equipment, and the object to be called is an object marked as a preset mark;
A first receiving module, configured to receive the first version information sent by the second device, where the first version information is recorded in a main registry of the second device;
the second sending module is used for sending a calling request to the second equipment when the second version information of the object to be called recorded in the auxiliary register of the first equipment is different from the first version information, wherein the calling request is used for acquiring the latest data of the object to be called in the second equipment;
and the first updating module is used for updating the original data of the object to be called stored on the first equipment by adopting the latest data of the object to be called, and updating the version information of the object to be called recorded in the auxiliary register into the first version information.
9. A data synchronization device, the device comprising:
the second receiving module is used for receiving a query request sent by first equipment, wherein the query request is used for querying first version information of an object to be called in the first equipment, and the object to be called is an object marked as a preset mark;
a third sending module, configured to send first version information corresponding to the query request, where the first version information is recorded in a main registry of the second device;
A fourth receiving module, configured to receive a call request sent by a first device, where the call request is used to obtain latest data of the object to be called in the second device;
and the fourth sending module is used for sending the latest data of the object to be called, which corresponds to the call request, to the first equipment.
10. An electronic device, the device comprising: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements a data synchronization method as claimed in any one of claims 1-7.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon computer program instructions, which when executed by a processor, implement the data synchronization method according to any of claims 1-7.
12. A computer program product, characterized in that instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the data synchronization method according to any one of claims 1-7.
CN202310774924.6A 2023-06-28 2023-06-28 Data synchronization method, device, equipment, medium and product Pending CN116775110A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310774924.6A CN116775110A (en) 2023-06-28 2023-06-28 Data synchronization method, device, equipment, medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310774924.6A CN116775110A (en) 2023-06-28 2023-06-28 Data synchronization method, device, equipment, medium and product

Publications (1)

Publication Number Publication Date
CN116775110A true CN116775110A (en) 2023-09-19

Family

ID=88006055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310774924.6A Pending CN116775110A (en) 2023-06-28 2023-06-28 Data synchronization method, device, equipment, medium and product

Country Status (1)

Country Link
CN (1) CN116775110A (en)

Similar Documents

Publication Publication Date Title
CN116775110A (en) Data synchronization method, device, equipment, medium and product
CN114372072A (en) Data storage method, device, equipment, computer storage medium and program product
CN115587143A (en) Data synchronization method, device, equipment and computer readable storage medium
CN117216113A (en) User determination method, device, equipment and computer storage medium
CN114710450B (en) Flow control method, device, equipment and computer storage medium
CN117472430A (en) Data acquisition method, device, equipment and computer storage medium
CN115048917B (en) Information processing method, device, equipment, medium and product
CN112995900B (en) SIM card distribution method, device, server and computer readable storage medium
CN114676290A (en) Abnormal group identification method and device, equipment, readable storage medium and product thereof
CN116151887A (en) Information pushing method, device, equipment and computer storage medium
CN116975107A (en) Method, device, equipment, medium and product for acquiring data serial number
CN117196784A (en) Information processing method, device, equipment, medium and product
CN118132655A (en) Information synchronization method, apparatus, device, storage medium, and program product
CN116028521A (en) Data processing method, device, equipment, medium and product
CN114661993A (en) Information query method, device, equipment and computer readable storage medium
CN116756219A (en) Data processing method, device, equipment and computer storage medium
CN115630062A (en) Data processing method, device, equipment and readable storage medium
CN114693417A (en) Automatic data processing method, device and equipment for interest bearing and computer storage medium
CN115033534A (en) File processing method, device, equipment and computer readable storage medium
CN117827959A (en) Data management method, apparatus, device, storage medium, and program product
CN115640290A (en) Data layering method, device and equipment and computer storage medium
CN116433374A (en) Intelligent contract deployment method, device, equipment, storage medium and program product
CN116257592A (en) Method and device for determining similar items of data items, electronic equipment and storage medium
CN118069452A (en) Filling method, device, equipment and storage medium for buried point event
CN117931758A (en) Log processing method, device, equipment, readable storage medium and vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination