Data processing method and device of blockchain network, computer device and medium
By introducing a periodic data publishing mechanism into the blockchain network, the problems of service instability and high access overhead caused by frequent polling are solved, achieving more efficient data access and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-03-23
- Publication Date
- 2026-07-10
AI Technical Summary
Existing blockchain networks suffer from service instability and excessive access overhead due to frequent polling by business systems.
By adopting a periodic data publishing mechanism, business nodes acquire and publish business data generated in the blockchain network at fixed time points, enabling business systems to access data within the corresponding period after the publication time point, thus reducing frequent polling.
It improves the stability of the blockchain network, reduces the frequency and overhead of accessing business data, and enhances system availability.
Smart Images

Figure CN116846956B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, computer equipment, and medium for a blockchain network. Background Technology
[0002] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and to generate the next block.
[0003] In existing applications, blockchain networks can serve multiple business systems. These systems can continuously poll the blockchain network to check for new blocks. If new blocks are generated, they can access or retrieve them. However, this frequent polling by multiple business systems puts immense pressure on the blockchain, leading to unstable service and high overhead. Summary of the Invention
[0004] This application provides a data processing method, apparatus, computer equipment, and medium for a blockchain network, which can improve the stability of the blockchain network and reduce the access overhead for business data in the blockchain network.
[0005] This application provides a data processing method for a blockchain network, the method comprising:
[0006] When the first release time point for business data is reached, retrieve the business data generated in the first release period corresponding to the first release time point in the blockchain network.
[0007] Publish business data generated within the first release period to the business system, enabling the business system to access the business data generated within the first release period after the first release time point.
[0008] This application provides a data processing device for a blockchain network, the device comprising:
[0009] The acquisition module is used to acquire business data generated in the first release period corresponding to the first release time point in the blockchain network when the first release time point for business data is reached.
[0010] The publishing module is used to publish business data generated within the first publishing cycle to the business system, enabling the business system to access the business data generated within the first publishing cycle after the first publishing time point.
[0011] Optionally, the next release time after the first release time is the second release time; the above-mentioned device is also used for:
[0012] Get real-time access requests sent by the business system; real-time access requests are used to request real-time access to business data in the blockchain network.
[0013] Generate real-time access credentials for the business system based on the real-time access request, and return the real-time access credentials to the business system.
[0014] The business system is used to access business data generated in the blockchain network within the target time interval based on real-time access credentials before the second release time point is reached; the target time interval refers to the time interval formed by the first release time point and the second release time point.
[0015] Optionally, the next release time after the first release time is the second release time; the above-mentioned device is also used for:
[0016] If a first access request for accessing business data generated within the target time interval is received from the business system before the second release time point, an access failure message is generated based on the first access request; the target time interval refers to the time interval consisting of the first release time point and the second release time point.
[0017] The system will return an access failure message to the business system.
[0018] Optionally, the above-mentioned device is also used for:
[0019] Obtain the second access request sent by the business system before the second release time point; the second access request carries the data identifier of the business data to be accessed;
[0020] If the target business data indicated by the data identifier is business data generated in the blockchain network before the first publication time point, then the target business data will be returned to the business system.
[0021] Optionally, after publishing the business data generated during the first publishing cycle to the business system, the above-mentioned device is further used for:
[0022] Generate a first release success message; the first release success message includes the first release period and the second release time point, the second release time point being the next release time point after the first release time point;
[0023] Return a success message to the business system after the first release;
[0024] The first release success message is used to prompt the business system to access the business data generated within the first release period before the second release time point is reached; the first release success message is also used to prompt the business system to access the business data generated in the blockchain network between the first release time point and the second release time point when the second release time point is reached.
[0025] Optionally, the above-mentioned device is also used for:
[0026] Before reaching the first release time point, obtain a data release contract for business data of at least one data type;
[0027] The release time point for each type of business data is determined according to the data release contract.
[0028] Optionally, the next release time after the first release time is the second release time; the above-mentioned device is also used for:
[0029] When the second release time point is reached, obtain the business data generated in the second release period corresponding to the second release time point in the blockchain network;
[0030] The system publishes business data generated during the second release cycle to the business system, enabling the business system to access business data generated during the first and second release cycles after the second release time point.
[0031] Optionally, after publishing the business data generated during the second publishing cycle to the business system, the above-mentioned device is further used for:
[0032] Generate a second release success message; the second release success message includes the second release period and the third release time point, the third release time point being the next release time point after the second release time point;
[0033] The system will return a success message for the second release.
[0034] The second release success message is used to prompt the business system to access the business data generated within the second release period before reaching the third release time point; the second release success message is also used to prompt the business system to access the business data generated in the blockchain network between the second release time point and the third release time point when reaching the third release time point.
[0035] Optionally, the next release time after the first release time is the second release time; the above-mentioned device is also used for:
[0036] If the pending business data needs to be reviewed before the second release time point, the second release time point will be postponed to the target release time point; pending business data includes business data generated in the blockchain network between the first release time point and the second release time point;
[0037] When the pending business data has passed the review and the target release time has arrived, the approved pending business data is released to the business system.
[0038] Optionally, the blockchain network includes a business network and a consensus network. The consensus network is used to reach a consensus on the business data submitted in the blockchain network. The method is executed by lightweight nodes in the business network. The business data that the lightweight nodes have is the business data that has passed the consensus provided by the consensus network.
[0039] This application provides a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the method of this application.
[0040] This application provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method described above.
[0041] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative embodiments described above.
[0042] When the first publication time point for business data is reached, this application can obtain the business data generated within the first publication period corresponding to the first publication time point in the blockchain network; and can publish the business data generated within the first publication period to the business system, enabling the business system to access the business data generated within the first publication period after the first publication time point. Therefore, this application can periodically publish business data to the business system, allowing the business system to access the published business data after the publication time point without constantly polling the business data generated in the blockchain network. This improves the business stability of the blockchain network and reduces the overhead of accessing business data within the blockchain network. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a schematic diagram of a network architecture for business processing provided in this application;
[0045] Figure 2 This is a schematic diagram of a data publishing scenario provided in this application;
[0046] Figure 3 This is a flowchart illustrating a data processing method for a blockchain network provided in this application;
[0047] Figure 4 This is a schematic diagram of a data acquisition scenario provided in this application;
[0048] Figure 5 This is a schematic diagram of a data access scenario provided in this application;
[0049] Figure 6 This is a schematic diagram of a data access scenario provided in this application;
[0050] Figure 7 This is a schematic diagram of a data processing scenario provided in this application;
[0051] Figure 8 This is a schematic diagram of a data interaction scenario provided in this application;
[0052] Figure 9 This is a schematic diagram of the structure of a data processing device for a blockchain network provided in this application;
[0053] Figure 10 This is a schematic diagram of the structure of a computer device provided in this application. Detailed Implementation
[0054] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0055] This application relates to blockchain-related technologies. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer. A blockchain consists of a series of blocks sequentially generated in chronological order. Once a new block is added to the blockchain, it cannot be removed. Each block records the data submitted by nodes in the blockchain system.
[0056] This application also relates to cloud technology. Cloud technology refers to a managed technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to realize the computing, storage, processing, and sharing of data.
[0057] Cloud technology is a general term encompassing network technology, information technology, integration technology, management platform technology, and application technology applied to cloud computing business models. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing. The cloud technology mentioned in this application refers to the data interaction between business systems and blockchain networks via the "cloud."
[0058] The relevant concepts involved in this application are described herein:
[0059] P2P network: A peer-to-peer network based on a specific network protocol. Instead of a central node to maintain the network state, each node maintains the overall network state or the connection state of its neighboring nodes through broadcast interactions with neighboring nodes.
[0060] SPV nodes: Lightweight nodes that do not save all transactions or download the entire block when verifying the existence of transactions; they only save the block header.
[0061] Optionally, SPV nodes can be used in the following scenarios: 1. Verifying payments in light wallets through SPV nodes; 2. In two-way pegging of sidechains, the main chain and the sidechain verify a specific transaction through SPV nodes to ensure that the transaction has indeed been paid, allowing one party to lock assets and the other party to transfer assets.
[0062] Please see Figure 1 , Figure 1 This is a schematic diagram of a network architecture for service processing provided in this application. For example... Figure 1 As shown, this network architecture can include a business network and a consensus network. The business network can include multiple business nodes, and the consensus network can include multiple consensus nodes. These two networks constitute a layered blockchain network, meaning they are not in the same network environment to protect the security of the consensus network. This network architecture can also include several business systems that can interact with the business nodes in the business network.
[0063] Both business nodes and consensus nodes can consist of one or more servers. These servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminal devices can be smart terminals such as smartphones, tablets, laptops, desktop computers, and smart TVs.
[0064] Please see also Figure 2 , Figure 2 This is a schematic diagram illustrating a data publishing scenario provided in this application. For example... Figure 2As shown, this example uses any one business node in the aforementioned business network. A business node can publish business data for the corresponding publication period to various business systems at each publication time point. For instance, a business node can publish business data for the first publication period (i.e., business data generated in the blockchain network during the first publication period) at the first publication time point, which could be the end time of the first publication period. Similarly, a business node can publish business data for the second publication period (i.e., business data generated in the blockchain network during the second publication period) at the second publication time point, which could be the end time of the second publication period. Likewise, a business node can publish business data for the third publication period (i.e., business data generated in the blockchain network during the third publication period) at the third publication time point, which could be the end time of the third publication period, and so on. The business data published by the business node can be business data that has been consensus-driven and uploaded to the blockchain by the consensus network.
[0065] Subsequently, each business system can access (e.g., pull or view) the business data published by the business system. For example, each business system can access the business data published by the business node within the first release period after the first release time point. Each business system can also access the business data published by the business node within the first and second release periods after the second release time point. Each business system can also access the business data published by the business node within the first, second, and third release periods after the third release time point.
[0066] As can be seen from the above process, by using the method provided in this application, each business system can periodically access the business data published by the business node at each publication time point. Before the next publication time point arrives, each business system does not need to constantly poll the business node to see if new data has been generated. By publishing data in this periodic rental form, the frequency of data access by the business system to the business node can be reduced, the stability of the business network can be improved, and the access overhead between the business system and the business network can be reduced.
[0067] Please see Figure 3 , Figure 3 This is a flowchart illustrating a data processing method for a blockchain network provided in this application. Figure 3 As shown, the method may include:
[0068] Step S101: When the first release time point for business data is reached, obtain the business data generated in the first release period corresponding to the first release time point in the blockchain network.
[0069] Optionally, the blockchain network may include a business network (also known as a witness network) and a consensus network (also known as a core network). The business network may include several business nodes. Optionally, the business network can be a p2p network (peer-to-peer network), and the business nodes in the business network can be lightweight nodes (such as SPV nodes) or other types of blockchain nodes. The number of business nodes in the business network can be determined based on the actual application scenario. The consensus network may include several consensus nodes. These consensus nodes are mainly used to reach consensus on the business data submitted in the blockchain network (such as transaction data from a business system). The business data held by the business nodes in the business network can be the business data provided by the consensus network after consensus has been passed. The consensus network can also be a p2p network, and the number of consensus nodes in the consensus network can be determined based on the actual application scenario.
[0070] In this application, both business nodes and consensus nodes are blockchain nodes within the blockchain network. Each blockchain node can consist of one or more computer devices, which can be terminal devices or servers. Therefore, it can be understood that the executing entity in this application can be any business node in the business network, meaning that all business nodes operate on the same principle. The executing entity in this application will be collectively referred to as a business node below.
[0071] Business systems can communicate with business nodes to access (e.g., pull or view) business data generated in the blockchain network (this generated business data can refer to the business data provided to business nodes after consensus is reached by the consensus network). For example, a business node can be a lightweight node, and the business data accessed by the business system can be invoice data. Here, "business system" can refer to a client system, which can reside on a user's device (e.g., a user's terminal device). The blockchain network can be understood as a backend network that provides business services to the business system.
[0072] There may be one or more business systems, and the specific number of business systems is determined based on the actual application scenario and is not limited thereto. In this application, the data interaction between a business node and a business system (such as access after data publication) is used as an example for illustration. It can be understood that the data interaction principle between a business node and any business system is the same and independent.
[0073] Business nodes can periodically publish business data generated in the blockchain network, enabling business systems to access the periodically published business data. For details, please refer to the following description.
[0074] When the first release time for business data is reached, the business node can obtain the business data generated in the first release period corresponding to the first release time in the blockchain network. The first release time can refer to any time point when business data needs to be released (which can be called the release time point or period time point), and the first release period corresponding to the first release time point can refer to the release period to which the business data released at the first release time point belongs.
[0075] For example, if business data needs to be published every hour (i.e., the cycle length is 1 hour), and the initialization starts from 1 o'clock, that is, the timer starts from 1 o'clock, then 2 o'clock can be used as the first publication time point. The first publication cycle corresponding to the first publication time point (i.e., 2 o'clock) can refer to the cycle from 1 o'clock to 2 o'clock (which can be called the publication cycle). The business data generated within the first publication cycle can refer to the business data generated within the blockchain network from 1 o'clock to 2 o'clock.
[0076] Therefore, the next release time point could be 3 o'clock, the next release time point could be 4 o'clock, and so on. The business processing logic is the same at each release time point. Therefore, this application uses the business processing logic at the first release time point as an example for explanation. The first release time point can be any release time point.
[0077] Therefore, upon reaching the aforementioned first release time point, the business node can obtain the business data generated within the first release cycle corresponding to the first release time point.
[0078] Specifically, business nodes can obtain business data generated within the first release period corresponding to the first release time point through the block height. For example, if the highest block height in the blockchain network at the previous release time point is h1 and the highest block height in the blockchain network at the first release time point is h2, then the business node can obtain block data (which includes business data) with block heights between h1 and h2 for release.
[0079] Optionally, before a business node begins publishing business data (such as before the first publishing time point mentioned above), the process by which the business node determines the publishing time and period for the business data can be as follows:
[0080] Business nodes can obtain data publishing contracts (a type of smart contract, which can be loaded onto business nodes by administrators through a management platform) for business data of at least one data type. The specific number and types of business data types can be determined based on the actual application scenario and are not limited thereto.
[0081] The data publishing contract is configured with publishing logic for each type of business data among the above-mentioned at least one type of business data. The publishing logic may include the publishing time point and publishing cycle of the business data.
[0082] Therefore, business nodes can determine the corresponding publication time points for each type of business data based on the aforementioned data publication contract. The publication time points and publication cycles (collectively referred to as publication logic) for different data types can be the same or different, depending on the actual application scenario. It is understandable that the principle for publishing business data of each data type is the same and independent of each other. In other words, business nodes can generate the publication time points (i.e., the nodes of the publication cycle) for various data types of business data locally based on the data publication contract.
[0083] Therefore, the business data acquired by the aforementioned business nodes within the first release period corresponding to the first release time point can be business data of any data type. This application uses the release process of business data of any data type as an example for illustration.
[0084] Furthermore, it is understandable that there may be multiple types of business data with the same release time (such as the first release time) and release period (such as the first release period). Therefore, the business data obtained by the above-mentioned business nodes within the first release period corresponding to the first release time may include business data of multiple data types. These multiple types of business data may be obtained separately and released separately in the future.
[0085] Alternatively, the next publication time point after the first publication time point can be referred to as the second publication time point. If the pending business data needs to be reviewed after reaching the first publication time point but before reaching the second publication time point, the next publication time for the pending business data (such as the second publication time point) can be postponed. For example, the second publication time point can be postponed to a target publication time point, which can be any time point after the second publication time point. This target publication time point can be determined according to the actual application scenario and is not restricted. The pending business data can include business data generated in the blockchain network between the first and second publication time points.
[0086] For example, if the second release time is 3 o'clock, the second release time can be delayed by half an hour so that the target release time can be 3:30.
[0087] By postponing the second release date, it is easier to review the pending business data. Therefore, after postponing the second release date, the pending business data can be reviewed, such as whether the pending business data is legal and complete.
[0088] Therefore, once the pending business data has passed review (e.g., the data is deemed valid / complete) and the target release time has arrived, the business node can release the approved pending business data to the business system. The second release time can be postponed to the target release time by adjusting the parameters in the data release contract.
[0089] Optionally, if the pending business data fails the review, the pending business data can be left unpublished. Instead, the pending business data can be corrected, and after the correction is completed, the pending business data can be put on the blockchain and subsequently published again.
[0090] Therefore, the method provided in this application can also meet the business scenarios of reviewing business data, making the review process of business data easier and more convenient.
[0091] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating a data acquisition scenario provided in this application. Assuming a release cycle lasts one hour, and the data release process is initialized starting at 1:00, then 2:00 can be considered a release time point. The release cycle corresponding to 2:00 is release cycle 1. If 2:00 is taken as the first release time point, and release cycle 1 (i.e., 1:00 to 2:00) is taken as the first release cycle, and the highest block height in the blockchain network is 100 at 1:00 and 200 at 2:00, then the business node can obtain the business data generated within release cycle 1 (i.e., the business data contained in blocks with block heights of 100 to 200).
[0092] Next, 3:00 can also be used as a release time point. The release period corresponding to 3:00 is release period 2. If 3:00 is taken as the first release time point, and release period 2 (i.e., 2:00 to 3:00) is taken as the first release period, and the highest block height in the blockchain network at 3:00 is 300, then the business nodes can obtain the business data generated within release period 2 (i.e., the business data contained in the block data with block heights of 200 to 300). And so on.
[0093] Optionally, the block data may include transaction data from the business system, and the business data included in the block data may refer to the invoice data of the business system in the transaction data.
[0094] Step S102: Publish the business data generated within the first publication period to the business system, so that the business system can access the business data generated within the first publication period after the first publication time point.
[0095] Optionally, business nodes can publish the business data generated within the first publication period to the business system, enabling the business system to access (pull) the published business data generated within the first publication period after the first publication time point. For example, the business data could be invoice data from the business system; the business system can pull its own invoice data and perform subsequent business processing on it, such as reviewing business transactions using the invoice data.
[0096] After the business node publishes the business data generated within the first publication cycle to the business system, it can generate a first publication success message. This first publication success message includes the first publication cycle and the second publication time point, which refers to the next publication time point after the first publication time point.
[0097] The business node can return the first successful publication notification message to the business system. This first successful publication notification message can serve as a data publication credential. It may also include a combination of nonce (an arbitrary or non-repeating random value used only once) and the business node's HMAC value (message authentication code). This nonce combination and the business node's HMAC value prove that the first successful publication notification message was published by the business node; they can be understood as the business node's identity verification information.
[0098] The first release success notification message indicates that the business system can access business data generated within the first release period before the second release time point. This message also indicates that the business system can access business data generated in the blockchain network between the first and second release time points upon reaching the second release time point. This eliminates the need for the business system to poll the blockchain network for new business data generated after the first release time point and before the second release time point, reducing the frequency of blockchain network access, preventing resource consumption from high-frequency polling, and improving the overall system service availability.
[0099] Furthermore, as described above, business systems typically can access business data published by business nodes, but cannot access unpublished business data. Therefore, in this application, when certain business systems require immediate access to business data, they can request to register a real-time access credential with the business node (registration can be done through the aforementioned data publishing contract). This credential can then be used to access the latest business data generated in the blockchain network. This process may include:
[0100] The business system can send a real-time access request to the business node, and the business node can obtain the real-time access request sent by the business system. This real-time access request is used to request real-time access to business data in the blockchain network.
[0101] Therefore, the business node can verify the system identity of the business system that submitted the real-time access request through the real-time access request. If the verification is successful, a real-time access credential for the business system can be generated. This real-time access credential can be generated using the private key of the business system, and the business node can return the real-time access credential to the business system.
[0102] Subsequently, the business system can access the business data generated within a target time interval in the blockchain network using the real-time access credential after reaching the first release time point and before reaching the second release time point. This target time interval can refer to the time interval formed by the first and second release time points. In other words, the business system can access the latest real-time generated business data in the blockchain network using the real-time access credential it holds.
[0103] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating a data access scenario provided in this application. For example... Figure 5 As shown, ① a business system can request to register for real-time access services from business nodes in the business network, such as by sending a real-time access request to a business node; ② after receiving the registration request, a business node can verify the identity of the business system that sent the request. If the identity verification of the business system is successful, the business node can generate a real-time access credential for the business system using the business system's private key, and then return the real-time access credential to the business system.
[0104] Furthermore, ③ the business system can request access to real-time data (such as business data generated in real time but not yet published in the blockchain network) by using the real-time access credentials it holds; ④ the business nodes in the business network can then return the real-time data they accessed to the business system.
[0105] If the business system has not registered the aforementioned real-time access credentials, and before the second publication time point, receives an access request (referred to as the first access request) from the business system for accessing business data generated within the target time interval, the business node can generate an access failure message based on the first access request and return the generated access failure message to the business system. This access failure message can be used to indicate to the business system that the business data within the target time interval has not yet been published and cannot be accessed.
[0106] Furthermore, business nodes can also obtain a second access request sent by the business system before the second publication time point. This second access request carries a data identifier of the business data that the business system needs to access. The business data indicated by this data identifier (i.e., the business data that the business system wants to access) can be referred to as the target business data. If the target business data is business data generated in the blockchain network before the first publication time point, the business node can obtain the target business data and return the obtained business data to the business system. This process indicates that the business system can successfully access any business data published before the latest publication time point (such as the first publication time point).
[0107] Please see Figure 6 , Figure 6 This is a schematic diagram illustrating a data access scenario provided in this application. For example... Figure 6 As shown, publication time point 2 can be the first publication time point mentioned above, and publication time point 3 can be the second publication time point mentioned above. If the current time is between publication time point 2 and publication time point 3, that is, the current time exceeds publication time point 2 but has not yet reached publication time point 3, then non-real-time access business systems (i.e., business systems that have not registered real-time access credentials) can access business data published by business nodes before publication time point 2, while real-time access business systems (i.e., business systems that have registered real-time access credentials) can access any business data generated before the current time.
[0108] Furthermore, the next release time after the first release time is the second release time. Therefore, when the second release time is reached, the business nodes can also obtain the business data generated in the second release cycle corresponding to the second release time in the blockchain network.
[0109] Business nodes can also publish business data generated during the second release cycle to the business system, so that the business system can access the business data generated during the first release cycle and the business data generated during the second release cycle after the second release time point.
[0110] Similarly, after a business node publishes the business data generated during the second publication cycle to the business system, it can generate a second publication success message. This message includes the second publication cycle and the third publication time point, which refers to the next publication time point after the second publication time point.
[0111] The business node can return the second successful publication notification message to the business system. This second successful publication notification message can also serve as a data publication credential. The first successful publication notification message can also include a combination of nonce (an arbitrary or non-repeating random value used only once) and the business node's HMAC value (message authentication code). This nonce combination and the business node's HMAC value are used to prove that the second successful publication notification message was published by the business node; they can be understood as the business node's identity verification information.
[0112] The second release success notification message indicates that the business system can access business data generated within the second release period before the third release time point. This message also indicates that the business system can access business data generated in the blockchain network between the second and third release time points upon reaching the third release time point. This eliminates the need for the business system to poll the blockchain network for new business data generated between the second and third release time points, thus reducing the frequency of blockchain network access.
[0113] Please see Figure 7 , Figure 7 This is a schematic diagram of a data processing scenario provided in this application. For example... Figure 7 As shown, each consensus node can reach a consensus on the business data submitted in the blockchain network, and then provide the business data that has passed consensus to the various business nodes for on-chain processing. Each business node contains a business publishing contract (i.e., the aforementioned data publishing contract), through which the publishing logic (such as publishing time and publishing cycle) corresponding to various types of business data can be determined. Therefore, business nodes can periodically publish business data to the business system according to the publishing logic corresponding to each type of business data, enabling the business system to access the business data published by the business nodes.
[0114] Please see Figure 8 , Figure 8 This is a schematic diagram illustrating a data interaction scenario provided in this application. For example... Figure 8As shown, a routing proxy network can separate the business network from the core network (i.e., the consensus network), and the network environments of the business network, core network, and routing proxy network can be isolated from each other. The business network contains several business nodes, the core network contains several core nodes (i.e., consensus nodes), and the routing proxy network contains several proxy nodes.
[0115] The business network can interface with the front-end business systems to exchange data and execute corresponding business operations (such as a business system requesting access to business data from a business node). The core network, on the other hand, performs consensus on data that needs to be uploaded to the blockchain. To ensure the security of the core network, it typically does not directly interface with the front-end business systems. The business network and the core network can communicate and interact through proxy nodes in a routing proxy network, which further enhances the security of the core network.
[0116] When the first publication time point for business data is reached, this application can obtain the business data generated within the first publication period corresponding to the first publication time point in the blockchain network; and can publish the business data generated within the first publication period to the business system, enabling the business system to access the business data generated within the first publication period after the first publication time point. Therefore, this application can periodically publish business data to the business system, allowing the business system to access the published business data after the publication time point without constantly polling the business data generated in the blockchain network. This improves the business stability of the blockchain network and reduces the overhead of accessing business data within the blockchain network.
[0117] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a data processing device for a blockchain network provided in this application. The data processing device for the blockchain network can be a computer program (including program code) running on a computer device; for example, the data processing device for the blockchain network is an application software. This data processing device for the blockchain network can be used to execute the corresponding steps in the methods provided in the embodiments of this application. Figure 9 As shown, the data processing device 1 of the blockchain network may include: an acquisition module 11 and a publishing module 12;
[0118] The acquisition module 11 is used to acquire business data generated in the first release period corresponding to the first release time point in the blockchain network when the first release time point for business data is reached.
[0119] The publishing module 12 is used to publish business data generated within the first publishing cycle to the business system, enabling the business system to access the business data generated within the first publishing cycle after the first publishing time point.
[0120] Optionally, the next release time after the first release time is the second release time; the aforementioned device 1 is also used for:
[0121] Get real-time access requests sent by the business system; real-time access requests are used to request real-time access to business data in the blockchain network.
[0122] Generate real-time access credentials for the business system based on the real-time access request, and return the real-time access credentials to the business system.
[0123] The business system is used to access business data generated in the blockchain network within the target time interval based on real-time access credentials before the second release time point is reached; the target time interval refers to the time interval formed by the first release time point and the second release time point.
[0124] Optionally, the next release time after the first release time is the second release time; the aforementioned device 1 is also used for:
[0125] If a first access request for accessing business data generated within the target time interval is received from the business system before the second release time point, an access failure message is generated based on the first access request; the target time interval refers to the time interval consisting of the first release time point and the second release time point.
[0126] The system will return an access failure message to the business system.
[0127] Optionally, the above-mentioned device 1 is also used for:
[0128] Obtain the second access request sent by the business system before the second release time point; the second access request carries the data identifier of the business data to be accessed;
[0129] If the target business data indicated by the data identifier is business data generated in the blockchain network before the first publication time point, then the target business data will be returned to the business system.
[0130] Optionally, after publishing the business data generated during the first publishing cycle to the business system, the above-mentioned device is further used for:
[0131] Generate a first release success message; the first release success message includes the first release period and the second release time point, the second release time point being the next release time point after the first release time point;
[0132] Return a success message to the business system after the first release;
[0133] The first release success message is used to prompt the business system to access the business data generated within the first release period before the second release time point is reached; the first release success message is also used to prompt the business system to access the business data generated in the blockchain network between the first release time point and the second release time point when the second release time point is reached.
[0134] Optionally, the above-mentioned device 1 is also used for:
[0135] Before reaching the first release time point, obtain a data release contract for business data of at least one data type;
[0136] The release time point for each type of business data is determined according to the data release contract.
[0137] Optionally, the next release time after the first release time is the second release time; the above-mentioned device is also used for:
[0138] When the second release time point is reached, obtain the business data generated in the second release period corresponding to the second release time point in the blockchain network;
[0139] The system publishes business data generated during the second release cycle to the business system, enabling the business system to access business data generated during the first and second release cycles after the second release time point.
[0140] Optionally, after publishing the business data generated during the second publishing cycle to the business system, the aforementioned device 1 is further used for:
[0141] Generate a second release success message; the second release success message includes the second release period and the third release time point, the third release time point being the next release time point after the second release time point;
[0142] The system will return a success message for the second release.
[0143] The second release success message is used to prompt the business system to access the business data generated within the second release period before reaching the third release time point; the second release success message is also used to prompt the business system to access the business data generated in the blockchain network between the second release time point and the third release time point when reaching the third release time point.
[0144] Optionally, the next release time after the first release time is the second release time; the aforementioned device 1 is also used for:
[0145] If the pending business data needs to be reviewed before the second release time point, the second release time point will be postponed to the target release time point; pending business data includes business data generated in the blockchain network between the first release time point and the second release time point;
[0146] When the pending business data has passed the review and the target release time has arrived, the approved pending business data is released to the business system.
[0147] Optionally, the blockchain network includes a business network and a consensus network. The consensus network is used to reach a consensus on the business data submitted in the blockchain network. The method is executed by lightweight nodes in the business network. The business data that the lightweight nodes have is the business data that has passed the consensus provided by the consensus network.
[0148] According to one embodiment of this application, Figure 3 The steps involved in the data processing method of the blockchain network shown can be derived from... Figure 9 The data processing unit 1 of the blockchain network shown is used to execute this process. For example, Figure 3 Step S101 shown can be performed by Figure 9 The acquisition module 11 in the middle is used to execute, Figure 3 Step S102 shown can be performed by Figure 9 The publishing module 12 in the middle is used to execute.
[0149] When the first publication time point for business data is reached, this application can obtain the business data generated within the first publication period corresponding to the first publication time point in the blockchain network; and can publish the business data generated within the first publication period to the business system, enabling the business system to access the business data generated within the first publication period after the first publication time point. Therefore, this application can periodically publish business data to the business system, allowing the business system to access the published business data after the publication time point without constantly polling the business data generated in the blockchain network. This improves the business stability of the blockchain network and reduces the overhead of accessing business data within the blockchain network.
[0150] According to one embodiment of this application, Figure 9The modules in the data processing device 1 of the blockchain network shown can be individually or entirely merged into one or more units, or some of these units can be further divided into multiple functionally smaller sub-units to achieve the same operation without affecting the technical effects of the embodiments of this application. The above modules are based on logical function division. In practical applications, the function of one module can be implemented by multiple units, or the function of multiple modules can be implemented by one unit. In other embodiments of this application, the data processing device 1 of the blockchain network may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.
[0151] According to one embodiment of this application, a general-purpose computer device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), can perform operations such as... Figure 3 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 9 The data processing apparatus 1 of the blockchain network shown herein, and the data processing method for implementing the blockchain network according to the embodiments of this application. The computer program described above may be recorded on, for example, a computer-readable recording medium, loaded onto the computing device via the computer-readable recording medium, and run therein.
[0152] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided in this application. For example... Figure 10 As shown, the computer device 1000 may include a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer device 1000 may also include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 10 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
[0153] exist Figure 10 In the computer device 1000 shown, the network interface 1004 provides network communication functionality; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:
[0154] When the first release time point for business data is reached, retrieve the business data generated in the first release period corresponding to the first release time point in the blockchain network.
[0155] Publish business data generated within the first release period to the business system, enabling the business system to access the business data generated within the first release period after the first release time point.
[0156] In one possible implementation, the next release time point after the first release time point is the second release time point; the processor 1001 can also be used to call the device control application stored in the memory 1005 to achieve:
[0157] Get real-time access requests sent by the business system; real-time access requests are used to request real-time access to business data in the blockchain network.
[0158] Generate real-time access credentials for the business system based on the real-time access request, and return the real-time access credentials to the business system.
[0159] The business system is used to access business data generated in the blockchain network within the target time interval based on real-time access credentials before the second release time point is reached; the target time interval refers to the time interval formed by the first release time point and the second release time point.
[0160] In one possible implementation, the next release time point after the first release time point is the second release time point; the processor 1001 can also be used to call the device control application stored in the memory 1005 to achieve:
[0161] If a first access request for accessing business data generated within the target time interval is received from the business system before the second release time point, an access failure message is generated based on the first access request; the target time interval refers to the time interval consisting of the first release time point and the second release time point.
[0162] The system will return an access failure message to the business system.
[0163] In one possible implementation, the processor 1001 can also be used to invoke a device control application stored in the memory 1005 to achieve:
[0164] Obtain the second access request sent by the business system before the second release time point; the second access request carries the data identifier of the business data to be accessed;
[0165] If the target business data indicated by the data identifier is business data generated in the blockchain network before the first publication time point, then the target business data will be returned to the business system.
[0166] In one possible implementation, after publishing the business data generated during the first publishing cycle to the business system, the processor 1001 can also be used to call the device control application stored in the memory 1005 to achieve:
[0167] Generate a first release success message; the first release success message includes the first release period and the second release time point, the second release time point being the next release time point after the first release time point;
[0168] Return a success message to the business system after the first release;
[0169] The first release success message is used to prompt the business system to access the business data generated within the first release period before the second release time point is reached; the first release success message is also used to prompt the business system to access the business data generated in the blockchain network between the first release time point and the second release time point when the second release time point is reached.
[0170] In one possible implementation, the processor 1001 can also be used to invoke a device control application stored in the memory 1005 to achieve:
[0171] Before reaching the first release time point, obtain a data release contract for business data of at least one data type;
[0172] The release time point for each type of business data is determined according to the data release contract.
[0173] In one possible implementation, the next release time point after the first release time point is the second release time point; the processor 1001 can also be used to call the device control application stored in the memory 1005 to achieve:
[0174] When the second release time point is reached, obtain the business data generated in the second release period corresponding to the second release time point in the blockchain network;
[0175] The system publishes business data generated during the second release cycle to the business system, enabling the business system to access business data generated during the first and second release cycles after the second release time point.
[0176] In one possible implementation, after publishing the business data generated during the second publishing cycle to the business system, the processor 1001 can also be used to call the device control application stored in the memory 1005 to achieve:
[0177] Generate a second release success message; the second release success message includes the second release period and the third release time point, the third release time point being the next release time point after the second release time point;
[0178] The system will return a success message for the second release.
[0179] The second release success message is used to prompt the business system to access the business data generated within the second release period before reaching the third release time point; the second release success message is also used to prompt the business system to access the business data generated in the blockchain network between the second release time point and the third release time point when reaching the third release time point.
[0180] In one possible implementation, the next release time point after the first release time point is the second release time point; the processor 1001 can also be used to call the device control application stored in the memory 1005 to achieve:
[0181] If the pending business data needs to be reviewed before the second release time point, the second release time point will be postponed to the target release time point; pending business data includes business data generated in the blockchain network between the first release time point and the second release time point;
[0182] When the pending business data has passed the review and the target release time has arrived, the approved pending business data is released to the business system.
[0183] In one possible implementation, the blockchain network includes a business network and a consensus network. The consensus network is used to reach a consensus on the business data submitted in the blockchain network. The method is executed by lightweight nodes in the business network. The business data held by the lightweight nodes is the business data that has passed the consensus provided by the consensus network.
[0184] It should be understood that the computer device 1000 described in the embodiments of this application can execute the foregoing text. Figure 3 The description of the data processing method for the blockchain network in the corresponding embodiments can also be performed as described above. Figure 9 The description of the data processing device 1 for the blockchain network in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.
[0185] Furthermore, it should be noted that this application also provides a computer-readable storage medium storing a computer program executed by the data processing device 1 of the aforementioned blockchain network. The computer program includes program instructions, which, when executed by the processor, enable the execution of the aforementioned... Figure 3 The description of the data processing method for the blockchain network in the corresponding embodiments is therefore not repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer storage medium embodiments related to this application, please refer to the description of the method embodiments of this application.
[0186] As an example, the above program instructions can be deployed and executed on a single computer device, or deployed and executed on multiple computer devices located in one location, or executed on multiple computer devices distributed across multiple locations and interconnected via a communication network. Multiple computer devices distributed across multiple locations and interconnected via a communication network can form a blockchain network.
[0187] The aforementioned computer-readable storage medium can be a data processing device of the blockchain network provided in any of the foregoing embodiments, or an internal storage unit of the aforementioned computer device, such as a hard drive or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0188] This application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned... Figure 3 The data processing method for the blockchain network described in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer-readable storage medium embodiments related to this application, please refer to the description of the method embodiments of this application.
[0189] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.
[0190] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0191] The methods and related apparatuses provided in this application are described with reference to the method flowcharts and / or structural diagrams provided in this application. Specifically, each block of the method flowchart and / or structural diagram, as well as combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to create a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 A process or multiple processes and / or structures illustrate the steps of the functions specified in one or more boxes.
[0192] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A data processing method for a blockchain network, characterized in that, The method includes: When the first release time point for business data is reached, the business data generated in the blockchain network within the first release period corresponding to the first release time point is obtained; the next release time point after the first release time point is the second release time point. The business data generated during the first release period is published to the business system, so that the business system can access the business data generated during the first release period after the first release time point. Obtain the real-time access request sent by the business system; the real-time access request is used to request real-time access to business data in the blockchain network; Based on the real-time access request, a real-time access credential for the business system is generated, and the real-time access credential is returned to the business system. The business system is used to access business data generated in the blockchain network within a target time interval based on the real-time access credential before reaching the second release time point; the target time interval refers to the time interval formed by the first release time point and the second release time point.
2. The method according to claim 1, characterized in that, The method further includes: If a first access request for accessing business data generated within the target time interval is received by the business system before the second release time point, an access failure message is generated based on the first access request; the target time interval refers to the time interval formed by the first release time point and the second release time point. The access failure message is returned to the business system.
3. The method according to claim 2, characterized in that, The method further includes: Obtain the second access request sent by the business system before the second release time point; the second access request carries the data identifier of the business data to be accessed; If the target business data indicated by the data identifier is business data generated in the blockchain network before the first publication time point, then the target business data is returned to the business system.
4. The method according to claim 1, characterized in that, After publishing the business data generated during the first publishing cycle to the business system, the method further includes: Generate a first successful release notification message; the first successful release notification message includes the first release period and the second release time point; The first successful publication message is returned to the business system; The first successful release message is used to prompt the business system to access the business data generated within the first release period before reaching the second release time point; the first successful release message is also used to prompt the business system to access the business data generated in the blockchain network between the first release time point and the second release time point when reaching the second release time point.
5. The method according to claim 1, characterized in that, The method further includes: Before reaching the first publication time point, obtain a data publication contract for business data of at least one data type; The release time point corresponding to each type of business data is determined according to the data release contract.
6. The method according to claim 1, characterized in that, The method further includes: When the second release time point is reached, acquire the business data generated in the blockchain network within the second release period corresponding to the second release time point; The business system publishes the business data generated during the second publication period, enabling the business system to access the business data generated during the first publication period and the business data generated during the second publication period after the second publication time point.
7. The method according to claim 6, characterized in that, After publishing the business data generated during the second publishing cycle to the business system, the method further includes: Generate a second successful release message; the second successful release message includes the second release period and the third release time point, wherein the third release time point refers to the next release time point after the second release time point; The second successful publication message is returned to the business system; The second successful release message is used to prompt the business system to access the business data generated within the second release period before reaching the third release time point; the second successful release message is also used to prompt the business system to access the business data generated in the blockchain network between the second release time point and the third release time point when reaching the third release time point.
8. The method according to claim 1, characterized in that, The method further includes: If the pending business data needs to be reviewed before the second release time point, the second release time point will be postponed to the target release time point; the pending business data includes business data generated in the blockchain network between the first release time point and the second release time point; When the pending business data passes the review and the target release time is reached, the approved pending business data is released to the business system.
9. The method according to claim 1, characterized in that, The blockchain network includes a business network and a consensus network. The consensus network is used to reach a consensus on the business data submitted in the blockchain network. The method is executed by lightweight nodes in the business network. The business data held by the lightweight nodes is the business data provided by the consensus network after the consensus has been passed.
10. A data processing device for a blockchain network, characterized in that, The device includes: The acquisition module is used to acquire business data generated in the blockchain network within the first release period corresponding to the first release time point when the first release time point is reached; the next release time point after the first release time point is the second release time point; The publishing module is used to publish business data generated within the first publishing period to the business system, so that the business system can access the business data generated within the first publishing period after the first publishing time point. The device is further configured to: acquire a real-time access request sent by the business system; the real-time access request is used to request real-time access to business data in the blockchain network; generate a real-time access credential for the business system based on the real-time access request, and return the real-time access credential to the business system; The business system is used to access business data generated in the blockchain network within a target time interval based on the real-time access credential before reaching the second release time point; the target time interval refers to the time interval formed by the first release time point and the second release time point.
11. The apparatus according to claim 10, characterized in that, The blockchain network includes a business network and a consensus network. The consensus network is used to reach a consensus on the business data submitted in the blockchain network. The device is applied to a lightweight node in the business network. The business data held by the lightweight node is the business data that has passed the consensus provided by the consensus network.
12. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-9.
13. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1-9.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed as described in any one of claims 1-9.