Data synchronization method and device, electronic equipment and storage medium

By using the mapping relationship between cache address information and qubit identifiers and user information in quantum computing, data synchronization between different clients is achieved, which solves the problem of inefficient data synchronization in quantum computing and improves computing efficiency.

CN119623658AActive Publication Date: 2025-03-14ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311177351.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2025-03-14
Estimated Expiration
2043-09-12

AI Technical Summary

Technical Problem

During the quantum computing process, data synchronization between different users is inefficient, which leads to users needing to re-execute quantum computing tasks to obtain output data, which takes a long time.

Method used

By obtaining the cache address information in the synchronization task, the data is stored in the preset cloud storage space, and the mapping relationship between the qubit identifier and user information is used to determine the client to which the data should be synchronized. When the client turns on the automatic pull function, the data is synchronized to the local storage space.

Benefits of technology

Data synchronization between different clients is realized, avoiding the time required for clients to perform quantum computing tasks separately to obtain data, and improving quantum computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623658A_ABST
    Figure CN119623658A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data synchronization method and device, electronic equipment and a storage medium. According to the scheme, a first synchronization task is obtained, wherein the first synchronization task comprises cache address information of first data; based on the cache address information, storing the first data cached in the preset cache space to a preset cloud storage space; determining first user information corresponding to the first quantum bit identifier in the first data according to a preset mapping relationship between the quantum bit identifier and the user information; and when a first client corresponding to the first user information starts a data automatic pulling function, storing first data in a preset cloud storage space to a local storage space of the first client. Through the technical scheme provided by the embodiment of the invention, data synchronization among different clients is realized, so that the quantum computing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Quantum computing is a computational model that uses the basic properties of quantum mechanics to solve problems. It is achieved by building a quantum physics hardware system that can be precisely operated and running quantum computing software to implement quantum algorithms, solve computational problems, and apply quantum computing to specific problems or fields.

[0003] In the process of quantum computing, considering the correlation between different quantum computing tasks, it is necessary to achieve data synchronization between different users. For example, the output data of a quantum computing task performed by user A may be the input data of another quantum computing task performed by user B. If user A can synchronize the output data to user B, this can effectively avoid the time-consuming execution of user B by performing the quantum computing task corresponding to user A, thereby improving the efficiency of quantum computing. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a data synchronization method, device, electronic device and storage medium to achieve data synchronization between different clients, thereby improving quantum computing efficiency. The specific technical solution is as follows:

[0005] The present application provides a data synchronization method, the method comprising:

[0006] Acquire a first synchronization task, where the first synchronization task includes cache address information of first data;

[0007] Based on the cache address information, storing the first data cached in the preset cache space to the preset cloud storage space;

[0008] Determine, according to a preset mapping relationship between the quantum bit identifier and the user information, first user information corresponding to the first quantum bit identifier in the first data;

[0009] When the first client corresponding to the first user information starts the data automatic pulling function, the first data in the preset cloud storage space is stored in the local storage space of the first client.

[0010] The present application also provides a data synchronization device, the device comprising:

[0011] A first acquisition module, used to acquire a first synchronization task, where the first synchronization task includes cache address information of first data;

[0012] A first storage module, configured to store the first data cached in the preset cache space to the preset cloud storage space based on the cache address information;

[0013] A first determination module, configured to determine, according to a preset mapping relationship between the quantum bit identifier and the user information, first user information corresponding to the first quantum bit identifier in the first data;

[0014] The second storage module is used to store the first data in the preset cloud storage space into the local storage space of the first client when the first client corresponding to the first user information turns on the automatic data pulling function.

[0015] The embodiment of the present application also provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0016] Memory, used to store computer programs;

[0017] The processor is used to implement any of the above-mentioned data synchronization method steps when executing the program stored in the memory.

[0018] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the above-mentioned steps of the data synchronization method is implemented.

[0019] An embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned data synchronization methods.

[0020] An embodiment of the present application also provides a quantum computer system, comprising any of the above-mentioned data synchronization devices.

[0021] Beneficial effects of the embodiments of the present invention:

[0022] The technical solution provided by the embodiment of the present invention can, after obtaining the first synchronization task, store the first data cached in the preset cache space to the preset cloud storage space according to the cache address information carried in the first synchronization task, and determine the first user information corresponding to the first quantum bit identifier in the first data through the preset mapping relationship between the quantum bit identifier and the user information, that is, determine the first client that can synchronously store the first data, and when the first client turns on the automatic data pulling function, store the first data stored in the preset cloud storage space to the local storage space of the first client, so as to realize the synchronous storage of the first data in the local storage space of the first client. Therefore, data generated in different clients can realize data synchronization through the preset cloud storage space, avoiding the time required for the client to obtain data by executing the quantum computing process alone, and effectively improving the efficiency of quantum computing.

[0023] In addition, when there are multiple first user information corresponding to the above-mentioned first quantum bit identifier, that is, when there are multiple first clients, the first data will be synchronously stored in the local storage space corresponding to each first client that turns on the automatic data pulling function, thereby realizing the synchronous storage of the first data in multiple clients and improving the efficiency of data synchronization.

[0024] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 A first flow chart of a data synchronization method provided in an embodiment of the present application;

[0027] Figure 2 A second flow chart of the data synchronization method provided in the embodiment of the present application;

[0028] Figure 3 A third flow chart of the data synchronization method provided in the embodiment of the present application;

[0029] Figure 4 A fourth flow chart of the data synchronization method provided in an embodiment of the present application;

[0030] Figure 5 A fifth flow chart of the data synchronization method provided in the embodiment of the present application;

[0031] Figure 6 A sixth flow chart of the data synchronization method provided in the embodiment of the present application;

[0032] Figure 7 A seventh flow chart of the data synchronization method provided in the embodiment of the present application;

[0033] Figure 8 An eighth flow chart of the data synchronization method provided in the embodiment of the present application;

[0034] Fig. 9 A ninth flow chart of the data synchronization method provided in the embodiment of the present application;

[0035] Fig.10 A schematic diagram of the structure of a data synchronization device provided in an embodiment of the present application;

[0036] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.

[0038] In order to solve the problems in the related art, the present application embodiment provides a data synchronization method. Figure 1 As shown, Figure 1 The first flow chart of the data synchronization method provided in the embodiment of the present application is as follows. The method can be applied to any electronic device, and the method includes the following steps.

[0039] Step S101, obtaining a first synchronization task, where the first synchronization task includes cache address information of first data.

[0040] Step S102: based on the cache address information, storing the first data cached in the preset cache space into the preset cloud storage space.

[0041] Step S103, determining the first user information corresponding to the first quantum bit identifier in the first data according to a preset mapping relationship between the quantum bit identifier and the user information.

[0042] Step S104, when the first client corresponding to the first user information starts the automatic data pulling function, the first data in the preset cloud storage space is stored in the local storage space of the first client.

[0043] In the embodiment of the present application, the electronic device may be a server or other device connected to a client for communication. The electronic device may be connected to multiple clients at the same time. Here, the number of the electronic device and the client connected to the electronic device is not specifically limited.

[0044] The above steps S101 to S104 can be executed by the electronic device calling its own asynchronous thread. For ease of understanding, the following description is only based on the electronic device as the execution subject, which does not serve any limiting role.

[0045] In addition, the number of asynchronous threads in the electronic device may be one or more, and may be adjusted in real time according to the number of current synchronization tasks, the number of clients connected to the electronic device, etc. The real-time adjustment process is not described in detail herein.

[0046] Through the method provided in the embodiment of the present application, after obtaining the first synchronization task, the first data cached in the preset cache space can be stored in the preset cloud storage space according to the cache address information carried in the first synchronization task, and the first user information corresponding to the first quantum bit identifier in the first data can be determined through the preset mapping relationship between the quantum bit identifier and the user information, that is, the first client that can synchronously store the first data is determined, and when the first client turns on the automatic data pulling function, the first data stored in the preset cloud storage space is stored in the local storage space of the first client, so as to realize the synchronous storage of the first data in the local storage space of the first client. Therefore, the data generated in different clients can be synchronized through the preset cloud storage space, avoiding the time required for the client to obtain data by executing the quantum computing process alone, and effectively improving the efficiency of quantum computing.

[0047] In addition, when there are multiple first user information corresponding to the above-mentioned first quantum bit identifier, that is, when there are multiple first clients, the first data will be synchronously stored in the local storage space corresponding to each first client that turns on the automatic data pulling function, thereby realizing the synchronous storage of the first data in multiple clients and improving the efficiency of data synchronization.

[0048] The embodiments of the present application are described below through specific examples.

[0049] Step S101, obtaining a first synchronization task, where the first synchronization task includes cache address information of first data.

[0050] In an optional embodiment, a preset queue may be set in the electronic device, and the preset queue is used to cache data synchronization tasks. Whenever a client sends data to be synchronized to the electronic device, the electronic device will generate a data synchronization task corresponding to each data to be synchronized, and cache the generated data synchronization task in the preset queue.

[0051] The data to be synchronized may be data related to quantum computing in the client, such as the calculation result corresponding to a quantum computing task. The data to be synchronized may be newly generated data, or may be updated data corresponding to a certain data (recorded as original data) in the client. Here, the data to be synchronized is not specifically limited.

[0052] In an optional embodiment, the data synchronization task may include cache address information of the data to be synchronized and user information corresponding to the client that sends the data to be synchronized. The cache address information may be a cache address, or identification information corresponding to the cache address, etc. The user information may be a user name or a user identification, etc. Here, the data to be synchronized, the cache address information, and the user information included in the data synchronization task are not specifically limited.

[0053] The electronic device may obtain the data synchronization task with the longest cache time from the above-mentioned preset queue as the first synchronization task.

[0054] The preset queue follows the first-in-first-out rule, and the first synchronization task is the data synchronization task that is prioritized in the preset queue.

[0055] For ease of understanding, the data to be synchronized corresponding to the first synchronization task is recorded as the first data. The client that sends the first data to the electronic device is recorded as the third client. The first synchronization task may include cache address information corresponding to the first data, and user information of the user corresponding to the third client.

[0056] In an embodiment of the present application, the above-mentioned data to be synchronized may include quantum bit data and configuration (config) data. Among them, the quantum bit data may include quantum bit identification, quantum bit power and frequency data. Configuration data may include quantum bit crosstalk data, judgment data, etc. Here, the data included in the data is not specifically limited.

[0057] In an optional embodiment, when there are multiple asynchronous threads in the above-mentioned electronic device, the electronic device can call an asynchronous thread whose current state is an idle state to obtain a first synchronization task from a preset queue. That is, whenever an asynchronous thread in an idle state appears, the electronic device can call the asynchronous thread to perform data synchronization processing. Compared with the method in which each asynchronous thread processes a data synchronization task corresponding to a certain client, or processes a data synchronization task corresponding to a certain fixed data, the method of using an asynchronous thread in an idle state to process data synchronization can effectively improve the resource utilization of each asynchronous thread, thereby shortening the waiting time of all data synchronization tasks and improving data synchronization efficiency.

[0058] In an optional embodiment, the preset queue may be set in other devices that are communicatively connected to the electronic device, such as a remote dictionary server (Remote Dictionary Server, Redis), etc., in addition to being set in the electronic device.

[0059] Step S102: based on the cache address information, storing the first data cached in the preset cache space into the preset cloud storage space.

[0060] In this step, after the third client sends the first data to the electronic device, the electronic device can cache the first data in a preset cache space. When the electronic device obtains the first synchronization task, the electronic device can obtain the first data from the preset cache space according to the cache address information in the first synchronization task, and store the first data in the preset cloud storage space.

[0061] In an optional embodiment, in the preset cloud storage space, each client has a corresponding storage space. When the electronic device stores the first data in the preset cloud storage space, it can cache the first data in the storage space corresponding to the third client in the preset cloud storage space.

[0062] In an embodiment of the present application, the above-mentioned preset cloud storage space may store the original data corresponding to the above-mentioned first data, or may not store the original data corresponding to the first data. When the original data of the first data is not cached in the preset cloud storage space, the electronic device can directly cache the above-mentioned first data to the preset cloud storage space. When the original data of the first data is cached in the preset cloud storage space, the electronic device can update the original data cached in the preset cloud storage space to the above-mentioned first data. Here, the method of storing the first data in the preset cloud storage space is not specifically limited.

[0063] Step S103, determining the first user information corresponding to the first quantum bit identifier in the first data according to a preset mapping relationship between the quantum bit identifier and the user information.

[0064] In the embodiment of the present application, a mapping relationship between a quantum bit identifier and user information is preset (referred to as a preset mapping relationship). The preset mapping relationship can be stored in the above-mentioned Redis together with the above-mentioned preset queue.

[0065] In an optional embodiment, the preset mapping relationship may include a first mapping relationship and a second mapping relationship. The first mapping relationship is used to indicate one or more qubit identifiers corresponding to each user information, that is, all qubits allocated to each user. The second mapping relationship is used to indicate one or more user information corresponding to each qubit identifier, that is, all users allocated to use each qubit.

[0066] For ease of understanding, the first mapping relationship and the second mapping relationship are illustrated using user 1 and quantum bit 1 respectively.

[0067] The first mapping relationship corresponding to the above user 1 can be expressed as: user1[q1, q2, q3, q4], where user1 is the user name of user 1, q1, q2, q3, q4 are the quantum bit identifiers corresponding to quantum bit 1-quantum bit 4, and user1[q1, q2, q3, q4] indicates that the quantum bits allocated to user 1 are quantum bit 1-quantum bit 4. That is, user 1 can use any one or more quantum bits from quantum bit 1 to quantum bit 4 for quantum computing.

[0068] The second mapping relationship corresponding to the above-mentioned quantum bit 1 can be expressed as: q1[user1, user2, user3], where q1 is the quantum bit identifier of quantum bit 1, user1, user2, user3 are the user names corresponding to user 1-user 3, and q1[user1, user2, user3] means that quantum bit 1 is assigned to user 1-user 3 for use, that is, quantum bit 1 can be used by any one or more users among user 1-user 3 for quantum computing.

[0069] In an optional embodiment, based on the above-mentioned second mapping relationship, the electronic device can determine all user information (recorded as first user information) corresponding to the quantum bit identifier (recorded as the first quantum bit identifier) ​​in the above-mentioned first data.

[0070] For ease of understanding, the second mapping relationship q1[user1, user2, user3] is used as an example for explanation. If the quantum bit carried in the first data is identified as q1, then according to the second mapping relationship, it can be determined that the user information corresponding to q1 includes user1, user2 and user3. At this time, the electronic device can determine that user1, user2 and user3 are all first user information.

[0071] In another optional embodiment, according to the second mapping relationship, the electronic device can determine all user information corresponding to the first quantum bit identifier in the first data, and select other user information except the second user information as the first user information. The second user information is the user information corresponding to the third client.

[0072] For ease of understanding, the second mapping relationship q1[user1, user2, user3] is still used as an example for explanation. When the quantum bit carried in the first data is identified as q1, the electronic device can determine that the user information corresponding to q1 includes user1, user2 and user3. Considering that the first synchronization task carries the second user information of the third client, such as user1, the first data is sent to the electronic device by the user corresponding to user1 through the client. At this time, the electronic device can determine that the first user information is recorded as user2 and user3 in addition to user1.

[0073] In the embodiment of the present application, the number of the first user information determined in the above step S103 can be empty, one or more. The above first user information can include the above second user information, or can exclude the above second user information. Here, the above determined first user information is not specifically limited. For ease of understanding, the following is only described by taking the example that the first user information does not include the second user information, which does not serve any limiting role.

[0074] In an optional embodiment, when the amount of the first user information is empty, the electronic device may determine that the first data does not need to be synchronized to other clients. At this time, the electronic device may not perform any synchronization operation. For example, the electronic device may directly discard the first data cached in the preset cache space.

[0075] In another optional embodiment, when the number of the first user information is one or more, the electronic device may determine that the first data needs to be synchronized to the client corresponding to the one or more first user information. At this time, the electronic device may perform a synchronization operation, such as executing step S104.

[0076] Step S104, when the first client corresponding to the first user information starts the automatic data pulling function, the first data in the preset cloud storage space is stored in the local storage space of the first client.

[0077] In an embodiment of the present application, for data stored in a preset cloud storage space, the client can synchronize the data in the preset cloud storage space by automatically pulling (pull) or manually pulling.

[0078] In an optional embodiment, for the client corresponding to each of the above-mentioned first user information (referred to as the first client), when it is determined that the first client has enabled the automatic data pulling function, the electronic device can obtain the first data stored in the preset cloud storage space, and synchronously store the obtained first data in the local storage space of the first client.

[0079] pass Figure 1According to the method shown, when the above-mentioned first data is the updated data corresponding to the above-mentioned original data, the first data stored in the local storage space of the third client can be synchronously updated to each first client, thereby realizing data synchronization and data update between the third client and the first client, and improving the accuracy of data update while improving the efficiency of data synchronization.

[0080] In an optional embodiment, according to the above Figure 1 The method shown in the figure, the embodiment of the present application also provides a data synchronization method. Figure 2 As shown, Figure 2 A second flow chart of the data synchronization method provided in the embodiment of the present application. Figure 2 The following step is added to the method shown, namely step S105.

[0081] Step S105: Send a second notification message to the first client, where the second notification message is used to indicate that there is data update in the local storage space of the first client.

[0082] In this step, after storing the first data in the local storage space of the first client, the electronic device may send a second notification message to the first client. After receiving the second notification message, the first client may determine that the data stored in its local storage space has been updated.

[0083] In an optional embodiment, after receiving the second notification message, the first client may display the second notification message in the form of a pop-up message or a prompt message, so that the user corresponding to the first client can determine whether there is a data update in the local storage space based on the displayed second notification message.

[0084] In an optional embodiment, considering that there may be multiple first clients, there may be multiple asynchronous threads for sending the second notification message. Therefore, when sending the second notification message, the electronic device may send the second notification message to each first client through a proxy thread, thereby improving the convenience of sending the second notification message.

[0085] Through the above-mentioned step S105, the electronic device sends a second notification message to the first client, so that the user corresponding to the first client can timely and accurately determine whether there is an update to the data stored in the local storage space according to the received second notification message, so that the user can timely understand the data update status of the local storage space and obtain data synchronization in time to ensure the accuracy and validity of the data stored in the client.

[0086] In an optional embodiment, according to the above Figure 1 The method shown in the figure, the embodiment of the present application also provides a data synchronization method. Figure 3 As shown, Figure 3 This is a third flow chart of the data synchronization method provided in the embodiment of the present application. The following step is added to the method, namely step S106.

[0087] Step S106, when the first client corresponding to the first user information does not enable the automatic data pulling function, a first notification message is sent to the first client, where the first notification message is used to indicate that there is data to be synchronized in the preset cloud storage space.

[0088] In this step, when it is determined that the automatic data pulling function is not enabled on the first client, the electronic device may determine that the first data needs to be synchronized to the first client, but the first client does not enable the corresponding function. At this time, the electronic device may send a notification message (referred to as the first notification message) to the first client to indicate that there is data to be synchronized in the preset cloud storage space. The method for sending the first notification message may refer to the method for sending the second notification message, which will not be described in detail here.

[0089] In an optional embodiment, in order to facilitate the first client to obtain the first data cached in the above-mentioned preset cloud storage space at a later time, when the electronic device sends a first notification message to the first client, the first notification message may carry the storage address information of the above-mentioned first data in the preset cloud storage space, or carry the first quantum bit identifier in the above-mentioned first data, so as to facilitate the later search for the first data in the preset cloud storage space.

[0090] The above step S104 and the above step S106 are steps respectively executed by the electronic device when the first client turns on the automatic data pulling function and the first client does not turn on the automatic data pulling function. Here, the execution of the above step S104 and the above step S106 is not specifically limited.

[0091] In an embodiment of the present application, after the electronic device stores the first data in the preset cloud storage space, for a first client that has not enabled the automatic data pulling function, the electronic device can promptly remind the user of the first client that there is data that can be synchronized in the preset cloud storage space by sending a first notification message to the first client, so that the user can independently choose whether to obtain the data that can be synchronized from the preset cloud storage space. While ensuring user selectivity, it is facilitating the user to timely understand the data update status and selectively synchronize data according to their own needs, thereby ensuring the accuracy and validity of the data stored in the client.

[0092] In an optional embodiment, according to the above Figure 1 The method shown in the figure, the embodiment of the present application also provides a data synchronization method. Figure 4 As shown, Figure 4A fourth flow chart of the data synchronization method provided in the embodiment of the present application. The method includes the following steps.

[0093] Step S401: Acquire a first synchronization task, where the first synchronization task includes cache address information of first data.

[0094] Step S402: based on the cache address information, storing the first data cached in the preset cache space into the preset cloud storage space.

[0095] Step S403: Determine the first user information corresponding to the first quantum bit identifier in the first data according to a preset mapping relationship between the quantum bit identifier and the user information.

[0096] Step S404, when the first client corresponding to the first user information turns on the automatic data pulling function, the first data in the preset cloud storage space is stored in the local storage space of the first client.

[0097] The above steps S401 to S404 are the same as the above steps S101 to S104.

[0098] Step S405: receiving second data sent by the second client.

[0099] In this step, when there is updated data in the local storage space of the second client, or when the user of the second client chooses to synchronize certain data to other users, the second client can send the second data to the above-mentioned electronic device after obtaining the updated data or the data to be synchronized (recorded as the second data).

[0100] In the embodiment of the present application, the second client may push the second data to the electronic device by automatic push or manual push.

[0101] In an optional embodiment, if the second data is data automatically pushed by the second client, the above step S405, i.e. receiving the second data sent by the second client, can be specifically expressed as:

[0102] The electronic device receives second data sent by the second client through the first interface.

[0103] In this step, when the second client turns on the automatic data push function, the second client can push the second data to the electronic device through the first interface. At this time, the electronic device can obtain the second data sent by the second client through the first interface.

[0104] In an optional embodiment, in order to facilitate the second client to actively push the above-mentioned second data to the electronic device, the second client can set a fixed storage space in the local storage space. Once the data is stored in the fixed storage space, the data can be determined as the above-mentioned second data, and the second client can directly send the second data to the above-mentioned electronic device.

[0105] In another optional embodiment, if the second data is data manually pushed by the user corresponding to the second client, the above step S405, receiving the second data sent by the second client, can be specifically expressed as:

[0106] The electronic device receives second data sent by the second client through the second interface.

[0107] In this step, when the second client opens the manual data push function, the user of the second client can manually push the second data to the electronic device through the second interface. At this time, the electronic device can obtain the second data sent by the second client through the second interface.

[0108] In an embodiment of the present application, the first interface and the second interface are different data transmission interfaces. Each client is connected to the electronic device through the first interface and the second interface. When the client sends data to the electronic device, if the client turns on the automatic data push function, the data is sent to the electronic device through the first interface; if the client turns on the manual data push function and the user chooses to manually push a certain data, the data is sent to the electronic device through the second interface.

[0109] Through the above-mentioned first interface and second interface, depending on whether the client turns on the automatic data push function or the manual data push function, the client will use different data transmission interfaces to push data to the electronic device, so that the electronic device can determine whether the data is automatically pushed by the client or manually pushed by the user of the client according to the interface for receiving the data, thereby adopting different processing methods for data pushed in different ways. The specific processing method can be found in the description below and is not explained in detail here.

[0110] In an optional embodiment, in order to distinguish data received in different push modes, when the electronic device generates a synchronization task corresponding to each data to be synchronized, it may carry different function tags in the synchronization task. For example, when the function tag is 1, it may indicate that the corresponding data to be synchronized is automatically pushed by the client; when the function tag is 2, it may indicate that the corresponding data to be synchronized is manually pushed by the user of the client.

[0111] Step S406: Send a response message for the second data to the second client, and cache the second data in a preset cache space.

[0112] In the embodiment of the present application, after receiving the second data sent by the second client, the electronic device may send a response message for the second data to the second client.

[0113] The above response message can be used to indicate that the electronic device has received the second data, or can also be used to indicate that the electronic device is processing the second data. After receiving the response message, the second client can determine that the electronic device has received the second data, or that the electronic device is processing the second data. At this time, the second client can handle other things.

[0114] In the related art, during the data synchronization between different clients, the resources of the client are always occupied. For example, when client 1 synchronizes data A to client 2, client 1 needs to send data A to client 2. After client 2 stores the received data A, client 2 will send a response message to client 1 for data A. Client 1 can only determine that the data synchronization is completed after receiving the response message. At this time, client 1 will handle other things. Therefore, in the data synchronization process of the related art, the computing resources of client 1 are occupied before the data synchronization is completed, especially the amount of data related to quantum computing is relatively large, and the time required for data synchronization is relatively long, which will cause the computing resources of client 1 to be occupied for a long time, resulting in synchronization timeout, and even the page of client 1 will be stuck, affecting the normal operation of client 1.

[0115] Compared with related technologies, the above-mentioned electronic device immediately feeds back a response message to the client after receiving the data sent by the client, which can release the client's computing resources in time, so that the client can use the released computing resources to process other things, effectively improving the utilization rate of the client's computing resources and avoiding synchronization timeouts and page freezes caused by long waiting times on the client.

[0116] In the embodiment of the present application, after receiving the second data sent by the second client, the electronic device may cache the second data into a preset cache space in addition to feeding back the response message.

[0117] Step S407: Generate a second synchronization task based on the cache address of the second data in the preset cache space.

[0118] In this step, after caching the second data into the preset cache space, the electronic device may generate a second synchronization task including cache address information according to the cache address of the second data in the preset cache space.

[0119] The second synchronization task may also include other information, such as user information corresponding to the second client. For details, please refer to the description of the first synchronization task, which will not be repeated here.

[0120] In the embodiment of the present application, the above steps S405 to S407 are executed after step S404. In addition, the above steps S405 to S407 can be executed before or after any step of the above steps S401 to S404. Here, the execution time of the above steps S405 to S407 is not specifically limited.

[0121] In an optional embodiment, the second client may be the third client, and the second data may be the first data. In this case, steps S405 to S407 are performed before step S401.

[0122] Through the above steps S405-S407, after the client sends data to the electronic device, the electronic device can not only feedback a response message to the client, but also generate a synchronization task corresponding to the data, so that the electronic device can process the data sent by the client without affecting the normal operation of the client, thereby improving the resource utilization of the client.

[0123] In an optional embodiment, if the first data is sent by the third client through the first interface, then according to the Figure 1 The method shown in the figure, the embodiment of the present application also provides a data synchronization method. Figure 5 As shown, Figure 5 A fifth flow chart of the data synchronization method provided in the embodiment of the present application is shown in FIG.

[0124] Step S501: Acquire a first synchronization task, where the first synchronization task includes cache address information of first data.

[0125] The above step S501 is the same as the above step S101.

[0126] Step S502: Determine, according to a preset mapping relationship, a second quantum bit identifier corresponding to the second user information of the third client.

[0127] In this step, the electronic device can determine all quantum bit identifiers (recorded as second quantum bit identifiers) corresponding to the second user information of the third client based on the above-mentioned first mapping relationship, that is, one or more quantum bit identifiers corresponding to each user information.

[0128] For ease of understanding, the first mapping relationship corresponding to the above user 1 is used for explanation. If the above second user information is the above user 1. According to user1[q1, q2, q3, q4], the electronic device can determine that all the quantum bit identifiers corresponding to user1 are q1, q2, q3 and q4. That is, q1, q2, q3 and q4 are all the above second quantum bit identifiers.

[0129] In the embodiment of the present application, the above-mentioned preset mapping relationship can be set according to user needs, the number of quantum bits on the quantum chip, etc. Therefore, the number of quantum bits corresponding to different user information in the above-mentioned first mapping relationship will also be different. Here, the number of second quantum bit identifiers determined in the above-mentioned step S502 is not specifically limited.

[0130] Step S503, when the second quantum bit identifier includes the first quantum bit identifier in the first data, determine whether the third client turns on the automatic data push function.

[0131] In an embodiment of the present application, after determining the above-mentioned second quantum bit identifier, the electronic device may compare the determined second quantum bit identifier with the first quantum bit identifier in the above-mentioned first data to determine whether the second quantum bit identifier includes the first quantum bit identifier.

[0132] When the second quantum bit identifier includes the first quantum bit identifier, the electronic device can determine that the third client can perform quantum calculation using the quantum bit corresponding to the first quantum bit identifier. Therefore, the electronic device can determine that the first data including the first quantum bit identifier is valid data.

[0133] After determining that the second quantum bit identifier includes the first quantum bit identifier, the electronic device can determine whether the third client has enabled the automatic data push function.

[0134] In an optional embodiment, for each client that is connected to the electronic device for communication, when the user turns on or off the automatic data push function, manual data push function, automatic data pull function or manual data pull function corresponding to the client, the electronic device will synchronously display the corresponding function icon.

[0135] When determining whether the third client has enabled the automatic data push function, the electronic device may determine whether the third client has enabled the automatic data push function based on the icon currently displayed. For example, the icon currently displayed is an icon corresponding to the automatic data push function. At this time, the electronic device may determine that the third client has enabled the automatic data push function.

[0136] Step S504: when the third client turns on the automatic data push function, based on the cache address information, the first data cached in the preset cache space is stored in the preset cloud storage space.

[0137] In this step, when it is determined in step S503 that the third client has enabled the automatic data push function, the electronic device can determine that the first data needs to be synchronized. At this time, the electronic device can store the first data in a preset cloud storage space, and the specific details can be referred to the description of step S102, which will not be repeated here.

[0138] In an embodiment of the present application, when the first data enables automatic data push for the third client, the electronic device can determine the validity of the first data based on the mapping relationship, thereby ensuring the accuracy and effectiveness of data synchronization.

[0139] In addition, after determining that the first data is valid data, the electronic device can determine whether the third client has enabled the automatic data push function and can synchronize the first data according to whether the user corresponding to the third client chooses to synchronize the first data, thereby improving the flexibility of data synchronization.

[0140] Step S505: Determine the first user information corresponding to the first quantum bit identifier in the first data according to a preset mapping relationship between the quantum bit identifier and the user information.

[0141] Step S506, when the first client corresponding to the first user information starts the data automatic pulling function, the first data in the preset cloud storage space is stored in the local storage space of the first client.

[0142] The above steps S505-S506 are the same as the above steps S103-S104.

[0143] In an optional embodiment, according to the above Figure 5 The method shown in the figure, the embodiment of the present application also provides a data synchronization method. Figure 6 As shown, Figure 6 The sixth flow chart of the data synchronization method provided in the embodiment of the present application is as follows. Figure 6 The following steps are added to the method shown, namely step S507 to step S508.

[0144] Step S507: when the third client does not enable the automatic data push function, the first data cached in the preset storage space is discarded based on the cache address information.

[0145] In this step, when the electronic device determines that the third client does not enable the automatic data push function, it can determine that the user of the third client abandons synchronization of the first data. At this time, the electronic device can determine the cache location of the first data in the preset cache space according to the cache address information carried in the first synchronization task, thereby discarding the first data.

[0146] In an embodiment of the present application, when the electronic device determines that the third client has not enabled the automatic data push function, it discards the first data in the preset cache space, thereby releasing the cache resources of the preset cache space in time and effectively improving the resource utilization of the preset cache space.

[0147] The above steps S504 and S507 are steps respectively executed by the electronic device when the third client turns on the automatic data push function and when the third client turns on the automatic data push function. Here, the execution of the above steps S504 and S507 is not specifically limited.

[0148] Step S508, when the second quantum bit identifier does not include the first quantum bit identifier, based on the cache address information, discard the first data cached in the preset cache space.

[0149] In this step, when the determined second quantum bit identifier does not include the first quantum bit identifier, the electronic device may determine that the first data is not valid data. At this time, the electronic device may not perform synchronization processing on the first data. For example, the electronic device may discard the first data cached in the preset cache space according to the cache address information carried by the first synchronization task.

[0150] The above steps S503 and S508 are respectively executed when the second quantum bit identifier includes the first quantum bit identifier. Here, the execution of the above steps S503 and S508 is not specifically limited.

[0151] In the embodiment of the present application, when the electronic device determines that the first data is not valid data, it promptly discards the first data cached in the preset cache space, thereby effectively improving the resource utilization of the preset cache space.

[0152] In an optional embodiment, if the first data is sent by the third client through the second interface, then according to the above Figure 1 The method shown in the figure, the embodiment of the present application also provides a data synchronization method. Figure 7 As shown, Figure 7 The seventh flow chart of the data synchronization method provided in the embodiment of the present application includes the following steps.

[0153] Step S701: Acquire a first synchronization task, where the first synchronization task includes cache address information of first data.

[0154] The above step S701 is the same as the above step S101.

[0155] Step S702: Determine, according to a preset mapping relationship, a second quantum bit identifier corresponding to the second user information of the third client.

