Data transaction method, device and system

By utilizing pre-stored transaction records and identity certificate key information in electronic devices, the credibility of blockchain transaction requests is ensured, the problem of data interaction between blockchains is solved, and the consistency of data in different blockchains is achieved. and improvement of system reliability.

CN115002104BActive Publication Date: 2024-10-11PETAL CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110192805.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-20
Publication Date
2024-10-11
Estimated Expiration
2041-02-20

AI Technical Summary

Technical Problem

Data interaction cannot occur between blockchains with different underlying architectures, resulting in inconsistent data in the blockchain and reducing the credibility of the system.

Method used

By implementing the data transaction method in electronic devices, using pre-stored transaction records to query matching transaction records, and ensuring that the transaction request is consistent with the blockchain information, the transaction request is submitted to the target blockchain and passed through the identity certificate key and routing Address information encapsulates transaction requests to ensure the credibility and consistency of the data source.

Benefits of technology

In scenarios where blockchains cannot interact, maintaining transaction records offline ensures the credibility of the data source and achieves consistency of the same business data in different blockchains, thus improving the credibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115002104B_ABST
    Figure CN115002104B_ABST
Patent Text Reader

Abstract

The present application relates to the field of blockchain technology, and discloses a data transaction method, which is applied to an intermediate device that maintains transaction records involved in a business scenario. After obtaining a transaction request initiated by a user, a transaction record matching the transaction request is searched from the transaction record, and then it is detected whether the transaction information of the corresponding transaction record is consistent with the transaction information of the transaction request. If consistent, a transaction is initiated to the corresponding blockchain. Since the transaction request can indicate the data writing mode and data structure, the transaction request represents a data source. Therefore, the technical solution of the embodiment of the present application obtains historical transaction information matching the transaction request through offline maintained transaction records, and then, while ensuring that the data source is credible, the corresponding transaction is executed, thereby ensuring the consistency of the same business data in different blockchains, and then ensuring the credibility of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of blockchain technology, and in particular to a data transaction method, device and system. Background Art

[0002] Blockchain is a distributed database that combines data blocks in a sequential manner into a chain data structure. Due to the characteristics of distributed fault tolerance, immutability and privacy protection, blockchain technology can be applied to a variety of business fields such as currency, securities, patents, copyrights, digital goods, and the Internet of Things.

[0003] Among them, a business scenario may involve multiple blockchains, some or all of which can be developed based on different underlying architectures. Different underlying architectures may involve different transaction processing methods, so blockchains related to different underlying architectures cannot interact with each other, thus forming data islands. Since it is difficult to determine whether the data source is credible, if different blockchains receive different transaction requests for the same business data, it is easy to cause the business data to be inconsistent in different blockchains, resulting in poor system credibility related to the business scenario. Summary of the invention

[0004] The embodiments of the present application provide a data transaction method, device, and system to solve the problem of being unable to ensure whether the data source is credible in a scenario where at least two blockchains cannot interact with each other.

[0005] In a first aspect, an embodiment of the present application provides a data transaction method, which can be executed by an electronic device or by a component of the electronic device (such as a chip, a chip system, or a processor, etc.). The method includes: obtaining a transaction request input by a user; querying a first transaction record matching the transaction request from pre-stored transaction records; obtaining first transaction information from a first blockchain related to the first transaction record; if the transaction information related to the transaction request is consistent with the first transaction information, submitting the transaction request to at least one second blockchain related to the transaction request.

[0006] Among them, the transaction request can indicate the data writing mode and data structure, that is, the transaction request represents a data source. The transaction record may include information such as the blockchain identifier, node identifier, transaction identifier, transaction mode, etc. associated with the transaction. In the technical solution of the embodiment of the present application, the electronic device can, for example, use the transaction record in which the data writing mode in the transaction record is the same as the data writing mode related to the transaction request as the first transaction record matching the transaction request, and can use the data structure information of the first transaction information to be consistent with the structure information of the data to be written in the transaction request, as the transaction information related to the transaction request is consistent with the first transaction information. Based on this, it can be seen that by adopting the implementation method of the embodiment of the present application, in the scenario where the blockchain cannot perform data interaction, the historical transaction information matching the transaction request can be obtained through the offline maintained transaction record, and then, while ensuring that the data source is credible, the corresponding transaction is executed, so that the consistency of the same business data in different blockchains can be ensured, and the credibility of the system can be ensured.

[0007] In an optional design, submitting the transaction request to at least one second blockchain related to the transaction request includes: obtaining identity certificate key information of each second blockchain in the at least one second blockchain, and routing address information of a node in each second blockchain; encapsulating the transaction request based on the identity certificate key information of each second blockchain; and writing the encapsulated transaction request into the corresponding second blockchain based on the routing address information of the node in each second blockchain.

[0008] In an optional design, after submitting the transaction request to at least one second blockchain related to the transaction request, it also includes: storing transaction records related to the transaction request. It can be seen that by adopting this implementation method, transaction records can be updated in time according to transaction changes of the blockchain, thereby providing reliable detection information.

[0009] In an optional design, it also includes: if the pre-stored transaction records do not include a first transaction record matching the transaction request, submitting the transaction request to at least one second blockchain related to the transaction request.

[0010] An optional design also includes: if the transaction information related to the transaction request is inconsistent with the first transaction information, submitting transaction request failure information.

[0011] In an optional design, it also includes: obtaining a query request input by a user, the query request indicating second transaction information; if the pre-stored transaction record includes a second transaction record, obtaining at least one blockchain related to the second transaction record; and reading the second transaction information from one of the at least one blockchains.

[0012] In an optional design, reading the second transaction information from one of the at least one blockchains includes: obtaining a node of a blockchain with a closest route among the at least one blockchain; and reading the second transaction information from the node of the blockchain with the closest route.

[0013] An optional design also includes: receiving identity certificate key information and transaction records of each blockchain in at least two blockchains, and routing address information of all nodes in each of the blockchains; and periodically detecting the connectivity of the routing address information of each node.

[0014] In a second aspect, an embodiment of the present application provides a data transaction device, comprising a proxy module, a data management module and an on-chain management module, wherein the proxy module is used to obtain a transaction request input by a user; the data management module is used to query a first transaction record matching the transaction request from pre-stored transaction records; the data management module is also used to obtain first transaction information from a first blockchain related to the first transaction record; and the on-chain management module is used to submit the transaction request to at least one second blockchain related to the transaction request if the transaction information related to the transaction request is consistent with the first transaction information.

[0015] In an optional design, the device also includes an identity management module and a routing management module, wherein the identity management module is used to store the identity certificate key information of the blockchain; the routing management module is used to store the routing address information of the nodes in the blockchain; the on-chain management module is also used to obtain the identity certificate key information of each second blockchain in the at least one second blockchain from the identity management module, and obtain the routing address information of the nodes in each second blockchain from the routing management module; the on-chain management module is also used to encapsulate the transaction request based on the identity certificate key information of each second blockchain; the on-chain management module is also used to write the encapsulated transaction request into the corresponding second blockchain based on the routing address information of the nodes in each second blockchain.

[0016] In an optional design, the data management module is also used to store transaction records related to the transaction request.

[0017] In an optional design, the proxy module is also used to submit transaction request failure information if the transaction information related to the transaction request is inconsistent with the first transaction information.

[0018] In an optional design, the proxy module is further used to obtain a query request input by a user, wherein the query request indicates second transaction information; the data management module is used to obtain at least one blockchain related to the second transaction record if the pre-stored transaction record includes the second transaction record; the data management module is further used to read the second transaction information from one of the at least one blockchain.

[0019] In an optional design, the data management module is also used to obtain the node of the blockchain with the closest route in the at least one blockchain from the routing management module; the data management module is also used to read the second transaction information from the node of the blockchain with the closest route.

