Transaction data processing method and apparatus, and storage medium

CN117009984BActive Publication Date: 2026-09-18CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310431615.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-20
Publication Date
2026-09-18
Estimated Expiration
2043-04-20

AI Technical Summary

Technical Problem

交易池频繁与后端模块交互的过程中,增加了交易池数据传输的压力,容易造成交易池的系统崩溃

Benefits of technology

[0018] These or other aspects of this application will become more readily apparent in the following description.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117009984B_ABST
    Figure CN117009984B_ABST
Patent Text Reader

Abstract

The application discloses a transaction data processing method and device and a storage medium, relates to the technical field of communication, and can improve the stability of a transaction pool. The method comprises the following steps: a control plane device acquires traffic information of to-be-transacted data and load information of a plurality of service meshes; the control plane device generates a target strategy according to the traffic information of the to-be-transacted data and the load information of the plurality of service meshes, the target strategy being used for representing a transmission routing of the to-be-transacted data in the plurality of service meshes and a service module for processing the to-be-transacted data in each service mesh of the plurality of service meshes; the control plane device sends the target strategy to a data plane device; and the data plane device receives and executes the target strategy sent by the control plane device. The embodiments of the application are applied to the processing of transaction data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more particularly to a transaction data processing method, apparatus, and storage medium. Background Technology

[0002] In blockchain network technology, after receiving transaction data, a blockchain node puts the transaction data into a transaction pool for caching. Then, it checks and packages a portion of the transaction data in the transaction pool to generate a legitimate transaction and sends the legitimate transaction to the consensus module.

[0003] In related technologies, during the transaction process, the centralized transaction pool interacts with the Software Development Kit (SDK) and multiple backend modules. This means the centralized transaction pool participates in the entire lifecycle of a transaction, from issuance to on-chain recording. The frequent interaction between the transaction pool and backend modules increases the pressure on data transmission, potentially causing system crashes. Therefore, improving the stability of the transaction pool remains a technical challenge. Summary of the Invention

[0004] This application provides a transaction data processing method, apparatus, and storage medium for improving the stability of a transaction pool.

[0005] To achieve the above objectives, this application adopts the following technical solution:

[0006] In a first aspect, this application provides a transaction data processing method applied to a control plane device in a blockchain transaction pool. The blockchain transaction pool also includes a data plane device, which is communicatively connected to the control plane device. The data plane device includes multiple service grids, and each service grid includes at least one service module for processing transaction data. The method includes: the control plane device acquiring traffic information of the data to be traded and load information of the multiple service grids; the control plane device generating a target policy based on the traffic information of the data to be traded and the load information of the multiple service grids, the target policy representing the transmission route of the data to be traded in the multiple service grids and the service module processing the transaction data in each of the multiple service grids; and the control plane device sending the target policy to the data plane device.

[0007] In conjunction with the first aspect described above, in one possible implementation, the method further includes: a service mesh comprising at least one of the following: a transaction receiving service mesh, a transaction detection service mesh, a transaction pending packaging storage service mesh, a transaction packaged storage service mesh, a transaction submission service mesh, and a transaction notification service mesh; wherein, the transaction receiving service mesh is used to receive pending transaction data; the transaction detection service mesh is used to detect pending transaction data; the transaction pending packaging storage service mesh is used to store the received pending transaction data; the transaction packaged storage service mesh is used to store the packaged pending transaction data; the transaction submission service mesh is used to store transactions that have reached consensus; and the transaction notification service mesh is used to notify the transaction terminal of the transaction results.

[0008] In conjunction with the first aspect described above, in one possible implementation, the method further includes: identifying at least one target service mesh among multiple service meshes whose load satisfies the traffic requirements of the data to be traded; determining, based on the type of the data to be traded, the transmission order of the data to be traded in the at least one target service mesh, and the service module in each of the at least one target service mesh that processes the data to be traded; and generating a target policy based on the transmission order of the data to be traded in the at least one target service mesh, and the service module in each of the at least one target service mesh that processes the data to be traded.

[0009] In conjunction with the first aspect above, in one possible implementation, the method further includes: sending a first instruction message to the data plane device, the first instruction message being used to instruct the data plane device to establish an encryption service grid and a decryption service grid; the encryption service grid being used to receive transaction data to be traded sent by the transaction receiving service grid, encrypt the transaction data to be traded, and obtain encrypted transaction data; the decryption service grid being used to receive encrypted transaction data sent by the transaction detection service grid, decrypt the encrypted transaction data, and obtain decrypted transaction data.

[0010] Secondly, this application provides a transaction data processing method applied to a data plane device in a blockchain transaction pool. The data plane device includes multiple service grids, each of which includes at least one service module for processing transaction data. The blockchain transaction pool also includes a control plane device, which is communicatively connected to the data plane device. The method includes: the data plane device receiving a target policy sent by the control plane device, the target policy representing the transmission route of the data to be traded in the multiple service grids and the service module for processing transaction data in each of the multiple service grids; and the data plane device executing the target policy.

[0011] Thirdly, this application provides a transaction data processing apparatus, comprising: a processing unit for acquiring traffic information of data to be traded and load information of multiple service meshes; the processing unit is further configured to generate a target strategy based on the traffic information of the data to be traded and the load information of the multiple service meshes, the target strategy being used to characterize the transmission route of the data to be traded in the multiple service meshes, and the service module in each of the multiple service meshes that processes the transaction data; and a communication unit for sending the target strategy to a data plane device.