[0156] The above step S702 may refer to the description of the above step S502, which will not be repeated here.

[0157] Step S703, when the second quantum bit identifier includes the first quantum bit identifier in the first data, based on the cache address information, the first data cached in the preset cache space is stored in the preset cloud storage space.

[0158] In this step, when the determined second quantum bit identifier includes the first quantum bit identifier, the electronic device can determine that the first data is valid data. At this time, the electronic device can store the first data in a preset cloud storage space.

[0159] In an embodiment of the present application, since the above-mentioned first data is manually pushed by the user of the third client when the manual data push function is turned on, the electronic device can directly determine the function currently turned on by the third client, and as long as it is determined that the first data is valid data, data synchronization can be performed on the first data.

[0160] Step S704: Determine the first user information corresponding to the first quantum bit identifier in the first data according to a preset mapping relationship between the quantum bit identifier and the user information.

[0161] Step S705 , when the first client corresponding to the first user information turns on the automatic data pulling function, the first data in the preset cloud storage space is stored in the local storage space of the first client.

[0162] The above steps S704 to S705 are the same as the above steps S103 to S104.

[0163] In an optional embodiment, according to the above Figure 7 The method shown in the figure, the embodiment of the present application also provides a data synchronization method. Figure 8 As shown, Figure 8 This is an eighth flow chart of the data synchronization method provided in the embodiment of the present application. The following steps are added to the method, namely step S706.

[0164] Step S706: When the second quantum bit identifier does not include the first quantum bit identifier, based on the cache address information, discard the first data cached in the preset cache space.

[0165] In this step, when the determined second quantum bit identifier does not include the first quantum bit identifier, the electronic device may determine that the first data is not valid data. At this time, the electronic device may not perform synchronization processing on the first data. For example, the electronic device may discard the first data cached in the preset cache space according to the cache address information carried by the first synchronization task.

[0166] The above steps S703 and S706 are steps respectively performed by the electronic device when determining whether the second quantum bit identifier includes the first quantum bit identifier. Here, the execution of the above steps S703 and S706 is not specifically limited.

[0167] In the embodiment of the present application, when the electronic device determines that the first data is not valid data, it promptly discards the first data cached in the preset cache space, thereby effectively improving the resource utilization of the preset cache space.

[0168] In the above Figure 5-Figure 8 In the illustrated embodiment, after obtaining the first synchronization task, the electronic device can determine, based on the functional tag in the first synchronization task, whether the first data corresponding to the first synchronization task is sent through the first interface or the second interface, thereby realizing the identification of different synchronization tasks and adopting different execution steps to realize data synchronization.

[0169] In an optional embodiment, according to the above Figure 1 The method shown in the figure, the embodiment of the present application also provides a data synchronization method. Fig. 9 As shown, Fig. 9 A ninth flow chart of a data synchronization method provided in an embodiment of the present application. The method includes the following steps.

[0170] Step S901: Acquire a first synchronization task, where the first synchronization task includes cache address information of first data.

[0171] Step S902: based on the cache address information, storing the first data cached in the preset cache space into the preset cloud storage space.

[0172] Step S903: Determine the first user information corresponding to the first quantum bit identifier in the first data according to a preset mapping relationship between the quantum bit identifier and the user information.

[0173] Step S904, when the first client corresponding to the first user information turns on the automatic data pulling function, the first data in the preset cloud storage space is stored in the local storage space of the first client.

[0174] The above steps S901 to S904 are the same as the above steps S101 to S104.

[0175] Step S905: receiving a data pulling instruction carrying the third user information sent by the fourth client, where the data pulling instruction is sent when the user corresponding to the third user information triggers a manual data pulling function.

[0176] In this step, the user of the fourth client can trigger the manual data pulling function. For example, the user of the fourth client can choose to turn on the trigger manual data pulling function. At this time, the fourth client will send a data pulling instruction carrying user information (recorded as the third user information) to the electronic device. The electronic device will also receive the data pulling instruction.

[0177] In the embodiment of the present application, the user triggers the automatic data pulling function in addition to the above-mentioned selection to enable the manual data pulling function, and may also include other methods. For example, when the automatic data pulling function is enabled, a data pulling button may be deployed in the display page of the client, and the user may trigger the manual data pulling function by clicking or the like. Here, the triggering method of the manual data pulling function is not specifically limited.

[0178] Step S906: Determine a third quantum bit identifier corresponding to the third user information based on a preset mapping relationship.

[0179] In this step, after receiving the above-mentioned data pull instruction, the electronic device can determine all quantum bit identifiers (recorded as third quantum bit identifiers) corresponding to the third user information carried by the data pull instruction according to the above-mentioned first mapping relationship.

[0180] In the embodiment of the present application, according to different user information and different first mapping relationships corresponding to each user information, the number of the third quantum bit identifiers determined in the above step S906 may be one or more. Here, the number of the above third quantum bit identifiers is not specifically limited.

[0181] Step S907, for each third quantum bit identifier, obtain the third data including the third quantum bit identifier from the preset cloud storage space.

[0182] In this step, for each third quantum bit identifier determined in the above step S906, the electronic device can determine whether data (referred to as third data) including the third quantum bit identifier is stored in the preset cloud storage space. After the third data of the third quantum bit identifier is stored in the preset cloud storage space, the electronic device can obtain the third data.

[0183] In an optional embodiment, for each third quantum bit identifier, when the third data with the third quantum bit identifier is not stored in the preset cloud storage space, the electronic device may not perform any processing, or the electronic device may feedback information carrying the third quantum bit identifier to the fourth client, and the feedback information is used to indicate that the third data is not stored in the preset cloud storage space.

[0184] Step S908: store the third data in the local storage space of the fourth client.

[0185] In an optional embodiment, for each third quantum bit identifier, the electronic device may store the third data corresponding to the third quantum bit identifier in the local storage space of the fourth client after obtaining the third data. That is, after obtaining each third data, the electronic device stores the third data in the local storage space.

[0186] In another optional embodiment, for each third quantum bit identifier, the electronic device may store all the third data together in the local storage space of the fourth client after obtaining all the third data.

[0187] Through the above steps S905 to S908, when the user of the fourth client triggers the manual data pulling function, the electronic device can synchronously store the third data stored in the preset cloud storage space into the local storage space of the fourth client to achieve data synchronization.

[0188] In the above Fig. 9 In the illustrated embodiment, the above steps S905 to S908 are executed after step S904. In addition, the above steps S905 to S908 may also be executed before or after any of the above steps S901 to S904. Here, the execution time of the above steps S905 to S908 is not specifically limited.

