CN112966288A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112966288A
CN112966288A CN202110340142.2A CN202110340142A CN112966288A CN 112966288 A CN112966288 A CN 112966288A CN 202110340142 A CN202110340142 A CN 202110340142A CN 112966288 A CN112966288 A CN 112966288A
Authority
CN
China
Prior art keywords
data
target
hash value
group
processed
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
CN202110340142.2A
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech 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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202110340142.2A priority Critical patent/CN112966288A/en
Publication of CN112966288A publication Critical patent/CN112966288A/en
Pending legal-status Critical Current

Links

Images

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/602Providing cryptographic facilities or services
    • 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
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a data processing method, a data processing device, electronic equipment and a storage medium, wherein the method comprises the following steps: when a transaction request is received, acquiring at least one group target hash value matched with the transaction request; wherein the set of target hash values are hash values generated based on data to be processed corresponding to the raw data; the data to be processed corresponds to the transaction request; for each group of target hash values, according to the data identification of the current group of target hash values, calling a group of original hash values which are stored in advance and matched with the data identification from the block chain; wherein the set of raw hash values is generated based on raw data, the set of raw hash values including at least one raw hash value and a raw total hash value; and aiming at each group of target hash values, when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value, determining that the data to be processed passes the audit, and improving the audit efficiency.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of data management, in particular to a data processing method and device, electronic equipment and a storage medium.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. At present, systems for performing evidence storage audit by using a block chain are increasing, the data are uploaded to the systems after hash calculation, hash values are recalculated one by one during audit, and then are compared with corresponding hash values on the chain, if the hash values are the same, the audit is passed, but the audit is long in time in the face of increasing data, and system paralysis is easily caused.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a data processing device, electronic equipment and a storage medium, which are used for auditing data and improving the auditing efficiency and accuracy.
In a first aspect, an embodiment of the present invention provides a data processing method, where the method includes:
when a transaction request is received, acquiring at least one group target hash value matched with the transaction request; wherein the set of target hash values are hash values generated based on data to be processed corresponding to the raw data; the data to be processed corresponds to the transaction request;
for each group of target hash values, according to the data identification of the current group of target hash values, calling a group of original hash values which are stored in advance and matched with the data identification from the block chain; wherein the set of raw hash values is generated based on raw data, the set of raw hash values including at least one raw hash value and a raw total hash value;
and aiming at each group of target hash values, when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value, determining that the data to be processed passes the auditing.
In a second aspect, an embodiment of the present invention further provides a data processing apparatus, where the apparatus includes:
the group target hash value acquisition module is used for acquiring at least one group target hash value matched with the transaction request when the transaction request is received; wherein the set of target hash values are hash values generated based on data to be processed corresponding to the raw data; the data to be processed corresponds to the transaction request;
the group original hash value calling module is used for calling a group original hash value which is stored in advance and matched with the data identifier from the block chain according to the data identifier of the current group of target hash values aiming at each group of target hash values; wherein the set of raw hash values is generated based on raw data, the set of raw hash values including at least one raw hash value and a raw total hash value;
and the to-be-processed data auditing module is used for determining that the to-be-processed data is approved when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value aiming at each group of target hash values.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the data processing method according to any one of the embodiments of the present invention.
In a fourth aspect, the embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing the data processing method according to any one of the embodiments of the present invention.
According to the technical scheme of the embodiment of the invention, when a transaction request is received, at least one group of target hash values matched with the transaction request is obtained, and for each group of target hash values, a group of original hash values which are pre-stored and matched with the data identification are called from a block chain according to the data identification of the current group of target hash values, and for each group of target hash values, when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value, the data to be processed is determined to be approved. The technical scheme of the embodiment of the invention realizes that whether the data to be processed passes the audit or not is determined by matching the target total hash value and the original total hash value, thereby improving the efficiency of data audit.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flow chart illustrating a data processing method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a data processing method according to a second embodiment of the present invention;
fig. 3 is a flowchart illustrating a data processing method according to a third embodiment of the present invention;
fig. 4 is a flowchart illustrating a data processing method according to a fourth embodiment of the present invention;
fig. 5 is a flowchart illustrating a data uplink process according to a fourth embodiment of the present invention;
fig. 6 is a flowchart illustrating a data processing method according to a fourth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a data processing apparatus according to a fifth embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device in a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present invention, where the embodiment is applicable to auditing data, and the method may be executed by a data processing apparatus, and the apparatus may be implemented in a form of software and/or hardware.
As shown in fig. 1, the embodiment of the present invention specifically includes the following steps:
s110, when a transaction request is received, at least one group target hash value matched with the transaction request is obtained.
The application scenarios of the data processing method of the embodiment of the invention include, but are not limited to, an application scenario of financial type data processing, an application scenario of analyzing log data in stages of program development and testing, and the like. A transaction request refers to a request to audit data. The request may be a transaction request sent by the auditing tool, or a transaction request generated according to a triggering operation of a user at a target terminal. The transaction request comprises at least one of a data type, a quantity of data, a data identification, and a target hash value of the data. The group target hash value is a hash value generated based on the data to be processed corresponding to the original data. The data to be processed corresponds to the transaction request. The data to be processed corresponds to the original data and is the data which needs to be audited. The original data refers to data pre-stored on the blockchain.
It should be noted that the original data and the data to be processed may be the same or different. For example, if the user artificially modifies the data content in the original data, the data to be processed is generated based on the modified original data, and the data to be processed is different from the original data. Or, the original data are all generated at the first time, the user modifies the original data at a second time except the first time, and if it is determined at a third time whether the original data have an error, the original data corresponding to the third time may be used as the data to be processed. If the original data is not modified and any change does not occur, the data to be processed at the moment is the same as the original data.
In this embodiment, the number of the group hash values may be one or two, or more, because if the data to be processed is divided into a plurality of groups, the number of the group hash values may be multiple; if the data to be processed is a group, the number of the group hash values may be one.
It should be further noted that the number of the group hash values is the same as the number of the group original hash values stored in the previous chain.
Specifically, when a transaction request is received, at least one group target hash value matching the transaction request is obtained. Optionally, the data to be processed is divided into different groups of data, and each group includes a preset number of sub-data to be processed. For each group, a group target hash value for each group is obtained. And preparing for data auditing of subsequent data to be processed.
In the embodiment of the present invention, before data auditing, that is, before a transaction request is received, the set of original hash values generated according to the original data may be subjected to uplink storage. Optionally, a set of original hash values of the original data is determined, and the set of original hash values is linked.
The uplink refers to storing the set of original hash values onto the blockchain. The benefit of storing to the blockchain is that the security of the data is improved.
It should be noted that the group raw hash value is generated based on raw data, and the raw data is grouped to obtain a plurality of groups of data, where each group includes a plurality of pieces of data. An original hash value is generated based on the single piece of data of each group, and an original total hash value is generated based on the plurality of original hash values of each group. Thus, the set of raw hash values includes at least one raw hash value and a raw total hash value. The group original hash value is sent to the block chain in advance for storage, and when a transaction request is received, the block chain can audit the data to be processed based on the comparison between the group target hash value and the group original hash value corresponding to the group target hash value.
In this embodiment, the original data may be divided into multiple groups, and the original data in each group may be processed to obtain a group original hash value. The original data may be divided into groups according to the number of data, the size of data amount, and time information of data, which are preset for each group. For example, if the original data is divided into a plurality of groups according to the number of data, for example, each group is set to contain 20 pieces of data, and the original data has 100 pieces of data in total, the original data is divided into 5 groups; or setting the size of the data size of each group to divide the original data into a plurality of groups, for example, setting the size of the data size of each group to occupy 20kb ± 5kb of the memory; it is also possible to set time information of data, for example, grouping data separated by two hours into one group, calculated from the earliest time of data in the original data, or grouping the original data by setting the relationship between the total data amount of the original data and the number of groups.
Optionally, determining a quantity corresponding to data included in the original data, and dividing the original data by a group number same as the numerical value according to a relationship between the quantity and a square of each numerical value; determining a set of raw hash values for each set of data, and chaining the set of raw hash values.
Wherein, the numerical value refers to a positive integer, such as 1, 2, 3, 4, etc., and the square of the corresponding numerical value is 1, 4, 9, 16, etc. in turn. The relationship between the number and the square of each numerical value means that when the difference between the number and the square of the numerical value is within a preset range, the number is determined to be equal to the square of the numerical value, so that the original data is determined to be divided into the same groups as the numerical values. For example, a predetermined range of [ -2,2], and when the number of data is 101 and the difference between the number and the square of the number is within the predetermined range, the number is determined to be 10. Thus, the original data is divided into 10 groups. After the first 100 pieces of data are sequentially divided into 10 groups, the remaining data are separately subjected to hash calculation to obtain an original hash value. Since the individual data is not divided into packets, there is no need to compute the group raw hash value. Of course, the data may also be divided into 11 groups, where each group in the first 10 groups includes 10 pieces of data, and the last 1 group includes one piece of data, so that the data of each group may be subjected to hash calculation to obtain an original hash value and an original total hash value.
Specifically, the original data includes a plurality of pieces of data, and the data in the original data is counted to determine the number of the pieces of data in the original data. And then determining a numerical value obtained by corresponding the number according to the relation between the logarithm number and the square of the numerical value, and dividing the data in the original data according to the group number which is the same as the numerical value. And determining a group of original hash values of each group of data, and performing chain storage on each group of original hash values.
And S120, aiming at each group of target hash values, calling a group of original hash values which are stored in advance and matched with the data identification from the block chain according to the data identification of the current group of target hash values.
The data identification means that the data to be processed is divided into a plurality of groups, and each group has the data identification so as to uniquely determine each group and the group target hash value of each group. The current group of target hash values can be distinguished from other groups of target hash values through the data identification, and it is guaranteed that the group of original hash values matched with the data identification can be found in each group of original hash values stored in a block chain in advance based on the data identification. The representation of the data identification may be a number of the group target hash value. And calling a pre-stored group original hash value matched with the data identifier from the block chain according to the data identifier of the current group of target hash values, and preparing for comparing the subsequent current group of target hash values with the group original hash value.
It should be noted that, in each set of original hash values, there is a data identifier matching with the current set of target hash values. At least one group of original hash values obtained based on the original data and at least one group of target hash values obtained based on the data to be processed have a one-to-one correspondence relationship. Such as: the data identifications of the group original hash value and the group target hash value are the same, or an association relationship exists between the data identifications of the group original hash value and the group target hash value, so that one group original hash value can be uniquely determined based on the data identification of the group target hash value and the association relationship. Optionally, since one group target hash value corresponds to one group target total hash value, the data identifier may be a data identifier of the target total hash value.
S130, aiming at each group of target hash values, when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value, determining that the data to be processed passes the auditing.
Specifically, if it is determined that the target total hash value in the current target hash value is the same as the corresponding original total hash value, it may be determined that the to-be-processed data corresponding to the target total hash value is the same as the original data corresponding to the original total hash value, so as to determine that the to-be-processed data passes the audit. Compared with the mode of matching the hash value of each piece of data one by one in the prior art, the technical scheme of the embodiment of the invention improves the speed of the auditing by adopting the method of matching the target total hash value with the original total hash value.
Illustratively, when the application scenario is financial ledger data, the original data is original ledger data, and the data to be processed is current ledger data corresponding to the original ledger data. In order to avoid errors of the current account book data due to human factors and the like, the current account book data is checked. The method comprises the steps of dividing current account book data into different groups, carrying out hash calculation to obtain at least one group original hash value, and sending the group original hash value to a block chain to be stored on the block chain. When a transaction request is received, at least one group target hash value matched with the transaction request is obtained, a group original hash value matched with the data identification in the block chain is called from the block chain according to the data identification of the current target hash value aiming at each group target hash value, when the group original hash value is the same as the group target hash value, the data to be processed is determined to be approved, and the conditions that the current account book is the same as the original account book, false accounts are not generated or the accounts are not omitted in the current account book are indicated. And the matching efficiency is improved through matching the group target hash value.
According to the technical scheme of the embodiment of the invention, when a transaction request is received, at least one group of target hash values matched with the transaction request is obtained, and for each group of target hash values, a group of original hash values which are pre-stored and matched with the data identification are called from a block chain according to the data identification of the current group of target hash values, and for each group of target hash values, when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value, the data to be processed is determined to be approved. The technical scheme of the embodiment of the invention realizes that whether the data to be processed passes the audit or not is determined by matching the target total hash value and the original total hash value, thereby improving the efficiency of data audit.
On the basis of the technical scheme, the result of the verification is fed back to the target terminal so as to remind the user corresponding to the target terminal.
The target terminal may be a terminal that sends out an transaction request, such as a computer or a server loaded with auditing tool software, or a terminal that can receive information, such as a mobile terminal or a tablet computer. The expression form of the result of the audit passing can be text, image, voice and the like. The result of the audit pass comprises the identification of the data to be processed, the audit time and the like. For example, the result of the audit is log information in the XX program development stage, the audit is completed in 20 minutes at 3, 2, and 12 in 2021, and the result of the audit is passed.
Specifically, the result of the passing of the audit is fed back to the target terminal, so that the user corresponding to the target terminal can obtain the result of the passing of the audit in time, and the data to be processed is subjected to subsequent processing based on the result of the passing of the audit.
Example two
Fig. 2 is a schematic flow chart of a data processing method according to an embodiment of the present invention, where on the basis of the above embodiment of the present invention, before receiving a transaction request and acquiring at least one group target hash value matched with the transaction request, the embodiment of the present invention adds a step of performing hash calculation on data to be processed to obtain the group target hash value, and specific steps are described in detail in the embodiment of the present invention. Technical terms identical or similar to those of the above embodiments will not be described again.
S210, determining a group target hash value corresponding to the data to be processed by adopting a hash algorithm.
The hash algorithm includes, but is not limited to, a number analysis method, a random number method, a square-based mid-cut method, and the like. And carrying out hash calculation on the data to be processed through a hash algorithm to obtain a hash value. Optionally, the data to be processed is divided into different groups, hash calculation is performed on the sub data to be processed of each group to obtain a target hash value, and hash calculation is performed on the target hash value of each group to obtain a target total hash value. And obtaining a group target hash value based on the target hash value and the target total hash value.
It should be noted that the grouping manner of the data to be processed is the same as the grouping manner of the original data. The calculation mode of obtaining the group target hash value according to the data to be processed is the same as the calculation mode of obtaining the group original hash value according to the original data. Thus, the data identity of the group original hash value is the same as the data identity of the corresponding group target hash value,
in this embodiment of the present invention, the determining a group target hash value corresponding to data to be processed by using a hash algorithm includes: determining a target hash value of the current to-be-processed subdata by adopting a hash algorithm aiming at each to-be-processed subdata in the to-be-processed data; acquiring target hash values corresponding to a preset number of to-be-processed subdata, and processing the target hash values based on a hash algorithm to obtain a target total hash value; obtaining a group target hash value based on the target hash value and a target total hash value corresponding to the target hash value; and determining a data identification corresponding to the group target hash value, so as to call a group original hash value stored in advance based on the data identification when a transaction request is received.
The sub-data to be processed refers to a single piece of data in the data to be processed. The target hash value is a hash value obtained by performing hash calculation on the to-be-processed sub-data. The target total hash value is a hash value obtained by performing hash calculation on at least one target hash value. The preset number may be any number greater than or equal to 1 and less than or equal to the total number of the sub-data to be processed. Each group of original hash values in the original data is provided with a data identifier, and correspondingly, the same data identifier is set for the group of target hash values corresponding to the group of original hash values, so as to determine that the original data corresponding to the group of original hash values corresponds to the to-be-processed data corresponding to the current group of target hash values.
Specifically, the sub-data to be processed is calculated by a hash algorithm to obtain a target hash value of each sub-data to be processed. And acquiring a preset number of sub data to be processed from the data to be processed, and performing hash calculation based on the target hash value of the sub data to be processed to obtain a target total hash value. The method comprises the steps of dividing a preset number of sub data to be processed into one group to divide the data to be processed into at least one group. In this way, the target hash value and the target hash sum for each group are obtained, and the group target hash value is combined from the target hash value and the target hash sum for each group. And setting a data identifier for each group target hash value, and calling the group original hash value stored in the block chain according to the data identifier when a transaction request is received.
In the embodiment of the present invention, the method for calculating the target hash value corresponding to the preset number of the to-be-processed sub-data to obtain the target total hash value includes at least one of the following methods:
firstly, the obtaining of the target hash value corresponding to the preset number of the to-be-processed subdata and the processing of the target hash value based on the hash algorithm to obtain the target total hash value includes: and acquiring target hash values corresponding to the preset number of the to-be-processed subdata according to the storage time information of the to-be-processed subdata, and processing the target hash values based on a hash algorithm to obtain a target total hash value.
The storage time information refers to the storage time of the to-be-processed sub data, and the storage position can be a to-be-examined subsystem or any database. The storage position of the embodiment of the invention is in the subsystem to be examined, and the subsystem to be examined acquires the data to be processed, stores the data and records the storage time.
Specifically, according to the storage time information of the to-be-processed subdata, target hash values corresponding to a preset number of the to-be-processed subdata are sequentially obtained, and hash calculation is performed on the target hash values to obtain a target total hash value. Of course, the sub-data to be processed obtains and sequentially calculates the target hash value based on the preset number of the sub-data to be processed according to the storage time information, and calculates to obtain the target total hash value based on the target hash value.
Secondly, the obtaining of the target hash value corresponding to the preset number of the to-be-processed subdata and the processing of the target hash value based on the hash algorithm to obtain the target total hash value includes: dividing the sub data to be processed into at least two groups according to the time information according to the number of the sub data to be processed, and obtaining a target total hash value of each group according to a target hash value corresponding to the sub data to be processed contained in each group.
Wherein, the time information refers to the time information of data generation. For example, the ledger data is data generated when a transaction is completed, and the corresponding time information is the time when the transaction is completed.
Specifically, the sub-data to be processed is divided into at least two groups according to the time information according to the number of the sub-data to be processed, and the target hash value corresponding to the sub-data to be processed included in each group is subjected to hash calculation again, so as to obtain the target total hash value of each group. It should be understood that obtaining the target hash value from the sub-data to be processed is the same as obtaining the original hash value from the data in the original data. The hash calculation mode for obtaining the target total hash value according to the target hash value is the same as that for obtaining the original total hash value according to the original hash value.
S220, when a transaction request is received, at least one group target hash value matched with the transaction request is obtained.
And S230, aiming at each group of target hash values, calling a group of pre-stored original hash values matched with the data identification from the block chain according to the data identification of the current group of target hash values.
And S240, aiming at each group of target hash values, when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value, determining that the data to be processed passes the auditing.
According to the technical scheme of the embodiment of the invention, a group target hash value corresponding to data to be processed is determined through a hash algorithm, at least one group target hash value matched with a transaction request is obtained when the transaction request is received, a group original hash value which is stored in advance and matched with a data identifier is called from a block chain according to the data identifier of the current group target hash value aiming at each group target hash value, and when the group target hash value is the same as the group original hash value, the data to be processed is determined to be approved. According to the technical scheme of the embodiment of the invention, the original data and the data to be processed corresponding to the original data are processed through the same hash algorithm, so that when the data to be processed is audited, whether the data to be processed passes the audit can be determined based on whether the group target hash value is the same as the group target hash value or not, and the validity of the audit is ensured.
EXAMPLE III
Fig. 3 is a flowchart illustrating a data processing method according to an embodiment of the present invention. On the basis of the alternative of the above embodiments, the embodiment of the present invention embodies the step of determining whether the audit of the data to be processed passes or not according to the target total hash value in the current set of target hash values and the corresponding original total hash value, and specific contents of the optimization thereof can be specifically described with reference to this embodiment. The technical solutions that are the same as or similar to the above embodiments will not be described again.
As shown in fig. 3, the data processing method according to the embodiment of the present invention includes the following steps:
s310, when a transaction request is received, at least one group target hash value matched with the transaction request is obtained.
S320, aiming at each group of target hash values, according to the data identification of the current group of target hash values, a group of original hash values which are stored in advance and matched with the data identification are called from the block chain.
S330, aiming at each group of target hash values, when the target total hash value in each group of target hash values is consistent with the corresponding original total hash value, determining that the data to be processed is the same as the original data, and feeding back to verify that the data to be processed is passed.
Specifically, when each group of target hash values are matched, the target total hash value in each target hash value is compared with the corresponding group of original total hash values. And when all the target total hash values are the same as the corresponding original total hash values, determining that the data to be processed is the same as the corresponding original data, and feeding back to verify to be passed. Optionally, the information that passes the audit can be sent to the target terminal. On the contrary, when any one target total hash value is different from the corresponding original total hash value, the data to be processed is determined to be different from the corresponding original data, the feedback that the audit is not passed is fed back, and the audit non-passing information can be sent to the target terminal.
S340, when a target total hash value in the group of target hash values is different from a corresponding original total hash value, taking the group of target hash values and the to-be-processed data corresponding to the group of target hash values as to-be-verified data; and checking the data to be verified to obtain a checking result, and feeding the checking result back to the target terminal.
Specifically, when the target total hash value is different from the corresponding original total hash value, the to-be-processed data associated with the target total hash value is determined to serve as the to-be-verified data. The group target hash value is composed of a target hash value and a target total hash value, and the target hash value is obtained by performing hash calculation on the sub-data to be processed. Therefore, the data to be verified includes at least one target hash value and the sub-data to be processed corresponding to each target hash value. And comparing each target hash value in the data to be verified with the original hash value corresponding to the target hash value, determining the verification result of each target hash value, and feeding the verification result back to the target terminal.
In this embodiment of the present invention, the verifying the data to be verified to obtain a verification result includes: determining original data corresponding to the data to be verified, and calling a group of original hash values corresponding to the original data; and matching a target hash value corresponding to each sub data to be processed in the data to be verified with a corresponding original hash value in sequence, determining abnormal sub data to be processed, and feeding the abnormal sub data to be processed back to the target terminal.
It should be understood that an association relationship exists between the original data and the data to be processed, and the original data corresponding to the data to be verified can be determined according to the association relationship. The association relationship may be that the original data and the data to be processed have the same data identifier.
Specifically, a set of original hash values corresponding to the original data is called, a target hash value corresponding to each to-be-processed subdata in the data to be verified is sequentially compared with the corresponding original hash value, and when the target hash value of the to-be-processed subdata is different from the corresponding original hash value, abnormal to-be-processed subdata is determined. The abnormal to-be-processed subdata can be fed back to the target terminal, so that the target terminal determines the abnormal to-be-processed subdata to perform subsequent processing on the abnormal to-be-processed subdata.
In this embodiment of the present invention, the verifying the data to be verified to obtain a verification result includes: determining a data identifier corresponding to the data to be verified, and calling a group of original hash values matched with the data identifier; and matching the target hash value corresponding to each sub-data to be processed in the data to be verified with the corresponding original hash value in sequence, determining abnormal sub-data to be processed, and feeding the abnormal sub-data to be processed back to the target terminal.
The data identifier of the data to be verified may be a data identifier of the group target hash value. The data identification of the group target hash value and the data identification of the group original hash value in the original data have an incidence relation, so that the group original hash value matched with the data identification can be called after the data identification corresponding to the data to be verified is determined. And comparing a target hash value corresponding to each to-be-processed subdata of the data to be verified with a corresponding original hash value in sequence, and determining abnormal to-be-processed subdata when the target hash value is different from the corresponding original hash value. The abnormal to-be-processed subdata can be fed back to the target terminal to remind a target user corresponding to the target terminal, so that the target user can conveniently perform subsequent processing work on the abnormal to-be-processed subdata.
According to the technical scheme of the embodiment of the invention, when a transaction request is received, at least one group of target hash values matched with the transaction request is obtained, and for each group of target hash values, a group of original hash values which are pre-stored and matched with the data identification are called from a block chain according to the data identification of the current group of target hash values, and for each group of target hash values, when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value, the data to be processed is determined to be approved. And on the contrary, the group target hash value and the data to be processed corresponding to the group target hash value are used as the data to be verified, the data to be verified is verified, and the obtained verification result is fed back to the target terminal. The technical scheme of the embodiment of the invention realizes the auditing to be processed, and when each target total hash value is the same as the corresponding original total hash value, the auditing is passed, and the auditing result is fed back to the target terminal. And if the verification result is not passed, verifying the group target hash value of the target total hash value and the corresponding to-be-processed data as to-be-verified data, and feeding back the verification result to the target terminal, so that the accuracy of the verification result is improved, and the analysis and subsequent processing of the to-be-processed data based on the verification result are facilitated for a user.
Example four
Fig. 4 is a schematic flow chart of a data processing method according to an embodiment of the present invention. Optionally, in the technical solution of the embodiment of the present invention, chain audit is performed through a block chain, and at least one group original hash value (the group original hash value includes an original hash value and an original total hash value) of original data is obtained through the block chain and stored. And the auditing subsystem sends a transaction request to the block chain, acquires data to be processed from the subsystem to be audited, performs hash calculation to obtain a group target hash value, receives the transaction request through the block chain, and acquires at least one group target hash value corresponding to the transaction request from the auditing subsystem for on-chain verification.
The pending subsystem stores original data, and the original data can be log data, ledger data and the like. And the pending subsystem calculates the total quantity of the data, the group number and the quantity of the data contained in each group. The total quantity N of data in the original data is counted, the quantity N is compared with the square of the value Y, and when the difference value of the quantity N and the square of the value Y is within a preset range, the group number Z is determined to be the same as the value Y, so that the original data are divided into Z groups. When the number is equal toWhen N is greater than the square of the value Y, dividing the original data into Z +1 groups, wherein each group in the front Z group comprises Z data, and the rest group comprises | N-Y2L data. When the number N is less than the square of the value Y, the original data is divided into Z groups, each group in the first Z-1 group contains Z data, and the remaining group contains | N-Y2L data. When the number N is equal to the square of the value Y, Z ═ Y, the original data is divided into Z groups, each group containing Z data. The pending subsystem groups the data to be processed in the same way as the original data. Each group of the original data has a corresponding group in the data to be processed, and the data contained in each group has sub-data to be processed for application in the corresponding group in the data to be processed. The pending subsystem is provided with a first hash processing module for carrying out hash calculation on the original data. And performing hash calculation on each data in each group through a first hash processing module to obtain an original hash value, and combining the original hash value and the original total hash value into a group of original hash values according to the original total hash value calculated for each original hash value in each group. Optionally, the calculation of the original hash value and the original total hash value by the first hash processing module may be performed during the uplink process, or may be performed after the calculation of the original data packet and the original hash value group has been completed in advance.
And the block chain acquires the group original hash value and stores the group original hash value. The following is a mode of calculating an original hash value and an original total hash value by a first hash processing module in the process of sending the group of original hash values to the block chain by the subsystem to be examined. First, the blockchain obtains the number of stored groups of the group original hash values that need to be stored and the number of data included in each group. The < number of groups, number of data contained in each group > may be obtained to set a corresponding storage area on the blockchain. And then, sequentially calculating the original hash values of the data in each group through a first hash processing module in the subsystem to be examined, and sequentially chaining the original hash values, wherein the chaining format can be < i, and the original hash value _ i >, wherein i refers to the serial number of the data. After the calculation of the original hash values of a group is finished, an original total hash value is calculated based on at least one original hash value contained in the group, and uplink is performed, wherein the uplink format can be < kth group, original total hash value >, and K represents the serial number of the group. If the original hash value data is judged to be calculated, it may be determined that the ith original hash value and the jth original hash value are data of one group according to | j-i | ═ z, at this time, the original total hash value of the group (for example, the kth group) may be calculated, and the original total hash value may be linked in a format of < kth group, original total hash value >. Finally, the uplink is cycled until all the group original hash values obtained based on the original data are subjected to uplink processing, and the storage work of the group original hash values by the block chain is completed, as shown in fig. 5.
The auditing subsystem comprises a second hash processing module for carrying out hash calculation on the data to be processed. The Hash calculation mode is the same as the mode of carrying out Hash calculation on the original data by the first Hash processing module in the subsystem to be examined. As shown in fig. 6, a transaction request is sent to the blockchain through the auditing subsystem, and the grouping of the original data corresponding to the pick-up request and the quantity condition of each group containing data are inquired from the blockchain. And reading the data to be processed corresponding to the original data from the subsystem to be audited through the auditing subsystem. And carrying out hash calculation on each group of data to be processed to obtain a target hash value, and obtaining a target total hash value based on the target hash value of each group. After the block chain receives the transaction request, calling each target total hash value in the auditing subsystem, acquiring a corresponding original total hash value stored in the block chain in advance, determining the target total hash value based on the group serial number and the data identification, correspondingly, acquiring the original total hash value matched with the group serial number and the data identification from the block chain, and performing on-chain verification, wherein the verification can be performed in a mode of (the group serial number and the target total hash value). And when the target total hash value is successfully verified, verifying the next target total hash value. When the current target total hash value verification fails, each target hash value in a group of target hash values corresponding to the target total hash value is obtained, each target hash value is verified in sequence, the target hash value which fails verification is determined, and a verification result is fed back to the auditing subsystem. For example, a feedback of the authentication failure of the Kth target hash value is made so that the user can base the authentication onAnd determining abnormal to-be-processed subdata in the to-be-processed data from the to-be-examined subsystem according to the verification result. The interaction frequency between the subsystem to be examined and the block chain is reduced, the interaction complexity is reduced, and the interaction frequency formula is
Figure BDA0002999214130000181
Wherein x is the group number of the packets of the data to be processed, and N is the total number of the data to be processed. When in use
Figure BDA0002999214130000182
Taking the minimum value
Figure BDA0002999214130000183
In this case, the number of interactions is the largest, however, when the number of interactions is the largest, the number of interactions is much smaller than that in the prior art, for example, when N is 1000000, x is 1000, and the maximum number of interactions is 999+1000, 1999. The minimum number of interactions is 1000, that is, the total hash value of each target is verified in sequence, and all the verifications pass, so the number of verification (interactions) is 1000. The number of verification times on the chain is reduced, the calculation pressure of the block chain is reduced, the auditing process is accelerated, and the overall auditing time is reduced.
According to the technical scheme of the embodiment of the invention, the original data are grouped and subjected to hash calculation through the subsystem to be examined, so that the original hash value of each group of single data and the original total hash value of each group of original hash values are obtained, and chaining is carried out. And performing hash calculation on the data to be processed through the auditing subsystem to obtain a target hash value of each group of single data and a target total hash value of the target hash values in each group. And sending a transaction request to the block chain through the auditing subsystem, calling a target total hash value in the auditing subsystem through the block chain to perform on-chain verification, when all the target total hash values are the same as the corresponding original total hash values, passing the audit, and sending a message passing the audit to the target terminal so as to inform a user corresponding to the target terminal. When any one target total hash value is different from the corresponding original total hash value, the target hash values contained in the group corresponding to the target total hash value are obtained, each target hash value is verified, at least one target hash value failed in verification is determined, and the verification result is fed back to the target terminal. By the technical scheme of the embodiment of the invention, the efficiency of data auditing can be improved.
EXAMPLE five
Fig. 7 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, where the data processing apparatus according to the embodiment of the present invention can execute a data processing method according to any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. The device includes: a group target hash value obtaining module 710, a group original hash value calling module 720 and a to-be-processed data auditing module 730; wherein:
a group target hash value obtaining module 710, configured to, when a transaction request is received, obtain at least one group target hash value matching the transaction request; wherein the set of target hash values are hash values generated based on data to be processed corresponding to the raw data; the data to be processed corresponds to the transaction request;
a group original hash value retrieving module 720, configured to retrieve, for each group target hash value, a group original hash value that is pre-stored and matches with the data identifier from the block chain according to the data identifier of the current group target hash value; wherein the set of raw hash values is generated based on raw data, the set of raw hash values including at least one raw hash value and a raw total hash value;
and the to-be-processed data auditing module 730 is configured to determine, for each group of target hash values, that the to-be-processed data is approved when a target total hash value in the current group of target hash values is the same as a corresponding original total hash value.
Further, the apparatus further comprises:
and the auditing result sending module is used for feeding back the auditing result to the target terminal so as to remind the user corresponding to the target terminal.
Further, the apparatus further comprises:
and the group target hash value determining module is used for determining the group target hash value corresponding to the data to be processed by adopting a hash algorithm.
Further, the set of target hash values determining module includes:
the target hash value determining submodule is used for determining a target hash value of the current to-be-processed subdata by adopting a hash algorithm aiming at each to-be-processed subdata in the to-be-processed data;
the target total hash value determining submodule is used for acquiring target hash values corresponding to the preset number of the to-be-processed subdata and processing the target hash values based on a hash algorithm to obtain target total hash values;
a group target hash value determination submodule configured to obtain a group target hash value based on the target hash value and a target total hash value corresponding to the target hash value;
and the data identification determining submodule is used for determining the data identification corresponding to the group of target hash values so as to call a group of pre-stored original hash values based on the data identification when a transaction request is received.
Further, the target total hash value determination submodule includes:
the first target total hash value determining unit is used for acquiring target hash values corresponding to the preset number of the to-be-processed subdata according to the storage time information of the to-be-processed subdata, and processing the target hash values based on a hash algorithm to obtain the target total hash values.
Further, the target total hash value determination submodule includes:
and the second target total hash value determining unit is used for dividing the sub data to be processed into at least two groups according to the time information according to the number of the sub data to be processed, and obtaining the target total hash value of each group according to the target hash value corresponding to the sub data to be processed contained in each group.
Further, the to-be-processed data auditing module 730 includes:
and the first auditing submodule is used for feeding back that the data to be processed is the same as the original data when the target total hash value in each group of target hash values is consistent with the corresponding original total hash value, and the data to be processed is approved by auditing.
Further, the apparatus further comprises:
the data to be verified determining module is used for taking the group target hash value and the data to be processed corresponding to the group target hash value as data to be verified when a target total hash value in the group target hash value is different from a corresponding original total hash value;
and the verification result acquisition module is used for verifying the data to be verified to obtain a verification result and feeding the verification result back to the target terminal.
Further, the check result obtaining module includes:
the first group of original hash value calling sub-modules are used for determining original data corresponding to the data to be verified and calling a group of original hash values corresponding to the original data;
and the first abnormal to-be-processed subdata determining submodule is used for matching a target hash value corresponding to each to-be-processed subdata in the to-be-verified data with a corresponding original hash value in sequence, determining abnormal to-be-processed subdata and feeding the abnormal to-be-processed subdata back to the target terminal.
Further, the check result obtaining module includes:
the second group of original hash value calling sub-module is used for determining a data identifier corresponding to the data to be verified and calling a group of original hash values matched with the data identifier;
and the second abnormal to-be-processed subdata determining submodule is used for matching a target hash value corresponding to each to-be-processed subdata in the to-be-verified data with a corresponding original hash value in sequence, determining abnormal to-be-processed subdata and feeding the abnormal to-be-processed subdata back to the target terminal.
Further, the apparatus further comprises:
and the group original hash value chaining module is used for determining the group original hash value of the original data and chaining the group original hash value.
Further, the set of original hash values chaining module comprises:
the original data dividing submodule is used for determining the quantity corresponding to the data contained in the original data and dividing the original data by the group number same as the numerical value according to the relationship between the quantity and the square of each numerical value;
and the group original hash value chaining sub-module is used for determining the group original hash value of each group of data and chaining the group original hash value.
According to the technical scheme of the embodiment of the invention, when a transaction request is received, at least one group of target hash values matched with the transaction request is obtained, and for each group of target hash values, a group of original hash values which are pre-stored and matched with the data identification are called from a block chain according to the data identification of the current group of target hash values, and for each group of target hash values, when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value, the data to be processed is determined to be approved. The technical scheme of the embodiment of the invention realizes that whether the data to be processed passes the audit or not is determined by matching the target total hash value and the original total hash value, thereby improving the efficiency of data audit.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE six
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. FIG. 8 illustrates a block diagram of an exemplary electronic device 80 suitable for use in implementing embodiments of the present invention. The electronic device 80 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 8, the electronic device 80 is in the form of a general purpose computing device. The components of the electronic device 80 may include, but are not limited to: one or more processors or processing units 801, a system memory 802, and a bus 803 that couples various system components including the system memory 802 and the processing unit 801.
Bus 803 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The electronic device 80 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 80 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 802 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)804 and/or cache memory 805. The electronic device 80 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 806 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 803 by one or more data media interfaces. Memory 802 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 808 having a set (at least one) of program modules 807 may be stored, for instance, in memory 802, such program modules 807 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. Program modules 807 generally perform the functions and/or methodologies of embodiments of the present invention as described herein.
The electronic device 80 may also communicate with one or more external devices 809 (e.g., keyboard, pointing device, display 810, etc.), with one or more devices that enable a user to interact with the electronic device 80, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 80 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 811. Also, the electronic device 80 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 812. As shown, the network adapter 812 communicates with the other modules of the electronic device 80 over the bus 803. It should be appreciated that although not shown in FIG. 8, other hardware and/or software modules may be used in conjunction with electronic device 80, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 801 executes various functional applications and data processing by running a program stored in the system memory 802, for example, to implement the data processing method provided by the embodiment of the present invention.
EXAMPLE seven
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a data processing method, the method comprising:
when a transaction request is received, acquiring at least one group target hash value matched with the transaction request; wherein the set of target hash values are hash values generated based on data to be processed corresponding to the raw data; the data to be processed corresponds to the transaction request; for each group of target hash values, according to the data identification of the current group of target hash values, calling a group of original hash values which are stored in advance and matched with the data identification from the block chain; wherein the set of raw hash values is generated based on raw data, the set of raw hash values including at least one raw hash value and a raw total hash value; and aiming at each group of target hash values, when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value, determining that the data to be processed passes the auditing.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 the context of 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.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. 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 for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention 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 invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (15)

