CN116910820A - Data report processing method, device, computer equipment and storage medium - Google Patents

Data report processing method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN116910820A
CN116910820A CN202310671727.1A CN202310671727A CN116910820A CN 116910820 A CN116910820 A CN 116910820A CN 202310671727 A CN202310671727 A CN 202310671727A CN 116910820 A CN116910820 A CN 116910820A
Authority
CN
China
Prior art keywords
report
target
block
information
report information
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
CN202310671727.1A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202310671727.1A priority Critical patent/CN116910820A/en
Publication of CN116910820A publication Critical patent/CN116910820A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • 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
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
    • 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)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a data report processing method, a data report processing device, computer equipment and a storage medium. The method comprises the following steps: responding to the report extraction instruction, and acquiring target report information carried by the report extraction instruction; accessing a block chain, and carrying out matching search according to target report information and historical report information stored in blocks in the block chain to obtain a plurality of candidate blocks corresponding to report extraction instructions; screening a plurality of candidate blocks according to time interval information carried by the report form extraction instruction and time stamps in the candidate blocks to obtain a target block; constructing and obtaining a time correlation path according to the time stamp in the target block; and extracting target report information from the target block according to the time correlation path. By adopting the method, the change condition of the report data can be reflected more intuitively, and the reliability of the extracted target report information is higher by combining the characteristic that the blockchain cannot be tampered.

Description

