Data synchronization method and device, electronic equipment and storage medium

Through cyclic monitoring and data decryption of the target message queue, the problem of low data synchronization efficiency in the existing technology is solved, efficient data synchronization is achieved, and user experience and operation convenience are improved.

CN118626567APending Publication Date: 2024-09-10安徽蓬阳健康科技股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410834501.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the existing technology, the data synchronization efficiency is poor when the data is relatively complex, making it difficult to achieve efficient data synchronization.

Method used

By cyclically monitoring the target message queue, the data is obtained and decrypted, and after determining whether it meets the data synchronization conditions, the decrypted data is stored in the target database to achieve continuous data synchronization.

Benefits of technology

It improves data synchronization efficiency, improves user experience, simplifies the data synchronization process, and reduces dependence on external programs and access operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626567A
    Figure CN118626567A
Patent Text Reader

Abstract

The invention discloses a data synchronization method and device, electronic equipment and a storage medium. The method comprises the following steps: performing loop monitoring on a target message queue, the target message queue being used for transmitting data in a first synchronization system; under the condition that the target synchronous data exists in the target message queue, acquiring the target synchronous data, and decrypting the target synchronous data to obtain decrypted synchronous data; and judging whether the decrypted synchronous data meets a data synchronization condition or not, and storing the decrypted synchronous data into a target database of a second synchronization system under the condition that the decrypted synchronous data meets the data synchronization condition. Based on the technical scheme of the invention, the technical scheme of the invention can improve the data synchronization efficiency in a manner of performing continuous data synchronization by circularly monitoring the target message queue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and in particular to a data synchronization method, device, electronic device and storage medium. Background Art

[0002] Data synchronization refers to the real-time or periodic updating and matching of data in two or more different locations or systems to maintain data consistency.

[0003] In the related technology, common data synchronization methods include database master-slave replication, data warehouse (Extract-Transform-Load, ETL) tool data migration, and trigger incremental data synchronization, etc. However, when the data is relatively complex, the data synchronization efficiency is usually poor. Summary of the invention

[0004] The present invention provides a data synchronization method, device, electronic device and storage medium to solve the problem that data synchronization efficiency is usually poor.

[0005] According to one aspect of the present invention, a data synchronization method is provided, wherein the method comprises:

[0006] Performing cyclic monitoring on a target message queue, wherein the target message queue is used to transmit data in the first synchronization system;

[0007] In the case where the target synchronization data exists in the target message queue, acquiring the target synchronization data, and decrypting the target synchronization data to obtain decrypted synchronization data;

[0008] It is determined whether the decrypted synchronization data meets the data synchronization condition, and if the decrypted synchronization data meets the data synchronization condition, the decrypted synchronization data is stored in a target database of the second synchronization system.

[0009] According to another aspect of the present invention, a data synchronization device is provided, wherein the device comprises:

[0010] A cyclic monitoring module, used for cyclically monitoring a target message queue, wherein the target message queue is used for transmitting data in the first synchronization system;

[0011] A data acquisition module, used for acquiring the target synchronization data when there is target synchronization data in the target message queue, and decrypting the target synchronization data to obtain decrypted synchronization data;

[0012] The data synchronization module is used to determine whether the decrypted synchronization data meets the data synchronization condition, and if the decrypted synchronization data meets the data synchronization condition, store the decrypted synchronization data in the target database of the second synchronization system.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data synchronization method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data synchronization method described in any embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention is to perform cyclic monitoring on the target message queue, wherein the target message queue is used to transmit data in the first synchronization system; when the target synchronization data exists in the target message queue, the target synchronization data is obtained, and the target synchronization data is decrypted to obtain decrypted synchronization data; it is determined whether the decrypted synchronization data meets the data synchronization conditions, and when the decrypted synchronization data meets the data synchronization conditions, the decrypted synchronization data is stored in the target database of the second synchronization system. The technical solution of the present invention improves the data synchronization efficiency by cyclically monitoring the target message queue for continuous data synchronization.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1is a flow chart of a data synchronization method provided according to Embodiment 1 of the present invention;

[0022] Figure 2 is a flow chart of a data synchronization method provided according to Embodiment 2 of the present invention;

[0023] Figure 3 is an overall flow chart of a data synchronization method provided according to an embodiment of the present invention;

[0024] Figure 4 is a structural diagram of a data synchronization device provided according to Embodiment 3 of the present invention;

[0025] Figure 5 It is a structural schematic diagram of an electronic device for implementing the data synchronization method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] Embodiment 1

[0029] Figure 1 A flowchart of a data synchronization method is provided for the first embodiment of the present invention. This embodiment is applicable to the case where data is synchronized between a first synchronization system and a second synchronization system. The method can be executed by a data synchronization device. The data synchronization device can be implemented in the form of hardware and / or software. The data synchronization device can be configured in a computer. Figure 1 As shown, the method includes:

[0030] S110. Perform cyclic monitoring on a target message queue, wherein the target message queue is used to transmit data in the first synchronization system.

[0031] The target message queue may be used to receive and transmit data in the first synchronization system. Optionally, the target message queue may be a rabbit message queue.

[0032] In the embodiment of the present invention, the data in the second synchronization system may be synchronized with the data in the first synchronization system, wherein the first synchronization system may be a customer's data system.

[0033] S120. When target synchronization data exists in the target message queue, the target synchronization data is acquired, and the target synchronization data is decrypted to obtain decrypted synchronization data.

[0034] The target synchronization data may be understood as data in the first synchronization system transmitted through the target message queue. Optionally, the target synchronization data may be updated data in the first synchronization system. Exemplarily, the target synchronization data may include newly added data, deleted data, and modified data.

[0035] The decrypted synchronization data may be understood as data obtained by decrypting the target synchronization data.

[0036] Optionally, the decrypting the target synchronization data includes:

[0037] The target synchronization data is decrypted by an asymmetric encryption algorithm.

[0038] Among them, the asymmetric encryption algorithm can be understood as an encryption algorithm in which the encryption key is different from the decryption key. In this embodiment, the asymmetric decryption algorithm can be preset according to the scenario requirements and is not specifically limited here. Optionally, the asymmetric decryption algorithm can be an asymmetric encryption algorithm based on number theory (Rivest-Shamir-Adleman, RSA algorithm). Correspondingly, the target synchronization data can be data encrypted based on the RSA algorithm.

[0039] In the data synchronization process, the present invention performs data transmission on encrypted target synchronization data. Based on the technical solution of the above embodiment, the security of data transmission in the data synchronization process can be improved.

[0040] S130: Determine whether the decrypted synchronization data meets the data synchronization condition, and if the decrypted synchronization data meets the data synchronization condition, store the decrypted synchronization data in a target database of the second synchronization system.

[0041] The data synchronization condition may be understood as a condition for synchronizing the decrypted synchronization data to the second synchronization system. Optionally, the data synchronization condition includes that there is no abnormal information in the decrypted synchronization data and / or there is target information in the decrypted synchronization data.

[0042] Among them, the abnormal information may be information characterizing the abnormality of the decrypted synchronization data. Optionally, the abnormal information may be malicious characters. The target information may be understood as necessary information that needs to be included in the decrypted synchronization data. Optionally, the target information may be a data ID or a data name, etc. In an embodiment of the present invention, the target information may be preset according to scenario requirements and is not specifically limited here. For example, in a scenario where the first synchronization system is a book borrowing system, the target information may include a book ID, a book name, and a borrower identifier, etc.

[0043] In the embodiment of the present invention, the data in the second synchronization system may be synchronized with the data in the first synchronization system, wherein the first synchronization system may be a customer's data system, and the second synchronization system may be a user's data system.

[0044] The target database may be understood as a database corresponding to the second synchronization system. The target database is used to store the decrypted synchronization data.

[0045] Optionally, the data synchronization method further includes: when the decrypted synchronization data meets the data synchronization condition, removing the decrypted synchronization data and generating abnormal prompt information.

[0046] The abnormal prompt information can be understood as information indicating that the decrypted synchronization data is abnormal. In the embodiment of the present invention, after the abnormal prompt information is generated, the display mode of the abnormal prompt information can be preset according to the scene requirements, and is not specifically limited here.

[0047] The technical solution of the embodiment of the present invention is to perform cyclic monitoring on the target message queue, wherein the target message queue is used to transmit data in the first synchronization system; when the target synchronization data exists in the target message queue, the target synchronization data is obtained, and the target synchronization data is decrypted to obtain decrypted synchronization data; it is determined whether the decrypted synchronization data meets the data synchronization conditions, and when the decrypted synchronization data meets the data synchronization conditions, the decrypted synchronization data is stored in the target database of the second synchronization system. The technical solution of the present invention improves the data synchronization efficiency by cyclically monitoring the target message queue for continuous data synchronization.

[0048] Embodiment 2

[0049] Figure 2This is a flow chart of a data synchronization method provided in Embodiment 2 of the present invention. This embodiment is to supplement the cyclic monitoring of the target message queue described in the above embodiment. Figure 2 As shown, the method includes:

[0050] S210, performing loop monitoring on the target message queue through a target loop statement in a target thread.

[0051] The target thread may be used to cyclically monitor the target message queue based on the target loop statement, and obtain the target synchronization data when there is target synchronization data in the target message queue. In the embodiment of the present invention, the target thread may be one.

