CN113282662B - Block information processing method, device, equipment and medium - Google Patents

Block information processing method, device, equipment and medium Download PDF

Info

Publication number
CN113282662B
CN113282662B CN202110622352.0A CN202110622352A CN113282662B CN 113282662 B CN113282662 B CN 113282662B CN 202110622352 A CN202110622352 A CN 202110622352A CN 113282662 B CN113282662 B CN 113282662B
Authority
CN
China
Prior art keywords
block
hash value
information
timestamp
data
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.)
Active
Application number
CN202110622352.0A
Other languages
Chinese (zh)
Other versions
CN113282662A (en
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.)
Guangdong Chenyi Info Technology Co ltd
Original Assignee
Guangdong Chenyi Info Technology Co ltd
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 Guangdong Chenyi Info Technology Co ltd filed Critical Guangdong Chenyi Info Technology Co ltd
Priority to CN202110622352.0A priority Critical patent/CN113282662B/en
Publication of CN113282662A publication Critical patent/CN113282662A/en
Application granted granted Critical
Publication of CN113282662B publication Critical patent/CN113282662B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • 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/602Providing cryptographic facilities or services
    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3823Payment protocols; Details thereof insuring higher security of transaction combining multiple encryption tools for a transaction
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Finance (AREA)
  • Software Systems (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a block information processing method, a device, equipment and a medium. The method is applied to a blockchain operating system and comprises the following steps: acquiring head data of a first block, and confirming a first hash value of the head data; adding first timestamp information based on the first hash value to form a second hash value; and converting the second hash value to form a second block so as to finish block uplink. According to the technical scheme, the block information can be processed to better adapt to the block chain Chinese operation environment, so that the block uplink efficiency and the service processing efficiency are effectively improved, and the hash collision resistance is improved.

Description

Block information processing method, device, equipment and medium
Technical Field
The embodiment of the application relates to the technical field of block chains, in particular to a block information processing method, a device, equipment and a medium.
Background
With the rapid development of the internet blockchain technology. The blockchain is a distributed shared ledger and a database, and in the application scene of rich blockchains, the problem of information asymmetry can be basically solved, and the collaborative trust and the consistent action among a plurality of main bodies are realized. When business operation occurs, the blockchain operating system needs to search a large amount of blockinformation on the ledger wall server frequently to meet business requirements, but aiming at the business requirements of frequent interaction, the searching speed of the blockinformation still needs to be improved, and the existing blockchain technology also cannot meet the requirement of business processing efficiency.
Theoretically, the processing speed of the blockchain is about 20 transactions per second at the highest, but currently, the usual code scanning payment can reach about 9 ten thousand transactions per second at the peak value. The current blockchain data processing technology is still far from efficient in business scenario applications of frequent transactions.
Disclosure of Invention
The embodiment of the application provides a block information processing method, a device, equipment and a medium, which are suitable for a block chain Chinese operation environment, and are used for improving the search speed, enhancing the hash collision resistance and improving the service processing efficiency of a block chain.
In a first aspect, an embodiment of the present application provides a block information processing method, applied to a blockchain operating system, including the following steps:
acquiring head data of a first block, and confirming a first hash value of the head data;
adding first timestamp information based on the first hash value to form a second hash value;
and converting the second hash value to form a second block so as to finish block uplink.
In a second aspect, an embodiment of the present application further provides a block information processing apparatus configured with a blockchain operating system, including:
the first block module is used for acquiring the head data of the first block and confirming a first hash value of the head data;
the hash value processing module is used for adding first timestamp information based on the first hash value to form a second hash value;
and the second block module is used for converting the second hash value to form a second block so as to finish block uplink.
In a third aspect, an embodiment of the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor executes the program to implement a block information processing method according to any embodiment of the present application.
In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, on which a computer program is stored, where the program is executed by a processor to implement a block information processing method according to any embodiment of the present application.
In the technical scheme provided by the embodiment of the application, in a blockchain operating system, head data of a first block is mainly acquired, first timestamp information is added based on a first hash value of the confirmed head data to form a second hash value, and the second block is formed after conversion. Based on the processing reconstruction of the first block header data to form a second block, the processing of the block information can better adapt to the Chinese operation environment of the block chain, effectively improve the block uplink efficiency and the service processing efficiency, and increase the hash collision resistance.
Drawings
Fig. 1 is a flowchart of a block information processing method according to a first embodiment of the present application;
fig. 2 is a flowchart of a block information processing method according to a second embodiment of the present application;
fig. 3 is a flowchart of a block information processing method according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a block information processing apparatus according to a fourth embodiment of the present application;
FIG. 5 is a block diagram illustrating another block information processing apparatus according to a fourth embodiment of the present application;
fig. 6 is a schematic hardware structure of a computer device in the fifth embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example 1
Fig. 1 is a flowchart of a block information processing method according to an embodiment of the present application, where the embodiment of the present application is applicable to a situation of how to improve the search efficiency in a frequently interacted service requirement to improve the interaction efficiency, the method may be performed by a block information processing apparatus according to an embodiment of the present application, and the apparatus may be implemented in a software and/or hardware manner and may be generally integrated in a computer device.
As shown in fig. 1, the block information processing method provided in this embodiment is applied to a blockchain operating system, and specifically includes:
s110, acquiring head data of a first block, and confirming a first hash value of the head data.
The blockchain operating system is used for generating a block, generating a transaction record based on transaction behavior of a service, and uploading the block to the blockchain network node to be recorded in the account book server, wherein the transaction record comprises any record of content data, file content data, digital fingerprint data, link data, privacy sharing data and the like. In the embodiment of the application, when transaction records are generated by transaction actions of a service under the basis of a current blockchain operating system, a first block is constructed according to information such as transaction time, transaction IP (Internet protocol), transaction quantity, transaction numerical value and the like, second timestamp information is generated according to the transaction time, the first block is respectively composed of head data and a block body, and the head data comprises a hexadecimal parent block hash value, a hexadecimal local block hash value, a random number and second timestamp information.
In an embodiment of the present application, a specific implementation manner of acquiring header data of a first block includes: according to the data uploading request of the first block, intercepting head data of the first block by adopting an intercepting algorithm, and extracting characters of the head data; the method comprises the steps of obtaining a character string from a first character to an N character under the length of the character string, marking the character string as string, comparing whether the character string has a fixed character string or not, pointing a pointer to the first character and all the characters behind the first character, calculating the lengths and the numbers of the first character and all the characters behind the first character, storing the character string into a specific space, and marking the character string as pstr. And according to the length and the number of the character strings, confirming that the character strings are any one of the father block hash value fhash1 and the father block hash value plus the present block hash value fhash12, and defining the character strings as first hash values.
Optionally, when the first block is a block information that is acquired by transmitting a transaction record to a blockchain operating system before a blockchain network node to intercept when the service system performs a transaction, for example, when the service system pays an a value for purchasing an article B and generates information such as transaction time, transaction IP, transaction number, transaction value and the like for constructing the first block, the blockchain operating system acquires head data of the first block which is not constructed by using an interception algorithm, namely, acquires a first hash value of the head data of the first block, wherein the first hash value is respectively formed by a hash value of a previous block called a parent block hash value and a hash value of the first block called a present block hash value together.
Optionally, the blockchain operating system obtaining the header data of the first block includes the following implementation manners: and for the first block encrypted by the first private key, the public key is called to decrypt the first block, and the header data of the first block is analyzed by verifying the validity of the digital signature of the service system in the first block. The embodiment is used for processing different systems to perform uplink operation on the block. Specifically, the service system initiates a data uploading request to a first block, and the blockchain operating systems of different service ends intercept the data uploading request so as to reprocess the block information of the first block.
S120, adding first time stamp information based on the first hash value to form a second hash value.
In the embodiment of the present application, the first timestamp information is generated by generating a data uploading request of a blockchain operating system to the first block, and acquiring data uploading time according to the data uploading request, so as to generate the first timestamp information, wherein the first timestamp information is 14-bit time data, such as 202104011350 51; wherein adding first timestamp information based on the first hash value includes the following implementations: the pstr character string is obtained from the specific space, the position identification of the first character of the pstr character string is identified, the first time stamp information is added before the position identification according to the position identification of the first character, the first time stamp is carried out, the position of the first time stamp information can be accurately identified through the time stamp, and 14-bit time data and the pstr character string are combined to form a second hash value.
In the embodiment of the present application, the second hash value=the first timestamp information+the parent block hash value fhash1, or the second hash value=the first timestamp information+the parent block hash value+the present block hash value;
optionally, step S120 further includes the following implementation manners: and acquiring a corresponding identifier according to the first hash value, reading the length and the number of the first bit characters of the first hash value to the first identifier, defining a parent region identifier of a parent block hash value, and adding the first timestamp information before the parent block hash value based on the parent region identifier.
For example, the first hash value 1f02629c634b1d00 is preceded by first timestamp information 20210401135051, resulting in 2021040110851, 1f02629c634b1d00, where "is the parent identifier.
S130, converting the second hash value to form a second block so as to finish block uplink.
In the embodiment of the application, the block uplink comprises the following implementation modes: and after the block information processing is performed on the first block based on the block chain operating system, forming a second block, encrypting the block information of the second block by using a second private key, sending an uplink request to the block chain network node, and storing the block information of the second block in a private data set of the block chain operating system. And the block chain network node responds to the uplink request, verifies the legitimacy of the digital signature corresponding to the uplink request, decrypts the block information of the second block by a public key based on the legitimacy of the digital signature corresponding to the uplink request, and stores the decrypted block information in a private data set of the account server.
In addition, the block information retrieval request of the second block is initiated based on the block chain operating system, and the effect of retrieving the block information can be rapidly realized according to the second block processed by the block information, and the specific implementation mode comprises the following steps: responding to a block information retrieval request of the second block aiming at an account server; invoking a timestamp comparison algorithm according to the first timestamp information; acquiring input search information according to the block information search request, wherein the search information comprises any one of a block record of a block in the second block and second timestamp information; processing the size sequence of the first timestamp information based on the timestamp comparison algorithm to obtain corresponding initial block information; and verifying the digital signature of the second block to confirm that the initial block information is the target block information. The time stamp comparison algorithm is used for executing the retrieval of the block information and processing the size sequence of the first time stamp information so as to realize the effect of quickly retrieving the block information based on the first time stamp information.
In the embodiment of the application, the uplink request is different from the data uploading request, and the request for uploading the block information to the block chain network node initiated by the block chain operating system aiming at the second block carries block header data and a block body which are processed by the block information, wherein the block body comprises a block transaction record; the data uploading request is initiated by the service system, a transaction record is generated based on transaction actions occurring in the service system, and the data uploading request for the transaction record is triggered.
In the embodiment of the present application, the implementation manner of converting the second hash value to form the second block includes: converting the second hash value from hexadecimal to decimal based on a decimal coded character set; and forming a second block according to the decimal encoding. The second hash value is converted from hexadecimal to decimal coding, so that the method can be better adapted to the Chinese operation environment of the block chain, the block uplink efficiency and the service processing efficiency are effectively improved, and the hash collision resistance is improved.
Example two
Fig. 2 is a flowchart of a block information processing method according to a second embodiment of the present application, where the embodiment of the present application is applicable to a blockchain chinese operation environment, and is capable of improving a search speed, enhancing hash collision resistance, and improving a blockchain service processing efficiency. The method may be performed by a block information processing apparatus provided by an embodiment of the present application, where the apparatus may be implemented in software and/or hardware, and may be generally integrated in a computer device.
As shown in fig. 2, the block information processing method provided in this embodiment, a blockchain operating system, specifically includes:
s210, according to the data uploading request of the first block, head data of the first block are intercepted.
In the embodiment of the application, the header data comprises a hexadecimal parent block hash value, a hexadecimal local block hash value, a random number and second timestamp information. The data uploading request is initiated by the service system, a transaction record is generated based on transaction actions occurring in the service system, and the data uploading request for the transaction record is triggered.
The method comprises the steps of intercepting head data of a first block by adopting an intercepting algorithm, and extracting characters of the head data; the method comprises the steps of obtaining a character string from a first character to an N character under the length of the character string, marking the character string as string, comparing whether the character string has a fixed character string or not, pointing a pointer to the first character and all the characters behind the first character, calculating the lengths and the numbers of the first character and all the characters behind the first character, storing the character string into a specific space, and marking the character string as pstr.
Optionally, the transaction behavior of the service system is monitored, a transaction record for combining the first block is generated, until the service system initiates a data uploading request for transmitting the transaction record to the blockchain network node, and head data of the first block is intercepted according to the data uploading request.
S220, confirming that the parent block hash value and the own block hash value of the head data are the first hash value.
In the embodiment of the present application, the confirmation method of the first hash value includes the following contents: and according to the length and the number of the character strings, confirming that the character strings are any one of the father block hash value fhash1 and the father block hash value plus the present block hash value fhash12, and defining the character strings as first hash values. And according to the length and the number of the character strings, invoking a preset hash configuration rule, and according to the hash length parameter and the number parameter under the hash configuration rule, confirming a parent block hash value and a local block hash value from the character strings, and confirming that the parent block hash value is a first hash value or confirming that the parent block hash value plus the local block hash value is the first hash value based on the hash configuration rule.
S230, generating corresponding first timestamp information according to the data uploading request; the first timestamp information is 14-bit system time data.
In the embodiment of the application, the first timestamp information is generated by a data uploading request of a block chain operating system to the first block, and the data uploading time is acquired according to the data uploading request, so as to generate the first timestamp information. Wherein the first timestamp information is 14 bits of time data, such as 202104011350 51.
And S240, adding the first timestamp information at the front end position of the first hash value to form a second hash value.
In the embodiment of the present application, adding the first timestamp information based on the first hash value includes the following implementation manners: the pstr character string is obtained from the specific space, the position identification of the first character of the pstr character string is identified, the first time stamp information is added before the position identification according to the position identification of the first character, the first time stamp is carried out, the position of the first time stamp information can be accurately identified through the time stamp, and 14-bit time data and the pstr character string are combined to form a second hash value.
S250, converting the second hash value from hexadecimal into decimal coding based on the decimal coding character set.
And S260, forming a second block according to the ten-bit binary code so as to complete block uplink.
In the embodiment of the present application, the implementation manner of converting the second hash value to form the second block includes: converting the second hash value from hexadecimal to decimal based on a decimal coded character set; and forming a second block according to the decimal encoding. The second hash value is converted from hexadecimal to decimal coding, so that the method can be better adapted to the Chinese operation environment of the block chain, the block uplink efficiency and the service processing efficiency are effectively improved, and the hash collision resistance is improved.
The embodiments of the present application are not explained in detail herein, and reference is made to the foregoing embodiments.
Example III
Fig. 3 is a flowchart of a block information processing method according to a third embodiment of the present application, where the embodiment of the present application is applicable to a case of avoiding repetitive operations of common services when configuring a multi-application environment, and the method may be performed by a block information processing apparatus according to the embodiment of the present application, where the apparatus may be implemented in a software and/or hardware manner, and may be generally integrated in a computer device.
As shown in fig. 3, the block information processing method provided in this embodiment is applied to a blockchain operating system, and specifically includes:
s110, acquiring head data of a first block, and confirming a first hash value of the head data.
And S120, adding first timestamp information based on the first hash value to form a second hash value.
And S130, converting the second hash value to form a second block so as to finish block uplink.
S310, responding to the block information retrieval request of the second block for the ledger server.
In the embodiment of the present application, step S310 includes the following implementation steps: based on a certain retrieval authority, block information of a second block stored in the private data set in the account book server is obtained, the block information is stored in the private data set of the block chain operating system, relevant tag data is obtained according to input retrieval requirement data, a retrieval index is established based on the tag data, and a block information retrieval request is formed based on the retrieval index.
S320, according to the first timestamp information, a timestamp comparison algorithm is called.
In the embodiment of the present application, the first timestamp information is generated by generating a data upload request of the blockchain operating system to the first block, and obtaining a data upload time according to the data upload request, where the first timestamp information is 14-bit time data, such as 202104011350 51.
S330, outputting target block information based on the sequential processing of the first timestamp information by the timestamp comparison algorithm.
In the embodiment of the application, on the basis of the first timestamp information, the timestamp comparison algorithm sorts the block information of all the second blocks in the block chain network according to a certain sequence, which is beneficial to improving the retrieval speed and improving the service processing efficiency of the block chain.
In the embodiment of the present application, step S330 includes the following implementation manners: acquiring input search information according to the block information search request, wherein the search information comprises any one of a block record of a block in the second block and second timestamp information; processing the size sequence of the first timestamp information based on the timestamp comparison algorithm to obtain corresponding initial block information;
optionally, according to the input search demand data, obtaining corresponding block information with a certain sequence, counting the frequency tf of data items corresponding to the search demand data, calculating the number df of each search demand data occurrence in the second block, performing deduplication processing on repeated data items, establishing a dictionary structure, and outputting initial block information to the block information after deduplication processing based on the dictionary structure.
S3303, the initial block information is confirmed to be the target block information by verifying the digital signature of the second block.
In the embodiment of the application, the digital signature is tamper-proof operation of the ledger wall server based on the uplink of the second block, and the tamper-proof operation is used for preventing the block information from being forged in the network transmission process. And after the second block is successfully uplink, the digital signature is encrypted and then stored in the second block together for proving the identity of the uplink person. When the block chain operating system performs block information retrieval on the account server, after initial block information is obtained based on a certain retrieval authority, the digital signature of the second block is further decrypted to verify the reliability of the data source, and then the initial block information is confirmed to be target block information, so that the retrieval speed can be greatly improved, the time is saved, and the service requirement of frequent interaction is met to a certain extent.
The embodiments of the present application are not explained in detail herein, and reference is made to the foregoing embodiments.
Example IV
Fig. 4 is a schematic structural diagram of a block information processing apparatus according to a fourth embodiment of the present application, which is applicable to a blockchain chinese operation environment, to improve a search speed, to enhance hash collision resistance, and to improve a blockchain service processing efficiency. The apparatus may be implemented in software and/or hardware and may be generally integrated in a computer device.
As shown in fig. 4, the block information processing apparatus is configured with a blockchain operating system, and specifically includes: a first block module 410, a hash value processing module 420, a second block module 430. Wherein, the liquid crystal display device comprises a liquid crystal display device,
a first block module 410, configured to obtain header data of a first block, and confirm a first hash value of the header data;
a hash value processing module 420, configured to add first timestamp information based on the first hash value to form a second hash value;
and a second block module 430, configured to convert the second hash value to form a second block, so as to complete block uplink. .
According to the technical scheme provided by the embodiment of the application, the block chain operating system intercepts and captures the head data of the first block according to the data uploading request of the first block, confirms the first hash value of the head data, adds first timestamp information before the first hash value to form a second hash value, and converts the second hash value to form the second block, so that block uplink is completed. After the operation, the method can better adapt to the Chinese operation environment of the block chain, effectively improve the block uplink efficiency and the service processing efficiency and increase the hash collision resistance.
As an alternative embodiment, in the blockchain operating system, when transaction actions are generated, and transaction records are generated and ready for linking, a large amount of searches need to be performed on the ledger server, so as to illustrate a schematic structure of another blockinformation processing apparatus shown in fig. 5, in this embodiment of the present application, the blockinformation processing apparatus further includes:
the retrieval module 510: for responding to a block information retrieval request of the second block for an account server;
algorithm module 520: the method is used for calling a timestamp comparison algorithm according to the first timestamp information;
the sorting module 530: and the target block information is output based on the sequential processing of the first timestamp information by the timestamp comparison algorithm.
The block information processing device can execute the block information processing method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of executing the block information processing method.
Example five
Fig. 6 is a schematic hardware structure of a computer device according to a fifth embodiment of the present application, as shown in fig. 6, where the computer device includes:
one or more processors 610, one processor 610 being illustrated in fig. 6;
a memory 620;
the processor 610 and the memory 620 in the computer device may be connected by a bus or otherwise, for example in fig. 6.
The memory 620, as a non-transitory computer readable storage medium, may be used to store a software program or a computer executable program, for example, program instructions corresponding to a block information processing method applied to a computer device in an embodiment of the present application, includes:
acquiring head data of a first block, and confirming a first hash value of the head data;
adding first timestamp information based on the first hash value to form a second hash value;
and converting the second hash value to form a second block so as to finish block uplink.
For another example, in an embodiment of the present application, a program instruction corresponding to a block information processing method applied to a computer device further includes:
responding to a block information retrieval request of the second block aiming at an account server;
invoking a timestamp comparison algorithm according to the first timestamp information;
and outputting target block information based on the sequential processing of the first timestamp information by the timestamp comparison algorithm.
The processor 610 executes various functional applications of the host computer and data processing by executing software program instructions stored in the memory 620, i.e., implements any of the block information processing methods applied to the computer device in the above-described embodiments.
Memory 620 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 620 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
Example seven
A sixth embodiment of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a block information processing method as provided in all the embodiments of the present application: that is, the program, when executed by the processor, implements:
acquiring head data of a first block, and confirming a first hash value of the head data;
adding first timestamp information based on the first hash value to form a second hash value;
and converting the second hash value to form a second block so as to finish block uplink.
For another example, a block information processing method provided by all embodiments of the present application is implemented: that is, the program, when executed by the processor, implements:
responding to a block information retrieval request of the second block aiming at an account server;
invoking a timestamp comparison algorithm according to the first timestamp information;
and outputting target block information based on the sequential processing of the first timestamp information by the timestamp comparison algorithm.
Any combination of one or more computer readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., connected through the internet using an internet service provider).
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the application, which is set forth in the following claims.

