CN113065871A - Transaction data processing method and device - Google Patents

Transaction data processing method and device Download PDF

Info

Publication number
CN113065871A
CN113065871A CN202110434445.0A CN202110434445A CN113065871A CN 113065871 A CN113065871 A CN 113065871A CN 202110434445 A CN202110434445 A CN 202110434445A CN 113065871 A CN113065871 A CN 113065871A
Authority
CN
China
Prior art keywords
version number
transaction
transaction data
data
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110434445.0A
Other languages
Chinese (zh)
Inventor
汪硕文
肖迪
谢联民
姚鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110434445.0A priority Critical patent/CN113065871A/en
Publication of CN113065871A publication Critical patent/CN113065871A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Health & Medical Sciences (AREA)
  • Finance (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Strategic Management (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a device for processing transaction data, and relates to the technical field of block chains. The method comprises the following steps: acquiring transaction data, wherein the transaction data comprises a transaction identifier; inquiring in a first data table according to the transaction identifier to obtain a first version number; wherein the first data table is obtained in advance; generating a new version number for the transaction data according to the first version number; and based on the transaction identification, the transaction data, the new version number, the first version number and the transaction data corresponding to the first version number, the transaction data are uplink stored. The device is used for executing the method. The transaction data processing method and device provided by the embodiment of the invention improve the reliability of the transaction data.

Description

Transaction data processing method and device
Technical Field
The invention relates to the technical field of block chains, in particular to a method and a device for processing transaction data.
Background
At present, in the bond underwriting transaction market of the same industry, if one of the two transaction parties is a bank, the transaction data is usually stored in a server of the bank.
Since the transaction data is stored in the server of the bank, the transaction data which is common to both transaction parties becomes the private data of the bank. The counterparty of the bank in the same-industry transaction has certain doubt for the transaction data shared by the two bank management parties. Therefore, how to propose a data processing method to improve the reliability of transaction data storage becomes an important issue to be solved in the field.
Disclosure of Invention
To solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for processing transaction data, which can at least partially solve the problems in the prior art.
In one aspect, the present invention provides a method for processing transaction data, including:
acquiring transaction data, wherein the transaction data comprises a transaction identifier;
inquiring in a first data table according to the transaction identifier to obtain a first version number; wherein the first data table is obtained in advance;
generating a new version number for the transaction data according to the first version number;
and based on the transaction identification, the transaction data, the new version number, the first version number and the transaction data corresponding to the first version number, the transaction data are uplink stored.
In another aspect, the present invention provides a transaction data processing apparatus, including:
the acquisition module is used for acquiring transaction data, and the transaction data comprises a transaction identifier;
the query module is used for querying in a first data table according to the transaction identifier to obtain a first version number; wherein the first data table is obtained in advance;
the generating module is used for generating a new version number for the transaction data according to the first version number;
and the storage module is used for storing the trade data in an uplink mode based on the trade identification, the trade data, the new version number, the first version number and the trade data corresponding to the first version number.
In yet another aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the transaction data processing method according to any of the above embodiments.
In yet another aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the method for processing transaction data according to any of the above embodiments.
The transaction data processing method and device provided by the embodiment of the invention can acquire transaction data including transaction identification, query and obtain a first version number in the first data table according to the transaction identification, generate a new version number for the transaction data according to the first version number, and store the transaction data in a chain manner on the basis of the transaction identification, the transaction data, the new version number, the first version number and the transaction data corresponding to the first version number, and store the transaction data through a block chain, so that the reliability of the transaction data is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a flowchart illustrating a transaction data processing method according to a first embodiment of the present invention.
Fig. 2 is a flowchart illustrating a transaction data processing method according to a second embodiment of the present invention.
Fig. 3 is a flowchart illustrating a transaction data processing method according to a third embodiment of the present invention.
Fig. 4 is a flowchart illustrating a transaction data processing method according to a fourth embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a transaction data processing device according to a fifth embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a transaction data processing device according to a sixth embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a transaction data processing device according to a seventh embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a transaction data processing device according to an eighth embodiment of the present invention.
Fig. 9 is a schematic structural diagram of a transaction data processing device according to a ninth embodiment of the present invention.
Fig. 10 is a schematic structural diagram of a transaction data processing device according to a tenth embodiment of the present invention.
Fig. 11 is a schematic physical structure diagram of an electronic device according to an eleventh embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention. It should be noted that the embodiments and features of the embodiments in the present application may be arbitrarily combined with each other without conflict.
Fig. 1 is a schematic flow chart of a transaction data processing method according to an embodiment of the present invention, and as shown in fig. 1, the transaction data processing method according to the embodiment of the present invention includes:
s101, acquiring transaction data, wherein the transaction data comprises a transaction identifier;
in particular, the server may obtain transaction data, which includes a transaction identification. The transaction data is set according to actual needs, and the embodiment of the invention is not limited. The execution main body of the transaction data processing method provided by the embodiment of the invention comprises but is not limited to a server.
For example, the transaction data may be bond underwriting transaction detail data generated by the equity underwriting.
S102, inquiring in a first data table according to the transaction identifier to obtain a first version number; wherein the first data table is obtained in advance;
specifically, after receiving the transaction data, the server may query a first version number from a first data table according to the transaction identifier. The first data table is obtained in advance, the first data table can store transaction identification and a first version number, and transaction data corresponding to the transaction identification and the first version number, and the first version number is the latest version number corresponding to the transaction identification.
For example, the server stores each transaction datum in the blockchain, then obtains the latest version number corresponding to each transaction identifier from the blockchain, and stores the transaction datum corresponding to the transaction identifier and the latest version number in the first data table. The version number corresponds to the transaction data one by one, the transaction identification can correspond to a plurality of transaction data, and for each transaction data with the same transaction identification, the latest version number corresponds to the latest transaction data. The latest transaction data are accessed frequently, and the latest transaction data corresponding to each transaction identifier are stored in the first data table, so that the data query efficiency can be improved.
S103, generating a new version number for the transaction data according to the first version number;
specifically, after the server queries and obtains the first version number corresponding to the transaction identifier, a new version number may be generated for the transaction data according to the first version number, and the new version number may be corresponding to the transaction data.
For example, version numbers are represented by the letter V plus a number, with a change in the number representing a different version number. The version number of the first transaction data corresponding to the transaction identifier may be denoted as V1, the version number of the second transaction data corresponding to the transaction identifier may be denoted as V2, the version number of the third transaction data corresponding to the transaction identifier may be denoted as V3, and so on. If the first version number obtained by the server query is V5, then the new version number generated for the transaction data is V6.
S104, based on the transaction identification, the transaction data, the new version number, the first version number and the transaction data corresponding to the first version number, the transaction data are stored in an uplink mode.
Specifically, after the server generates the new version number, the server may package the transaction data into a new block based on the transaction identifier, the transaction data, the new version number, the first version number, and the transaction data corresponding to the first version number, and uplink store the new block.
The transaction data processing method provided by the embodiment of the invention can acquire the transaction data comprising the transaction identifier, obtain the first version number by inquiring in the first data table according to the transaction identifier, generate the new version number for the transaction data according to the first version number, and link and store the transaction data based on the transaction identifier, the transaction data, the new version number, the first version number and the transaction data corresponding to the first version number, and store the transaction data through the block chain, so that the reliability of transaction data storage is improved.
Fig. 2 is a schematic flow chart of a transaction data processing method according to a second embodiment of the present invention, and as shown in fig. 2, on the basis of the foregoing embodiments, the uplink storing of the transaction data based on the transaction identifier, the transaction data, the new version number, the first version number, and the transaction data corresponding to the first version number further includes:
s201, obtaining corresponding transaction data from a block chain according to the transaction identification and the first version number;
specifically, the server may obtain transaction data corresponding to the transaction identifier and the first version number by querying from a blockchain according to the transaction identifier and the first version number.
S202, if the transaction data which are obtained from the block chain and correspond to the transaction identification and the first version number are the same as the transaction data which are locally stored and correspond to the transaction identification and the first version number, generating a new block based on the transaction data and the new version number.
Specifically, the server may obtain corresponding transaction data locally according to the transaction identifier and the first version number, then compare the locally stored transaction data corresponding to the transaction identifier and the first version number with the transaction data corresponding to the transaction identifier and the first version number obtained from the blockchain, and if the transaction data corresponding to the transaction identifier and the first version number obtained from the blockchain is the same as the locally stored transaction data corresponding to the transaction identifier and the first version number, then store the transaction data corresponding to the new version number onto the blockchain. The server generates a new block based on the transaction data and the new version number and chains the new block.
For example, the new chunk includes a chunk header including the local chunk hash value, parent chunk hash value, mercker root, timestamp, transaction identification, version number, and target difficulty, and a chunk, which may include transaction data. The parent block hash value is the hash value of the last block of the new block. The timestamp is the time at which the new chunk was generated. The target difficulty is the number of M which is 0 before the hash value of the new block is calculated, and M is set according to actual needs. The hash value of the transaction data in the block of zones may be calculated as the mercker root. The block hash value can be obtained by calculating the hash value of the parent block hash value, the Mercker root number, the timestamp, the transaction identifier, the version number and the first M bits of the target difficulty, wherein the first M bits are 0. To keep the transaction data secret, the transaction data in the block may be encrypted.
On the basis of the above embodiments, further, the transaction data processing method provided by the embodiment of the present invention further includes:
and if the transaction data which is obtained from the blockchain and corresponds to the transaction identification and the first version number is different from the locally stored transaction data which corresponds to the transaction identification and the first version number, carrying out data error prompt.
Specifically, the server compares transaction data corresponding to the transaction identifier and the first version number, which is locally stored, with transaction data corresponding to the transaction identifier and the first version number, which is obtained from the blockchain, and if the transaction data corresponding to the transaction identifier and the first version number, which is obtained from the blockchain, is different from the transaction data corresponding to the transaction identifier and the first version number, which is locally stored, it is said that data is in error, a data error prompt is performed.
Fig. 3 is a schematic flow chart of a transaction data processing method according to a third embodiment of the present invention, and as shown in fig. 3, on the basis of the foregoing embodiments, further, the transaction data processing method according to the embodiment of the present invention further includes:
s301, updating a second data table according to the transaction identifier and the first version number;
specifically, the second data table stores an old version number corresponding to each transaction identifier and transaction data corresponding to the old version number, where the old version number corresponding to the transaction identifier is each version number except the first version number. Because a new version number is generated and becomes the latest version number corresponding to the transaction identifier, the inquired first version number corresponding to the transaction identifier becomes the old version number, and the server adds the first version number and the transaction data corresponding to the transaction identifier and the first version number into a second data table, so that the second data table is updated.
S302, updating a first data table according to the transaction identification and the new version number.
Specifically, because the first version number corresponding to the transaction identifier is no longer the latest version number, the server may replace the first version number corresponding to the transaction identifier in the first data with the latest version number, and replace the transaction data corresponding to the first version number with the transaction data corresponding to the new version number, thereby updating the first data table, so that the data in the first data table are all the latest transaction data corresponding to the transaction identifier.
Fig. 4 is a schematic flow chart of a transaction data processing method according to a fourth embodiment of the present invention, and as shown in fig. 4, on the basis of the foregoing embodiments, further, the transaction data processing method according to the embodiment of the present invention further includes:
s401, receiving a transaction data query request, wherein the transaction data query request comprises a transaction identifier and a second version number;
specifically, when transaction data query is needed, a user may send a transaction data query request to the server through the client terminal, where the transaction data query request includes a transaction identifier and a second version number. The server receives the transaction data query request. The client terminal includes, but is not limited to, a notebook computer, a desktop computer, and the like.
S402, inquiring corresponding transaction data from the first data table according to the transaction identification and the second version number.
Specifically, the server queries transaction data corresponding to the transaction identifier and the second version number in the first data table according to the transaction identifier and the second version number, and if the transaction data corresponding to the transaction identifier and the second version number is queried, the queried transaction data corresponding to the transaction identifier and the second version number may be returned to the client terminal. And if the first data table has the transaction identifier which is the same as the transaction identifier included in the transaction data query request and the first version number which is the same as the second version number, the corresponding transaction data is queried. The transaction data is inquired through the first data table, and compared with the method for inquiring the data from the block chain, the data inquiry efficiency can be improved.
On the basis of the above embodiments, further, the transaction data processing method provided by the embodiment of the present invention further includes:
and if corresponding transaction data are not inquired from the first data table according to the transaction identifier and the second version number, inquiring the corresponding transaction data from the second data table according to the transaction identifier and the second version number.
Specifically, if the server does not inquire the corresponding transaction data from the first data table according to the transaction identifier and the second version number, which indicates that the inquired transaction data is not the latest transaction data corresponding to the transaction identifier, the server may inquire the corresponding transaction data from the second data table according to the transaction identifier and the second version number, and if the corresponding transaction data is inquired, the inquired transaction data may be returned to the client terminal. Wherein the second data represents pre-acquired.
For example, the server stores each transaction datum in the blockchain, then acquires an old version number corresponding to each transaction identifier from the blockchain, and stores the transaction data corresponding to the transaction identifier and the old version number in the second data table. The old version number corresponding to the transaction identifier refers to each version number except the first version number.
On the basis of the above embodiments, further, the transaction data processing method provided by the embodiment of the present invention further includes:
and if the corresponding first version number is not inquired in the first data table according to the transaction identifier, generating a first version number for the transaction data.
Specifically, the server does not query a corresponding first version number in the first data table according to the transaction identifier, which indicates that the transaction data corresponding to the transaction identifier is received for the first time, and a version number has not been generated for the transaction data corresponding to the transaction identifier before, and the server may generate the first version number for the transaction data.
When the transaction data of the first version number corresponding to the transaction identifier is stored in the uplink, a new block can be directly generated and stored in the block chain due to the first storage.
The invention provides a method for storing the equity bond underwriting transaction data, which introduces a block chain storage technology, privatizes and manages the existing equity bond underwriting transaction data, and upgrades the data into a block chain for storage and certification. Thereby improving the credibility, the openness and the safety of the commensurable bond underwriting transaction data.
Fig. 5 is a schematic structural diagram of a transaction data processing apparatus according to a fifth embodiment of the present invention, and as shown in fig. 5, the transaction data processing apparatus according to the embodiment of the present invention includes an obtaining module 501, an inquiring module 502, a generating module 503, and a storing module 504, where:
the obtaining module 501 is configured to obtain transaction data, where the transaction data includes a transaction identifier; the query module 502 is configured to query the first data table according to the transaction identifier to obtain a first version number; wherein the first data table is obtained in advance; the generating module 503 is configured to generate a new version number for the transaction data according to the first version number; the storage module 504 is configured to store the transaction data in uplink based on the transaction identifier, the transaction data, the new version number, the first version number, and the transaction data corresponding to the first version number.
In particular, the obtaining module 501 may obtain transaction data, which includes a transaction identification. The transaction data is set according to actual needs, and the embodiment of the invention is not limited.
After receiving the transaction data, the query module 502 may query the first version number from the first data table according to the transaction identification. The first data table is obtained in advance, the first data table can store transaction identification and a first version number, and transaction data corresponding to the transaction identification and the first version number, and the first version number is the latest version number corresponding to the transaction identification.
After the first version number corresponding to the transaction identifier is obtained through querying, the generating module 503 may generate a new version number for the transaction data according to the first version number, and correspond the new version number to the transaction data.
After generating the new version number, the storage module 504 may package the transaction data into a new block and uplink-store the new block based on the transaction identifier, the transaction data, the new version number, the first version number, and the transaction data corresponding to the first version number.
The transaction data processing device provided by the embodiment of the invention can acquire transaction data comprising the transaction identifier, obtain the first version number by inquiring in the first data table according to the transaction identifier, generate the new version number for the transaction data according to the first version number, and link and store the transaction data based on the transaction identifier, the transaction data, the new version number, the first version number and the transaction data corresponding to the first version number, and store the transaction data through the block chain, so that the reliability of transaction data storage is improved.
Fig. 6 is a schematic structural diagram of a transaction data processing apparatus according to a sixth embodiment of the present invention, and as shown in fig. 6, on the basis of the foregoing embodiments, further, the storage module 504 includes an obtaining unit 5041 and a generating unit 5042, where:
the obtaining unit 5041 is configured to obtain corresponding transaction data from a blockchain according to the transaction identifier and the first version number; the generating unit 5042 is configured to generate a new blocky based on the transaction data and the new version number after the transaction data corresponding to the transaction identifier and the first version number obtained from the blockchain is the same as the transaction data corresponding to the transaction identifier and the first version number stored locally.
Fig. 7 is a schematic structural diagram of a transaction data processing apparatus according to a seventh embodiment of the present invention, and as shown in fig. 7, on the basis of the foregoing embodiments, further, the transaction data processing apparatus according to the embodiment of the present invention further includes a prompting module 505, where:
the prompting module 505 is configured to perform a data error prompt after the transaction data corresponding to the transaction identifier and the first version number obtained from the blockchain is different from the locally stored transaction data corresponding to the transaction identifier and the first version number.
Fig. 8 is a schematic structural diagram of a transaction data processing apparatus according to an eighth embodiment of the present invention, and as shown in fig. 8, on the basis of the foregoing embodiments, further, the transaction data processing apparatus according to the embodiment of the present invention further includes a first updating module 506 and a second updating module 507, where:
the first updating module 506 is used for updating a second data table according to the transaction identifier and the first version number; the second updating module 507 updates the first data table according to the transaction identifier and the new version number.
Fig. 9 is a schematic structural diagram of a transaction data processing apparatus according to a ninth embodiment of the present invention, and as shown in fig. 9, on the basis of the foregoing embodiments, further, the transaction data processing apparatus according to the embodiment of the present invention further includes a receiving module 508 and a first data querying module 509, where:
the receiving module 508 is configured to receive a transaction data query request, where the transaction data query request includes a transaction identifier and a second version number; the first data query module 509 is configured to query the corresponding transaction data from the first data table according to the transaction identifier and the second version number.
Fig. 10 is a schematic structural diagram of a transaction data processing device according to a tenth embodiment of the present invention, and as shown in fig. 10, on the basis of the foregoing embodiments, the transaction data processing device according to the embodiment of the present invention further includes:
the second data query module 510 is configured to query corresponding transaction data from the second data table according to the transaction identifier and the second version number if corresponding transaction data is not queried from the first data table according to the transaction identifier and the second version number.
On the basis of the foregoing embodiments, further, the generating module 503 is further configured to:
and if the corresponding first version number is not inquired in the first data table according to the transaction identifier, generating a first version number for the transaction data.
The embodiment of the apparatus provided in the embodiment of the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the apparatus are not described herein again, and refer to the detailed description of the above method embodiments.
Fig. 11 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 11, the electronic device may include: a processor (processor)1101, a communication Interface (Communications Interface)1102, a memory (memory)1103 and a communication bus 1104, wherein the processor 1101, the communication Interface 1102 and the memory 1103 are communicated with each other via the communication bus 1104. The processor 1101 may call logic instructions in the memory 1103 to perform the following method: acquiring transaction data, wherein the transaction data comprises a transaction identifier; inquiring in a first data table according to the transaction identifier to obtain a first version number; wherein the first data table is obtained in advance; generating a new version number for the transaction data according to the first version number; and based on the transaction identification, the transaction data, the new version number, the first version number and the transaction data corresponding to the first version number, the transaction data are uplink stored.
In addition, the logic instructions in the memory 1103 can be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: acquiring transaction data, wherein the transaction data comprises a transaction identifier; inquiring in a first data table according to the transaction identifier to obtain a first version number; wherein the first data table is obtained in advance; generating a new version number for the transaction data according to the first version number; and based on the transaction identification, the transaction data, the new version number, the first version number and the transaction data corresponding to the first version number, the transaction data are uplink stored.
The present embodiment provides a computer-readable storage medium, which stores a computer program, where the computer program causes the computer to execute the method provided by the above method embodiments, for example, the method includes: acquiring transaction data, wherein the transaction data comprises a transaction identifier; inquiring in a first data table according to the transaction identifier to obtain a first version number; wherein the first data table is obtained in advance; generating a new version number for the transaction data according to the first version number; and based on the transaction identification, the transaction data, the new version number, the first version number and the transaction data corresponding to the first version number, the transaction data are uplink stored.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of processing transaction data, comprising:
acquiring transaction data, wherein the transaction data comprises a transaction identifier;
inquiring in a first data table according to the transaction identifier to obtain a first version number; wherein the first data table is obtained in advance;
generating a new version number for the transaction data according to the first version number;
and based on the transaction identification, the transaction data, the new version number, the first version number and the transaction data corresponding to the first version number, the transaction data are uplink stored.
2. The method of claim 1, wherein the uplink storing of the transaction data based on the transaction identifier, the transaction data, the new version number, the first version number, and the transaction data corresponding to the first version number comprises:
acquiring corresponding transaction data from a block chain according to the transaction identification and the first version number;
and if the transaction data which is obtained from the blockchain and corresponds to the transaction identification and the first version number is the same as the locally stored transaction data which corresponds to the transaction identification and the first version number, generating a new block based on the transaction data and the new version number.
3. The method of claim 2, further comprising:
and if the transaction data which is obtained from the blockchain and corresponds to the transaction identification and the first version number is different from the locally stored transaction data which corresponds to the transaction identification and the first version number, carrying out data error prompt.
4. The method of claim 1, further comprising:
updating a second data table according to the transaction identification and the first version number;
and updating the first data table according to the transaction identification and the new version number.
5. The method of claim 1, further comprising:
receiving a transaction data query request, wherein the transaction data query request comprises a transaction identifier and a second version number;
and inquiring corresponding transaction data from the first data table according to the transaction identification and the second version number.
6. The method of claim 5, further comprising:
and if corresponding transaction data are not inquired from the first data table according to the transaction identifier and the second version number, inquiring the corresponding transaction data from the second data table according to the transaction identifier and the second version number.
7. The method of any of claims 1 to 6, further comprising:
and if the corresponding first version number is not inquired in the first data table according to the transaction identifier, generating a first version number for the transaction data.
8. An apparatus for processing transaction data, comprising:
the acquisition module is used for acquiring transaction data, and the transaction data comprises a transaction identifier;
the query module is used for querying in a first data table according to the transaction identifier to obtain a first version number; wherein the first data table is obtained in advance;
the generating module is used for generating a new version number for the transaction data according to the first version number;
and the storage module is used for storing the trade data in an uplink mode based on the trade identification, the trade data, the new version number, the first version number and the trade data corresponding to the first version number.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110434445.0A 2021-04-22 2021-04-22 Transaction data processing method and device Pending CN113065871A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110434445.0A CN113065871A (en) 2021-04-22 2021-04-22 Transaction data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110434445.0A CN113065871A (en) 2021-04-22 2021-04-22 Transaction data processing method and device

Publications (1)

Publication Number Publication Date
CN113065871A true CN113065871A (en) 2021-07-02

Family

ID=76567377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110434445.0A Pending CN113065871A (en) 2021-04-22 2021-04-22 Transaction data processing method and device

Country Status (1)

Country Link
CN (1) CN113065871A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008233A (en) * 2019-03-31 2019-07-12 杭州复杂美科技有限公司 A kind of information inquiry and know together method, system, equipment and storage medium
CN111143476A (en) * 2019-12-31 2020-05-12 杭州趣链科技有限公司 Intelligent contract data rapid query method based on database
CN112148794A (en) * 2020-09-23 2020-12-29 京东数字科技控股股份有限公司 Version management method and device of intelligent contract and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008233A (en) * 2019-03-31 2019-07-12 杭州复杂美科技有限公司 A kind of information inquiry and know together method, system, equipment and storage medium
CN111143476A (en) * 2019-12-31 2020-05-12 杭州趣链科技有限公司 Intelligent contract data rapid query method based on database
CN112148794A (en) * 2020-09-23 2020-12-29 京东数字科技控股股份有限公司 Version management method and device of intelligent contract and storage medium

Similar Documents

Publication Publication Date Title
CN107396360B (en) Block verification method and device
US11336451B2 (en) Cross-blockchain resource transmission
US11251966B2 (en) Sending cross-chain authenticatable messages
CN107276765B (en) Processing method and device for consensus in block chain
US20200366485A1 (en) Method and apparatus for inter-blockchain transmission of authenticable message
CN109542851A (en) File updating method, apparatus and system
CN111654399A (en) Networking method, device and equipment based on SD-WAN and storage medium
CN112363997B (en) Data version management method, device and storage medium
CN104717280A (en) Data synchronism marking method and device
CN113065871A (en) Transaction data processing method and device
CN111858764A (en) Data synchronization method and device, computer equipment and storage medium
CN111897826A (en) Parameter information updating method and device, electronic equipment and readable storage medium
CN110597600A (en) Method for modifying application configuration parameters of distributed system and distributed system
CN113076380B (en) Data synchronization method, device, system, equipment and storage medium
CN113312073B (en) Installation package file processing method and related device
CN112052267B (en) Data query method, equipment, server and storage medium
CN115134091A (en) Management method of distributed digital identity identifier
CN114489737A (en) Multi-firmware OTA (over the air) upgrading method and device, server and storage medium
CN113312412A (en) Statistical data acquisition method and device, electronic equipment and storage medium
CN112989147A (en) Data information pushing method and device, computer equipment and storage medium
CN112783544B (en) Local tracking code branch establishing method and terminal of subcode library
CN112653557B (en) Digital identity processing method, digital identity processing device, electronic equipment and readable storage medium
CN110929500B (en) File comparison method and related device
CN113505116A (en) Data migration method and device
CN115580464A (en) User identity information updating method and device based on block chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination