CN-122001900-A - Data synchronous updating method and device, storage medium and electronic equipment
Abstract
The application discloses a data synchronization updating method, a device, a storage medium and electronic equipment, which relate to the technical field of data processing and comprise the steps of responding to a data synchronization request of target ordering data, and verifying the data synchronization request through a request node corresponding to the data synchronization request in a plurality of containerized nodes of a blockchain network; and under the condition that the common identification verification passes, storing the target ordering data in a target storage network, and generating data index information corresponding to the target ordering data in the target storage network, wherein the data index information is used for updating the target ordering data by at least one node to be updated. According to the application, the target ordering data is subjected to consensus verification through the plurality of consensus nodes, so that the safety of data synchronization and the accuracy of data synchronization updating can be improved.
Inventors
- HUANG ZIPENG
- ZENG GUIQUAN
- ZHANG QI
- MA LI
- CHEN JI
Assignees
- 中移互联网有限公司
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251225
Claims (15)
- 1. A method for synchronously updating data, comprising: Responding to a data synchronization request of target subscription data, and verifying the data synchronization request through a request node corresponding to the data synchronization request in a plurality of containerized nodes of a blockchain network; determining a plurality of consensus nodes based on configuration information of the plurality of containerized nodes under the condition that the data synchronization request passes verification, and performing consensus verification on the target subscription data through the plurality of consensus nodes; Storing the target subscription data in a target storage network under the condition that the consensus verification is passed; and generating data index information corresponding to the target ordering data in the target storage network, wherein the data index information is used for updating the target ordering data by at least one node to be updated.
- 2. The method of claim 1, wherein the determining a plurality of consensus nodes based on configuration information of the plurality of containerized nodes in the case that the data synchronization request verification passes, performing consensus verification on the target subscription data by the plurality of consensus nodes, comprises: Determining a request consensus node from the plurality of containerized nodes based on configuration information of the plurality of containerized nodes if the data synchronization request passes verification; Determining at least one consensus verification node corresponding to the request consensus node; Requesting, by the requesting consensus node, the at least one consensus verification node to perform a consensus verification on the target subscription data.
- 3. The method of claim 2, wherein the determining a request consensus node from the plurality of containerized nodes based on configuration information of the plurality of containerized nodes if the data synchronization request is validated comprises: Determining the mortgage weight data and/or the historical reputation scoring data of the plurality of containerized nodes in the current consensus period under the condition that the data synchronization request passes verification; and selecting the request consensus node from the plurality of containerized nodes by using a rights and interests proving mechanism according to the mortgage weight data and/or the historical reputation scoring data.
- 4. A method according to claim 3, wherein said determining at least one consensus verification node to which the requesting consensus node corresponds comprises: Determining node load data and node network topology information corresponding to the plurality of containerized nodes; And selecting at least one consensus verification node corresponding to the request consensus node from the plurality of containerized nodes according to the node load data and the node network topology information.
- 5. The method of claim 2, wherein the requesting, by the requesting consensus node, the at least one consensus verification node to consensus verify the target subscription data comprises: generating consensus verification information corresponding to the data synchronization request through the request consensus node; Broadcasting the consensus verification information to the at least one consensus verification node, wherein the at least one consensus verification node is used for voting according to the consensus verification information so as to perform consensus verification on the target subscription data.
- 6. A method according to claim 3, wherein, in the event that the consensus verification passes, the method further comprises, prior to storing the target subscription data in a target storage network: Determining voting data of the at least one consensus verification node for voting according to the consensus verification information; Determining passing proportion data passing through the verification of the target ordering data according to the voting data; the storing the target subscription data in a target storage network in the case that the consensus verification is passed includes: And storing the target subscription data in a target storage network under the condition that the passing proportion data is larger than a passing proportion threshold value.
- 7. The method of claim 1, wherein storing the target subscription data in a target storage network if the consensus verification passes comprises: Dividing the target subscription data into a plurality of data fragments under the condition that the consensus verification is passed; And carrying out distributed storage on the plurality of data fragments in a plurality of nodes of the target storage network, wherein the target storage network is a decentralised storage network.
- 8. The method of claim 7, wherein generating the data index information corresponding to the target subscription data in the target storage network comprises: Generating fragment hash data corresponding to each data fragment in the plurality of data fragments; And carrying out aggregation processing on the fragment hash data corresponding to each data fragment to obtain a content addressing hash value corresponding to the target ordering data, and recording the content addressing hash value in the latest block in the block chain network.
- 9. The method of claim 8, wherein after generating the data index information corresponding to the target subscription data in the target storage network, the method further comprises: in response to the at least one node to be updated monitoring the latest block in the blockchain network, acquiring the target subscription data from the target storage network according to the content-addressable hash value; And carrying out data verification on the target subscription data through the intelligent contract in the at least one node to be updated, and updating the target subscription data in a local service database corresponding to the at least one node to be updated under the condition that verification is passed.
- 10. The method of claim 1, wherein prior to validating the data synchronization request by a requesting node corresponding to the data synchronization request in the plurality of containerized nodes of the blockchain network, the method further comprises: responding to a plurality of candidate data synchronous requests corresponding to the target subscription data, and performing version consistency verification on the plurality of candidate data synchronous requests; and under the condition that the version consistency check is not passed, making a decision on the plurality of candidate data synchronization requests according to a target decision condition through an intelligent contract to obtain the data synchronization requests, wherein the target decision condition comprises a first decision condition determined based on a time stamp and/or a second decision condition determined based on a service priority.
- 11. The method according to claim 1, wherein the method further comprises: Acquiring resource utilization indexes of a plurality of containerized nodes of the blockchain network; and performing capacity expansion or capacity contraction processing on the capacity of the plurality of containerized nodes according to the resource utilization index.
- 12. A data synchronization updating apparatus, comprising: A verification module configured to respond to a data synchronization request of target subscription data, and verify the data synchronization request through a request node corresponding to the data synchronization request in a plurality of containerized nodes of a blockchain network; a determining module configured to determine a plurality of consensus nodes based on configuration information of the plurality of containerized nodes, and perform consensus verification on the target subscription data through the plurality of consensus nodes, if the data synchronization request verification passes; a storage module configured to store the target subscription data in a target storage network if the consensus verification passes; the generation module is configured to generate data index information corresponding to the target subscription data in the target storage network, wherein the data index information is used for updating the target subscription data by at least one node to be updated.
- 13. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any one of claims 1 to 11.
- 14. An electronic device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 11 when executing the computer program.
- 15. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1 to 11.
Description
Data synchronous updating method and device, storage medium and electronic equipment Technical Field The present application relates to the field of data processing technologies, and in particular, to a method and apparatus for synchronously updating data, a storage medium, and an electronic device. Background The synchronous updating of the ordering relation data is a key link in multi-system collaboration (such as e-commerce, education platform, saaS service and the like), and the core aim is to ensure that the ordering behavior generated by a user in any channel (such as Web, app, applet and third party platform) can be reflected in all relevant systems in real time and consistently. At present, data synchronization updating relies on a centralized architecture platform to perform distributed data collaboration among different nodes, however, by using the method, only a single encryption means is relied on to encrypt mechanical energy data in the data synchronization process, so that the situation of being attacked or tampered with data easily occurs in the data synchronization process, and the data security in the centralized architecture platform is influenced. Disclosure of Invention In view of this, the present application provides a method, an apparatus, a storage medium and an electronic device for data synchronization, which are mainly aimed at improving the technical problem that in the prior art, only a single encryption means is relied on to encrypt mechanical energy data in the process of data synchronization, so that attack or data tampering easily occurs in the process of data synchronization, and the data security in a centralized architecture platform is affected. In a first aspect, the present application provides a method for synchronously updating data, including: Responding to a data synchronization request of target subscription data, and verifying the data synchronization request through a request node corresponding to the data synchronization request in a plurality of containerized nodes of a blockchain network; determining a plurality of consensus nodes based on configuration information of the plurality of containerized nodes under the condition that the data synchronization request passes verification, and performing consensus verification on the target subscription data through the plurality of consensus nodes; Storing the target subscription data in a target storage network under the condition that the consensus verification is passed; and generating data index information corresponding to the target ordering data in the target storage network, wherein the data index information is used for updating the target ordering data by at least one node to be updated. Optionally, in the case that the data synchronization request passes verification, determining a plurality of consensus nodes based on configuration information of the plurality of containerized nodes, and performing consensus verification on the target subscription data through the plurality of consensus nodes includes: Determining a request consensus node from the plurality of containerized nodes based on configuration information of the plurality of containerized nodes if the data synchronization request passes verification; Determining at least one consensus verification node corresponding to the request consensus node; Requesting, by the requesting consensus node, the at least one consensus verification node to perform a consensus verification on the target subscription data. Optionally, in the case that the data synchronization request passes verification, determining a request consensus node from the plurality of containerized nodes based on configuration information of the plurality of containerized nodes includes: Determining the mortgage weight data and/or the historical reputation scoring data of the plurality of containerized nodes in the current consensus period under the condition that the data synchronization request passes verification; and selecting the request consensus node from the plurality of containerized nodes by using a rights and interests proving mechanism according to the mortgage weight data and/or the historical reputation scoring data. Optionally, determining at least one consensus verification node corresponding to the request consensus node includes: Determining node load data and node network topology information corresponding to the plurality of containerized nodes; And selecting at least one consensus verification node corresponding to the request consensus node from the plurality of containerized nodes according to the node load data and the node network topology information. Optionally, requesting, by the requesting consensus node, the at least one consensus verification node to perform consensus verification on the target subscription data, including: generating consensus verification information corresponding to the data synchronization request through the request consensus node; Bro