Data transmission method and device, equipment, storage medium and program product

By introducing a service gateway to the blockchain system to listen to message queues and re-request data, the instability problem of the transaction execution system when transmitting data to the blockchain system is solved, and the accurate and reliable data transmission is achieved.

CN119728718AActive Publication Date: 2025-03-28INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411894840.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-03-28
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

When the existing transaction execution system transmits transaction data to the blockchain system based on http call, there is a problem of unstable data transmission. Especially after the http link is disconnected, the blockchain system cannot actively send data requests to the transaction execution system, resulting in data being unable to be transmitted stably.

Method used

By introducing a service gateway into the blockchain system, listening to the message queue, obtaining transaction data to be launched, and re-requesting the message queue when data reception is abnormal to ensure accurate data transmission. At the same time, transaction data to be put on the chain is sent to each blockchain node, and its processing and storage are controlled.

Benefits of technology

It improves the transmission stability of transaction data to be launched, ensures that the data can be accurately and reliably transmitted to blockchain nodes, and solves the problem of data transmission instability caused by http link disconnection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728718A_ABST
    Figure CN119728718A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data transmission method and device, equipment, a storage medium and a program product, and relates to the field of financial science and technology or other related fields. The block chain system comprises a service gateway and a plurality of block chain nodes. The method is applied to a service gateway, and comprises the following steps: monitoring a message queue, when monitoring that to-be-linked transaction data exists in the message queue, acquiring the to-be-linked transaction data from the message queue, and when the service gateway does not correctly receive the to-be-linked transaction data, sending request information to the message queue, and sending the to-be-linked transaction data to each block chain node to obtain the to-be-linked transaction data which is not correctly received again, sending the to-be-linked transaction data to each block chain node, and controlling the block chain node to process the to-be-linked transaction data and store a processing result on the block. According to the method provided by the invention, the to-be-linked transaction data is acquired in a mode that the service gateway sends the data request to the message queue, so that the stability of the to-be-linked transaction data transmission is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology or other related fields, and in particular to a data transmission method, device, equipment, storage medium and program product. Background Art

[0002] A blockchain system is a distributed database or record-keeping system that is used to record data in a structure that is difficult to hack into the system.

[0003] The transaction execution system can execute specific transactions to generate transaction data, and store the generated transaction data on the blockchain. At this time, the transaction execution system can transmit the transaction data to the blockchain system to store the transaction data on each blockchain node. When the transaction execution system transmits the data to be uploaded to the blockchain system, it is usually implemented by http calls. However, there are certain problems with the above method. This method requires the establishment of an http link between the transaction execution system and the blockchain system, and the http link may have the problem of link disconnection, resulting in instability in data transmission. When the link is disconnected, the blockchain system cannot actively send data requests to the transaction execution system, so that the data in the transaction execution system cannot be stably transmitted to the blockchain system. Summary of the invention

[0004] The present application provides a data transmission method, apparatus, device, storage medium and program product, which are used to solve the problem that when an existing transaction execution system transmits transaction data to a blockchain system based on HTTP calls, the data cannot be transmitted stably.

[0005] In a first aspect, the present application provides a data transmission method, wherein the blockchain system includes a service gateway and multiple blockchain nodes; the method is applied to the service gateway, and the method includes:

[0006] Monitoring a message queue; the message queue is used to store transaction data transmitted by the transaction execution system;

[0007] When it is monitored that there is transaction data to be uploaded to the chain in the message queue, the transaction data to be uploaded to the chain is obtained from the message queue; wherein, when the transaction data to be uploaded to the chain is not correctly received, the service gateway is also used to send a request message to the message queue to re-acquire the transaction data to be uploaded to the chain that was not correctly received;

[0008] Send the transaction data to be uploaded to each blockchain node, and control the blockchain node to process the transaction data to be uploaded and store the processing results on the block.