Claims (8)

1. The block information processing method is characterized by being applied to a block chain operating system and comprising the following steps of:
acquiring head data of a first block, and confirming a first hash value of the head data;
adding first timestamp information based on the first hash value to form a second hash value;
converting the second hash value to form a second block so as to finish block uplink;
the step of acquiring the header data of the first block and confirming the first hash value of the header data comprises the following steps: intercepting head data of the first block according to a data uploading request of the first block; confirming that the parent block hash value and the own block hash value of the head data are the first hash value;
the adding the first timestamp information based on the first hash value to form a second hash value comprises the following steps: generating corresponding first timestamp information according to the data uploading request; adding the first timestamp information at the front end position of the first hash value to form a second hash value; the first timestamp information is the data uploading time of the first block;
the step of converting the second hash value to form a second block includes the following steps: converting the second hash value from hexadecimal to decimal based on a decimal coded character set; forming a second block according to the decimal code to finish block uplink;
the step of converting the second hash value to form a second block to complete block uplink, and then the step of: responding to a block information retrieval request of the second block aiming at an account server; invoking a timestamp comparison algorithm according to the first timestamp information; and outputting target block information based on the sequential processing of the first timestamp information by the timestamp comparison algorithm.
2. The method of claim 1, wherein the first timestamp information is 14-bit system time data.
3. The method of claim 1, wherein the first block is composed of the header data and a block body, wherein a second block is formed according to the decimal encoding to complete a block uplink, comprising the steps of:
acquiring corresponding random numbers and second timestamp information according to the head data of the first block; the second timestamp information is business transaction time;
combining the decimal code, the random number, the second timestamp information and the block body to form the second block;
and transmitting the second block to a network node to complete block uplink.
4. The method according to claim 3, wherein the processing of the first timestamp information based on the timestamp comparison algorithm in order, outputting target block information, comprises the steps of:
acquiring input search information according to the block information search request, wherein the search information comprises any one of a block record of a block in the second block and second timestamp information;
processing the size sequence of the first timestamp information based on the timestamp comparison algorithm to obtain corresponding initial block information;
and verifying the digital signature of the second block to confirm that the initial block information is the target block information.
5. A block information processing apparatus, wherein a blockchain operating system is configured, comprising:
the first block module is used for acquiring the head data of the first block and confirming a first hash value of the head data;
the hash value processing module is used for adding first timestamp information based on the first hash value to form a second hash value; the first timestamp information is the data uploading time of the first block;
the second block module is used for converting the second hash value to form a second block so as to finish block uplink;
the first block module is further configured to perform the following steps:
intercepting head data of the first block according to a data uploading request of the first block; confirming that the parent block hash value and the own block hash value of the head data are the first hash value;
the hash value processing module is further configured to perform the following steps:
generating corresponding first timestamp information according to the data uploading request; adding the first timestamp information at the front end position of the first hash value to form a second hash value;
the second block module is further configured to perform the following steps:
converting the second hash value from hexadecimal to decimal based on a decimal coded character set; forming a second block according to the decimal code to finish block uplink;
the block information processing apparatus further includes:
and a retrieval module: for responding to a block information retrieval request of the second block for an account server;
the algorithm module: the method is used for calling a timestamp comparison algorithm according to the first timestamp information;
and a sequencing module: and the target block information is output based on the sequential processing of the first timestamp information by the timestamp comparison algorithm.
6. The apparatus of claim 5, wherein the first timestamp information generated by the hash value processing module is 14-bit system time data.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-4 when the program is executed by the processor.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-4.
CN202110622352.0A 2021-06-03 2021-06-03 Block information processing method, device, equipment and medium Active CN113282662B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110622352.0A CN113282662B (en) 2021-06-03 2021-06-03 Block information processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110622352.0A CN113282662B (en) 2021-06-03 2021-06-03 Block information processing method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN113282662A CN113282662A (en) 2021-08-20
CN113282662B true CN113282662B (en) 2023-11-03