Data report processing method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data report processing method, apparatus, computer device, storage medium, and computer program product.
Background
The report forms are report files which are integrated and reflected by the total sum of certain business functions or requirements according to a certain form, and the processed report forms firstly need to analyze the data sources of the report forms. In the process of sorting and analyzing the report form in actual production, the problems of various data sources, long links, difficulty in analysis, frequent data source change, difficulty in evaluating the change range and influence and the like exist.
Aiming at the problems, the report or report data processing mode in the traditional technical scheme is to trace back the report data source manually and identify the change information of the report data source, so that a great deal of labor cost and time cost are consumed, and the reliability of the obtained data source analysis result is poor.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data report processing method, apparatus, computer device, computer readable storage medium, and computer program product with higher reliability.
In a first aspect, the present application provides a method for processing a data report. The method comprises the following steps:
responding to a report extraction instruction, and acquiring target report information carried by the report extraction instruction;
Accessing a block chain, and carrying out matching search according to the target report information and the historical report information stored in the block chain to obtain a plurality of candidate blocks corresponding to report extraction instructions;
screening the candidate blocks according to time interval information carried by the report extraction instruction and the time stamp in the candidate block to obtain a target block;
constructing and obtaining a time correlation path according to the time stamp in the target block;
and extracting target report information from the target block according to the time correlation path.
In one embodiment, the data report processing method further includes:
acquiring historical report information;
the history report information is subjected to hash operation to obtain an intermediate state hash character string;
obtaining a calculation difficulty value of the intermediate hash character string according to the hash operation, and generating a workload certification of the block;
and generating a block corresponding to the historical report information according to the workload certification and the intermediate state hash character string.
In one embodiment, before generating the block corresponding to the historical report information according to the workload certification and the intermediate hash string, the method includes:
Acquiring an electronic signature corresponding to the intermediate state hash character string;
the generating the block corresponding to the historical report information according to the workload certification and the intermediate hash character string comprises the following steps:
and if the electronic signature and the intermediate hash character string pass the verification of the nodes in the blockchain, combining the blockblocks and the blockheads to form the blocks in the blockchain.
In one embodiment, the accessing the blockchain and performing a matching search according to the target report information and the historical report information stored in the blockchain blocks to obtain a plurality of candidate blocks corresponding to the report extraction instruction includes:
acquiring a history hash character string corresponding to the history report information;
performing hash operation on the target report information in the report extraction instruction to obtain a target hash character string corresponding to the target report information;
and according to the historical hash character string and the target hash character string which are identical, obtaining candidate blocks corresponding to report form extraction instructions from block matching search corresponding to the historical hash character string.
In one embodiment, the filtering the plurality of candidate blocks according to the time interval information carried by the report extraction instruction and the time stamp in the candidate block to obtain the target block includes:
Acquiring time interval information in a report form extraction instruction and a time stamp in a candidate block;
binding a hash value obtained by carrying out hash operation on data report information corresponding to the report extraction instruction with the time interval information to form an interval time stamp;
and screening the target block from the candidate blocks according to the time stamp in the candidate block and the interval time stamp.
In one embodiment, the data report processing method further includes:
acquiring a time correlation path corresponding to target report information;
and pushing the target report information according to the time information corresponding to the target report information in the time correlation path.
In a second aspect, the application also provides a data report processing device. The device comprises:
the instruction acquisition module is used for responding to the report extraction instruction and acquiring target report information carried by the report extraction instruction;
the information screening module accesses the block chain, and performs matching search according to the target report information and the historical report information stored in the blocks in the block chain to obtain a plurality of candidate blocks corresponding to the report extraction instruction;
the time screening module screens the candidate blocks according to the time interval information carried by the report extraction instruction and the time stamp in the candidate block to obtain a target block;
The path construction module is used for constructing a time-associated path according to the time stamp in the target block;
and the report extraction module is used for extracting target report information from the target block according to the time correlation path.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
responding to a report extraction instruction, and acquiring target report information carried by the report extraction instruction;
accessing a block chain, and carrying out matching search according to the target report information and the historical report information stored in the block chain to obtain a plurality of candidate blocks corresponding to report extraction instructions;
screening the candidate blocks according to time interval information carried by the report extraction instruction and the time stamp in the candidate block to obtain a target block;
constructing and obtaining a time correlation path according to the time stamp in the target block;
and extracting target report information from the target block according to the time correlation path.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
responding to a report extraction instruction, and acquiring target report information carried by the report extraction instruction;
accessing a block chain, and carrying out matching search according to the target report information and the historical report information stored in the block chain to obtain a plurality of candidate blocks corresponding to report extraction instructions;
screening the candidate blocks according to time interval information carried by the report extraction instruction and the time stamp in the candidate block to obtain a target block;
constructing and obtaining a time correlation path according to the time stamp in the target block;
and extracting target report information from the target block according to the time correlation path.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
responding to a report extraction instruction, and acquiring target report information carried by the report extraction instruction;
Accessing a block chain, and carrying out matching search according to the target report information and the historical report information stored in the block chain to obtain a plurality of candidate blocks corresponding to report extraction instructions;
screening the candidate blocks according to time interval information carried by the report extraction instruction and the time stamp in the candidate block to obtain a target block;
constructing and obtaining a time correlation path according to the time stamp in the target block;
and extracting target report information from the target block according to the time correlation path.
The application provides a data report processing method, a data report processing device, computer equipment, a storage medium and a computer program product; the method is based on report extraction instructions, and extracts and calls the stored historical report information in a blockchain mode, so that a manual data source tracing mode in a traditional scheme is replaced, labor cost and time cost are saved, and the processing efficiency is high; when searching and screening target report information, the method firstly performs primary screening based on the target report information in the report extraction instruction to obtain candidate blocks storing corresponding report information, and then performs secondary screening based on time interval information in the report extraction instruction and time stamps carried by the candidate blocks to obtain target blocks; the time correlation path is formed based on the time stamp carried by the target block, so that the target report information is obtained through extraction, and the change condition of report data can be reflected more intuitively; and the reliability of the finally extracted target report information is higher by combining the characteristic that the blockchain cannot be tampered.
Drawings
FIG. 1 is a diagram of an application environment for a datagram table processing method in one embodiment;
FIG. 2 is a flow chart of a method of processing a datagram table in one embodiment;
FIG. 3 is a flowchart illustrating sub-steps for storing report data to a blockchain in one embodiment;
FIG. 4 is a block diagram of a datagram table processing apparatus in one embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The data report processing method provided by the embodiment of the application can be applied to the application environment shown in the figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. In this implementation environment, the data storage manner in the server 104 may store report information generated by the application in a blockchain storage manner. The server 104, as a node joining the blockchain, can package report information generated by its installed application system to form a new block of the blockchain by a consensus mechanism, join the new block into the blockchain, and send the information of the new block to other nodes in the blockchain by broadcasting. In the implementation environment, in the situation that report information needs to be acquired, the server 104 responds to a report extraction instruction of the terminal 102, and performs matching search with historical report information stored in a blockchain block accessed by the server 104 based on target report information carried in the report extraction instruction; and if the historical report information stored in the block chain block is judged to be consistent with the target report information carried in the instruction, selecting the block chain block as a candidate block. Further, the report extraction instruction received by the server 104 may also carry time interval information; and based on the time interval information, performing secondary screening on the candidate blocks obtained by the primary screening to obtain target blocks with the block creation time matched with the time interval information. Then, based on the target block obtained by screening, the server 104 further obtains a timestamp formed when the block is created, and forms a time-associated path of the target report information according to the timestamp. Finally, based on the time correlation path, the server 104 extracts and sorts the report information in the target block according to the time dimension, and finally, the sorted target report information can accurately reflect the change condition of the data in the target report information in the set time interval. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a data report processing method is provided, and the method is applied to the server 104 in fig. 1 for illustration, and includes the following steps:
step 202, responding to a report extraction instruction, and acquiring target report information carried by the report extraction instruction.
In an embodiment, the report extraction instruction is instruction information that acquires historical report information that has been generated and stored into the blockchain in response to an operation of the target object in the terminal interactive interface. The target report information is information content used for describing the target report to be extracted in the report extraction instruction.
In an exemplary embodiment, the server obtains an interaction instruction of the operation object through an interaction operation interface of the terminal, triggers a corresponding report extraction instruction, sends the report extraction instruction to the server, performs necessary analysis processing on the report extraction instruction at the server to obtain target report information carried in the report extraction instruction, and the server can extract the corresponding report information from the historical report information stored in the blockchain based on the target report information and returns the report information to the terminal.
And 204, accessing the blockchain, and carrying out matching search according to the target report information and the historical report information stored in the blocks in the blockchain to obtain a plurality of candidate blocks corresponding to the report extraction instruction.
The Blockchain (Blockchain) applied in the embodiment is a distributed shared ledger and database, and has the characteristics of decentralization, non-falsification, whole trace, traceability, collective maintenance, disclosure transparency and the like. The foregoing features ensure the authenticity of the stored data in the blockchain blocks. In the block of the block chain in the embodiment, the historical report information generated by the application system in the life cycle is stored. In the embodiment, when the collected historical report information is packaged to form the blocks in the blockchain, the content of the historical report information needs to be encrypted, then the corresponding ciphertext data is formed, and the blocks in the blockchain are formed by packaging.
In an exemplary embodiment, a server with an application system background may be added to a blockchain as a new node, and in the adding process, a request is first sent to other nodes in the blockchain, so that the server can successfully establish a connection with the other nodes. If the other nodes agree, then both nodes successfully establish a connection. In a blockchain network, nodes must be connected by a network protocol, such as the P2P (Peer-to-Peer) protocol. In a P2P network, each node is peer-to-peer, and can send and receive data to and from each other. Furthermore, the server can obtain all the block bodies in the block chain and the history report information stored in the block bodies after establishing connection with other nodes as newly added nodes. After the server is successfully accessed to the blockchain and passes node authentication of the blockchain, matching search is carried out on the historical report information stored in the blockchain based on the target report information obtained by analyzing the report extraction instruction, so that tracing of the target report information is realized. In the matching search of the embodiment, since the historical report information stored in the block is encrypted to obtain ciphertext data, before the matching search is performed, the same encryption process can be performed on the target report information, similarity calculation is performed on two encrypted data in a text similarity calculation mode, a higher similarity threshold value is set, and if the calculated similarity value can meet the similarity threshold value, the ciphertext data in the current block is judged to be ciphertext of the target report information; the blockchain blocks storing the corresponding ciphertext data are marked as candidate blocks.
And step 206, screening the plurality of candidate blocks according to the time interval information carried by the report extraction instruction and the time stamp in the candidate blocks to obtain the target block.
In an embodiment, the time interval information is used to describe a time interval formed between a given start time node and end time node, wherein a specific time value is a description of the time generated for the target report information. That is, according to the time interval information carried in the report instruction, the data change of the target report information in the set time interval can be acquired from the blockchain. In an embodiment, the timestamp in the candidate block is the only time information when the encrypted historical report information is packed to form a new block of the blockchain, and the time information is stored in the block header of the block.
In an embodiment, after performing primary screening based on target report information and historical report information stored in a block chain block to obtain candidate blocks containing the same report information, a server extracts time interval information in report extraction information sent by a terminal to obtain a start time node and an end time node of the time interval information, performs second-round screening on the candidate blocks based on a time interval formed by the two nodes and a timestamp in a block head of the candidate block, and generates time of the screened target blocks within a time range formed by the time interval information. Before the embodiment performs the second round of screening, the embodiment can convert the starting time node and the ending time node of the time interval information through timestamp conversion tools such as Unix timestamp and the like due to the particularity of the data structure of the timestamp of the candidate block, the data format with the same timestamp is formed, and whether the timestamp of the candidate block falls between the sequence numbers is judged according to the starting character string sequence numbers and the ending character string sequence numbers corresponding to the starting time node and the ending time node, so that whether the candidate block is a target block is judged. In contrast, in the embodiment, the timestamp may be converted into the time information in the normal time format by using a timestamp conversion tool such as Unix timestamp, and whether the time information falls into the time interval is determined, so as to determine whether the candidate block is the target block.
Step 208, according to the time stamp in the target block, a time-associated path is constructed.
In an embodiment, the time-associated path is based on a plurality of time node information, and forms a path according to the sequence of the time nodes; the time node information may be converted by a time stamp.
In an embodiment, the time stamps of the candidate blocks are filtered through time interval information to obtain target blocks, then time stamps are extracted from the block heads of all the target blocks, a plurality of time stamps obtained by extraction are converted into time information in a normal time format through a time stamp conversion tool such as Unix time stamp, and the obtained time information is the time generated by the block, and meanwhile, the time node can also reflect that the data content of the target data report changes in the report. The service forms time node sequences according to the sequence of the time nodes corresponding to all the time stamps, and the time nodes are connected in series in a coordinate axis mode and the like, so that corresponding time correlation paths can be obtained.
And step 210, extracting target report information from the target block according to the time correlation path.
The embodiment of the invention is characterized in that after a time correlation path is formed based on the time stamp of the target block, the data content of the target report information is extracted from the target block, the data content of the target report information is decrypted to obtain a corresponding data plaintext, meanwhile, the data plaintext is correlated with the time node after the time stamp conversion, the data plaintext is ordered according to the sequence of the time nodes in the time correlation path based on the correlation relationship between the data plaintext and the time node, finally, the obtained data content records of the target report in different time intervals can also more intuitively and clearly reflect the change of the data content in the data report along with the change of time, and the data content is convenient to track.
The data report processing method in the embodiment is based on report extraction instructions, extracts and calls the stored historical report information in a block chain mode, replaces a manual data source tracing mode in the traditional scheme, saves labor cost and time cost, and is high in processing efficiency; when searching and screening target report information, the method firstly performs primary screening based on the target report information in the report extraction instruction to obtain candidate blocks storing corresponding report information, and then performs secondary screening based on time interval information in the report extraction instruction and time stamps carried by the candidate blocks to obtain target blocks; the time correlation path is formed based on the time stamp carried by the target block, so that the target report information is obtained through extraction, and the change condition of report data can be reflected more intuitively; and the reliability of the finally extracted target report information is higher by combining the characteristic that the blockchain cannot be tampered.
In one embodiment, as shown in fig. 3, the data report processing method may further include:
step 302, obtaining historical report information.
Illustratively, in an embodiment, the data content of the data report in the application system may be obtained by automating data collection, database connection, and by way of a Web service or calling an API interface. For example, in the embodiment, the data change condition of the data report in the application system can be directly obtained through the API interface, and the real-time data acquisition and processing can be realized through the API interface, and meanwhile, the data report can be integrated with other application programs. It should be noted that in the embodiment, an appropriate data acquisition mode needs to be selected according to a specific scene and requirements, and effective management and maintenance are performed on data, so as to ensure accuracy and reliability of the data.
Step 304, the history report information is hashed to obtain an intermediate state hash character string.
The intermediate Hash string is a string of binary values with a fixed length, which is calculated by a Hash algorithm, and in an embodiment, the Hash algorithm can map binary values with any length to binary values with a shorter fixed length, and the small binary values are called Hash values. Hash values are a unique and extremely compact representation of a piece of data.
Illustratively, in the embodiment, the server is used as a blockchain node, and after acquiring a newly generated data report or an updated data report, the data content in the data table can be verified through a necessary verification process. After the verification is passed, the server will first encrypt the report data. Because the Merkle (Merkle) tree is an essential component of the blockchain, all encrypted report data is firstly converted into hash values based on the characteristics of the Merkle tree and recorded in the father node of the Merkle tree of the operation record; then, all hash values recorded by the operation are pairwise captured, the hash value of the sum of the hash values is calculated, and the hash values of the two captured pairs are recorded in a common father node; the process of pairwise computing the hash value records is repeated until the final total hash value is generated, and the block performs hash operation on the final hash value again and then records the final hash value into the head as the ID of the block.
And step 306, obtaining the calculation difficulty value of the intermediate state hash character string according to the hash operation, and generating the workload certification of the block.
The workload certification in the embodiment belongs to a consensus mechanism, and is used for proving whether the nodes in the blockchain complete the certification of a certain amount of work when forming a new block.
Illustratively, in the embodiment, each time a new block is generated, after the data content of report data for uplink storage is selected, the version number, the timestamp and the difficulty value in the block header need to be filled, and a root hash of the corresponding Merkle tree is generated. These values are unique and fixed after the data content of the report data is selected, and the only value that can be changed is the random number (Nonce). The server is used as a node of the block chain, and two SHA256 algorithms for calculating the block head of the whole new block are required according to the difficulty value, and the obtained hash result is smaller than a preset threshold. The server can find the corresponding random number only by continuously trying and enumerating according to the pseudo-randomness of the period number SHA256 algorithm, and the workload of the server can be proved.
And 308, generating a block corresponding to the historical report information according to the workload certification and the intermediate hash character string.
For example, the server needs to obtain the block information of the last block of the new block before packaging to form the new block, where the block information of the last block mainly includes the last block ID. And calculating the current block ID and the last block ID according to the steps to realize the linking function of the blocks. Finally, the server forms a block header of the new block based on the previous block ID, the current block ID, the root hash of the Merkle tree, the timestamp, the version number, and the workload proof; and encrypting and packaging the acquired report data to form a block body, combining the block head and the block body to obtain a new block, and accessing the new block into a block chain.
In the embodiment, report data is stored in a block chain mode, each block can store the report data content in a specific time, and a safe and reliable chain is constructed in a cryptography mode to form a non-tamperable storage structure, so that the safety of the data is improved.
In one embodiment, before generating the block corresponding to the historical report information according to the workload certification and the intermediate state hash character string, the method may further include a process of verifying the electronic signature of the intermediate state hash character string, so that generating the new block in the blockchain in the embodiment method may include the following steps:
step one, an electronic signature corresponding to the intermediate hash character string is obtained.
And step two, if the electronic signature and the intermediate state hash character string pass through the verification of the nodes in the block chain, generating a block corresponding to the historical report information according to the workload certification and the intermediate state hash character string.
The electronic signature is signature information formed by encrypting report data subjected to hash operation through a private key generated by an asymmetric encryption algorithm, so that the signature information contains related information of hash character strings of the data report.
Illustratively, in an embodiment the server needs to check the validity and validity of the report data obtained before it is packaged as a blockchain link to form a blockchain chunk. Aiming at the validity verification in the embodiment, firstly, the blockchain in the embodiment adopts an asymmetric encryption mode to form a public key and a private key; wherein, in a node of the blockchain, its generated public key is public to other nodes in the blockchain, and its generated private key is private to the blockchain node. Furthermore, when the server is used as a block chain link point to package the report data to form a block in the block chain, firstly, the hash operation is required to be performed on the report data to generate a hash character string, and the hash character string is recorded as an intermediate state hash character string. And then the server encrypts the hash character string according to the locally stored private key to form signature information. After the signature encryption is completed by the server, other nodes in the blockchain are broadcasted, wherein the broadcasted content is report data obtained through initial acquisition and signature information formed through private key encryption. After receiving the broadcast message, other nodes can decrypt the signature information in the broadcast message by utilizing the public key which is generated and broadcast in advance by the node to obtain a corresponding hash character string, meanwhile, the other nodes synchronously carry out hash operation on report data in the broadcast message to obtain another hash character string, the two hash character strings are compared, whether the two hash character strings are consistent or not is judged, if so, the data transmission is proved to be correct, and the verification is passed. If the transaction information is inconsistent, the transaction information is proved to be changed, and verification cannot be passed. The method of the embodiment effectively solves the problem of node verification consistency through a partial symmetric encryption mode.
In one embodiment, the method performs a matching search according to target report information and historical report information stored in blocks in a block chain to obtain a plurality of candidate blocks corresponding to report extraction instructions, and the method includes the following steps:
step one, a history hash character string corresponding to the history report information is obtained.
And secondly, carrying out hash operation on the target report information in the report extraction instruction to obtain a target hash character string corresponding to the target report information.
And thirdly, searching and obtaining candidate blocks corresponding to the report form extraction instructions from the block matching corresponding to the historical hash character strings according to the fact that the historical hash character strings and the target hash character strings are identical.
Illustratively, in the process of extracting report data based on the target report information carried in the report extraction instruction in the embodiment, similar to the process of packaging the report data to form the blocks in the blockchain, the consistency of the data needs to be checked in a comparison manner. For example, in the embodiment, the target report information may select the topic name and part of the core attribute fields of the data report, and hash the character strings formed by the combination to obtain the target hash character string of the target report information. Correspondingly, when the block chain stores the report data, a corresponding index can be generated based on the report data in the block, and the source report topic name and part of core attribute fields of the report data in the block are combined to form index information. And when matching search is carried out, comparing the target hash character string with the hash character string obtained after hash operation is carried out on the index information, and if the comparison result is the same as the target hash character string, taking the block corresponding to the index information as a candidate block corresponding to the report extraction instruction. According to the embodiment, the matching search efficiency is improved on one hand by setting the index and comparing the hash strings; on the other hand, the consistency of the data before and after the data is ensured, and related information is prevented from being tampered maliciously.
In one embodiment, in the method, according to time interval information carried by a report extraction instruction and a timestamp in a candidate block, screening a plurality of candidate blocks to obtain a target block includes the following steps:
step one, time interval information in the report extraction instruction and a time stamp in the candidate block are obtained.
And step two, binding a hash value obtained by hash operation of the data report information corresponding to the report extraction instruction with the time interval information to form an interval time stamp.
And thirdly, screening the target block from the candidate blocks according to the time stamp in the candidate block and the interval time stamp.
In the embodiment, since the time stamp in the candidate block is obtained by performing hash operation on report data to be stored in the block when the block is formed, and based on the hash string, a time stamp request is sent out by a time stamp server, the time stamp server signs the hash string and the time record, and the obtained time stamp is generated. This timestamp is bound to the report data and stored in the block. Based on the feature that the time stamp is bound with the report data, in the embodiment, after the time interval information of the screened report data is extracted from the report extraction instruction, hash operation is performed on the target report information to obtain a corresponding hash value, and the hash value and the time interval information are sent to a time stamp server to obtain the corresponding time stamp. For example, the embodiment may select the start time and the end time in the time interval information as the time record of the target report, and send the time record to the time stamp server to obtain the time stamp. It should be noted that, in the embodiment, when the data report is generated, hash operation may be immediately performed on the data in the report, and the hash operation is sent to the timestamp server according to the time of generating the data report, so as to obtain the corresponding timestamp; because the binding relation exists between the time stamp and the report data, when the data report is called, the binding relation between the report and the time stamp can be directly utilized to directly acquire the time stamp as a starting time node or an ending time node of the time interval information. The server screens the time stamp in the candidate block according to the starting time stamp and the ending time stamp; the time stamp can prove the context between the blocks, and then the time stamp falls into the block between the start time stamp and the end time stamp, and the target block is determined. In the embodiment, the non-tamperable data of the time stamp is utilized, the blocks are screened through the time stamp, and the reliability of the obtained result is higher.
In one embodiment, the data report processing method may further include the steps of:
step one, obtaining a time correlation path corresponding to target report information.
And step two, pushing the target report information according to the time information corresponding to the target report information in the time correlation path.
Illustratively, the time-associated path in the embodiment can describe the life cycle of one data report, and meanwhile, the embodiment obtains the change content of the data in the target report in the life cycle from the blockchain based on the time-associated path. After the server obtains the change content of the report data, the server pushes the data report corresponding to different time to the terminal according to the time information described by the time correlation path and the time sequence, and the data report is visually displayed through the terminal.
Taking a specific implementation scenario of a financial transaction system as an example, the datagram table processing method in the application is described in more complete and detailed as follows:
firstly, data information which is generated for the first time by each business function in a financial transaction system and comprises target object information, operation time, a storage system, a target report and the like is packaged into blocks in a block chain, and a time stamp of a new block is generated based on the operation time. Then, the data report after the change is stored in the chain structure of the blockchain for any information or data change of the report.
Then, when the report data stored in the blockchain is called, matching screening can be performed according to specific report information and the time stamp of the block storing the report information, so as to realize the analysis of the data source of any report tracking analysis or the analysis of the range and influence of the change of certain data.
Specifically, in the embodiment, the report extraction instruction is responded, and based on target report information carried in the report extraction instruction, matching search is performed with history report information stored in an accessed blockchain block; and if the historical report information stored in the block chain block is judged to be consistent with the target report information carried in the instruction, selecting the block chain block as a candidate block. Further, the received report extraction instruction can also carry time interval information; and based on the time interval information, performing secondary screening on the candidate blocks obtained by the primary screening to obtain target blocks with the block creation time matched with the time interval information. And then, based on the target blocks obtained by screening, further acquiring time stamps formed during the block creation, and forming a time correlation path of the target report information according to the time stamps. Finally, based on the time correlation path, the report information in the target block is extracted and sorted according to the time dimension, and finally, the sorted target report information can be accurately reflected in a set time interval, and the change condition of data in the target report information can be accurately reflected.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
In an embodiment, as shown in fig. 4, based on the same inventive concept, an embodiment of the present application further provides a data report processing apparatus 400 for implementing the above-mentioned related data report processing method, including: an instruction acquisition module 401, an information screening module 402, a time screening module 403, a path construction module 404 and a report extraction module 405, wherein:
The instruction acquisition module 401 responds to the report extraction instruction to acquire target report information carried by the report extraction instruction.
The information filtering module 402 accesses the blockchain, and performs matching search according to the target report information and the historical report information stored in the blocks in the blockchain to obtain a plurality of candidate blocks corresponding to the report extraction instruction.
The time screening module 403 screens the candidate blocks according to the time interval information carried by the report extraction instruction and the time stamp in the candidate block, so as to obtain the target block.
The path construction module 404 constructs a time-associated path according to the time stamp in the target block.
The report extracting module 405 extracts the target report information from the target block according to the time-associated path.
Specifically, the instruction acquisition module 401 in the data report processing device 400 extracts and calls the historical report information stored in a blockchain manner based on the report extraction instruction, replaces the manual data source tracing manner in the traditional scheme, saves labor cost and time cost, and has high processing efficiency; when searching and screening target report information, firstly, the information screening module 402 performs primary screening based on the target report information in the report extraction instruction to obtain candidate blocks storing corresponding report information, and then, the time screening module 403 performs secondary screening based on time interval information in the report extraction instruction and a timestamp carried by the candidate blocks to obtain target blocks; the path construction module 404 forms a time-associated path based on the time stamp carried by the target block; finally, the report extraction module 405 extracts the target report information according to the time-related path, so that the change condition of the report data can be reflected more intuitively; and the reliability of the target report information finally extracted by the data report processing device 400 is higher by combining the characteristic that the blockchain cannot be tampered.
In one embodiment, the data report processing apparatus 400 further includes a data storage module capable of acquiring historical report information; the history report information is subjected to hash operation to obtain an intermediate state hash character string; obtaining a calculation difficulty value of the intermediate hash character string according to the hash operation, and generating a workload certification of the block; and generating a block corresponding to the historical report information according to the workload certification and the intermediate state hash character string.
In one embodiment, the data storage module in the device is further capable of acquiring an electronic signature corresponding to the intermediate hash string; if the electronic signature and the intermediate state hash character string pass the verification of the nodes in the block chain, generating a block corresponding to the historical report information according to the workload certification and the intermediate state hash character string.
In one embodiment, the information filtering module 402 may further obtain a history hash string corresponding to the history report information; carrying out hash operation on target report information in the report extraction instruction to obtain a target hash character string corresponding to the target report information; and according to the fact that the historical hash character string and the target hash character string are identical, searching and obtaining candidate blocks corresponding to the report form extraction instruction from the block matching corresponding to the historical hash character string.
In one embodiment, the time filtering module 403 is further capable of obtaining time interval information in the report extraction instruction and a timestamp in the candidate block; binding a hash value obtained by carrying out hash operation on data report information corresponding to the report extraction instruction with time interval information to form an interval time stamp; and screening the target block from the candidate blocks according to the time stamp in the candidate block and the interval time stamp.
In one embodiment, the data report processing apparatus 400 further includes a data pushing module, capable of acquiring a time correlation path corresponding to the target report information; and pushing the target report information according to the time information corresponding to the target report information in the time correlation path.
The modules in the data report processing device can be realized by all or part of software, hardware and combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The report data generated or acquired by the computer equipment is stored in a manner of forming new blockchain blocks by packing. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a data report processing method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method for processing a data report, the method comprising:
responding to a report extraction instruction, and acquiring target report information carried by the report extraction instruction;
accessing a block chain, and carrying out matching search according to the target report information and the historical report information stored in the block chain to obtain a plurality of candidate blocks corresponding to report extraction instructions;
Screening the candidate blocks according to time interval information carried by the report extraction instruction and the time stamp in the candidate block to obtain a target block;
constructing and obtaining a time correlation path according to the time stamp in the target block;
and extracting target report information from the target block according to the time correlation path.
2. The method as recited in claim 1, further comprising:
acquiring historical report information;
the history report information is subjected to hash operation to obtain an intermediate state hash character string;
obtaining a calculation difficulty value of the intermediate hash character string according to the hash operation, and generating a workload certification of the block;
and generating a block corresponding to the historical report information according to the workload certification and the intermediate state hash character string.
3. The method according to claim 2, wherein before generating the block corresponding to the history report information according to the workload certification and the intermediate hash string, the method comprises:
acquiring an electronic signature corresponding to the intermediate state hash character string;
the generating the block corresponding to the historical report information according to the workload certification and the intermediate hash character string comprises the following steps:
And if the electronic signature and the intermediate state hash character string pass the verification of the nodes in the blockchain, generating a block corresponding to the historical report information according to the workload certification and the intermediate state hash character string.
4. The method of claim 1, wherein accessing the blockchain and performing a matching search based on the target report information and the historical report information stored in the blockchain blocks to obtain a plurality of candidate blocks corresponding to the report extraction instruction comprises:
acquiring a history hash character string corresponding to the history report information;
performing hash operation on the target report information in the report extraction instruction to obtain a target hash character string corresponding to the target report information;
and according to the historical hash character string and the target hash character string which are identical, obtaining candidate blocks corresponding to report form extraction instructions from block matching search corresponding to the historical hash character string.
5. The method of claim 1, wherein the filtering the plurality of candidate blocks according to the time interval information carried by the report extraction instruction and the time stamp in the candidate block to obtain the target block comprises:
Acquiring time interval information in a report form extraction instruction and a time stamp in a candidate block;
binding a hash value obtained by carrying out hash operation on data report information corresponding to the report extraction instruction with the time interval information to form an interval time stamp;
and screening the target block from the candidate blocks according to the time stamp in the candidate block and the interval time stamp.
6. The method of any one of claims 1-5, further comprising:
acquiring a time correlation path corresponding to target report information;
and pushing the target report information according to the time information corresponding to the target report information in the time correlation path.
7. A data report processing apparatus, the apparatus comprising:
the instruction acquisition module is used for responding to the report extraction instruction, acquiring target report information carried by the report extraction instruction, and responding to the report extraction instruction, and acquiring target report information carried by the report extraction instruction;
the information screening module accesses the block chain, and performs matching search according to the target report information and the historical report information stored in the blocks in the block chain to obtain a plurality of candidate blocks corresponding to the report extraction instruction;
The time screening module screens the candidate blocks according to the time interval information carried by the report extraction instruction and the time stamp in the candidate block to obtain a target block;
the path construction module is used for constructing a time-associated path according to the time stamp in the target block;
and the report extraction module is used for extracting target report information from the target block according to the time correlation path.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310671727.1A 2023-06-07 2023-06-07 Data report processing method, device, computer equipment and storage medium Pending CN116910820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310671727.1A CN116910820A (en) 2023-06-07 2023-06-07 Data report processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310671727.1A CN116910820A (en) 2023-06-07 2023-06-07 Data report processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116910820A true CN116910820A (en) 2023-10-20