[0009] In a second aspect, the present application provides a data transmission device, wherein the blockchain system includes a service gateway and a plurality of blockchain nodes; the device is applied to the service gateway, and the device includes:

[0010] A monitoring module, used for monitoring a message queue; the message queue is used for storing transaction data transmitted by the transaction execution system;

[0011] An acquisition module, configured to acquire the transaction data to be uploaded from the message queue when it is detected that there is transaction data to be uploaded in the message queue; wherein, when the service gateway fails to correctly receive the transaction data to be uploaded, the service gateway is further configured to send a request message to the message queue to reacquire the transaction data to be uploaded that was not correctly received;

[0012] The processing module is used to send the transaction data to be uploaded to each blockchain node, and control the blockchain node to process the transaction data to be uploaded to the chain and store the processing results on the block.

[0013] In a third aspect, the present application provides an electronic device, including: at least one processor and a memory;

[0014] Memory stores computer-executable instructions;

[0015] At least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs any method of the first aspect.

[0016] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, a method as described in any one of the first aspects is implemented.

[0017] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in any one of the first aspects when executed by a processor.

[0018] The data transmission method, device, equipment, storage medium and program product provided by the present application, the blockchain system includes a service gateway and multiple blockchain nodes; the method is applied to the service gateway, and the method includes: monitoring a message queue, the message queue is used to store transaction data transmitted by a transaction execution system, and when it is monitored that there is transaction data to be uploaded to the chain in the message queue, the transaction data to be uploaded to the chain is obtained from the message queue, wherein, when the service gateway fails to correctly receive the transaction data to be uploaded to the chain, it is also used to send a request message to the message queue to re-acquire the incorrectly received transaction data to be uploaded to the chain, send the transaction data to each blockchain node, and control the blockchain node to process the transaction data to be uploaded to the chain and store the processing results on the block, and obtain the transaction data to be uploaded to the chain by sending a data request to the message queue by the service gateway, thereby improving the stability of the transmission of the transaction data to be uploaded to the chain. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0020] Figure 1 An application scenario diagram of a data transmission method provided by an embodiment of the present invention;

[0021] Figure 2 A schematic diagram of a data transmission method according to an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of a flow chart of another data transmission method provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of the structure of a data transmission device provided by an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention.

[0025] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0026] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0027] It should be noted that the data transmission method, apparatus, equipment, storage medium and program product provided in the present application can be used in the field of financial technology, and can also be used in any field other than the field of financial technology. The application field of the data transmission method, apparatus, equipment, storage medium and program product in the present application is not limited.

[0028] Figure 1 An application scenario diagram of a data transmission method provided by an embodiment of the present invention, such as Figure 1 As shown, the transaction execution system can transmit the generated transaction data to the message queue, and the service gateway can monitor the message queue. When the transaction data to be uploaded to the chain is monitored, the transaction data to be uploaded to the chain is transmitted to each blockchain node to store the transaction data to be uploaded to the block in the blockchain node.

[0029] The data transmission method provided in this application is intended to solve the above technical problems in the prior art.

[0030] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0031] Figure 2 A flowchart of a data transmission method provided by an embodiment of the present invention, wherein the blockchain system includes a service gateway and multiple blockchain nodes; the method is applied to the service gateway, and the method includes steps S201 to S203:

[0032] Step S201, monitoring a message queue; the message queue is used to store transaction data transmitted by a transaction execution system.

[0033] The transaction execution system may be a system that executes data transactions. For example, when user A transfers 10 yuan to user B, the transaction execution system is a system that executes the above transaction. After executing a transaction, the transaction execution system may upload the corresponding transaction data to the message queue to store the transaction data in the message queue.

[0034] Exemplarily, the message queue may be a component implemented based on RabbitMQ or Kafka RabbitMQ.