[0012] In conjunction with the third aspect mentioned above, in one possible implementation, the service mesh includes at least one of the following: a transaction receiving service mesh, a transaction detection service mesh, a transaction pending packaging storage service mesh, a transaction packaged storage service mesh, a transaction submission service mesh, and a transaction notification service mesh; wherein, the transaction receiving service mesh is used to receive pending transaction data; the transaction detection service mesh is used to detect pending transaction data; the transaction pending packaging storage service mesh is used to store the received pending transaction data; the transaction packaged storage service mesh is used to store the packaged pending transaction data; the transaction submission service mesh is used to store transactions that have reached consensus; and the transaction notification service mesh is used to notify the transaction terminal of the transaction results.

[0013] In conjunction with the third aspect above, in one possible implementation, the processing unit is further configured to: determine at least one target service mesh among multiple service meshes whose load satisfies the traffic requirements of the data to be traded; determine the transmission order of the data to be traded in the at least one target service mesh, and the service module in each of the at least one target service mesh that processes the data to be traded, based on the type of the data to be traded; and generate a target strategy based on the transmission order of the data to be traded in the at least one target service mesh, and the service module in each of the at least one target service mesh that processes the data to be traded.

[0014] In conjunction with the third aspect above, in one possible implementation, the processing unit is further configured to: send first instruction information to the data plane device, the first instruction information being used to instruct the data plane device to establish an encryption service grid and a decryption service grid; the encryption service grid being used to receive transaction data to be traded sent by the transaction receiving service grid, encrypt the transaction data to be traded, and obtain encrypted transaction data; the decryption service grid being used to receive encrypted transaction data sent by the transaction detection service grid, decrypt the encrypted transaction data, and obtain decrypted transaction data.

[0015] Fourthly, this application provides a transaction data processing apparatus, comprising: a communication unit for receiving a target strategy sent by a control plane device, the target strategy being used to characterize the transmission route of the data to be traded in multiple service meshes, and a service module for processing the transaction data in each of the multiple service meshes; and a processing unit for executing the target strategy.

[0016] Fifthly, a transaction data processing apparatus is provided, comprising: a processor and a memory; wherein the memory is used to store computer execution instructions, and when the communication device is running, the processor executes the computer execution instructions stored in the memory to enable the communication device to implement the transaction data processing method as described in any possible implementation of the first aspect.

[0017] In a sixth aspect, a computer-readable storage medium is provided, the computer-readable storage medium including instructions that, when executed by a communication device, cause a computer to perform a transaction data processing method as described in any possible implementation of the first aspect.

[0018] These or other aspects of this application will become more readily apparent in the following description.

[0019] The above solution offers at least the following advantages: In this embodiment, the control plane device sends a target policy to the data plane device based on the traffic information of the data to be traded and the load information of multiple service meshes. The target policy characterizes the transmission route of the data to be traded in multiple service meshes, as well as the service module that processes the transaction data in each of the multiple service meshes. On the one hand, in this embodiment, service meshes are set up in the transaction pool. Since the service meshes do not need to authenticate and authorize each other, the number of communication times between service meshes in the transaction pool is reduced, thus reducing the communication interaction pressure of the transaction pool. On the other hand, the control plane device can dynamically adjust the routing between service meshes in the data plane device and the service modules in the service meshes in real time, and the frequent communication between the risk avoidance backend module and the data plane device during control improves the stability of the transaction pool. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.

[0021] Figure 1 A schematic diagram of a centralized transaction pool architecture provided in an embodiment of this application;

[0022] Figure 2 A flowchart illustrating a transaction data processing method provided in this application embodiment;

[0023] Figure 3 A flowchart illustrating a transaction data processing method provided in this application embodiment;

[0024] Figure 4This is a schematic diagram of the structure of a transaction data processing system provided in an embodiment of this application;

[0025] Figure 5 This is a schematic diagram of the structure of a transaction data processing device provided in an embodiment of this application;

[0026] Figure 6 A flowchart illustrating a transaction data processing method provided in this application embodiment;

[0027] Figure 7 A flowchart illustrating a transaction data processing method provided in this application embodiment;

[0028] Figure 8 A flowchart illustrating a transaction data processing method provided in this application embodiment;

[0029] Figure 9 A flowchart illustrating a transaction data processing method provided in this application embodiment;

[0030] Figure 10 This is a schematic diagram of another transaction data processing device provided in an embodiment of this application. Detailed Implementation

[0031] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0032] The terms "first" and "second," etc., used in the specification and drawings of this application are used to distinguish different objects or to distinguish different treatments of the same object, rather than to describe a specific order of objects.

[0033] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.

[0034] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0035] In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0036] The following is an explanation of the terms related to the embodiments of this application.

[0037] 1. Blockchain Transaction Pool

[0038] The blockchain transaction pool has detection, on-chain, and feedback functions. After receiving transaction data, the blockchain transaction pool detects it. If the data passes the detection, it sends it to the consensus module; otherwise, it does not transmit the data. Once consensus is reached between the user terminal and the block-producing node, an on-chain notification is sent to the user terminal.

[0039] 2. Centralized data transaction pool

[0040] Centralized data trading scenarios using transaction pools include: Bitcoin, Ethereum, Chang'an Chain, Cosmos, and Polkadot. Data trading scenarios without transaction pools include consortium blockchains like Fabric.