Family

ID=77283437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110622352.0A Active CN113282662B (en) 2021-06-03 2021-06-03 Block information processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113282662B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103097A (en) * 2017-05-22 2017-08-29 中链科技有限公司 Drawing method and terminal device based on block chain technology
CN107147501A (en) * 2017-06-27 2017-09-08 中国联合网络通信集团有限公司 Timestamp processing method and processing device
CN107977910A (en) * 2017-12-04 2018-05-01 四川长虹电器股份有限公司 A kind of educational background based on block chain signs and issues method and system
CN108304475A (en) * 2017-12-28 2018-07-20 北京比特大陆科技有限公司 Data query method, apparatus and electronic equipment
CN109246084A (en) * 2018-08-13 2019-01-18 中国联合网络通信集团有限公司 New block generation method, device, electronic equipment and storage medium
CN109462483A (en) * 2018-11-27 2019-03-12 平安科技(深圳)有限公司 Mail based on block chain deposits card method, apparatus, equipment and storage medium
CN109471905A (en) * 2018-11-16 2019-03-15 华东师范大学 A kind of block chain index method for supporting time range and range of attributes compound query
CN109635585A (en) * 2018-12-07 2019-04-16 深圳市智税链科技有限公司 Method, agent node and the medium of Transaction Information are inquired in block chain network
CN109711839A (en) * 2018-12-13 2019-05-03 平安科技(深圳)有限公司 Block chain storage method, device, equipment and storage medium based on data compression
CN109815748A (en) * 2019-01-24 2019-05-28 黄冈 A kind of centre data source method for monitoring based on block chain
CN110069345A (en) * 2019-04-23 2019-07-30 江苏大学 Crowdsourcing resource distribution formula anonymity dispensing method and its allocating system based on block chain
CN110505306A (en) * 2019-08-30 2019-11-26 公安部交通管理科学研究所 A kind of data ID generation method may specify digit
CN110585727A (en) * 2019-09-26 2019-12-20 腾讯科技(深圳)有限公司 Resource acquisition method and device
CN111209591A (en) * 2019-12-31 2020-05-29 浙江工业大学 Storage structure sorted according to time and quick query method
CN111797138A (en) * 2020-06-29 2020-10-20 北京荷月科技有限公司 Method and system for querying data on trusted front-end chain
CN112699416A (en) * 2021-01-04 2021-04-23 烽火通信科技股份有限公司 File storage method, file verification method and electronic equipment
CN112765271A (en) * 2020-12-31 2021-05-07 杭州趣链科技有限公司 Block chain transaction index storage method and device, computer equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10015017B2 (en) * 2015-04-09 2018-07-03 Qualcomm Incorporated Proof of work based user identification system

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103097A (en) * 2017-05-22 2017-08-29 中链科技有限公司 Drawing method and terminal device based on block chain technology
CN107147501A (en) * 2017-06-27 2017-09-08 中国联合网络通信集团有限公司 Timestamp processing method and processing device
CN107977910A (en) * 2017-12-04 2018-05-01 四川长虹电器股份有限公司 A kind of educational background based on block chain signs and issues method and system
CN108304475A (en) * 2017-12-28 2018-07-20 北京比特大陆科技有限公司 Data query method, apparatus and electronic equipment
CN109246084A (en) * 2018-08-13 2019-01-18 中国联合网络通信集团有限公司 New block generation method, device, electronic equipment and storage medium
CN109471905A (en) * 2018-11-16 2019-03-15 华东师范大学 A kind of block chain index method for supporting time range and range of attributes compound query
CN109462483A (en) * 2018-11-27 2019-03-12 平安科技(深圳)有限公司 Mail based on block chain deposits card method, apparatus, equipment and storage medium
CN109635585A (en) * 2018-12-07 2019-04-16 深圳市智税链科技有限公司 Method, agent node and the medium of Transaction Information are inquired in block chain network
CN109711839A (en) * 2018-12-13 2019-05-03 平安科技(深圳)有限公司 Block chain storage method, device, equipment and storage medium based on data compression
CN109815748A (en) * 2019-01-24 2019-05-28 黄冈 A kind of centre data source method for monitoring based on block chain
CN110069345A (en) * 2019-04-23 2019-07-30 江苏大学 Crowdsourcing resource distribution formula anonymity dispensing method and its allocating system based on block chain
CN110505306A (en) * 2019-08-30 2019-11-26 公安部交通管理科学研究所 A kind of data ID generation method may specify digit
CN110585727A (en) * 2019-09-26 2019-12-20 腾讯科技(深圳)有限公司 Resource acquisition method and device
CN111209591A (en) * 2019-12-31 2020-05-29 浙江工业大学 Storage structure sorted according to time and quick query method
CN111797138A (en) * 2020-06-29 2020-10-20 北京荷月科技有限公司 Method and system for querying data on trusted front-end chain
CN112765271A (en) * 2020-12-31 2021-05-07 杭州趣链科技有限公司 Block chain transaction index storage method and device, computer equipment and medium
CN112699416A (en) * 2021-01-04 2021-04-23 烽火通信科技股份有限公司 File storage method, file verification method and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SBAC: A secure blockchain-based access control framework for information-centric networking;Qinyun Lyu;《Journal of Network and Computer Applications》;1-8 *
融入区块链技术的医疗数据存储机制;王辉 等;《计算机科学》;第47卷(第04期);285-291 *