[0035] Step S202: when it is monitored that there is transaction data to be uploaded to the chain in the message queue, the transaction data to be uploaded to the chain is obtained from the message queue; wherein, when there is an abnormality in receiving the transaction data to be uploaded to the chain, the service gateway is also used to send a request message to the message queue to re-acquire the transaction data to be uploaded to the chain that was not received correctly.

[0036] A variety of transaction data can be stored in the message queue. In practice, not all transaction data needs to be uploaded to the blockchain system. Therefore, the service gateway can monitor the message queue to determine whether there is transaction data to be uploaded. The service gateway is used for the blockchain system to communicate with the outside world. Specifically, when the service gateway monitors the presence of new transaction data in the message queue, it can determine whether the new transaction data meets the preset conditions. If the preset conditions are met, it means that the new transaction data is transaction data to be uploaded, that is, it means that the message queue monitors the presence of transaction data to be uploaded.

[0037] When the service gateway detects that there is transaction data to be uploaded to the chain in the message queue, the service gateway can actively obtain the transaction data to be uploaded to the chain from the message queue.

[0038] In addition, when an abnormality occurs in the network, an abnormality occurs when the service gateway obtains the transaction data to be uploaded to the chain from the message queue, or an abnormality occurs when the service gateway uploads the transaction data to be uploaded to the blockchain node, resulting in the blockchain system failing to correctly obtain the transaction data to be uploaded to the chain. In this case, the service gateway can send a request message to the message queue again to re-acquire the transaction data to be uploaded to the chain, so as to achieve accurate transmission of the transaction data to be uploaded to the blockchain system.

[0039] On the contrary, when no transaction data to be uploaded to the chain is monitored, no operation is performed.

[0040] Step S203: Send the transaction data to be uploaded to each blockchain node, and control the blockchain node to process the transaction data to be uploaded to the chain and store the processing results on the block.

[0041] After the service gateway obtains the transaction data to be uploaded to the chain, it can send the transaction data to be uploaded to the chain to each blockchain node, and each blockchain node can process the transaction data to be uploaded to the chain, so that the processing results can be stored on the block.

[0042] Optionally, the blockchain system may include multiple hardware devices, that is, physical devices, such as servers or computer devices, and each blockchain node may drift between multiple hardware devices. A variety of smart contracts are set in each blockchain node, and each smart contract can process the transaction data to be uploaded to the chain to obtain the processing result. Exemplarily, a transfer smart contract may be included. When user A transfers 10 yuan to user B, the balance of user A and the balance of user B after the transfer can be determined based on the current balance of user A and the current balance of user B and the transfer amount. The balance of each user after the transfer can be considered as the processing result, so that the processing result can be stored on the block.

[0043] The present invention provides a data transmission method, a blockchain system includes a service gateway and multiple blockchain nodes; the method is applied to the service gateway, and the method includes: monitoring a message queue, the message queue is used to store transaction data transmitted by a transaction execution system, and when it is monitored that there is transaction data to be put on the chain in the message queue, the transaction data to be put on the chain is obtained from the message queue, wherein when the service gateway receives the transaction data to be put on the chain with an abnormality, it is also used to send a request message to the message queue to re-acquire the transaction data to be put on the chain that is not correctly received, send the transaction data to be put on the chain to each blockchain node, and control the blockchain node to process the transaction data to be put on the chain and store the processing result on the block, and obtain the transaction data to be put on the chain by sending a data request to the message queue by the service gateway, thereby improving the stability of the transmission of the transaction data to be put on the chain.

[0044] Figure 3 A flowchart of another data transmission method provided by an embodiment of the present invention.

[0045] Optionally, the method further includes:

[0046] Step S301: when it is monitored that there is new transaction data in the message queue, the identification information of the new transaction data is obtained;

[0047] Step S302: determine whether the identification information is one of the target identification information, where the target identification information is used to indicate the identification information of the transaction data to be uploaded to the chain; the identification information corresponds to the transaction scenario;

[0048] Step S303: If yes, determine that the transaction data to be uploaded to the chain exists in the message queue.