[0020] In an optional design, the identity management module is also used to receive the identity certificate key information of each blockchain in at least two blockchains; the routing management module is also used to receive the routing address information of all nodes in each of the blockchains; the routing management module is also used to periodically detect the connectivity of the routing address information of each node.

[0021] In a third aspect, an embodiment of the present application provides a data trading system, the system comprising at least two blockchains and an electronic device, wherein cross-chain interaction is not supported between the at least two blockchains, and the electronic device is as described in the second aspect or any possible design of the second aspect.

[0022] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor, the processor being coupled to a memory, the memory being used to store programs or instructions, and when the programs or instructions are executed by the processor, the device executes the method in the first aspect or any possible design of the first aspect.

[0023] In a fifth aspect, an embodiment of the present application provides a computer storage medium, which stores instructions. When the instructions are executed on a computer, the computer executes part or all of the steps of the data trading method in the first aspect and various possible implementations of the first aspect.

[0024] In a sixth aspect, an embodiment of the present application provides a computer program product, which, when running on a computer, enables the computer to execute part or all of the steps of the data trading method in the first aspect and various possible implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 is an exemplary structural diagram of a data transaction system 1 provided in an embodiment of the present application;

[0027] Figure 2A is a method flow chart of a data transaction method 100 provided in an embodiment of the present application;

[0028] Figure 2B is a method flow chart of a data query method 200 provided in an embodiment of the present application;

[0029] Figure 2C is a method flow chart of a data storage method 300 provided in an embodiment of the present application;

[0030] Figure 3 It is a schematic diagram of an exemplary structure of an electronic device 30 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0031] The technical solution of the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application.

[0032] The terms used in the following embodiments of the present application are for the purpose of describing optional implementation methods and are not intended to be used as limitations on the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind", "said", "above", "the" and "this" are intended to also include plural expressions. It should also be understood that although the terms first, second, etc. may be used to describe a certain class of objects in the following embodiments, the objects are not limited to these terms. These terms are used to distinguish specific objects of this class of objects. For example, the terms first, second, etc. may be used to describe blockchains in the following embodiments, but blockchains should not be limited to these terms. The same is true for other classes of objects that may be described by the terms first, second, etc. in the following embodiments, which will not be repeated here.

[0033] The embodiment of the present application provides a data transaction method, which maintains the transaction records involved in the business scenario off-chain. Then, after obtaining the transaction request initiated by the user, the first transaction record matching the transaction request is determined according to the transaction record, and then the transaction information of the first transaction record is obtained. If the transaction information of the first transaction record is consistent with the transaction information of the transaction request, a transaction is initiated to the corresponding blockchain. Among them, the transaction request can indicate the data writing mode and data structure, that is, the transaction request represents a data source. It can be seen that the technical solution of the embodiment of the present application, in a scenario where the blockchain cannot perform data interaction, can obtain historical transaction information matching the transaction request through the transaction records maintained offline, and then, while ensuring that the data source is credible, the corresponding transaction is executed, thereby ensuring the consistency of the same business data in different blockchains, and then ensuring the credibility of the system.

[0034] The "business scenario" involved in the embodiments of this application refers to the transaction scenario of a specific business, such as the scenario of copyright transaction, the scenario of securities transaction, the scenario of patent transaction, etc. A business scenario can correspond to a blockchain network. For example, the Copyright Bureau can form a blockchain network with multiple copyright owners. In some implementations, the blockchain network of a business scenario is also referred to as the data transaction system of the business scenario.

[0035] The "transaction request" involved in the embodiments of the present application refers to writing a piece of data to the blockchain through a data writing mode. Among them, different types of transactions correspond to different data writing modes, and the structure of the written data is also different. Based on this, the transaction request can also be considered as the data source of the blockchain.

[0036] In some implementations, the "transaction record matching the transaction request" may refer to a transaction record having the same data writing mode as the transaction request. In other implementations, the "transaction record matching the transaction request" may refer to a transaction record having the same content as the preset content in the data writing mode of the transaction request.

[0037] Figure 1 A structural schematic diagram of a data transaction system 1 is shown. The data transaction system 1 may include an intermediate device 10 and at least two blockchains 20. The intermediate device 10 may include a proxy module 11, an identity management module 12, a routing management module 13, a data management module 14, and an on-chain management module 15. The blockchain 21 and the blockchain 22 in the at least two blockchains 20 do not support cross-chain interaction, for example, and both the blockchain 21 and the blockchain 22 can interact with the intermediate device 10 for data. Among them, the blockchain 21 and the blockchain 22 may each include multiple nodes, and business data is stored in each node.

[0038] Understandably, Figure 1The illustrated structure does not constitute a specific limitation on the data transaction system 1 in the embodiment of the present application. Optionally, in other embodiments, the data transaction system 1 described in the embodiment of the present application may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0039] The proxy module 11 can be used to implement the information interaction function between the intermediate device 10 and each of the at least two blockchains 20, and can call other modules in the intermediate device 10 to execute the functions of the corresponding modules.

[0040] The identity management module 12 can be used to obtain Figure 1 The identity certificate key information of each blockchain is illustrated so as to provide the identity certificate key information of the corresponding blockchain when the proxy module 11 and the on-chain management module 15 interact with each blockchain.

[0041] The routing management module 13 can be used to maintain Figure 1 The routing address information of the nodes in each blockchain is illustrated to provide the routing address information of the corresponding nodes when the proxy module 11 and the on-chain management module 15 interact with the nodes of the blockchain.

[0042] The data management module 14 can be used to maintain the transaction record of each transaction in the data transaction system 1. The transaction record may include information such as the blockchain identifier, node identifier, transaction identifier, transaction mode, etc. associated with the transaction. The data management module 14 can also be used to obtain the transaction request triggered by the user, and detect whether the data related to the transaction request is credible based on the transaction record. Optionally, the data management module 14 can maintain the transaction information of the business data in the form of a database. The database can be, for example, a relational database management system (my structured query language, mySQL).

[0043] The on-chain management module 15 can be used to respond to the triggering of the proxy module 11, obtain the identity certificate key information of the blockchain corresponding to the transaction request and the routing address information of the node corresponding to the transaction request from the identity management module 12, so as to send the transaction request to the node of the requested blockchain and write the data related to the transaction request into the corresponding node.

[0044] It is understandable that the embodiments of the present application can also be applied to future-oriented blockchain technology. The data transaction system and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solution of the present application and do not constitute a limitation on the technical solution provided by the present application. It is known to those skilled in the art that with the evolution of blockchain technology and the emergence of new business scenarios, the technical solutions provided by the present application are also applicable to similar technical problems.

[0045] Figure 2A A data transaction method 100 (hereinafter referred to as method 100) is shown. Method 100 is applied to Figure 1 The intermediate device 10 in the embodiment includes: obtaining a transaction request input by a user (S101). Determining whether the transaction record contains a first transaction record matching the transaction request (S102). If the transaction record includes a first transaction record matching the transaction request, obtaining first transaction information from a first blockchain related to the first transaction record (S103), and determining whether the transaction information related to the transaction request is consistent with the first transaction information (S104). If the transaction record does not include the first transaction record matching the transaction request, submitting the transaction request to at least one second blockchain related to the transaction request (S105). If the transaction information related to the transaction request is consistent with the first transaction information, executing the operation of S105. If the transaction information related to the transaction request is inconsistent with the first transaction information, submitting transaction request failure information (S106).

[0046] Among them, the transaction request may indicate the blockchain to which the data is written, and the transaction request may indicate that the data is written to at least one blockchain, and the technical solution of the embodiment of the present application is not limited to this.