[0041] Once the blockchain nodes are activated, the transaction pool will operate according to its responsibilities. The transaction pool architecture in this centralized scenario is as follows: Figure 1 As shown, the user terminal sends the data to be traded to the transaction pool, and the backend module retrieves the transaction data from the transaction pool.

[0042] In the process of trading in a blockchain trading pool, centralized trading pools need to frequently communicate and interact with user terminals and backend modules. For example... Figure 2 As shown, the user terminal submits transaction data to the transaction pool, and the transaction detection module in the transaction pool checks the validity of the transaction. A valid transaction must meet at least one of the following conditions: the signature of the transaction data is valid, the transaction data is a non-duplicate transaction, or the transaction data is not a transaction already on the blockchain. After determining that the transaction is legitimate, the transaction center sends the transaction data to the transaction provider module.

[0043] The backend consensus module retrieves the transaction data from the transaction provider module, packages it into blocks, and verifies transactions that are not matched in the transaction pool, thus improving consensus block verification efficiency. Subsequently, the backend synchronization module retrieves the transaction data from the transaction provider module and broadcasts it to other consensus nodes. After a consensus is reached on a transaction, the backend storage module submits the transaction and its execution result to the blockchain database and sends a disk placement notification to the transaction notifier module in the transaction pool. The transaction notifier module then sends the transaction result to the user terminal based on the disk placement notification.

[0044] For example, in combination Figure 2 ,like Figure 3As shown, after the transaction pool receives the transaction data sent by the user terminal, it sequentially processes the following modules: transaction detection module, transaction storage module, transaction packaging & transaction consensus module, transaction submission module, and transaction notification module.

[0045] The transaction detection module stores valid, unique, and un-uploaded transaction data into the transaction pool. The transaction storage module stores the transaction data. The transaction packaging and consensus module retrieves legitimate transactions from the transaction pool, packages them into new blocks, and broadcasts them to other consensus nodes. Upon receiving the new block, these nodes verify the signature of each transaction, ensuring the block's legitimacy. The transaction submission module, after reaching consensus, calls the storage module to submit the transaction and its execution result to the blockchain database. The transaction notification module notifies the user terminal of the transaction execution result after successful on-chain processing.

[0046] 3. Weak censorship

[0047] A degraded user experience can result when certain censored block producers fail to include individual transactions in their blocks. For example, a compliant block producer might reject a transaction from a blacklisted address, but the transaction is ultimately accepted by a non-censored block producer.

[0048] 4. Strict review

[0049] Strong censorship occurs when an individual's transaction is never included on the blockchain. Since the individual has lost the ability to transact, this can be considered a de facto loss of assets. This can happen when the network is taken over by a majority, also known as a 51% attack, and if it occurs, it can threaten the continued existence of the attacked blockchain.

[0050] The above is a definition of terms used in the embodiments of this application.

[0051] In blockchain network technology, after receiving transaction data, a blockchain node places the transaction data into a transaction pool for caching. Then, the transaction pool checks and packages a portion of the transaction data in the pool to generate valid transaction data, which is then sent to the consensus module.

[0052] In related technologies, during the transaction process, the centralized transaction pool interacts with the SDK and multiple backend modules. This means the centralized transaction pool participates in the entire lifecycle of a transaction, from issuance to on-chain recording. Frequent interactions between the transaction pool and backend modules increase the pressure on data transmission, potentially causing system crashes. Therefore, improving the stability of the transaction pool remains a technical challenge.

[0053] At the same time, centralized transaction pools are difficult to resist both weak and strong censorship.

[0054] To address the technical problems existing in related technologies, this application provides a method for managing a blockchain transaction pool: a control plane device acquires traffic information of the data to be traded and load information of multiple service meshes; the control plane device generates a target policy based on the traffic information of the data to be traded and the load information of the multiple service meshes, the target policy being used to characterize the transmission route of the data to be traded in the multiple service meshes, and the service module in each of the multiple service meshes that processes the transaction data; the control plane device sends the target policy to a data plane device. The data plane device receives the target policy sent by the control plane device and executes the target policy.

[0055] In this embodiment, the control plane device sends a target policy to the data plane device based on the traffic information of the data to be traded and the load information of multiple service meshes. The target policy is used to characterize the transmission route of the data to be traded in multiple service meshes, and the service module that processes the transaction data in each of the multiple service meshes. On the one hand, in this embodiment, service meshes are set up in the transaction pool. Since the service meshes do not need to authenticate and authorize each other, the number of communication times between service meshes in the transaction pool is reduced, thus reducing the communication interaction pressure of the transaction pool. On the other hand, the control plane device can dynamically adjust the routing between service meshes in the data plane device and the service modules in the service meshes in real time. Frequent communication between the risk avoidance backend module and the data plane device during control improves the stability of the transaction pool.

[0056] This transaction data processing method can be applied to transaction data processing system 40. The following, in conjunction with the appendix... Figure 4 This application provides a detailed description of a transaction data processing system 40 according to an embodiment, such as... Figure 4 As shown, the transaction data processing system 40 includes a user terminal 41 and a transaction data processing device 42.

[0057] The transaction data processing device 42 includes a control plane device 421 and a data plane device 422.

[0058] User terminal 41 is configured to send transaction data to transaction data processing device 42.

[0059] The transaction data processing device 42 is configured to process the transaction data to be processed and send the processing results to the user terminal 41.

[0060] The control plane device 421 is configured to generate and send a target policy based on the traffic information of the data to be traded and the load information of multiple service meshes.

[0061] Data plane device 422 is configured to receive and execute target strategies sent by control plane device 421.

[0062] It should be explained that in this application, sending the transaction data to the management device of the transaction pool from the user terminal can improve transaction efficiency. If the user terminal's transactions do not have a transaction pool, the following problems arise: 1. The blockchain loses its resistance to dust attacks. Here, a dust attack on the blockchain refers to a large number of meaningless transactions filling the entire block network. Transaction verification during the transaction process between the user terminal and the block-producing node requires time and computing power. If there are a large number of dust transactions between the user terminal and the block-producing node, it will affect the packaging and verification functions during the transaction process.

[0063] 2. The difficulty of double-spending attacks on user terminals decreases. During the transaction process between user terminals and block-producing nodes, although block-producing nodes will choose transactions with higher fees for packaging, malicious block-producing nodes can attract a large number of transactions with low fee thresholds and isolate other block-producing nodes. In this way, malicious block-producing nodes can control transactions, and the difficulty of launching double-spending attacks on user terminals will decrease.

[0064] 3. The network incentive mechanism between the user terminal and the block-producing node will be affected. The transaction pool's memory pool contains a transaction queue arranged by random numbers and transaction fees. This allows block-producing nodes to selectively package user data based on transaction fees, improving the network incentive mechanism. If the user terminal and block-producing node are not in the transaction pool at any time, the network incentive mechanism between them will be affected.

[0065] 4. Out-of-order transactions can affect user terminal contract calls. When network latency exists, transactions initiated by user terminals may not be broadcast to block-producing nodes in a timely manner. Due to the strict ordering of transactions / contracts, if block-producing nodes execute multiple transactions sent by user terminals based on the time they are received, out-of-order transactions will prevent user terminals from calling contracts correctly.

[0066] The basic hardware structure of the transaction data processing device 42 in the transaction data processing system 40 includes: Figure 5 The components included in the transaction data processing apparatus 500 shown below. Figure 5 Taking the transaction data processing device 500 shown as an example, the hardware structure of the transaction data processing device 42 will be introduced.

[0067] like Figure 5 As shown, the transaction data processing device 500 includes at least one processor 501, a communication line 502, and at least one communication interface 504, and may also include a memory 503. The processor 501, memory 503, and communication interface 504 are connected via the communication line 502.

[0068] The processor 501 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).

[0069] Communication line 502 may include a path for transmitting information between the aforementioned components.

[0070] The communication interface 504 is used to communicate with other devices or communication networks. It can use any transceiver-like device, such as Ethernet, radio access network (RAN), WLAN, etc.

[0071] The memory 503 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of including or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0072] In one possible design, the memory 503 can exist independently of the processor 501, meaning the memory 503 can be an external memory of the processor 501. In this case, the memory 503 can be connected to the processor 501 via a communication line 502 to store execution instructions or application code, and its execution is controlled by the processor 501 to implement the blockchain transaction pool management method provided in the following embodiments of this application. In another possible design, the memory 503 can also be integrated with the processor 501, meaning the memory 503 can be an internal memory of the processor 501. For example, the memory 503 can be a cache, used to temporarily store some data and instruction information.

[0073] As one possible implementation, processor 501 may include one or more CPUs, for example Figure 5 CPU0 and CPU1 in the example. As another possible implementation, the blockchain transaction pool management device 500 may include multiple processors, such as... Figure 5 The processors 501 and 507 are included. Alternatively, the blockchain transaction pool management device 500 may also include an output device 505 and an input device 506.

[0074] The following, in conjunction with the appendix Figure 6 The transaction data processing method provided in the embodiments of this application will be described in detail, such as... Figure 6 As shown, the transaction data processing method includes:

[0075] S601, The control plane device acquires the traffic information of the data to be traded and the load information of multiple service meshes.

[0076] The control plane device is a device in the blockchain transaction pool. The blockchain transaction pool also includes a data plane device. The data plane device is communicatively connected to the control plane device. The data plane device includes multiple service grids. Each service grid includes at least one service module. The service module is used to process transaction data.

[0077] Optionally, the service mesh may include at least one of the following: transaction receiving service mesh, transaction detection service mesh, transaction pending packaging storage service mesh, transaction packaged storage service mesh, transaction submission service mesh, and transaction notification service mesh.

[0078] The transaction receiving service grid is used to receive data to be traded; the transaction detection service grid is used to detect data to be traded; the transaction packaging storage service grid is used to store the received data to be traded; the transaction packaging storage service grid is used to store the packaged data to be traded; the transaction submission service grid is used to store transactions that have reached consensus; and the transaction notification service grid is used to notify the transaction terminal of the transaction results.

[0079] Optionally, the service mesh includes a proxy module, which is used to control the service modules in the service mesh.

[0080] In one possible implementation, the control plane device obtains the flow information of the data to be traded through a flow monitoring device.

[0081] It should be noted that the flow monitoring device can be located inside the data plane device or independently of the data plane device.

[0082] In one possible implementation, the control plane device sends a first request message to proxy modules in multiple service meshes. The proxy modules respond to the first request message and send their own load information to the control plane device. The first request message is used to obtain the load information of the service meshes.