[0049] When generating transaction data, the transaction execution system may set corresponding identification information for the transaction data. Optionally, different identification information may be set according to the transaction scenario. For example, identification information 1 may be set for transaction scenario 1, identification information 2 may be set for transaction scenario 2, and so on.

[0050] The process of determining whether there is transaction data to be put on the chain in the message queue by the service gateway can be as follows: the service gateway can first monitor whether there is new transaction data in the message queue, and when there is new transaction data, it can obtain the identification information of the new transaction data, and then determine whether the transaction data is transaction data to be put on the chain according to the identification information. Specifically, the target identification information corresponding to the transaction data to be put on the chain can be set in the service gateway, and when the identification information corresponding to the new transaction data is one of the target identification information, it can be determined that the new transaction data is transaction data to be put on the chain.

[0051] By setting different identification information for different transaction data, the service gateway can determine whether the newly added transaction data in the message queue is the transaction data to be uploaded to the chain, so as to accurately screen the transaction data to be uploaded to the chain.

[0052] Optionally, the method further includes:

[0053] For any blockchain node, obtain the operation and maintenance parameter information of the hardware device where the blockchain node is located;

[0054] Determine the dormant smart contract in the blockchain node according to the operation and maintenance parameter information and whether there is transaction data to be uploaded to the blockchain;

[0055] Control the container corresponding to the dormant smart contract in the blockchain node to stop running, so that the dormant smart contract is in a dormant state.

[0056] Each blockchain node in the blockchain system can be set up with multiple smart contracts. Each smart contract corresponds to a type of transaction data to be uploaded to the blockchain, that is, it is used to process a type of transaction data to be uploaded to the blockchain. When a smart contract is activated on a blockchain node, it needs to consume the resources of the hardware device where the blockchain node is located. Therefore, the container corresponding to the smart contract can be controlled to stop running according to the actual situation to achieve the dormancy of the smart contract, thereby reducing the resource occupation of the smart contract.

[0057] Optionally, since the hardware device where each blockchain node is located may be different, the smart contract that needs to be dormant can be determined separately for each blockchain node. Specifically, for each blockchain node, the operation and maintenance parameter information of the hardware device where the blockchain node is located can be obtained. The operation and maintenance parameter information can reflect the operating status of the hardware device, such as busy or idle. After obtaining the operation and maintenance parameter information, the dormant smart contract can be determined based on the operation and maintenance parameter information and the information on whether there is currently transaction data to be uploaded to the chain. When it is determined that the hardware device is idle based on the operation and maintenance parameter information, it can be determined that there is no dormant smart contract, that is, there is no need to control any smart contract to be dormant.

[0058] Exemplarily, the smart contracts that need to be dormant on each blockchain node can be determined at preset intervals, and the containers corresponding to the smart contracts that need to be dormant can be controlled to stop running.

[0059] By determining the dormant smart contracts and controlling the containers corresponding to the dormant smart contracts to stop running, the resource occupation of the smart contracts can be reduced and the data processing capabilities of the hardware devices can be improved.

[0060] Optionally, determining the dormant smart contract in the blockchain node according to the operation and maintenance parameter information and information on whether there is currently transaction data to be uploaded to the chain includes:

[0061] When the operation and maintenance parameter information meets the target condition and the transaction data to be uploaded to the chain does not exist currently, all smart contracts in the blockchain node are determined to be the smart contracts to be dormant;

[0062] Alternatively, when the operation and maintenance parameter information meets the target condition and the transaction data to be uploaded to the chain currently exists, a first smart contract corresponding to the transaction data to be uploaded to the chain is determined, and all smart contracts in the blockchain node except the first smart contract are determined as the smart contracts to be dormant;

[0063] The operation and maintenance parameters include CPU occupancy information, memory occupancy information and IO information; satisfying the target condition indicates that each operation and maintenance parameter information is greater than a corresponding preset value.