Family

ID=88363658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310671727.1A Pending CN116910820A (en) 2023-06-07 2023-06-07 Data report processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116910820A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117574413A (en) * 2024-01-17 2024-02-20 杭州易靓好车互联网科技有限公司 Dynamic encryption protection method for vehicle transaction client information

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117574413A (en) * 2024-01-17 2024-02-20 杭州易靓好车互联网科技有限公司 Dynamic encryption protection method for vehicle transaction client information
CN117574413B (en) * 2024-01-17 2024-04-05 杭州易靓好车互联网科技有限公司 Dynamic encryption protection method for vehicle transaction client information

Similar Documents

Publication Publication Date Title
CN110188096B (en) Index creating method, device and equipment for data record
WO2018041066A1 (en) Data processing method, apparatus and system based on block chain technology
CN109522330B (en) Cloud platform data processing method, device, equipment and medium based on block chain
CN110689349B (en) Transaction hash value storage and searching method and device in blockchain
CN109522328B (en) Data processing method and device, medium and terminal thereof
CN110543510B (en) Bill data processing method, device, storage medium and computer equipment
CN104798052B (en) The matched method and apparatus of consumer
CN110224808B (en) Bank data sharing method and device based on block chain, computer equipment and storage medium
US20200213331A1 (en) Data service system
CN112861496A (en) Report generation display method and device, computer equipment and readable storage medium
CN111177302A (en) Business document processing method and device, computer equipment and storage medium
CN116910820A (en) Data report processing method, device, computer equipment and storage medium
CN111459935B (en) Internet of things data storage method, storage system, query method and storage medium
WO2022082891A1 (en) Big data acquisition method and system, and computer device and storage medium thereof
CN111339551B (en) Data verification method and related device and equipment
CN115858322A (en) Log data processing method and device and computer equipment
Bergers et al. Dwh-dim: a blockchain based decentralized integrity verification model for data warehouses
CN113094740A (en) Internet of things data security storage system and method based on cloud computing
CN115221125A (en) File processing method and device, electronic equipment and readable storage medium
CN111339039A (en) File comparison method and device, storage medium and electronic device
CN111339574B (en) Block data processing method and device, computer equipment and storage medium
CN113282662B (en) Block information processing method, device, equipment and medium
CN111339566B (en) Block summarization method, device, computer equipment and storage medium
CN111782620B (en) Credit link automatic tracking platform and method thereof
CN115758475A (en) Resource data aggregation method and device, computer equipment and storage medium

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