[0083] It should be explained that the control plane device can send the first request message to the agent modules in multiple service meshes via broadcast, which can improve the efficiency of sending the first request message.

[0084] S602. The control plane device generates a target strategy based on the traffic information of the data to be traded and the load information of multiple service meshes.

[0085] The target strategy is used to characterize the transmission route of the data to be traded in multiple service meshes, as well as the service module that processes the transaction data in each of the multiple service meshes.

[0086] Optionally, the target strategy may include the names of the service modules that need to be added and / or removed.

[0087] Optionally, the target strategy includes multiple sub-target strategies, which are used to construct the transmission routes of the data to be traded in multiple service meshes or to determine the service modules that process the transaction data.

[0088] S603. The control plane device sends the target policy to the data plane device. Correspondingly, the data plane device receives the target policy sent by the control plane device.

[0089] In one possible implementation, the control plane device determines, based on the target policy, multiple service meshes for executing the target policy and a sub-target policy corresponding to each of the multiple service meshes, wherein the sub-target policy is a part of the target policy. The control plane device sends its corresponding sub-target policy to the agents of the multiple service meshes respectively.

[0090] In another possible implementation, the control plane device sends the target policy to the processing module in the data plane device, so that the processing module analyzes the target policy and sends the configuration policy to multiple service mesh agents controlled by the processing module respectively.

[0091] For example, the target strategy includes the following transmission path of the data to be traded in the transaction pool: transaction receiving service grid → transaction detection service grid → transaction packaging storage service grid and transaction submission service grid → transaction notification service grid; the transaction receiving service grid requires 3 service modules, the transaction detection service grid requires 5 service modules, the transaction packaging storage service grid requires 3 service modules, the transaction submission service grid requires 3 service modules, and the transaction notification service grid requires 1 service module. In one possible implementation, the control plane device sends a first sub-target strategy to the agent of the transaction detection service grid, which instructs the agent of the transaction detection service grid to establish three service modules. The control plane device sends a second sub-target strategy to the agent of the transaction packaging storage service grid, which instructs the transaction packaging storage service grid to disconnect the communication connection with the transaction packaging storage service grid and directly send the data to be traded to the transaction submission service grid.

[0092] It should be explained that the control plane device sends the sub-target policy corresponding to each service mesh agent to the agents of multiple service meshes. In this way, each service mesh agent can only receive indication messages related to that agent, improving the security of the indication messages. Since the sub-target policy is a part of the target policy, the information length of the indication messages received by the service mesh agents is shorter, avoiding resource waste and improving the efficiency of sending indication messages.

[0093] S604, Data plane device executes target strategy.

[0094] In one possible implementation, when the service mesh agent in the data plane device receives the target policy sent by the control plane device, the service mesh agent executes the target policy.

[0095] In another possible implementation, when the processing module in the data plane device receives the target policy sent by the control plane device, it parses the target policy to obtain multiple sub-target policies and sends the sub-target policies to the service mesh agents corresponding to the sub-target policies. The service mesh agents then execute the sub-target policies.

[0096] The above solution offers at least the following advantages: In this embodiment, the control plane device sends a target policy to the data plane device based on the traffic information of the data to be traded and the load information of multiple service meshes. The target policy characterizes the transmission route of the data to be traded in multiple service meshes, as well as the service module that processes the transaction data in each of the multiple service meshes. On the one hand, in this embodiment, service meshes are set up in the transaction pool. Since the service meshes do not need to authenticate and authorize each other, the number of communication times between service meshes in the transaction pool is reduced, thus reducing the communication interaction pressure of the transaction pool. On the other hand, the control plane device can dynamically adjust the routing between service meshes in the data plane device and the service modules in the service meshes in real time, and the frequent communication between the risk avoidance backend module and the data plane device during control improves the stability of the transaction pool.

[0097] Combination Figure 6 ,like Figure 7 As shown, the process by which the control plane device generates the target strategy based on the traffic information of the data to be traded and the load information of multiple service meshes can be specifically implemented through the following S701-S703.

[0098] S701, The control plane device determines at least one target service mesh among multiple service meshes whose load meets the traffic requirements of the data to be traded.

[0099] In one possible implementation, the control plane device determines at least one target service mesh among multiple service meshes whose load meets the traffic requirements of the data to be traded, based on the type of the data to be traded.

[0100] For example, when the type of data to be traded is A, the control plane device determines at least one target service mesh whose load meets the traffic requirements of the data to be traded, including: a transaction receiving service mesh, a transaction detection service mesh, a transaction pending packaging storage service mesh, a transaction packaged storage service mesh, a transaction submission service mesh, and a transaction notification service mesh.

[0101] When the type of data to be traded is B, the control plane device determines at least one target service mesh whose load meets the traffic requirements of the data to be traded, including: transaction receiving service mesh, transaction detection service mesh, transaction packaging storage service mesh, transaction submission service mesh, and transaction notification service mesh.

[0102] S702, the control plane device determines the transmission order of the data to be traded in at least one target service grid and the service module in each service grid of the at least one target service grid that processes the data to be traded, based on the type of the data to be traded.

[0103] In one possible implementation, the control plane device determines the transmission order of the data to be traded in at least one target service grid based on the type of the data to be traded; the control plane device determines the service module in each of the at least one target service grid that processes the data to be traded based on the size of the data to be traded.