1. A method of data processing, performed by nodes in a blockchain, the method comprising:
when a transaction request is received, acquiring at least one group target hash value matched with the transaction request; wherein the set of target hash values are hash values generated based on data to be processed corresponding to the raw data; the data to be processed corresponds to the transaction request;
for each group of target hash values, according to the data identification of the current group of target hash values, calling a group of original hash values which are stored in advance and matched with the data identification from the block chain; wherein the set of raw hash values is generated based on raw data, the set of raw hash values including at least one raw hash value and a raw total hash value;
and aiming at each group of target hash values, when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value, determining that the data to be processed passes the auditing.
2. The method of claim 1, further comprising:
and feeding back the result of the verification to a target terminal so as to remind the user corresponding to the target terminal.
3. The method of claim 1, wherein before obtaining at least one group target hash value matching a transaction request when the transaction request is received, further comprising:
and determining a group target hash value corresponding to the data to be processed by adopting a hash algorithm.
4. The method of claim 3, wherein determining the set of target hash values corresponding to the data to be processed using a hash algorithm comprises:
determining a target hash value of the current to-be-processed subdata by adopting a hash algorithm aiming at each to-be-processed subdata in the to-be-processed data;
acquiring target hash values corresponding to a preset number of to-be-processed subdata, and processing the target hash values based on a hash algorithm to obtain a target total hash value;
obtaining a group target hash value based on the target hash value and a target total hash value corresponding to the target hash value;
and determining a data identification corresponding to the group target hash value, so as to call a group original hash value stored in advance based on the data identification when a transaction request is received.
5. The method of claim 4, wherein the obtaining a target hash value corresponding to a preset number of the sub-data to be processed and processing the target hash value based on a hash algorithm to obtain a target total hash value comprises:
and acquiring target hash values corresponding to the preset number of the to-be-processed subdata according to the storage time information of the to-be-processed subdata, and processing the target hash values based on a hash algorithm to obtain a target total hash value.
6. The method of claim 4, wherein the obtaining a target hash value corresponding to a preset number of the sub-data to be processed and processing the target hash value based on a hash algorithm to obtain a target total hash value comprises:
dividing the sub data to be processed into at least two groups according to the time information according to the number of the sub data to be processed, and obtaining a target total hash value of each group according to a target hash value corresponding to the sub data to be processed contained in each group.
7. The method of claim 1, wherein determining that the pending data is approved when the target total hash value in the current set of target hash values is the same as the corresponding original total hash value comprises:
and when the target total hash value in each group of target hash values is consistent with the corresponding original total hash value, determining that the data to be processed is the same as the original data, and feeding back to verify to pass.
8. The method of claim 1, further comprising:
when a target total hash value in a group of target hash values is different from a corresponding original total hash value, taking the group of target hash values and the to-be-processed data corresponding to the group of target hash values as to-be-verified data;
and checking the data to be verified to obtain a checking result, and feeding the checking result back to the target terminal.
9. The method according to claim 8, wherein the verifying the data to be verified to obtain a verification result comprises:
determining original data corresponding to the data to be verified, and calling a group of original hash values corresponding to the original data;
and matching a target hash value corresponding to each sub data to be processed in the data to be verified with a corresponding original hash value in sequence, determining abnormal sub data to be processed, and feeding the abnormal sub data to be processed back to the target terminal.
10. The method according to claim 8, wherein the verifying the data to be verified to obtain a verification result comprises:
determining a data identifier corresponding to the data to be verified, and calling a group of original hash values matched with the data identifier;
and matching the target hash value corresponding to each sub-data to be processed in the data to be verified with the corresponding original hash value in sequence, determining abnormal sub-data to be processed, and feeding the abnormal sub-data to be processed back to the target terminal.
11. The method of claim 1, further comprising:
a set of raw hash values for the raw data is determined and the set of raw hash values is chained.
12. The method of claim 11, wherein determining a set of raw hash values for raw data and chaining the set of raw hash values comprises:
determining the quantity corresponding to the data contained in the original data, and dividing the original data according to the group number which is the same as the numerical value according to the relationship between the quantity and the square of each numerical value;
determining a set of raw hash values for each set of data, and chaining the set of raw hash values.
13. A data processing apparatus configured to be arranged at each node in a block chain, comprising:
the group target hash value acquisition module is used for acquiring at least one group target hash value matched with the transaction request when the transaction request is received; wherein the set of target hash values are hash values generated based on data to be processed corresponding to the raw data; the data to be processed corresponds to the transaction request;
the group original hash value calling module is used for calling a group original hash value which is stored in advance and matched with the data identifier from the block chain according to the data identifier of the current group of target hash values aiming at each group of target hash values; wherein the set of raw hash values is generated based on raw data, the set of raw hash values including at least one raw hash value and a raw total hash value;
and the to-be-processed data auditing module is used for determining that the to-be-processed data is approved when the target total hash value in the current group of target hash values is the same as the corresponding original total hash value aiming at each group of target hash values.
14. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a data processing method as claimed in any one of claims 1-12.
15. A storage medium containing computer-executable instructions for performing the data processing method of any one of claims 1-12 when executed by a computer processor.
CN202110340142.2A 2021-03-30 2021-03-30 Data processing method and device, electronic equipment and storage medium Pending CN112966288A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110340142.2A CN112966288A (en) 2021-03-30 2021-03-30 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110340142.2A CN112966288A (en) 2021-03-30 2021-03-30 Data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112966288A true CN112966288A (en) 2021-06-15