[0052] The target loop statement can be understood as a loop statement in the target thread. In the embodiment of the present invention, the target loop statement can be pre-added according to the scene requirements, and is not specifically limited here. Optionally, the target loop statement can be while-true.

[0053] Optionally, before the target message queue is cyclically monitored, the method further includes:

[0054] The second synchronization system is started, and based on the target compilation language, the target thread is added to the target page corresponding to the second synchronization system, and the target loop statement is added to the target thread.

[0055] The target compiled language may be a compiled language for adding the target thread and the target loop statement. In an embodiment of the present invention, the target compiled language may be preset according to scenario requirements, and is not specifically limited here. Optionally, the target compiled language is C#.

[0056] In the related art, a message queue monitoring program is usually written in an external or interface to achieve message queue monitoring, but external access operations are required to start the monitoring program, which often leads to poor user experience. The present invention only needs to add threads and loop statements in the target page corresponding to the second synchronization system to achieve cyclic monitoring of the message queue. The present invention does not require the writing of external programs or the intervention of external access operations, and can achieve the effect of cyclic monitoring of the message queue and continuous data synchronization, thereby improving the user experience.

[0057] Optionally, the target page may be an application startup page of the second synchronization system. The application startup page may be global.asax.

[0058] Optionally, before the target message queue is cyclically monitored, the method further includes:

[0059] The second synchronization system is started, and the target page that completes the target thread and the target loop statement is started to be added.

[0060] In an embodiment of the present invention, when performing data synchronization between the second synchronization system and the first synchronization system for the first time, the second synchronization system can be started first, and a target thread can be added to the application startup page of the second synchronization system, and a target loop statement can be added to the target thread to achieve data synchronization.

[0061] In the embodiment of the present invention, data synchronization can be terminated, that is, the second synchronization system can be closed according to user requirements.

[0062] Furthermore, when the second synchronization system is started again, if the target thread and the target loop statement have already been added to the application startup page of the second synchronization system, there is no need to add the thread and loop statement again, and the second synchronization system can be directly started to achieve data synchronization between the second synchronization system and the first synchronization system. In the present invention, when the second synchronization system is started, the application startup page corresponding to the second synchronization system and the threads and loop statements in the application startup page are also started together.

[0063] Based on the technical solution of the above embodiment, the present invention can realize data synchronization between the second synchronization system and the first synchronization system only by starting the second synchronization system, thereby improving the convenience of user operation and enhancing the user experience.

[0064] S220. When target synchronization data exists in the target message queue, the target synchronization data is acquired, and the target synchronization data is decrypted to obtain decrypted synchronization data.

[0065] S230: Determine whether the decrypted synchronization data meets the data synchronization condition, and if the decrypted synchronization data meets the data synchronization condition, store the decrypted synchronization data in the target database of the second synchronization system.

[0066] The technical solution of the embodiment of the present invention performs cyclic monitoring on the target message queue through the target loop statement in the target thread. The present invention performs cyclic monitoring on the target message queue through the target loop statement in the target thread, which can realize automatic message queue cyclic monitoring, and can immediately obtain and synchronize data when there is data in the message queue, thereby improving data synchronization efficiency.

[0067] Figure 3 FIG. 1 is an overall flow chart of a data synchronization method provided according to an embodiment of the present invention. Figure 3 As shown, the overall process of the data synchronization method can be:

[0068] 1. Start the second synchronization system and start the global.asax in the second synchronization system.

[0069] 2. Add and start the target thread in global.asax.

[0070] 3. Add while-true in the target thread based on C#.

[0071] 4. Monitor the rabbit message queue used to transmit data in the first synchronization system through a while-true loop. When there is data in the rabbit message queue, read the data in the queue and create a link and consumer; obtain the data in the queue and decrypt the data through the RSA algorithm;

[0072] 5. Determine whether the decrypted data can be synchronized. If so, save the data; if not, discard the data.

[0073] Based on the technical solution of the above embodiment, the present invention does not need to write too many programs, that is, only by adding threads and while-true in global.asax, the effect of continuously monitoring the message queue and performing data synchronization can be achieved. In addition, based on the while-true statement, the present invention achieves the effect of monitoring the message queue without the help of external access operations.

[0074] The present invention can embed the target thread in the global.asax of the second synchronization system to realize the common start and termination of the second synchronization system and the target thread, and realize that in addition to the first data synchronization, only the second synchronization system needs to be started to realize the cyclic monitoring of the target message queue and the data synchronization between data systems.

[0075] Embodiment 3

[0076] Figure 4 FIG. 1 is a schematic diagram of a data synchronization device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a cycle monitoring module 310, a data acquisition module 320 and a data synchronization module 330. Among them,