[0064] When each operation and maintenance parameter information is greater than the corresponding preset value, it can indicate that the hardware device is in a busy state. Specifically, a preset value can be set for each operation and maintenance parameter information. For example, a preset value 1 can be set for CPU occupancy information, a preset value 2 can be set for memory occupancy information, and a preset value 3 can be set for IO information. When the operation and maintenance parameter information is greater than the corresponding preset value, it can reflect that the corresponding device in the hardware device is busy; when each operation and maintenance parameter information is greater than the corresponding preset value, it can indicate that the hardware device is in a busy state.

[0065] When the operation and maintenance parameter information meets the target conditions, the dormant smart contract can be determined. When the operation and maintenance parameter information does not meet the preset conditions, it can be determined that there is no dormant smart contract in the blockchain node.

[0066] When the operation and maintenance parameter information meets the target conditions, it can also be determined whether there is currently any transaction data to be uploaded to the chain. When there is currently no transaction data to be uploaded to the chain, each smart contract in the blockchain node can be determined as a dormant smart contract.

[0067] On the contrary, when the operation and maintenance parameter information meets the target conditions, but there is currently transaction data to be uploaded to the chain, the first smart contract corresponding to the transaction data to be uploaded can be determined. Each transaction data has a smart contract, which is used to process the transaction data. The data table of the smart contract corresponding to each transaction data can be pre-set. When there is transaction data to be uploaded to the chain, the data table can be queried to determine the corresponding first smart contract. After determining the first smart contract, the smart contracts other than the first smart contract in the blockchain node can be determined as dormant smart contracts.

[0068] Optionally, the target condition may also be that the number of operation and maintenance parameters greater than the corresponding preset values ​​is greater than the target value. Exemplarily, when there are three operation and maintenance parameter information, when two operation and maintenance parameter information respectively meet the corresponding preset values, it means that the target condition is met. The data of the target value can be set according to the actual situation and is not limited here.

[0069] By determining the dormant smart contract based on the transaction data to be uploaded to the chain when the operation and maintenance parameter information meets the target conditions, the dormant smart contract in the corresponding blockchain node can be accurately determined.

[0070] Optionally, controlling the blockchain node to process the transaction data to be uploaded to the blockchain and storing the processing result on the block includes:

[0071] Determine a second smart contract corresponding to the transaction data to be uploaded to the chain, and determine each target blockchain node where the second smart contract is in a dormant state;

[0072] Sending a wake-up instruction for the second smart contract to each target blockchain node to wake up the second smart contract in each target blockchain node;

[0073] The transaction data to be uploaded to the chain is processed according to the second smart contract in each blockchain node, and the processing result is stored in the block.

[0074] When a blockchain node processes transaction data to be uploaded, since the processing of transaction data to be uploaded needs to be implemented based on smart contracts, the corresponding second smart contract can be determined based on the transaction data to be uploaded, and whether the second smart contract is in a dormant state can be determined. Specifically, the service gateway can send dormant state request information for the second smart contract to each blockchain node, thereby obtaining dormant state information to determine whether the second smart contract in each blockchain node is in a dormant state. When the second smart contract of a blockchain node is in a dormant state, the blockchain node is a target blockchain node, so that the service gateway can send a wake-up instruction to these target blockchain nodes, and the wake-up instruction is used to wake up the second smart contract in each target blockchain node.

[0075] When the second smart contract in each target blockchain node is awakened, the transaction data to be uploaded can be processed based on the second smart contract, and the processing results can be stored in the block of the corresponding blockchain node.

[0076] When a smart contract is dormant, when uploading the transaction data to be uploaded to the blockchain node, it is possible to first determine whether the corresponding smart contract is dormant, and activate it if it is dormant to achieve accurate uploading of the transaction data to be uploaded to the chain.

[0077] Optionally, the method further includes:

[0078] Upon receiving the trigger information sent by the third-party application system, each blockchain node is controlled to execute a third smart contract corresponding to the trigger information to generate contract execution information; the third-party application system is used to trigger the transaction execution system to execute the target transaction;