[0189] In the above Fig. 9 In the embodiment shown, the manual data pulling process is described by taking the example of obtaining all data that can be synchronized and stored in the local storage space from the preset cloud storage space after the user triggers the manual data pulling function. In addition, the user can also trigger the manual data pulling function for a certain data to be synchronized.

[0190] For example, after receiving the first notification message carrying the first quantum bit identifier, the user can trigger a manual data pull function for the first data. At this time, the first client can send a data pull instruction carrying the first user information and the first quantum bit identifier to the electronic device.

[0191] After receiving the data pull instruction from the first client, the electronic device can store the data including the first quantum bit identifier stored in the preset cloud storage space (ie, the above-mentioned first data) into the local storage space of the first client.

[0192] In an optional embodiment, in order to further improve the accuracy of data synchronization, after receiving the data pull instruction sent by the first client, the electronic device can refer to the above step S906 to determine the quantum bit identifier (recorded as the fourth quantum bit identifier) ​​corresponding to the first user information.

[0193] When the fourth quantum bit identifier includes the first quantum bit identifier, the electronic device may store the data including the first quantum bit identifier stored in the preset cloud storage space into the local storage space of the first client.

[0194] Based on the same inventive concept, according to the data synchronization method provided in the above embodiment of the present application, the embodiment of the present application also provides a data synchronization device. Fig.10 As shown, Fig.10 A schematic diagram of a data synchronization device provided in an embodiment of the present application. The device includes the following modules.

[0195] A first acquisition module 1001 is used to acquire a first synchronization task, where the first synchronization task includes cache address information of first data;

[0196] The first storage module 1002 is used to store the first data cached in the preset cache space to the preset cloud storage space based on the cache address information;

[0197] A first determination module 1003, configured to determine first user information corresponding to a first quantum bit identifier in the first data according to a preset mapping relationship between the quantum bit identifier and the user information;

[0198] The second storage module 1004 is used to store the first data in the preset cloud storage space into the local storage space of the first client when the first client corresponding to the first user information turns on the automatic data pulling function.

[0199] Optionally, the data synchronization device may further include:

[0200] A first receiving module, used for receiving second data sent by a second client;

[0201] A first sending module, used to send a response message for the second data to the second client, and cache the second data in a preset cache space;

[0202] A generating module is used to generate a second synchronization task based on a cache address of the second data in a preset cache space.

[0203] Optionally, the first receiving module may be specifically configured to receive the second data sent by the second client through the first interface if the second data is data automatically pushed by the second client.

[0204] Optionally, the data synchronization device may further include:

[0205] A second determination module is configured to determine, if the first data is sent by the third client through the first interface, before storing the first data cached in the preset cache space in the preset cloud storage space based on the cache address information, a second quantum bit identifier corresponding to the second user information of the third client according to a preset mapping relationship;

[0206] A third determination module is used to determine whether the third client turns on the automatic data push function when the second quantum bit identifier includes the first quantum bit identifier in the first data;

[0207] The first calling module is used to call the first storage module 1002 to execute the step of storing the first data cached in the preset cache space to the preset cloud storage space based on the cache address information when the automatic data push function is turned on in the third client.

[0208] Optionally, the data synchronization device may further include:

[0209] The first discarding module is used to discard the first data cached in the preset storage space based on the cache address information when the automatic data push function is not enabled on the third client.

[0210] Optionally, the second receiving module may be specifically configured to receive the second data sent by the second client through the second interface if the second data is data manually pushed by a user corresponding to the second client.

[0211] Optionally, the data synchronization device may further include:

[0212] a fourth determination module, configured to determine, if the first data is sent by the third client through the second interface, before storing the first data cached in the preset cache space in the preset cloud storage space based on the cache address information, a second quantum bit identifier corresponding to the second user information of the third client according to a preset mapping relationship;

[0213] The second calling module is used to call the first storage module 1002 to execute the step of storing the first data cached in the preset cache space to the preset cloud storage space based on the cache address information when the second quantum bit identifier includes the first quantum bit identifier in the first data.

[0214] Optionally, the data synchronization device may further include:

[0215] The second discarding module is used to discard the first data cached in the preset cache space based on the cache address information when the second quantum bit identifier does not include the first quantum bit identifier.

[0216] Optionally, the data synchronization device may further include:

[0217] A second receiving module is used to receive a data pulling instruction carrying third user information sent by a fourth client, where the data pulling instruction is sent when a user corresponding to the third user information triggers a manual data pulling function;

[0218] A fifth determination module, used to determine a third quantum bit identifier corresponding to the third user information based on a preset mapping relationship;

[0219] A second acquisition module is used to acquire, for each third quantum bit identifier, third data including the third quantum bit identifier from a preset cloud storage space;

[0220] The third storage module is used to store the third data in the local storage space of the fourth client.

[0221] Optionally, the data synchronization device may further include:

[0222] The second sending module is used to send a first notification message to the first client when the first client corresponding to the first user information does not enable the automatic data pulling function, and the first notification message is used to indicate that there is data to be synchronized in the preset cloud storage space.

[0223] Optionally, the data synchronization device may further include:

[0224] The third sending module is used to send a second notification message to the first client after storing the first data in the preset cloud storage space to the local storage space of the first client, where the second notification message is used to indicate that there is data update in the local storage space of the first client.

[0225] Through the device provided in the embodiment of the present application, after obtaining the first synchronization task, the first data cached in the preset cache space can be stored in the preset cloud storage space according to the cache address information carried in the first synchronization task, and the first user information corresponding to the first quantum bit identifier in the first data can be determined through the preset mapping relationship between the quantum bit identifier and the user information, that is, the first client that can synchronously store the first data is determined, and when the first client turns on the automatic data pulling function, the first data stored in the preset cloud storage space is stored in the local storage space of the first client, so as to realize the synchronous storage of the first data in the local storage space of the first client. Therefore, data generated in different clients can be synchronized through the preset cloud storage space, avoiding the time required for the client to obtain data by executing the quantum computing process alone, and effectively improving the efficiency of quantum computing.

[0226] In addition, when there are multiple first user information corresponding to the above-mentioned first quantum bit identifier, that is, when there are multiple first clients, the first data will be synchronously stored in the local storage space corresponding to each first client that turns on the automatic data pulling function, thereby realizing the synchronous storage of the first data in multiple clients and improving the efficiency of data synchronization.

[0227] Based on the same inventive concept, according to the data synchronization method provided in the above embodiment of the present application, the embodiment of the present application also provides an electronic device, such as Fig.11 As shown, it includes a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, wherein the processor 1101, the communication interface 1102, and the memory 1103 communicate with each other through the communication bus 1104.

[0228] Memory 1103, used for storing computer programs;

[0229] The processor 1101 is used to implement the following steps when executing the program stored in the memory 1103:

[0230] Acquire a first synchronization task, where the first synchronization task includes cache address information of the first data;

[0231] Based on the cache address information, storing the first data cached in the preset cache space to the preset cloud storage space;

[0232] Determine, according to a preset mapping relationship between the quantum bit identifier and the user information, first user information corresponding to the first quantum bit identifier in the first data;

[0233] When the first client corresponding to the first user information starts the data automatic pulling function, the first data in the preset cloud storage space is stored in the local storage space of the first client.

[0234] Through the electronic device provided by the embodiment of the present application, after obtaining the first synchronization task, according to the cache address information carried in the first synchronization task, the first data cached in the preset cache space can be stored in the preset cloud storage space, and the first user information corresponding to the first quantum bit identifier in the first data can be determined through the preset mapping relationship between the quantum bit identifier and the user information, that is, the first client that can synchronously store the first data is determined, and when the first client turns on the automatic data pulling function, the first data stored in the preset cloud storage space is stored in the local storage space of the first client, so as to realize the synchronous storage of the first data in the local storage space of the first client. Therefore, the data generated in different clients can realize data synchronization through the preset cloud storage space, avoiding the time required for the client to obtain data by executing the quantum computing process alone, and effectively improving the efficiency of quantum computing.

[0235] In addition, when there are multiple first user information corresponding to the above-mentioned first quantum bit identifier, that is, when there are multiple first clients, the first data will be synchronously stored in the local storage space corresponding to each first client that turns on the automatic data pulling function, thereby realizing the synchronous storage of the first data in multiple clients and improving the efficiency of data synchronization.

[0236] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0237] The communication interface is used for communication between the above electronic device and other devices.

[0238] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0239] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0240] Based on the same inventive concept, according to the data synchronization method provided in the above-mentioned embodiments of the present application, the embodiments of the present application also provide a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the steps of any of the above-mentioned data synchronization methods.

[0241] Based on the same inventive concept, according to the data synchronization method provided in the above-mentioned embodiments of the present application, the embodiments of the present application also provide a computer program product containing instructions, which, when executed on a computer, enables the computer to execute any of the data synchronization methods in the above-mentioned embodiments.

[0242] Based on the same inventive concept, according to the data synchronization method provided in the above-mentioned embodiments of the present application, the embodiments of the present application also provide a quantum computer system, including any of the above-mentioned data synchronization devices.

[0243] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0244] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0245] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for embodiments such as devices, electronic devices, computer-readable storage media, computer program products, and quantum computer systems, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0246] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A data synchronization method, characterized in that: The method comprises: Acquire a first synchronization task, where the first synchronization task includes cache address information of first data; Based on the cache address information, storing the first data cached in the preset cache space to the preset cloud storage space; Determine, according to a preset mapping relationship between the quantum bit identifier and the user information, first user information corresponding to the first quantum bit identifier in the first data; When the first client corresponding to the first user information starts the data automatic pulling function, the first data in the preset cloud storage space is stored in the local storage space of the first client.

2. The method according to claim 1, characterized in that The method further comprises: receiving second data sent by a second client; Sending a response message to the second data to the second client, and caching the second data into a preset cache space; A second synchronization task is generated based on a cache address of the second data in the preset cache space.

3. The method according to claim 2, characterized in that If the second data is data automatically pushed by the second client, the step of receiving the second data sent by the second client includes: Second data sent by the second client through the first interface is received.

4. The method according to claim 3, characterized in that If the first data is sent by the third client through the first interface, before storing the first data cached in the preset cache space to the preset cloud storage space based on the cache address information, the method further includes: Determine, according to a preset mapping relationship, a second quantum bit identifier corresponding to the second user information of the third client; When the second quantum bit identifier includes the first quantum bit identifier in the first data, determining whether the third client turns on the automatic data push function; When the third client turns on the automatic data push function, the step of storing the first data cached in the preset cache space to the preset cloud storage space based on the cache address information is performed.

5. The method according to claim 4, characterized in that The method further comprises: When the automatic data push function is not enabled on the third client, the first data cached in the preset storage space is discarded based on the cache address information.

6. The method according to claim 2, characterized in that If the second data is data manually pushed by a user corresponding to the second client, the step of receiving the second data sent by the second client includes: Receive second data sent by the second client through the second interface.

7. The method according to claim 6, characterized in that If the first data is sent by the third client through the second interface, before storing the first data cached in the preset cache space to the preset cloud storage space based on the cache address information, the method further includes: Determine, according to a preset mapping relationship, a second quantum bit identifier corresponding to the second user information of the third client; When the second quantum bit identifier includes the first quantum bit identifier in the first data, the step of storing the first data cached in the preset cache space to the preset cloud storage space based on the cache address information is performed.

8. The method according to claim 4 or 7, characterized in that: The method further comprises: When the second quantum bit identifier does not include the first quantum bit identifier, the first data cached in the preset cache space is discarded based on the cache address information.

9. The method according to claim 1, characterized in that: The method further comprises: receiving a data pulling instruction carrying third user information sent by a fourth client, wherein the data pulling instruction is sent when a user corresponding to the third user information triggers a manual data pulling function; Based on the preset mapping relationship, determining a third quantum bit identifier corresponding to the third user information; For each third quantum bit identifier, obtaining third data including the third quantum bit identifier from the preset cloud storage space; The third data is stored in the local storage space of the fourth client.

10. The method according to claim 1, characterized in that The method further comprises: When the first client corresponding to the first user information does not enable the automatic data pulling function, a first notification message is sent to the first client, where the first notification message is used to indicate that there is data to be synchronized in the preset cloud storage space.

11. The method according to claim 1, characterized in that After storing the first data in the preset cloud storage space into the local storage space of the first client, the method further includes: A second notification message is sent to the first client, where the second notification message is used to indicate that there is data update in the local storage space of the first client.

12. A data synchronization device, characterized in that: The device comprises: A first acquisition module, used to acquire a first synchronization task, where the first synchronization task includes cache address information of first data; A first storage module, configured to store the first data cached in the preset cache space to the preset cloud storage space based on the cache address information; A first determination module, configured to determine, according to a preset mapping relationship between the quantum bit identifier and the user information, first user information corresponding to the first quantum bit identifier in the first data; The second storage module is used to store the first data in the preset cloud storage space into the local storage space of the first client when the first client corresponding to the first user information turns on the automatic data pulling function.

13. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1-11 when executing a program stored in a memory.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Data caching synchronization method, server and client side

    CN105302895A

  • Message synchronization method and device, computer device and computer readable storage medium

    CN110365739A

  • Systems and methods for quantum caching

    CN116663667A

  • Tuner Circuit Board

    KR1020210117640A

  • Quantum data and state synchronization

    US20230095267A1