[0104] Optionally, the type of data to be traded includes at least one of the following: Hypertext Transfer Protocol (HTTP), gRPC, WebSocket (a TCP-based full-duplex communication protocol), and Transmission Control Protocol (TCP).

[0105] For example, when the type of the data to be traded is B and the transaction data is 2MB, the transmission order of the data to be traded in at least one target service mesh is as follows: transaction receiving service mesh → transaction detection service mesh → transaction packaging storage service mesh → transaction submission service mesh → transaction notification service mesh. Specifically, the transaction receiving service mesh requires 2 service modules, the transaction detection service mesh requires 6 service modules, the transaction packaging storage service mesh requires 8 service modules, the transaction submission service mesh requires 6 service modules, and the transaction notification service mesh requires 2 service modules.

[0106] When the type of the data to be traded is C and the transaction data is 1MB, the transmission order of the data in at least one target service mesh is as follows: transaction receiving service mesh → transaction detection service mesh → transaction submission service mesh → transaction packaging storage service mesh → transaction notification service mesh. Specifically, the transaction receiving service mesh requires 1 service module, the transaction detection service mesh requires 3 service modules, the transaction packaging storage service mesh requires 4 service modules, the transaction submission service mesh requires 3 service modules, and the transaction notification service mesh requires 1 service module.

[0107] S703, the control plane device generates a target strategy based on the transmission order of the data to be traded in at least one target service grid and the service module in each of the at least one target service grid that processes the data to be traded.

[0108] In one possible implementation, the control plane device compares the transmission order of the data to be traded in at least one target service mesh with the transmission order of the data stream in the current data plane device within the meshes to determine the service meshes in the current data plane device whose routing paths need to be changed. Based on the service meshes in the current data plane device whose routing paths need to be changed, the control plane device generates a third sub-target policy. The control plane device compares the service modules processing the data to be traded in each of the at least one target service mesh with the service modules that are started in the current data plane device to determine the service modules that need to be started or stopped in the current data plane device. Based on the service modules that need to be started or stopped in the current data plane device, the control plane device generates a fourth sub-target policy. The control plane device generates a target policy based on the third and fourth sub-target policies.

[0109] The above scheme brings at least the following beneficial effects: In this embodiment, firstly, the control plane device determines at least one target service mesh among multiple service meshes whose load meets the traffic requirements of the data to be traded; secondly, the control plane device determines the transmission order of the data to be traded in the at least one target service mesh, and the service module in each of the at least one target service mesh that processes the data to be traded. In this way, the control plane device can dynamically and finely send target policies to the service mesh agent, enabling the service mesh agent to adjust the service mesh routing relationships and the service modules managed by the service mesh in a timely manner according to the target policies.

[0110] In one possible implementation, after S703 described above, the control plane device can further encrypt and decrypt the data to be traded in the transaction pool. The process of the control plane device encrypting and decrypting the data to be traded in the transaction pool is described below.

[0111] Combination Figure 6 ,like Figure 8 As shown, the process of encrypting and decrypting the data to be traded in the transaction pool by the above-mentioned control plane device can be specifically implemented through the following S801-S802.

[0112] S801, the control plane device sends a first instruction message to the data plane device. Correspondingly, the data plane device receives the first instruction message.

[0113] The first instruction information is used to instruct the data plane device to establish an encryption service grid and a decryption service grid. The encryption service grid is used to receive the transaction data to be traded sent by the transaction receiving service grid, and encrypts the transaction data to be traded using the Transport Layer Security Protocol (TLS) to obtain encrypted transaction data. The decryption service grid is used to receive the encrypted transaction data sent by the transaction detection service grid, and decrypts the encrypted transaction data to obtain decrypted transaction data.

[0114] S802, the data plane device creates an encryption service grid and a decryption service grid according to the first instruction information.

[0115] The above scheme offers at least the following advantages: In this embodiment, the control plane device instructs the data plane device to create an encryption service grid and a decryption service grid. Before the transaction receiving service grid sends the transaction data to the transaction detection service grid, the encryption service grid encrypts the transaction data to obtain encrypted transaction data. This prevents the transaction detection service grid from accessing the privacy information in the transaction data during its detection process, thus avoiding both weak and strong audits of the transaction pool. Furthermore, after the transaction detection service grid detects the encrypted transaction data, it decrypts it to obtain decrypted transaction data and uploads it to the blockchain, ensuring the continuation of the transaction.

[0116] In one possible implementation, prior to S601 above, the service mesh of the data control plane device in the transaction pool can also provide services to external devices. The process by which the service mesh of the data control plane device in the transaction pool can provide services to external devices is described below.

[0117] Combination Figure 6 ,like Figure 9 As shown, the process of encrypting and decrypting the data to be traded in the transaction pool by the above-mentioned control plane device can be specifically implemented through the following S901-S908.

[0118] S901, the control panel starts and operates its own equipment.

[0119] The control plane device is used to manage and configure policies for the service mesh in the data plane device.

[0120] S902, Service Mesh starts its own devices.

[0121] S903. The service mesh sends a registration request to the processing module in the data plane device. Correspondingly, the processing module in the data plane device receives and responds to the registration request.

[0122] S904. The external service device sends a second request message to the processing module in the data plane device.

[0123] The second request message is used to obtain the address of the service mesh in the data plane device.

[0124] S905. The processing module in the data plane device sends the address of the service grid in the data plane device to the external service device.