[0047] Combination Figure 1 In the data transaction system 1 shown, after obtaining the transaction request input by the user, the data management module 14 can query whether there is a transaction record matching the transaction request from the pre-maintained transaction records. For example, the data management module 14 can query the transaction record with the same data writing mode as the transaction request according to the data writing mode. After querying that the first transaction record is a transaction record matching the transaction request, the data management module 14 can obtain the first blockchain identifier, transaction identifier, node identity and other information related to the first transaction record. After that, the data management module 14 obtains the identity certificate key information of the first blockchain from the identity management module 12, and obtains the routing address information related to the node identity of the first blockchain from the routing management module 13. Then, a query request is initiated to the first blockchain to obtain the first transaction information corresponding to the first transaction record. This can avoid errors in the transaction records of the data management module and the situation where the transaction records of the data management module and the blockchain are not updated synchronously.

[0048] Exemplarily, the first transaction information may include data structure information of the first transaction data. After the data management module 14 obtains the first transaction information, it may detect whether the data structure information of the first transaction information is consistent with the structure information of the data to be written in the transaction request. When the data structure information of the first transaction information is consistent with the structure information of the data to be written in the transaction request, it can be explained that the data to be written in the transaction request is credible, that is, it is not forged data, so that it can be determined that the data source related to the transaction request is credible. Furthermore, the chain management module 15 may obtain at least one second blockchain related to the transaction request, obtain the identity certificate key information of each second blockchain from the identity management module 12, and obtain the routing address information related to the node identity of each second blockchain from the routing management module 13, and then encapsulate the transaction request according to the encapsulation method corresponding to the second blockchain, and then write the encapsulated transaction request into the second blockchain. Furthermore, the data management module 14 stores the transaction record corresponding to the transaction request.

[0049] In other embodiments, if the data management module 14 cannot find a transaction record with the same data writing mode as the transaction request, it can be considered that the transaction request is the first time to write data into the blockchain in this mode, and the written data can be assumed to be credible. Then, the on-chain management module 15 triggers the transaction request.

[0050] In a possible implementation, the data transaction method may be a data query method. Figure 2B A data query method 200 (hereinafter referred to as method 200) is illustrated. Method 200 includes: obtaining a query request input by a user, the query request indicating second transaction information. Determining whether the transaction record contains a second transaction record matching the second transaction information. If the transaction record contains the second transaction record, obtaining at least one blockchain related to the second transaction record, and reading the second transaction information from the at least one blockchain. If the transaction record does not contain the second transaction record, submitting a query failure message.

[0051] In method 200, the data management module 14 determines whether the transaction record includes a second transaction record, and when the transaction record includes the second transaction record, obtains the identity certificate key information of the blockchain related to the second transaction record from the identity management module 12, and obtains the routing address information related to the node identity related to the second transaction record from the routing management module 13, so as to read the second transaction information.

[0052] In some implementations, if the second transaction record is related to at least two blockchains, the data management module 14 may determine a node of a blockchain with the closest routing among the at least two blockchains, and then read the second transaction information from the node of the closest blockchain.

[0053] In some other implementations, when the database in the data management module 14 contains the second transaction information, the data management module 14 may read the second transaction information from the database.

[0054] It can be seen that the embodiment of the present application maintains transaction records on different blockchains through an offline database, which makes transaction data query more convenient.

[0055] It should be noted that before executing method 100 and method 200, the intermediate device 10 may also pre-store blockchain-related data. Figure 2C A data storage method 300 (hereinafter referred to as method 300) is illustrated. Method 300 includes: the intermediate device 10 can also receive the identity certificate key information of each blockchain in at least two blockchains 20, and the routing address information of all nodes in each blockchain. Afterwards, the intermediate device 10 periodically detects the connectivity of the routing address information of each node.

[0056] Exemplarily, after the blockchain and the nodes of the blockchain are deployed, the blockchain can register the identity certificate key information to the identity management module 12, register the routing address information of each node to the routing management module 13, and register each transaction record to the data management module 14.

[0057] In addition, the routing management module 13 may, for example, periodically send a heartbeat packet to each node according to the routing address information to determine the connectivity of each node.

[0058] It is understandable that methods 100 to 300 are schematic descriptions and do not limit the embodiments of the present application. In the embodiments of the present application, the information stored in the data management module can be flexibly deployed based on different business scenarios, and the embodiments of the present application do not limit this.