[0077] The loop monitoring module 310 is used to perform loop monitoring on the target message queue, wherein the target message queue is used to transmit data in the first synchronization system; the data acquisition module 320 is used to acquire the target synchronization data when the target synchronization data exists in the target message queue, and decrypt the target synchronization data to obtain decrypted synchronization data; the data synchronization module 330 is used to determine whether the decrypted synchronization data meets the data synchronization conditions, and if the decrypted synchronization data meets the data synchronization conditions, store the decrypted synchronization data in the target database of the second synchronization system.

[0078] The technical solution of the embodiment of the present invention is to perform cyclic monitoring on the target message queue, wherein the target message queue is used to transmit data in the first synchronization system; when the target synchronization data exists in the target message queue, the target synchronization data is obtained, and the target synchronization data is decrypted to obtain decrypted synchronization data; it is determined whether the decrypted synchronization data meets the data synchronization conditions, and when the decrypted synchronization data meets the data synchronization conditions, the decrypted synchronization data is stored in the target database of the second synchronization system. The technical solution of the present invention improves the data synchronization efficiency by cyclically monitoring the target message queue for continuous data synchronization.

[0079] Optionally, the cycle monitoring module 310 is specifically used for:

[0080] The target message queue is cyclically monitored through a target loop statement in a target thread.

[0081] Optionally, the data synchronization device also includes: a loop statement adding module, which is used to start the second synchronization system before the target message queue is loop-monitored, and add the target thread in the target page corresponding to the second synchronization system based on the target compilation language, and add the target loop statement in the target thread.

[0082] Optionally, the target compilation language is C# language, and the target page includes an application startup page.

[0083] Optionally, the data synchronization device further includes: a system page startup module, which is used to start the second synchronization system before the target message queue is cyclically monitored, and start adding the target page that completes the target thread and the target loop statement.

[0084] Optionally, the data acquisition module 320 includes: a data decryption unit, configured to decrypt the target synchronization data using an asymmetric encryption algorithm.

[0085] Optionally, the data synchronization condition includes that there is no abnormal information in the decrypted synchronization data and / or there is target information in the decrypted synchronization data.

[0086] The data synchronization device provided in the embodiment of the present invention can execute the data synchronization method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0087] Embodiment 4

[0088] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0089] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0090] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0091] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a data synchronization method.

[0092] In some embodiments, the data synchronization method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data synchronization method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the data synchronization method in any other appropriate manner (e.g., by means of firmware).

[0093] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0094] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0095] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0096] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0097] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0098] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0099] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0100] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A data synchronization method, characterized in that: include: Performing cyclic monitoring on a target message queue, wherein the target message queue is used to transmit data in the first synchronization system; In the case where the target synchronization data exists in the target message queue, acquiring the target synchronization data, and decrypting the target synchronization data to obtain decrypted synchronization data; It is determined whether the decrypted synchronization data meets the data synchronization condition, and if the decrypted synchronization data meets the data synchronization condition, the decrypted synchronization data is stored in a target database of the second synchronization system.

2. The method according to claim 1, characterized in that The cyclic monitoring of the target message queue includes: The target message queue is cyclically monitored through a target loop statement in a target thread.

3. The method according to claim 2, characterized in that Before the target message queue is cyclically monitored, the method further includes: The second synchronization system is started, and based on the target compilation language, the target thread is added to the target page corresponding to the second synchronization system, and the target loop statement is added to the target thread.

4. The method according to claim 3, characterized in that The target compilation language is C# language, and the target page includes an application startup page.

5. The method according to claim 2, characterized in that: Before the target message queue is cyclically monitored, the method further includes: The second synchronization system is started, and the target page that completes the target thread and the target loop statement is started to be added.

6. The method according to claim 1, characterized in that The decrypting the target synchronization data comprises: The target synchronization data is decrypted by an asymmetric encryption algorithm.

7. The method according to claim 1, characterized in that The data synchronization condition includes that there is no abnormal information in the decrypted synchronization data and / or there is target information in the decrypted synchronization data.

8. A data synchronization device, characterized in that: include: A cyclic monitoring module, used for cyclically monitoring a target message queue, wherein the target message queue is used for transmitting data in the first synchronization system; A data acquisition module, used for acquiring the target synchronization data when there is target synchronization data in the target message queue, and decrypting the target synchronization data to obtain decrypted synchronization data; The data synchronization module is used to determine whether the decrypted synchronization data meets the data synchronization condition, and if the decrypted synchronization data meets the data synchronization condition, store the decrypted synchronization data in the target database of the second synchronization system.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data synchronization method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data synchronization method according to any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

  • Data synchronization method and device, equipment and storage medium

    CN113064950A

  • Data synchronization method and device, terminal, and storage medium

    WO2020173248A1