[0125] S906. The external service device sends a third request message to the service mesh agent based on the address of the service mesh.

[0126] The third request message is used to request the invocation of service modules in the service mesh.

[0127] S907, The service mesh agent sends a call response message to an external service device.

[0128] Optionally, the call response message may include a service mesh that allows external service appliances to invoke it.

[0129] S908: External service devices invoke the service mesh based on their own needs and the call response message.

[0130] The above solution brings at least the following beneficial effects: In this embodiment of the application, the external service device can call the service grid in the transaction pool, which can improve the utilization rate of the service grid.

[0131] As can be seen, the above mainly describes the technical solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, in conjunction with the modules and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware 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 implementation should not be considered beyond the scope of this invention.

[0132] This application embodiment can divide the transaction data processing device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0133] like Figure 10 The diagram shown is a structural schematic of a transaction data processing apparatus 100 provided in an embodiment of this application. The transaction data processing apparatus 100 includes a processing unit 1001 and a communication unit 1002.

[0134] Processing unit 1001 is used to acquire traffic information of the data to be traded and load information of multiple service meshes; processing unit 1001 is also used to generate a target policy based on the traffic information of the data to be traded and the load information of multiple service meshes, the target policy being used to characterize the transmission route of the data to be traded in multiple service meshes, and the service module that processes the transaction data in each of the multiple service meshes; communication unit 1002 is used to send the target policy to the data plane device.

[0135] Optionally, the service mesh includes at least one of the following: a transaction receiving service mesh, a transaction detection service mesh, a transaction pending packaging storage service mesh, a transaction packaged storage service mesh, a transaction submission service mesh, and a transaction notification service mesh; wherein, the transaction receiving service mesh is used to receive pending transaction data; the transaction detection service mesh is used to detect pending transaction data; the transaction pending packaging storage service mesh is used to store the received pending transaction data; the transaction packaged storage service mesh is used to store the packaged pending transaction data; the transaction submission service mesh is used to store transactions that have reached consensus; and the transaction notification service mesh is used to notify the transaction terminal of the transaction results.

[0136] Optionally, the processing unit 1001 is further configured to: determine at least one target service mesh among multiple service meshes whose load meets the traffic requirements of the data to be traded; determine the transmission order of the data to be traded in the at least one target service mesh and the service module of each service mesh in the at least one target service mesh that processes the data to be traded, based on the type of the data to be traded; and generate a target strategy based on the transmission order of the data to be traded in the at least one target service mesh and the service module of each service mesh in the at least one target service mesh that processes the data to be traded.

[0137] Optionally, in one possible implementation, the processing unit 1001 is further configured to: send first instruction information to the data plane device, the first instruction information being used to instruct the data plane device to establish an encryption service grid and a decryption service grid; the encryption service grid being used to receive transaction data to be traded sent by the transaction receiving service grid, encrypt the transaction data to be traded, and obtain encrypted transaction data; the decryption service grid being used to receive encrypted transaction data sent by the transaction detection service grid, decrypt the encrypted transaction data, and obtain decrypted transaction data.

[0138] The processing unit 1001 can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination of functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The communication unit 1002 can be a transceiver circuit or a communication interface, etc. The storage module can be a memory. When the processing unit 1001 is a processor, the communication unit 1002 is a communication interface, and the storage module is a memory, the transaction data processing apparatus involved in the embodiments of this application can be... Figure 5 The transaction data processing device shown.

[0139] Through the above description of the implementation methods, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the network node can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, modules, and network nodes described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0140] This application also provides a computer-readable storage medium storing instructions. When a computer executes these instructions, the computer performs each step of the method flow shown in the above-described method embodiments.

[0141] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run computer programs or instructions to implement the transaction data processing method in the above method embodiments.

[0142] Embodiments of this application provide a computer program product containing instructions that, when executed on a computer, cause the computer to perform the transaction data processing method described in the above method embodiments.

[0143] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), registers, hard disks, optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing, or any other form of computer-readable storage medium in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may reside in an application-specific integrated circuit (ASIC). In embodiments of the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0144] Since the apparatus, device, computer-readable storage medium, and computer program product in the embodiments of the present invention can be applied to the above methods, the technical effects that can be obtained can also be referred to the above method embodiments. The embodiments of this application will not be repeated here.

[0145] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for processing transaction data, characterized in that, A control plane device is used in a blockchain transaction pool, the blockchain transaction pool further including a data plane device, the data plane device being communicatively connected to the control plane device, the data plane device including multiple service grids, each of the multiple service grids including at least one service module, the service module being used to process transaction data, the method including: Obtain the traffic information of the data to be traded and the load information of the multiple service meshes; Based on the traffic information of the data to be traded and the load information of the multiple service meshes, a target strategy is generated. The target strategy is used to characterize the transmission route of the data to be traded in the multiple service meshes, and the service module in each of the multiple service meshes that processes the data. The target strategy is sent to the data plane device; The step of generating a target strategy based on the traffic information of the data to be traded and the load information of the multiple service meshes includes: Identify at least one target service mesh among the plurality of service meshes whose load meets the traffic requirements of the data to be traded; Based on the type of the data to be traded, determine the transmission order of the data to be traded in the at least one target service grid, and the service module in each of the at least one target service grids that processes the data to be traded; The target strategy is generated based on the transmission order of the data to be traded in the at least one target service grid and the service module in each of the at least one target service grids that processes the data to be traded.