[0079] Receiving the contract execution information sent by each blockchain node, and performing deduplication processing on each contract execution information to obtain retained contract execution information; the contract execution information represents basic information of the target transaction;

[0080] The retained contract execution information is transmitted to the transaction execution system so that the transaction execution system executes the target transaction.

[0081] Typically, the transaction execution system can generate transaction data first, and each blockchain node in the blockchain system can process and store the transaction data.

[0082] For the blockchain system, there is also a special scenario, which requires that the transaction data be uploaded to the blockchain system first, and then the specific data transaction is executed through the transaction execution system. Exemplarily, there are system 1 and system 2, system 1 is the transaction execution system, and system 2 is a third-party application system, or it can be called a channel application system, based on which the execution of the transaction can be triggered. In system 2, there is a scenario of sending red envelopes to users, and the strategy for sending red envelopes is stored on the blockchain. After system 2 is triggered to send red envelopes, the blockchain will store the contract execution information, and then send the contract execution information to system 1, so that system 1 can change the account information. For the above scenario, it is necessary to implement the blockchain system to transmit data to the transaction execution system.

[0083] In the above scenario, since there are multiple blockchain nodes in the blockchain system, each blockchain node will obtain contract execution information according to the smart contract. Each blockchain node can send the contract execution information to the service gateway. If the service gateway directly sends each contract execution information to the transaction execution system, the transaction execution system will perform a data transaction for each contract execution information, and there will be a problem of multiple executions for one transaction, resulting in errors. Therefore, the service gateway can receive the contract execution information sent by each blockchain node, and deduplicate the received contract execution information to obtain the retained contract execution information. The contract execution information can be the basic information of the transaction, such as the amount of the red envelope sent to user A, the amount of the red envelope sent to user B, etc.

[0084] After the retained contract execution information is determined, the retained contract execution information can be sent to the transaction execution system, so that the transaction execution system can only process the retained contract execution information, thereby avoiding the transaction execution system from executing the same transaction multiple times.

[0085] After processing the contract execution information, the transaction execution system can obtain the execution result, such as whether the red envelope is successfully sent. The transaction execution system can send the execution result to the message queue, and the service gateway obtains the execution result from the message queue and stores it in each blockchain node.

[0086] By deduplicating the contract execution information of each blockchain node through the service gateway, the transaction execution system can be prevented from executing the same transaction multiple times, thereby improving the accuracy of transaction processing by the transaction execution system.

[0087] Figure 4 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present invention, wherein the blockchain system includes a service gateway and a plurality of blockchain nodes; the device 40 is applied to the service gateway, and the device includes:

[0088] A monitoring module 401 is used to monitor a message queue; the message queue is used to store transaction data transmitted by the transaction execution system;

[0089] The acquisition module 402 is used to acquire the transaction data to be uploaded from the message queue when it is monitored that there is transaction data to be uploaded in the message queue; wherein, when the service gateway fails to correctly receive the transaction data to be uploaded, it is further used to send a request message to the message queue to reacquire the transaction data to be uploaded that was not correctly received;

[0090] The processing module 403 is used to send the transaction data to be uploaded to each blockchain node, and control the blockchain node to process the transaction data to be uploaded to the chain and store the processing results on the block.

[0091] Optionally, the device further includes: a judgment module, configured to:

[0092] When it is monitored that there is new transaction data in the message queue, the identification information of the new transaction data is obtained;

[0093] Determine whether the identification information is one of the target identification information, where the target identification information is used to indicate the identification information of the transaction data to be uploaded to the chain; the identification information corresponds to the transaction scenario;

[0094] If so, it is determined that the transaction data to be uploaded to the chain exists in the monitored message queue.

[0095] Optionally, the device further includes: a sleep control module, configured to:

[0096] For any blockchain node, obtain the operation and maintenance parameter information of the hardware device where the blockchain node is located;

[0097] Determine the dormant smart contract in the blockchain node according to the operation and maintenance parameter information and whether there is transaction data to be uploaded to the blockchain;

[0098] Control the container corresponding to the dormant smart contract in the blockchain node to stop running, so that the dormant smart contract is in a dormant state.

[0099] Optionally, when determining the dormant smart contract in the blockchain node according to the operation and maintenance parameter information and the information on whether there is currently transaction data to be uploaded, the dormant control module is specifically used to:

[0100] When the operation and maintenance parameter information meets the target condition and the transaction data to be uploaded to the chain does not exist currently, all smart contracts in the blockchain node are determined to be the smart contracts to be dormant;

[0101] Alternatively, when the operation and maintenance parameter information meets the target condition and the transaction data to be uploaded to the chain currently exists, a first smart contract corresponding to the transaction data to be uploaded to the chain is determined, and all smart contracts in the blockchain node except the first smart contract are determined as the smart contracts to be dormant;

[0102] The operation and maintenance parameters include CPU occupancy information, memory occupancy information and IO information; satisfying the target condition indicates that each operation and maintenance parameter information is greater than a corresponding preset value.

[0103] Optionally, when controlling the blockchain node to process the transaction data to be uploaded and storing the processing result on the block, the processing module 403 is specifically used to:

[0104] Determine a second smart contract corresponding to the transaction data to be uploaded to the chain, and determine each target blockchain node where the second smart contract is in a dormant state;

[0105] Sending a wake-up instruction for the second smart contract to each target blockchain node to wake up the second smart contract in each target blockchain node;

[0106] The transaction data to be uploaded to the chain is processed according to the second smart contract in each blockchain node, and the processing result is stored in the block.

[0107] Optionally, the device further includes: a transmission module, configured to:

[0108] Upon receiving the trigger information sent by the third-party application system, each blockchain node is controlled to execute a third smart contract corresponding to the trigger information to generate contract execution information; the third-party application system is used to trigger the transaction execution system to execute the target transaction;

[0109] Receiving the contract execution information sent by each blockchain node, and performing deduplication processing on each contract execution information to obtain retained contract execution information; the contract execution information represents basic information of the target transaction;

[0110] The retained contract execution information is transmitted to the transaction execution system so that the transaction execution system executes the target transaction.

[0111] The data transmission device provided by the embodiment of the present invention can realize the above-mentioned Figure 2 The data transmission method of the embodiment shown has similar implementation principles and technical effects, which will not be described in detail here.

[0112] Figure 5 The hardware structure diagram of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the electronic device provided by this embodiment includes: at least one processor 501 and a memory 502. The processor 501 and the memory 502 are connected via a bus 503.

[0113] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the method in the above method embodiment.

[0114] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0115] In the above Figure 5In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0116] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.

[0117] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0118] An embodiment of the present invention further provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method of the above method embodiment is implemented.

[0119] An embodiment of the present application also provides a computer program product, including a computer program, which implements the method of the above method embodiment when executed by a processor.

[0120] The computer-readable storage medium mentioned above may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium may be any available medium that can be accessed by a general or special-purpose computer.

[0121] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0122] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

[0123] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0124] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.

[0125] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.

[0126] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0127] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0128] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A data transmission method, characterized in that: The blockchain system includes a service gateway and a plurality of blockchain nodes; the method is applied to the service gateway, and the method includes: Monitoring a message queue; the message queue is used to store transaction data transmitted by the transaction execution system; When it is monitored that there is transaction data to be uploaded to the chain in the message queue, the transaction data to be uploaded to the chain is obtained from the message queue; wherein, when the transaction data to be uploaded to the chain is not correctly received, the service gateway is also used to send a request message to the message queue to re-acquire the transaction data to be uploaded to the chain that was not correctly received; Send the transaction data to be uploaded to each blockchain node, and control the blockchain node to process the transaction data to be uploaded and store the processing results on the block.

2. The method according to claim 1, characterized in that The method further comprises: When it is monitored that there is new transaction data in the message queue, the identification information of the new transaction data is obtained; Determine whether the identification information is one of the target identification information, where the target identification information is used to indicate the identification information of the transaction data to be uploaded to the chain; the identification information corresponds to the transaction scenario; If so, it is determined that the transaction data to be uploaded to the chain exists in the monitored message queue.

3. The method according to claim 1, characterized in that: The method further comprises: For any blockchain node, obtain the operation and maintenance parameter information of the hardware device where the blockchain node is located; Determine the dormant smart contract in the blockchain node according to the operation and maintenance parameter information and whether there is transaction data to be uploaded to the blockchain; Control the container corresponding to the dormant smart contract in the blockchain node to stop running, so that the dormant smart contract is in a dormant state.

4. The method according to claim 3, characterized in that: Determining the dormant smart contract in the blockchain node according to the operation and maintenance parameter information and the information whether there is currently transaction data to be uploaded to the chain, including: When the operation and maintenance parameter information meets the target condition and the transaction data to be uploaded to the chain does not currently exist, all smart contracts in the blockchain node are determined to be the smart contracts to be dormant; Alternatively, when the operation and maintenance parameter information meets the target condition and the transaction data to be uploaded to the chain currently exists, a first smart contract corresponding to the transaction data to be uploaded to the chain is determined, and all smart contracts in the blockchain node except the first smart contract are determined as the smart contracts to be dormant; The operation and maintenance parameters include CPU occupancy information, memory occupancy information and IO information; satisfying the target condition indicates that each operation and maintenance parameter information is greater than a corresponding preset value.

5. The method according to claim 3, characterized in that: Controlling the blockchain node to process the transaction data to be uploaded to the blockchain and storing the processing result on the block, including: Determine a second smart contract corresponding to the transaction data to be uploaded to the chain, and determine each target blockchain node where the second smart contract is in a dormant state; Sending a wake-up instruction for the second smart contract to each target blockchain node to wake up the second smart contract in each target blockchain node; The transaction data to be uploaded to the chain is processed according to the second smart contract in each blockchain node, and the processing result is stored in the block.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Upon receiving the trigger information sent by the third-party application system, each blockchain node is controlled to execute a third smart contract corresponding to the trigger information to generate contract execution information; the third-party application system is used to trigger the transaction execution system to execute the target transaction; Receiving the contract execution information sent by each blockchain node, and performing deduplication processing on each contract execution information to obtain retained contract execution information; the contract execution information represents basic information of the target transaction; The retained contract execution information is transmitted to the transaction execution system so that the transaction execution system executes the target transaction.

7. A data transmission device, characterized in that: The blockchain system includes a service gateway and a plurality of blockchain nodes; the device is applied to the service gateway, and the device includes: A monitoring module, used for monitoring a message queue; the message queue is used for storing transaction data transmitted by the transaction execution system; An acquisition module, configured to acquire the transaction data to be uploaded from the message queue when it is detected that there is transaction data to be uploaded in the message queue; wherein, when the service gateway fails to correctly receive the transaction data to be uploaded, the service gateway is further configured to send a request message to the message queue to reacquire the transaction data to be uploaded that was not correctly received; The processing module is used to send the transaction data to be uploaded to each blockchain node, and control the blockchain node to process the transaction data to be uploaded to the chain and store the processing results on the block.

8. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Intelligent contract running environment control method and system, equipment and medium

    CN111274576A

  • Intelligent contract management system and method in block chain, medium and product

    CN113312429A

  • Data processing method and device applied to light node of block chain and electronic equipment

    CN117112247A

  • Data integration method and device of block chain, computer equipment and storage medium

    CN117633102A

  • Transaction processing method and device based on block chain, equipment, medium and product

    CN118261597A