Family

ID=76279632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110340142.2A Pending CN112966288A (en) 2021-03-30 2021-03-30 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112966288A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490599A (en) * 2019-08-23 2019-11-22 深圳前海微众银行股份有限公司 Verification method, system, device, equipment and the readable storage medium storing program for executing of evidence
CN111008404A (en) * 2019-11-27 2020-04-14 山东爱城市网信息技术有限公司 Service call auditing method, equipment and medium based on block chain
CN111177795A (en) * 2019-12-13 2020-05-19 杜晓楠 Method, device and computer storage medium for identifying video tampering by using block chain
CN111723159A (en) * 2020-08-21 2020-09-29 支付宝(杭州)信息技术有限公司 Data verification method and device based on block chain

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490599A (en) * 2019-08-23 2019-11-22 深圳前海微众银行股份有限公司 Verification method, system, device, equipment and the readable storage medium storing program for executing of evidence
CN111008404A (en) * 2019-11-27 2020-04-14 山东爱城市网信息技术有限公司 Service call auditing method, equipment and medium based on block chain
CN111177795A (en) * 2019-12-13 2020-05-19 杜晓楠 Method, device and computer storage medium for identifying video tampering by using block chain
CN111723159A (en) * 2020-08-21 2020-09-29 支付宝(杭州)信息技术有限公司 Data verification method and device based on block chain