Also Published As

Publication number Publication date
CN113282662A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
US20240074004A1 (en) Verification of interactions system and method
CN110119643B (en) Two-dimensional code generation method and device and two-dimensional code identification method and device
CN108550037B (en) File processing method and device based on block chain
CN111047324B (en) Method and apparatus for updating a set of public keys at a blockchain node
CN108512830B (en) Information encryption processing method and device, computer equipment and storage medium
CN109189857B (en) Data sharing system, method and device based on block chain
CN107196840B (en) Data processing method, device and equipment
CN112511514A (en) HTTP encrypted transmission method and device, computer equipment and storage medium
CN112367164B (en) Service request processing method and device, computer equipment and storage medium
CN110662184A (en) Information pushing method and device, computer equipment and storage medium
CN112437060B (en) Data transmission method and device, computer equipment and storage medium
CN114615031A (en) File storage method and device, electronic equipment and storage medium
CN113129008A (en) Data processing method and device, computer readable medium and electronic equipment
CN113282662B (en) Block information processing method, device, equipment and medium
CN110851794A (en) Media file uplink method and device, storage medium and electronic device
CN107729345B (en) Website data processing method and device, website data processing platform and storage medium
CN112182603B (en) Anti-crawler method and device
CN110266641A (en) Information-reading method and device
KR102500419B1 (en) Method for managing data, computing device for executing the method
CN115270180A (en) Log storage and packaging method and device
CN116664123A (en) Digital wallet design method based on blockchain technology
CN112217801B (en) Message processing method and device, computer equipment and storage medium
US11128605B2 (en) Distributed encryption of mainframe data
CN115086428A (en) Network request sending method and device and electronic equipment
CN112073174B (en) Communication account decryption method, device, equipment, storage medium and information interaction system

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
GR01 Patent grant
GR01 Patent grant