[0059] In summary, the implementation method of the embodiment of the present application is adopted to deploy an intermediate device in the blockchain network, and the intermediate device maintains the transaction records involved in the business scenario. Then, after obtaining the transaction request initiated by the user, the intermediate device searches for the transaction record that matches the transaction request, and then detects whether the transaction information of the corresponding transaction record is consistent with the transaction information of the transaction request. If the transaction information of the transaction record is consistent with the transaction information of the transaction request, a transaction is initiated to the corresponding blockchain. In this way, in a scenario where the blockchain cannot perform data interaction, the historical transaction information matching the transaction request can be obtained through the transaction records maintained offline, and then, while ensuring that the data source is credible, the corresponding transaction is executed, thereby ensuring the consistency of the same business data in different blockchains, and then ensuring the credibility of the system.

[0060] Corresponding to the method provided in the above method embodiment, the embodiment of the present application also provides a corresponding intermediate device, including a module for executing the corresponding module of the above embodiment. The module can be software, hardware, or a combination of software and hardware.

[0061] Figure 3 A schematic diagram of the structure of an electronic device 30 is provided. The electronic device 30 may be an intermediate device, or a chip, a chip system, or a processor that supports the intermediate device to implement the above method. The device may be used to implement the method described in the above method embodiment, and the details may refer to the description in the above method embodiment.

[0062] The electronic device 30 may include one or more processors 301, which may also be referred to as processing units, and may implement certain control functions. The processor 301 may be a general-purpose processor or a dedicated processor, etc. The processor 301 may, for example, execute a software program and process data of the software program.

[0063] In an optional design, the processor 301 may also store instructions and / or data 303, and the instructions and / or data 303 can be executed by the processor so that the electronic device 30 executes the method described in the above method embodiment.

[0064] In another optional design, the processor 301 may include a transceiver unit for implementing the receiving and sending functions. For example, the transceiver unit may be a transceiver circuit, or an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing the receiving and sending functions may be separate or integrated. The above-mentioned transceiver circuit, interface, or interface circuit may be used for reading and writing code / data, or the above-mentioned transceiver circuit, interface, or interface circuit may be used for transmitting or delivering signals.

[0065] In yet another possible design, the electronic device 30 may include a circuit that can implement the functions of sending, receiving, or communicating in the aforementioned method embodiments.

[0066] Optionally, the electronic device 30 may include one or more memories 302, on which instructions 304 may be stored, and the instructions may be executed on the processor so that the electronic device 30 performs the method described in the above method embodiment. Optionally, the above blockchain information and transaction information may also be stored in the memory. Optionally, instructions and / or data may also be stored in the processor. The processor and memory may be provided separately or integrated together. For example, the corresponding relationship described in the above method embodiment may be stored in a memory or in a processor.

[0067] Optionally, the electronic device 30 may further include a transceiver 305 and / or an antenna 306. The processor 301 may be referred to as a processing unit, which controls the electronic device 30. The transceiver 305 may be referred to as a transceiver unit, a transceiver, a transceiver circuit, a transceiver device or a transceiver module, etc., which is used to implement a transceiver function.

[0068] Optionally, the electronic device 30 in the embodiment of the present application can be used to execute the embodiment of the present application. Figure 2A , Figure 2B or Figure 2C The described method can also be used to execute a method in which the methods described in the above three or more figures are combined with each other.