Similar Documents

Publication Publication Date Title
CN109635256B (en) Method and device for verifying data
US11119843B2 (en) Verifying application behavior based on distributed tracing
CN112363753A (en) Data verification method and device, electronic equipment and storage medium
CN107784205B (en) User product auditing method, device, server and storage medium
CN112528262A (en) Application program access method, device, medium and electronic equipment based on token
CN112636957A (en) Early warning method and device based on log, server and storage medium
CN112181804A (en) Parameter checking method, equipment and storage medium
CN110109824B (en) Big data autoregression test method and device, computer equipment and storage medium
CN110222028A (en) A kind of data managing method, device, equipment and storage medium
WO2022068316A1 (en) Data reconciliation method and apparatus, device, and storage medium
CN108596587B (en) Cash-up auditing method, apparatus, electronic device, program product and storage medium
CN110888791A (en) Log processing method, device, equipment and storage medium
CN112751782B (en) Flow switching method, device, equipment and medium based on multi-activity data center
CN114595765A (en) Data processing method and device, electronic equipment and storage medium
CN112181485B (en) Script execution method and device, electronic equipment and storage medium
CN112685077A (en) Data modification method, system, computer device and computer readable storage medium
CN112966288A (en) Data processing method and device, electronic equipment and storage medium
CN114978646A (en) Access authority determination method, device, equipment and storage medium
CN115589298A (en) Method, device, system, equipment and medium for verifying information of block chain
CN114428815A (en) Data storage method and device, electronic equipment and computer readable medium
CN113760367A (en) Data processing method and device, electronic equipment and storage medium
CN113592645A (en) Data verification method and device
CN112447279A (en) Task processing method and device, electronic equipment and storage medium
CN112818204A (en) Service processing method, device, equipment and storage medium
CN107704557B (en) Processing method and device for operating mutually exclusive data, 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210615

RJ01 Rejection of invention patent application after publication