2. The method according to claim 1, characterized in that, The service mesh includes at least one of the following: a transaction receiving service mesh, a transaction detection service mesh, a transaction pending packaging storage service mesh, a transaction packaged storage service mesh, a transaction submission service mesh, and a transaction notification service mesh; The transaction receiving service grid is used to receive the data to be traded; the transaction detection service grid is used to detect the data to be traded; the transaction packaging storage service grid is used to store the received data to be traded; the transaction packaged storage service grid is used to store the packaged data to be traded; the transaction submission service grid is used to store transactions that have reached consensus; and the transaction notification service grid is used to notify the transaction terminal of the transaction results.

3. The method according to claim 2, characterized in that, The method further includes: A first instruction message is sent to the data plane device, which instructs the data plane device to establish an encryption service grid and a decryption service grid. The encryption service grid is used to receive the transaction data to be traded sent by the transaction receiving service grid, encrypt the transaction data to be traded, and obtain encrypted transaction data. The decryption service grid is used to receive the encrypted transaction data sent by the transaction detection service grid, decrypt the encrypted transaction data, and obtain decrypted transaction data.

4. A method for processing transaction data, characterized in that, A data plane device applied in a blockchain transaction pool, the data plane device comprising multiple service grids, each service grid comprising at least one service module for processing transaction data, the blockchain transaction pool further comprising a control plane device communicatively connected to the data plane device, the method comprising: The system receives a target policy sent by the control plane device. The target policy characterizes the transmission route of the data to be traded in the plurality of service meshes, and the service module in each of the plurality of service meshes that processes the data to be traded. The control plane device determines at least one target service mesh in the plurality of service meshes whose load meets the traffic requirements of the data to be traded. Based on the type of the data to be traded, the system determines the transmission order of the data to be traded in the at least one target service mesh, and the service module in each of the at least one target service mesh that processes the data to be traded. Based on the transmission order of the data to be traded in the at least one target service mesh, and the service module in each of the at least one target service mesh that processes the data to be traded, the system generates the target policy. Execute the target strategy.

5. A transaction data processing device, characterized in that, The device includes a processing unit and a communication unit: The processing unit is used to acquire traffic information of the data to be traded and load information of multiple service meshes; The processing unit is further configured to generate a target strategy based on the traffic information of the data to be traded and the load information of the multiple service meshes. The target strategy is used to characterize the transmission route of the data to be traded in the multiple service meshes, and the service module in each of the multiple service meshes that processes the data to be traded. The communication unit is used to send the target strategy to the data plane device; The processing unit is further configured to: Identify at least one target service mesh among the plurality of service meshes whose load meets the traffic requirements of the data to be traded; Based on the type of the data to be traded, determine the transmission order of the data to be traded in the at least one target service grid, and the service module in each of the at least one target service grids that processes the data to be traded; The target strategy is generated based on the transmission order of the data to be traded in the at least one target service grid and the service module in each of the at least one target service grids that processes the data to be traded.

6. The apparatus according to claim 5, characterized in that, The service mesh includes at least one of the following: a transaction receiving service mesh, a transaction detection service mesh, a transaction pending packaging storage service mesh, a transaction packaged storage service mesh, a transaction submission service mesh, and a transaction notification service mesh; The transaction receiving service grid is used to receive the data to be traded; the transaction detection service grid is used to detect the data to be traded; the transaction packaging storage service grid is used to store the received data to be traded; the transaction packaged storage service grid is used to store the packaged data to be traded; the transaction submission service grid is used to store transactions that have reached consensus; and the transaction notification service grid is used to notify the transaction terminal of the transaction results.

7. The apparatus according to claim 6, characterized in that, The processing unit is further configured to: send a first instruction message to the data plane device, the first instruction message being used to instruct the data plane device to establish an encryption service grid and a decryption service grid; the encryption service grid being used to receive the transaction data to be traded sent by the transaction receiving service grid, and to encrypt the transaction data to obtain encrypted transaction data; The decryption service grid is used to receive the encrypted transaction data sent by the transaction detection service grid, decrypt the encrypted transaction data, and obtain decrypted transaction data.

8. A transaction data processing apparatus, characterized in that, The device includes a processing unit and a communication unit: The communication unit is used to receive a target policy sent by the control plane device. The target policy is used to characterize the transmission route of the data to be traded in multiple service meshes, and the service module in each of the multiple service meshes that processes the transaction data. The control plane device is used to determine at least one target service mesh among the plurality of service meshes whose load meets the traffic requirements of the data to be traded; Based on the type of the data to be traded, determine the transmission order of the data to be traded in the at least one target service grid, and the service module in each of the at least one target service grids that processes the data to be traded; The target strategy is generated based on the transmission order of the data to be traded in the at least one target service grid and the service module in each of the at least one target service grid that processes the data to be traded. The processing unit is used to execute the target strategy.

9. A transaction data processing apparatus, characterized in that, include: A processor and a memory; wherein the memory is used to store computer execution instructions, and when the transaction data processing device is running, the processor executes the computer execution instructions stored in the memory to cause the transaction data processing device to perform the transaction data processing method according to any one of claims 1-3.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes instructions that, when executed by a transaction data processing apparatus, cause the computer to perform the transaction data processing method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Node management method and device and electronic equipment

    CN112152778A

  • Gridded community common service network and service method

    CN113269651A