[0069] The processor and transceiver described in the present application can be implemented in an integrated circuit (IC), an analog IC, a radio frequency integrated circuit RFIC, a mixed signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (NMOS), P-type metal oxide semiconductor (positive channel metal oxide semiconductor, PMOS), bipolar junction transistor (BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.

[0070] The scope of the electronic device described in the above embodiments is not limited thereto, and the structure of the device may not be limited thereto. Figure 3 The electronic device may be an independent device or may be part of a larger device. For example, the electronic device may be:

[0071] (1) Independent integrated circuit IC, or chip, or chip system or subsystem;

[0072] (2) having a set of one or more ICs, and optionally, the IC set may also include a storage component for storing data and / or instructions;

[0073] (3) ASIC, such as modem (MSM);

[0074] (4) Modules that can be embedded in other devices;

[0075] (5) Receivers, terminals, smart terminals, cellular phones, wireless devices, handheld devices, mobile units, vehicle-mounted devices, network devices, cloud devices, artificial intelligence devices, machine equipment, home equipment, medical equipment, industrial equipment, etc.;

[0076] (5)Others

[0077] In a specific implementation, corresponding to the electronic device, the embodiment of the present application further provides a computer storage medium, wherein the computer storage medium set in the electronic device can store a program, and when the program is executed, it can implement the following FIG. 2A to FIG. 2C Some or all of the steps in each embodiment of the provided method. The storage medium in the electronic device can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0078] It should be understood that in various embodiments of the present application, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment.

[0079] It is understandable that some optional features in the embodiments of the present application may be implemented independently in certain scenarios without relying on other features, such as the solution on which they are currently based, to solve corresponding technical problems and achieve corresponding effects, or may be combined with other features according to needs in certain scenarios. Accordingly, the devices provided in the embodiments of the present application may also realize these features or functions accordingly, which will not be elaborated here.

[0080] It is understood that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general processor, a digital signal processor (digital signal processor, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0081] The scheme described in the present application can be implemented in various ways. For example, these technologies can be implemented in a combination of hardware, software or hardware. For hardware implementation, the processing unit for executing these technologies at a communication device (for example, a base station, a terminal, a network entity or a chip) can be implemented in one or more general-purpose processors, DSPs, digital signal processing devices, ASICs, programmable logic devices, FPGAs, or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any traditional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration to implement.

[0082] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

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

[0084] In this application, elements expressed in the singular are intended to mean "one or more" rather than "one and only one", unless otherwise specified. In this application, "at least one" is intended to mean "one or more", and "more than one" is intended to mean "two or more", unless otherwise specified.

[0085] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. A can be singular or plural, and B can be singular or plural. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0086] The values ​​of the information in each table in the present application are only examples and can be configured to other values, which are not limited by the present application. When configuring the correspondence between information and each parameter, it is not necessarily required to configure all the correspondences illustrated in each table. For example, in the table in the present application, the correspondences shown in some rows may not be configured. For another example, appropriate deformation adjustments can be made based on the above table, such as splitting, merging, etc. The names of the parameters shown in the titles of the above tables may also use other names that can be understood by the communication device, and the values ​​or representations of the parameters may also be other values ​​or representations that can be understood by the communication device. When implementing the above tables, other data structures may also be used, such as arrays, queues, containers, stacks, linear lists, pointers, linked lists, trees, graphs, structures, classes, heaps, hash tables or hash tables.

[0087] The predefined in the present application may be understood as defined, predefined, stored, pre-stored, pre-negotiated, pre-configured, solidified, or pre-burned.

[0088] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A data transaction method, characterized in that: The method comprises: Obtaining a transaction request input by a user, wherein the transaction request is a request to write data to a blockchain in a data writing mode; Querying a first transaction record matching the transaction request from pre-stored transaction records, wherein the transaction record matching the transaction request is a transaction record having the same data writing mode as the transaction request, or a transaction record having the same preset content in the data writing mode as the transaction request; Obtaining first transaction information from a first blockchain related to the first transaction record, where the first transaction information includes data structure information of the first transaction data; If the data structure information of the data to be written related to the transaction request is consistent with the data structure information in the first transaction information, the transaction request is submitted to at least one second blockchain related to the transaction request.

2. The method according to claim 1, characterized in that Submitting the transaction request to at least one second blockchain related to the transaction request includes: Obtaining identity certificate key information of each second blockchain in the at least one second blockchain and routing address information of a node in each second blockchain; Encapsulating the transaction request based on the identity certificate key information of each second blockchain; The encapsulated transaction request is written into the corresponding second blockchain based on the routing address information of the node in each second blockchain.

3. The method according to claim 1, characterized in that After submitting the transaction request to at least one second blockchain related to the transaction request, the method further includes: Storing transaction records related to the transaction request.

4. The method according to claim 1, characterized in that Also includes: If the pre-stored transaction records do not include a first transaction record matching the transaction request, submit the transaction request to at least one second blockchain related to the transaction request.

5. The method according to claim 1, characterized in that Also includes: If the data structure information of the to-be-written data related to the transaction request is inconsistent with the data structure information in the first transaction information, transaction request failure information is submitted.

6. The method according to claim 1, characterized in that Also includes: Obtaining a query request input by a user, wherein the query request indicates second transaction information; If the pre-stored transaction record includes a second transaction record, obtaining at least one blockchain related to the second transaction record; The second transaction information is read from one of the at least one blockchain.

7. The method according to claim 6, characterized in that Reading the second transaction information from one of the at least one blockchain includes: Obtaining a node of a blockchain that is closest to the at least one blockchain; The second transaction information is read from a node of the blockchain closest to the route.

8. The method according to any one of claims 1 to 7, characterized in that Also includes: Receiving identity certificate key information and transaction records of each blockchain in at least two blockchains, and routing address information of all nodes in each of the blockchains; The connectivity of the routing address information of each node is periodically detected.

9. A data transaction device, characterized in that: The device includes an agent module, a data management module and an uplink management module, wherein: The proxy module is used to obtain a transaction request input by a user, where the transaction request is a request to write data to the blockchain in a data writing mode; The data management module is configured to query a first transaction record matching the transaction request from pre-stored transaction records, wherein the transaction record matching the transaction request is a transaction record having the same data writing mode as the transaction request, or a transaction record having the same preset content in the data writing mode of the transaction request; The data management module is further used to obtain first transaction information from a first blockchain related to the first transaction record, where the first transaction information includes data structure information of the first transaction data; The on-chain management module is configured to submit the transaction request to at least one second blockchain related to the transaction request if the data structure information of the data to be written related to the transaction request is consistent with the data structure information in the first transaction information.

10. The device according to claim 9, characterized in that The device also includes an identity management module and a routing management module, wherein: The identity management module is used to store the identity certificate key information of the blockchain; The routing management module is used to store the routing address information of the nodes in the blockchain; The on-chain management module is further configured to obtain the identity certificate key information of each second blockchain in the at least one second blockchain from the identity management module, and obtain the routing address information of the node in each second blockchain from the routing management module; The on-chain management module is further used to encapsulate the transaction request based on the identity certificate key information of each second blockchain; The on-chain management module is further used to write the encapsulated transaction request into the corresponding second blockchain based on the routing address information of the node in each second blockchain.

11. The device according to claim 9, characterized in that The data management module is also used to store transaction records related to the transaction request.

12. The device according to claim 9, characterized in that The proxy module is further configured to submit transaction request failure information if the data structure information of the to-be-written data related to the transaction request is inconsistent with the data structure information in the first transaction information.

13. The device according to claim 9, characterized in that The proxy module is further used to obtain a query request input by a user, wherein the query request indicates the second transaction information; The data management module is configured to obtain at least one blockchain related to a second transaction record if the pre-stored transaction record includes the second transaction record; The data management module is further used to read the second transaction information from one of the at least one blockchain.

14. The device according to claim 13, characterized in that The data management module is further configured to obtain, from the routing management module, a node of a blockchain that is closest to the routing in the at least one blockchain; The data management module is further used to read the second transaction information from the node of the blockchain closest to the route.

15. The device as claimed in claim 10, characterized in that The identity management module is further used to receive identity certificate key information of each blockchain in at least two blockchains; The routing management module is further used to receive routing address information of all nodes in each of the blockchains; The routing management module is also used to periodically detect the connectivity of the routing address information of each node.

16. A data trading system, characterized in that: The system includes at least two blockchains and an electronic device, wherein cross-chain interaction is not supported between the at least two blockchains, and the electronic device is the data transaction device described in any one of claims 9-15.