CN109145651B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN109145651B
CN109145651B CN201810959037.5A CN201810959037A CN109145651B CN 109145651 B CN109145651 B CN 109145651B CN 201810959037 A CN201810959037 A CN 201810959037A CN 109145651 B CN109145651 B CN 109145651B
Authority
CN
China
Prior art keywords
user data
terminal
user
data block
hash value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810959037.5A
Other languages
Chinese (zh)
Other versions
CN109145651A (en
Inventor
何晓行
赵长江
黄永洪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201810959037.5A priority Critical patent/CN109145651B/en
Publication of CN109145651A publication Critical patent/CN109145651A/en
Application granted granted Critical
Publication of CN109145651B publication Critical patent/CN109145651B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • G06F21/645Protecting data integrity, e.g. using checksums, certificates or signatures using a third party
    • 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
    • G06F21/6272Protecting 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 by registering files or documents with a third party

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention discloses a data processing method and a data processing device, wherein the method comprises the following steps: acquiring a user data block state of each terminal in a terminal set, selecting a target terminal from the terminal set according to the user data block state, and generating a user data block chain according to a user data block in the target terminal; storing the user data block chain and sending the user data block chain to each terminal in the terminal set; when a data verification request of a request terminal is received, calculating user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value; and matching the initial hash value with the verification hash value, determining the integrity of the user data according to the matching result, and effectively verifying the integrity of the user data.

Description

Data processing method and device
Technical Field
The present invention relates to computer technologies, and in particular, to a data processing method and apparatus.
Background
With the continuous development of computers, a blockchain technology capable of decentralizing and disclosing transparency is also developed vigorously.
Currently, a terminal (e.g., a smart phone, a tablet computer, a notebook computer, etc.) or a server participating in recording user data may package one or more generated user data into one user data block, and then join with another user data block to form a new user data block. One user data block is connected to another user data block, thereby forming a user data block chain.
However, when the terminal wants to verify whether the user data in the user data block chain is modified, how to effectively verify the integrity of the user data corresponding to the user data block chain becomes a problem to be solved urgently.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a data processing method and apparatus, which can effectively verify the integrity of user data.
In order to solve the above technical problem, an embodiment of the present invention provides a data processing method and apparatus, including:
acquiring a user data block state of each terminal in a terminal set, selecting a target terminal from the terminal set according to the user data block state, and generating a user data block chain according to a user data block in the target terminal; storing the user data block chain and sending the user data block chain to each terminal in the terminal set;
when a data verification request of a request terminal is received, calculating user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value, wherein the data verification request is a request for verifying a first determination result, and the first determination result is a result of determining the integrity of the user data by the request terminal;
and matching an initial hash value with the verification hash value, and determining the integrity of the user data according to a matching result, wherein the integrity is used for indicating whether the user data is modified, and the initial hash value is the hash value in the user data block chain.
Wherein, after determining the integrity of the user data according to the matching result, the method further comprises:
comparing the determined integrity of the user data with the first determination result to determine the correctness of the first determination result;
and sending a notification message to the request terminal, wherein the notification message comprises a result of determining the correctness of the first determination result.
Wherein, the user data corresponding to the user data block chain at least comprises: first user data and second user data, the second user data having an association with the first user data;
the calculating the user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value specifically includes:
calculating to obtain a first hash value according to first user data in the user data block chain;
and calculating to obtain a verification hash value according to the second user data in the user data block chain and the first hash value.
Wherein, after receiving the data verification request of the requesting terminal, the method further comprises:
acquiring user information corresponding to the request terminal, wherein the user information at least comprises a user identifier of the request terminal;
calling a storage component to acquire security information corresponding to the user identifier of the request terminal stored in the storage component;
and if the safety information corresponding to the user identification of the request terminal meets the preset condition, calculating the user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value.
Wherein the method further comprises: acquiring a user identifier of each user data in the target terminal, and determining working information corresponding to the user identifier of each user data;
determining the capability level corresponding to the user identification of each user data according to the working information;
and if the capability level of the user identifier is within a preset range, executing the content corresponding to the recommendation information when the recommendation information of the user identifier with the capability level within the preset range is received.
Correspondingly, an embodiment of the present invention further provides a data processing apparatus, including:
the processing module is used for acquiring the user data block state of each terminal in the terminal set, selecting a target terminal from the terminal set according to the user data block state, generating a user data block chain according to a user data block in the target terminal, and storing the user data block chain;
a communication module, configured to send the user data block chain to each terminal in the terminal set;
the computing module is used for computing user data corresponding to the user data block chain according to a data verification request to obtain a verification hash value when the data verification request of a request terminal is received, wherein the data verification request is a request for verifying a first determination result, and the first determination result is a result of determining the integrity of the user data by the request terminal;
a first determining module, configured to match an initial hash value with the verification hash value, and determine integrity of the user data according to a matching result, where the integrity is used to indicate whether the user data is modified, and the initial hash value is a hash value in the user data block chain.
Wherein the apparatus further comprises: the second determining module is used for comparing the determined integrity of the user data with the first determining result so as to determine the correctness of the first determining result;
the communication module is further configured to send a notification message to the requesting terminal, where the notification message includes a result of determining the correctness of the first determination result.
Wherein, the user data corresponding to the user data block chain at least comprises: first user data and second user data, the second user data having an association with the first user data;
the computing module is specifically configured to compute a first hash value according to first user data in the user data block chain, and compute a verification hash value according to second user data in the user data block chain and the first hash value.
Wherein the apparatus further comprises: and the acquisition module is used for acquiring the user information corresponding to the request terminal, wherein the user information at least comprises a user identifier of the request terminal, calling a storage component to acquire the safety information corresponding to the user identifier of the request terminal stored in the storage component, and if the safety information corresponding to the user identifier of the request terminal meets a preset condition, calculating the user data corresponding to the user data block chain according to the data verification request through the calculation module to obtain a verification hash value.
Wherein the apparatus further comprises: a third determining module, configured to obtain a user identifier of each user data in the target terminal, determine work information corresponding to the user identifier of each user data, and determine, according to the work information, a capability level corresponding to the user identifier of each user data;
and the execution module is used for executing the content corresponding to the recommendation information when receiving the recommendation information of the user identifier with the capability level within the preset range if the capability level of the user identifier is within the preset range.
The embodiment of the invention has the following beneficial effects: the method comprises the steps of generating a user data block chain by selecting a target terminal, storing the user data block chain and sending the user data block chain to each terminal in a terminal set, calculating user data corresponding to the user data block chain according to a data verification request to obtain a verification hash value when the data verification request of a request terminal is received, matching an initial hash value with the verification hash value, determining the integrity of the user data according to a matching result, and effectively verifying the integrity of the user data corresponding to the user data block chain by using the hash value.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another data processing method provided by the embodiment of the invention;
FIG. 3 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another data processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the execution subject of the embodiment of the present invention may be various types of terminals or servers, where the terminal may be a terminal capable of performing data processing, such as a smart phone, a tablet computer, a wearable Device, a computer, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), and the server may be a server capable of performing data processing, such as a text server and a database server, and the present invention is not limited thereto.
For convenience of description, the following method embodiments take the execution subject as an example for further description.
Referring to fig. 1, a flow chart of a data processing method according to an embodiment of the present invention is shown, where the data processing method shown in fig. 1 includes:
s101, obtaining user data block states of all terminals in a terminal set, selecting a target terminal from the terminal set according to the user data block states, and generating a user data block chain according to a user data block in the target terminal.
It should be noted that the terminal set may be a terminal set participating in recording user data. Each terminal in the terminal set can store and record the user data.
It should be further noted that the user data block state may be a parameter such as a speed, a correct rate, an error rate, and the like for the server to generate the user data block according to each terminal in the terminal set, and the user data block state may be used to analyze a recording quality of each terminal recording the user data block.
In some possible embodiments, the server may use the speed at which each terminal generates the user data block as the user data block status. Specifically, the server may sort the speed at which each terminal in the terminal set generates the user data block in the order from fast to slow, and then select the terminal corresponding to the terminal with the highest speed at which the user data block is generated as the target terminal.
In some possible embodiments, the server may also use the correct rate or the error rate of the user data block generated by each terminal as the user data block state, then sort the user data blocks according to the correct rate or the error rate of the user data block generated by each terminal in the terminal set, and then select the target terminal according to the sorting result.
In some possible embodiments, the server may further use a generation quality obtained by analyzing a speed, a correct rate, and an error rate of each terminal in the terminal set to generate the user data block as the user data block status. Of course, the above-mentioned modes are only examples, not exhaustive, and include but are not limited to the above-mentioned alternatives.
It should be noted that the user data block may be a block into which one or more user data generated within a period of time are packed for the target terminal.
In specific implementation, the server may obtain a plurality of user data blocks in the target terminal after selecting the target terminal according to the state of the user data blocks, and the server may associate each user data block according to a time sequence and generate the user data block chain.
And S102, storing the user data block chain and sending the user data block chain to each terminal in the terminal set.
It should be noted that the server may store the user data blockchain in a storage component of the server after generating the user data blockchain. Further, the server may also send the user data block chain to each terminal in the terminal set, and each terminal in the terminal set may verify the integrity of data of the user data block chain by using the user data block chain.
S103, when a data verification request of a request terminal is received, calculating user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value.
The data verification request is a request for verifying a first determination result, and the first determination result is a result of determining the integrity of the user data by the request terminal.
In a specific implementation, the requesting terminal may be one of the terminals in the terminal set, or the requesting terminal may also be a terminal that receives the user data block chain through any one of the terminals in the terminal set, or the requesting terminal may also be any other terminal, which is not limited in this embodiment of the present invention.
In some possible embodiments, the requesting terminal may perform integrity verification on the user data in the user data blockchain according to the user data blockchain.
Specifically, the requesting terminal may calculate the user data to obtain a verification hash value of the terminal side, match the verification hash value of the terminal side with an initial hash value in a user data block chain, and if a matching result indicates that the verification hash value of the terminal side is the same as the initial hash value, the requesting terminal may generate a first determination result, where the first determination result may be a result of determining that the integrity of the user data is not modified by the user data.
Wherein, if the matching result indicates that the verification hash value at the terminal side is not the same as the initial hash value, the requesting terminal may generate a first determination result, and the first determination result may be a result of determining that the integrity of the user data is that the user data is modified.
In some possible embodiments, after the requesting terminal generates the first determination result, it may request the server to verify whether the first determination result is correct. Specifically, the requesting terminal may send a data verification request to the server, where the data verification request may include the first determination result, and the first determination result may include a verification hash value at the terminal side.
In some possible embodiments, when receiving a data verification request from a request terminal, the server may calculate, according to the data verification request, user data corresponding to a user data block chain in the server, to obtain a verification hash value on the server side.
And S104, matching the initial hash value with the verification hash value, and determining the integrity of the user data according to a matching result.
Wherein the integrity is used for indicating whether the user data is modified, and the initial hash value is a hash value in the user data block chain.
It should be noted that the initial hash value may be a hash value in the user data chunk chain. The server may generate a hash value corresponding to user data of the user data block chain at the same time when generating the user data block chain according to the user data block in the target terminal, and add the hash value corresponding to the user data block chain.
In some possible embodiments, the specific way for the server to match the initial hash value with the verification hash value may be: the server determines whether the initial hash value and the verification hash value are the same.
Further, if the matching result determines that the initial hash value is the same as the verification hash value for the server, the server may further determine that the integrity of the user data is that the user data is not modified. If the matching result determines that the initial hash value is different from the verification hash value for the server, the server may further determine that the integrity of the user data is that the user data is modified.
It can be seen that, in the embodiment of the present invention, a user data block chain is generated by selecting a target terminal, then the user data block chain is stored and sent to each terminal in a terminal set, when a data verification request of a request terminal is received, a verification hash value is obtained by calculating user data corresponding to the user data block chain according to the data verification request, finally, an initial hash value is matched with the verification hash value, and the integrity of the user data is determined according to a matching result, and the integrity of the user data corresponding to the user data block chain can be effectively verified by using the hash value.
Fig. 2 is a schematic flow chart of another data processing method according to an embodiment of the present invention. The data processing method as shown in fig. 2 may include:
s201, obtaining user data block states of all terminals in a terminal set, selecting a target terminal from the terminal set according to the user data block states, and generating a user data block chain according to a user data block in the target terminal.
Optionally, the server may further obtain a user identifier of each user data in the target terminal, and determine work information corresponding to the user identifier of each user data; determining the capability level corresponding to the user identification of each user data according to the working information; and if the capability level of the user identifier is within a preset range, executing the content corresponding to the recommendation information when the recommendation information of the user identifier with the capability level within the preset range is received.
It should be noted that the user identifier may be a user name, a user account, an identity ID of the user, a user avatar, and the like, which is not limited in this embodiment of the present invention.
The target terminal may include user data corresponding to a plurality of user identifiers. For example, user data 1 may represent data corresponding to user identity a, user data 2 may represent data corresponding to user data B, and so on.
It should be further noted that the work information may be, for example, a workload, a work intensity, a processing speed of a work corresponding to the user identifier, and the like, which is not limited in this embodiment of the present invention.
For example, the server may obtain the user data block state of each terminal in the terminal set, and at the same time, obtain the user identifier corresponding to each user data in the target terminal, where user data 1 corresponds to user identifier a, user data 2 corresponds to user identifier B, and user data 3 corresponds to user identifier C. The terminal may record in advance the work information (e.g., workload) corresponding to each of the user identifier a, the user identifier B, and the user identifier C.
The workload corresponding to the user identifier a is, for example, 50, the workload corresponding to the user identifier B is, for example, 20, and the workload corresponding to the user identifier C is, for example, 70. If the server presets the user identifier with the workload of 0-20, the corresponding capability level is a, the user identifier with the workload of 21-50, the corresponding capability level is B, the user identifier with the workload of 51 or above, the corresponding capability level is C, the capability level corresponding to the user identifier a is B, the capability level corresponding to the user identifier B is a, and the capability level corresponding to the user identifier C is C.
Further, the preset range of the capability level may be b or above. Therefore, the server may determine that the user identity a and the user identity C are user identities with the capability level within a preset range.
Further, if the server receives recommendation information (e.g., a data update method, a data verification method, etc.) sent to the server by the user identifier a or the user identifier C, the server may execute the content corresponding to the recommendation information according to the recommendation information (e.g., adjust the data update method of the server according to the recommended data update method, etc.).
In some possible embodiments, when the server may further receive user data corresponding to the user identifier a or the user identifier C, if the user data is data that needs to be executed by the server, the server may directly execute the user data corresponding to the user identifier a or the user identifier C.
S202, storing the user data block chain, and sending the user data block chain to each terminal in the terminal set.
It should be noted that step S202 in the embodiment of the present invention may be implemented according to step S102 in the above method embodiment, and the specific implementation process may refer to the related description of the above method embodiment, which is not described herein again.
S203, when a data verification request of a request terminal is received, user information corresponding to the request terminal is obtained.
Wherein, the user information at least comprises the user identification of the request terminal.
The data verification request is a request for verifying a first determination result, and the first determination result is a result of determining the integrity of the user data by the request terminal.
It should be noted that the user information corresponding to the requesting terminal may at least include the user identifier of the requesting terminal. Alternatively, the user information may further include the number, size, and the like of the user data of the requesting terminal in the server, which is not limited in the present invention.
In some possible embodiments, the server may obtain the user data of the requesting terminal according to the data verification request when receiving the data verification request sent by the requesting terminal. And the amount, size, etc. of the user data of the requesting terminal in the server.
S204, calling a storage component to acquire the security information corresponding to the user identification of the request terminal stored in the storage component.
It should be noted that the storage component may be a storage medium dedicated to storing data in the server.
It should be further noted that the security information corresponding to the user identifier of the requesting terminal may be pre-stored in the storage component of the server, and the server may determine whether the data verification request of the requesting terminal is an illegal request according to the security information.
The security information may be information for determining whether the requesting terminal is a secure terminal authenticated by the server, or the like.
S205, if the safety information corresponding to the user identifier of the request terminal meets the preset condition, calculating the user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value.
For example, the security information may include a security key of the requesting terminal, and the preset condition may be security authentication of the server itself. If the server can pass the security authentication of the server itself according to the security key of the requesting terminal, the server can determine that the requesting terminal is a secure terminal.
In some possible embodiments, after determining that the requesting terminal is a secure terminal, the server may calculate the verification hash value for the user data corresponding to the user data blockchain according to the data verification request.
If the server determines that the requesting terminal is not a secure terminal, the server may not perform any processing on the user data corresponding to the user data blockchain, and the server may further send a notification message that the requesting terminal is not authenticated to the requesting terminal.
Optionally, the user data corresponding to the user data block chain at least includes: first user data and second user data, the second user data having an association with the first user data.
It should be noted that the association between the second user data and the first user data may be a chronological association. For example, the first user data is the first data and the second user data is the second data.
It should be noted that the user data may further include third user data, fourth user data, and so on, and when there are more than 2 user data, the processing method may be similar to the processing method of the 2 user data, and the embodiment of the present invention does not limit this.
Optionally, the calculating the verification hash value for the user data corresponding to the user data block chain according to the data verification request specifically includes: calculating to obtain a first hash value according to first user data in the user data block chain; and calculating to obtain a verification hash value according to the second user data in the user data block chain and the first hash value.
In some possible embodiments, the first user data may be earlier data and the second user data may be later data. The server may calculate the first user data by using a hash algorithm to obtain a corresponding first hash value, then may calculate a corresponding second hash value by using a hash algorithm according to the second user data, and then may generate the verification hash value according to the first hash value and the second hash value.
In some possible embodiments, the server may further calculate the first user data by using a hash algorithm to obtain a corresponding first hash value, and then the server may obtain the verification hash value by using a hash algorithm according to the second user data and the first hash value.
S206, matching the initial hash value with the verification hash value, and determining the integrity of the user data according to the matching result.
It should be noted that step S206 in the embodiment of the present invention may be implemented according to step S104 in the above method embodiment, and the specific implementation process may refer to the related description of the above method embodiment, which is not described herein again.
S207, the determined integrity of the user data is compared with the first determination result to determine the correctness of the first determination result.
Wherein the first determination result is a result of the requesting terminal determining the integrity of the user data.
In some possible embodiments, the server may determine that the integrity of the user data is that the user data is not modified, and if the first determination result is that the user data is also not modified, the server may determine that the first determination result is correct. Alternatively, the server may determine that the integrity of the user data is such that the user data is modified, and if the first determination result is such that the user data is also modified, the server may determine that the first determination result is also correct.
In some possible embodiments, the server may determine that the integrity of the user data is that the user data is not modified, and if the first determination result is that the user data is also modified, the server may determine that the first determination result is erroneous. Alternatively, the server may determine that the integrity of the user data is that the user data is modified, and if the first determination result is that the user data is not modified, the server may determine that the first determination result is also erroneous.
S208, sending a notification message to the request terminal.
Wherein the notification message includes a result of determining correctness of the first determination result.
In a specific implementation, the server may send the notification message to the requesting terminal after determining the correctness of the first determination result. Wherein, the correctness of the first determination result can be determined as two types: the first determination result is correct, or the first determination result is incorrect.
Wherein, if the first determination result is correct, the notification message may be a message for notifying that the first determination result is correct. If the first determination result is erroneous, the notification message may be a message for notifying that the first determination result is erroneous.
It can be seen that, in the embodiment of the present invention, a target terminal is selected to generate a user data block chain, the user data block chain is stored and sent to each terminal in a terminal set, when a data verification request of a request terminal is received, if security information of a user identifier of the request terminal meets a preset condition, a verification hash value is calculated for user data corresponding to the user data block chain according to the data verification request, an initial hash value is matched with the verification hash value, the integrity of the user data is determined according to a matching result, and the determination result is sent to the request terminal, so that the integrity of the user data corresponding to the user data block chain can be effectively verified by using the hash value, and the verified result is sent to the request terminal to help the request terminal to determine the correctness of the determination result of the request terminal, the reliability of the determination result of the requesting terminal itself is enhanced.
The following are embodiments of the apparatus of the present invention, which are used to implement the method of the first embodiment and the method of the second embodiment of the present invention, and for convenience of description, only relevant portions of the embodiments of the present invention, and specifically, portions not disclosed, are shown.
Fig. 3 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention. The apparatus shown in fig. 3 may include:
the processing module 301 is configured to acquire a user data block state of each terminal in a terminal set, select a target terminal from the terminal set according to the user data block state, generate a user data block chain according to a user data block in the target terminal, and store the user data block chain.
A communication module 302, configured to send the user data block chain to each terminal in the terminal set.
A calculating module 303, configured to calculate a verification hash value for the user data corresponding to the user data block chain according to a data verification request when receiving the data verification request of a request terminal, where the data verification request is a request for verifying a first determination result, and the first determination result is a result of determining the integrity of the user data by the request terminal.
A first determining module 304, configured to match an initial hash value with the verification hash value, and determine integrity of the user data according to a matching result, where the integrity is used to indicate whether the user data is modified, and the initial hash value is a hash value in the user data block chain.
It can be seen that, in the embodiment of the present invention, a user data block chain is generated by selecting a target terminal, then the user data block chain is stored and sent to each terminal in a terminal set, when a data verification request of a request terminal is received, a verification hash value is obtained by calculating user data corresponding to the user data block chain according to the data verification request, finally, an initial hash value is matched with the verification hash value, and the integrity of the user data is determined according to a matching result, and the integrity of the user data corresponding to the user data block chain can be effectively verified by using the hash value.
Fig. 4 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention. The apparatus shown in fig. 4 may include:
the processing module 401 is configured to acquire a user data block state of each terminal in a terminal set, select a target terminal from the terminal set according to the user data block state, generate a user data block chain according to a user data block in the target terminal, and store the user data block chain.
A communication module 402, configured to send the user data block chain to each terminal in the terminal set;
a calculating module 403, configured to calculate, when a data verification request of a request terminal is received, a verification hash value for user data corresponding to the user data block chain according to the data verification request, where the data verification request is a request for verifying a first determination result, and the first determination result is a result of determining, by the request terminal, integrity of the user data.
A first determining module 404, configured to match an initial hash value with the verification hash value, and determine integrity of the user data according to a matching result, where the integrity is used to indicate whether the user data is modified, and the initial hash value is a hash value in the user data block chain.
Optionally, the apparatus further comprises: a second determining module 405, configured to compare the determined integrity of the user data with the first determination result, so as to determine the correctness of the first determination result.
Wherein the general module 402 is further configured to send a notification message to the requesting terminal, where the notification message includes a result of determining the correctness of the first determination result.
Optionally, the user data corresponding to the user data block chain at least includes: first user data and second user data, the second user data having an association with the first user data.
The calculating module 403 is specifically configured to calculate a first hash value according to the first user data in the user data block chain, and calculate a verification hash value according to the second user data in the user data block chain and the first hash value.
Optionally, the apparatus further comprises: an obtaining module 406, configured to obtain user information corresponding to the request terminal, where the user information at least includes a user identifier of the request terminal, and invoke a storage component to obtain security information corresponding to the user identifier of the request terminal stored in the storage component, and if the security information corresponding to the user identifier of the request terminal meets a preset condition, the computing module 403 executes a computation on user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value.
Optionally, the apparatus further comprises: a third determining module 407, configured to obtain a user identifier of each user data in the target terminal, determine working information corresponding to the user identifier of each user data, and determine, according to the working information, a capability level corresponding to the user identifier of each user data.
The executing module 408 is configured to, if the capability level of the user identifier is within a preset range, execute the content corresponding to the recommendation information when receiving the recommendation information of the user identifier whose capability level is within the preset range.
It can be seen that, in the embodiment of the present invention, a target terminal is selected to generate a user data block chain, the user data block chain is stored and sent to each terminal in a terminal set, when a data verification request of a request terminal is received, if security information of a user identifier of the request terminal meets a preset condition, a verification hash value is calculated for user data corresponding to the user data block chain according to the data verification request, an initial hash value is matched with the verification hash value, the integrity of the user data is determined according to a matching result, and the determination result is sent to the request terminal, so that the integrity of the user data corresponding to the user data block chain can be effectively verified by using the hash value, and the verified result is sent to the request terminal to help the request terminal to determine the correctness of the determination result of the request terminal, the reliability of the determination result of the requesting terminal itself is enhanced.
Fig. 5 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention. The data processing device may be a server or a terminal.
As shown in fig. 5, the data processing apparatus in the embodiment of the present invention includes: at least one input device 1000; at least one processor 2000, such as a CPU; at least one memory 3000; at least one output device 4000, the input device 1000, the processor 2000, the memory 3000, and the output device 4000 being connected through a bus. Wherein the bus is used for enabling connection communication between these components. The input device 1000 and the output device 4000 of the apparatus in the embodiment of the present invention may be wired transmission ports, or may also be wireless devices, for example, including an antenna apparatus, configured to perform signaling or data communication with other node devices.
The processor 2000 may be a Central Processing Unit (CPU) 2000, a network processor 2000 (NP), or a combination of CPU and NP.
The processor 2000 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The memory 3000 may include a volatile memory 3000(volatile memory), such as a random-access memory 3000 (RAM); the memory 3000 may also include a non-volatile memory 3000(non-volatile memory), such as a flash memory 3000(flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD); memory 3000703 may also include a combination of memories 3000 of the sort described above.
Optionally, the memory 3000 is also used for storing program instructions. The processor 2000 may call the program instructions stored in the memory 3000 to implement the methods according to the first and second embodiments of the present invention.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
Specifically, the processor 2000 is configured to control the input device 1000 to obtain a user data block state of each terminal in the terminal set, select a target terminal from the terminal set according to the user data block state, and generate a user data block chain according to a user data block in the target terminal.
A memory 3000 for storing the user data block chain.
An output device 4000 configured to send the user data block chain to each terminal in the terminal set.
The processor 2000 is further configured to, when the input device 1000 receives a data verification request from a request terminal, calculate user data corresponding to the user data blockchain according to the data verification request to obtain a verification hash value; and matching the initial hash value with the verification hash value, and determining the integrity of the user data according to the matching result.
The data verification request is a request for verifying a first determination result, and the first determination result is a result of determining the integrity of the user data by the request terminal.
Wherein the integrity is used to indicate whether the user data is modified, and the initial hash value is a hash value in the user data block chain.
Optionally, the processor 2000 is further configured to compare the determined integrity of the user data with the first determination result to determine the correctness of the first determination result.
Wherein the output device 4000 is configured to send a notification message to the requesting terminal, the notification message including a result of determining the correctness of the first determination result.
Optionally, the user data corresponding to the user data block chain at least includes: first user data and second user data, the second user data having an association with the first user data.
Optionally, the processor 2000 is specifically configured to calculate a first hash value according to the first user data in the user data block chain; and calculating to obtain a verification hash value according to the second user data in the user data block chain and the first hash value.
Optionally, the processor 2000 is further configured to control the input device 1000 to obtain user information corresponding to the request terminal, where the user information at least includes a user identifier of the request terminal; a storage component in the control memory 3000 acquires security information corresponding to the user identifier of the request terminal stored in the storage component; and if the safety information corresponding to the user identifier of the request terminal meets the preset condition, calculating the user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value.
Optionally, the processor 2000 is further configured to obtain a user identifier of each user data in the target terminal, determine working information corresponding to the user identifier of each user data, determine an ability level corresponding to the user identifier of each user data according to the working information, and if the ability level of the user identifier is within a preset range, execute content corresponding to the recommendation information when the input device 1000 receives recommendation information of the user identifier whose ability level is within the preset range.
It can be seen that, in the embodiment of the present invention, a target terminal is selected to generate a user data block chain, the user data block chain is stored and sent to each terminal in a terminal set, when a data verification request of a request terminal is received, if security information of a user identifier of the request terminal meets a preset condition, a verification hash value is calculated for user data corresponding to the user data block chain according to the data verification request, an initial hash value is matched with the verification hash value, the integrity of the user data is determined according to a matching result, and the determination result is sent to the request terminal, so that the integrity of the user data corresponding to the user data block chain can be effectively verified by using the hash value, and the verified result is sent to the request terminal to help the request terminal to determine the correctness of the determination result of the request terminal, the reliability of the determination result of the requesting terminal itself is enhanced.
In another embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, can implement: acquiring a user data block state of each terminal in a terminal set, selecting a target terminal from the terminal set according to the user data block state, and generating a user data block chain according to a user data block in the target terminal; storing the user data block chain and sending the user data block chain to each terminal in the terminal set; when a data verification request of a request terminal is received, calculating user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value, wherein the data verification request is a request for verifying a first determination result, and the first determination result is a result of determining the integrity of the user data by the request terminal; and matching an initial hash value with the verification hash value, and determining the integrity of the user data according to a matching result, wherein the integrity is used for indicating whether the user data is modified, and the initial hash value is the hash value in the user data block chain.
It should be noted that, for specific processes executed by the processor of the computer-readable storage medium, reference may be made to the methods described in the first embodiment and the second embodiment, which are not described herein again.
The computer readable storage medium may be an internal storage unit of the terminal according to any of the foregoing embodiments, for example, a hard disk or a memory of the terminal. The computer readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the terminal. The computer-readable storage medium is used for storing the computer program and other programs and data required by the terminal. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a particular embodiment, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A data processing method, comprising:
acquiring a user data block state of each terminal in a terminal set, selecting a target terminal from the terminal set according to the user data block state, and generating a user data block chain according to a user data block in the target terminal; storing the user data block chain and sending the user data block chain to each terminal in the terminal set;
when a data verification request of a request terminal is received, calculating user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value, wherein the data verification request is used for requesting verification of a first determination result, and the first determination result is a result of determining the integrity of the user data corresponding to the user data block chain by the request terminal;
matching an initial hash value with the verification hash value, and determining the integrity of the user data according to a matching result, wherein the integrity is used for indicating whether the user data is modified, and the initial hash value is a hash value in the user data block chain;
and comparing the determined integrity of the user data with the first determination result to determine the correctness of the first determination result.
2. The method of claim 1, wherein the method further comprises:
and sending a notification message to the request terminal, wherein the notification message comprises a result of determining the correctness of the first determination result.
3. The method of claim 1, wherein the user data corresponding to the user data block chain at least comprises: first user data and second user data, the second user data having an association with the first user data;
the calculating the user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value specifically includes:
calculating to obtain a first hash value according to first user data in the user data block chain;
and calculating to obtain a verification hash value according to the second user data in the user data block chain and the first hash value.
4. The method according to any of claims 1 to 3, wherein after receiving a data verification request of a requesting terminal, further comprising:
acquiring user information corresponding to the request terminal, wherein the user information at least comprises a user identifier of the request terminal;
calling a storage component to acquire security information corresponding to the user identifier of the request terminal stored in the storage component;
and if the safety information corresponding to the user identification of the request terminal meets the preset condition, calculating the user data corresponding to the user data block chain according to the data verification request to obtain a verification hash value.
5. The method of claim 1, wherein the method further comprises:
acquiring a user identifier of each user data in the target terminal, and determining working information corresponding to the user identifier of each user data;
determining the capability level corresponding to the user identification of each user data according to the working information;
and if the capability level of the user identifier is within a preset range, executing the content corresponding to the recommendation information when the recommendation information of the user identifier with the capability level within the preset range is received.
6. A data verification apparatus, comprising:
the processing module is used for acquiring the user data block state of each terminal in the terminal set, selecting a target terminal from the terminal set according to the user data block state, generating a user data block chain according to a user data block in the target terminal, and storing the user data block chain;
a communication module, configured to send the user data block chain to each terminal in the terminal set;
a calculating module, configured to calculate a verification hash value for user data corresponding to the user data block chain according to a data verification request when receiving the data verification request from a request terminal, where the data verification request is a request for verifying a first determination result, and the first determination result is a result of determining, by the request terminal, integrity of the user data corresponding to the user data block chain;
a first determining module, configured to match an initial hash value with the verification hash value, and determine integrity of the user data according to a matching result, where the integrity is used to indicate whether the user data is modified, and the initial hash value is a hash value in the user data block chain;
and the second determining module is used for comparing the determined integrity of the user data with the first determining result so as to determine the correctness of the first determining result.
7. The apparatus of claim 6, wherein the communication module is further configured to send a notification message to the requesting terminal, the notification message including a result of determining the correctness of the first determination result.
8. The apparatus of claim 6, wherein the user data corresponding to the user data blockchain comprises at least: first user data and second user data, the second user data having an association with the first user data;
the computing module is specifically configured to compute a first hash value according to first user data in the user data block chain, and compute a verification hash value according to second user data in the user data block chain and the first hash value.
9. The apparatus of any of claims 6 to 8, further comprising:
and the acquisition module is used for acquiring the user information corresponding to the request terminal, wherein the user information at least comprises a user identifier of the request terminal, calling a storage component to acquire the safety information corresponding to the user identifier of the request terminal stored in the storage component, and if the safety information corresponding to the user identifier of the request terminal meets a preset condition, calculating the user data corresponding to the user data block chain according to the data verification request through the calculation module to obtain a verification hash value.
10. The apparatus of claim 6, further comprising:
a third determining module, configured to obtain a user identifier of each user data in the target terminal, determine work information corresponding to the user identifier of each user data, and determine, according to the work information, a capability level corresponding to the user identifier of each user data;
and the execution module is used for executing the content corresponding to the recommendation information when receiving the recommendation information of the user identifier with the capability level within the preset range if the capability level of the user identifier is within the preset range.
CN201810959037.5A 2018-08-22 2018-08-22 Data processing method and device Active CN109145651B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810959037.5A CN109145651B (en) 2018-08-22 2018-08-22 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810959037.5A CN109145651B (en) 2018-08-22 2018-08-22 Data processing method and device

Publications (2)

Publication Number Publication Date
CN109145651A CN109145651A (en) 2019-01-04
CN109145651B true CN109145651B (en) 2021-12-28

Family

ID=64790684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810959037.5A Active CN109145651B (en) 2018-08-22 2018-08-22 Data processing method and device

Country Status (1)

Country Link
CN (1) CN109145651B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110147685B (en) * 2019-04-04 2020-10-23 创新先进技术有限公司 Data verification method, system, device and equipment
CN110083775B (en) * 2019-05-13 2021-06-25 北京顺丰同城科技有限公司 Configuration method and configuration device for recommended resources
CN110351089B (en) * 2019-05-23 2022-01-04 西安电子科技大学 Data signature authentication method and device
CN111429136B (en) * 2020-03-05 2023-04-28 合肥达朴汇联科技有限公司 Block chain-based data auditing method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040205315A1 (en) * 2000-12-28 2004-10-14 Ripley Micheal S. Verifying the integrity of a media key block by storing validation data in the validation area of media
KR100772881B1 (en) * 2006-05-25 2007-11-05 삼성전자주식회사 Apparatus and method for checking self modifying code
US20080256363A1 (en) * 2007-04-13 2008-10-16 Boris Balacheff Trusted component update system and method
CN102609658A (en) * 2012-02-15 2012-07-25 何晓行 Electronic evidence consolidating device, electronic evidence consolidating method and electronic evidence consolidating system
CN106203179A (en) * 2016-07-12 2016-12-07 何晓行 A kind of completeness check system and method to file
CN106230880A (en) * 2016-07-12 2016-12-14 何晓行 A kind of storage method of data and application server
CN107580030A (en) * 2017-08-18 2018-01-12 重庆邮电大学 A kind of data managing method, device and server
CN108256353A (en) * 2018-01-11 2018-07-06 武汉斗鱼网络科技有限公司 A kind of data integrity verifying method, apparatus and client
CN108427601A (en) * 2017-02-13 2018-08-21 北京航空航天大学 A kind of cluster transaction processing method of privately owned chain node

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040205315A1 (en) * 2000-12-28 2004-10-14 Ripley Micheal S. Verifying the integrity of a media key block by storing validation data in the validation area of media
KR100772881B1 (en) * 2006-05-25 2007-11-05 삼성전자주식회사 Apparatus and method for checking self modifying code
US20080256363A1 (en) * 2007-04-13 2008-10-16 Boris Balacheff Trusted component update system and method
CN102609658A (en) * 2012-02-15 2012-07-25 何晓行 Electronic evidence consolidating device, electronic evidence consolidating method and electronic evidence consolidating system
CN106203179A (en) * 2016-07-12 2016-12-07 何晓行 A kind of completeness check system and method to file
CN106230880A (en) * 2016-07-12 2016-12-14 何晓行 A kind of storage method of data and application server
CN108427601A (en) * 2017-02-13 2018-08-21 北京航空航天大学 A kind of cluster transaction processing method of privately owned chain node
CN107580030A (en) * 2017-08-18 2018-01-12 重庆邮电大学 A kind of data managing method, device and server
CN108256353A (en) * 2018-01-11 2018-07-06 武汉斗鱼网络科技有限公司 A kind of data integrity verifying method, apparatus and client

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于区块链的信息物理融合系统的信息安全保护框架;丁庆洋 等;《计算机科学》;20180530;第45卷(第2期);第32-39页 *
基于哈希树的云存储完整性检测算法;颜湘涛 等;《计算机科学》;20121230;第39卷(第12期);第94-97,113页 *

Also Published As

Publication number Publication date
CN109145651A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
CN109145651B (en) Data processing method and device
CN109347787B (en) Identity information identification method and device
US20190386834A1 (en) Blockchain management apparatus, blockchain management method, and program
WO2020119271A1 (en) Block chain-based screen recording evidence obtaining method, system, and electronic device
CN108494557B (en) Social security digital certificate management method, computer readable storage medium and terminal device
CN111290742A (en) Parameter verification method and device, electronic equipment and readable storage medium
CN108256322B (en) Security testing method and device, computer equipment and storage medium
CN109902493B (en) Script issuing method and server
CN111431908B (en) Access processing method and device, management server and readable storage medium
CN113360868A (en) Application program login method and device, computer equipment and storage medium
CN110445768B (en) Login method and device and electronic equipment
CN111259368A (en) Method and equipment for logging in system
CN107391980B (en) Login verification method, device, equipment and storage medium based on equipment data
CN110381114B (en) Interface request parameter processing method and device, terminal equipment and medium
CN109818915B (en) Information processing method and device, server and readable storage medium
CN108965108B (en) Message pushing method and related equipment
CN111459899B (en) Log sharing method and device and terminal equipment
CN114979109A (en) Behavior track detection method and device, computer equipment and storage medium
CN110866827B (en) Method and device for processing pass, storage medium and server
CN113706131A (en) Block chain transaction method, device and equipment based on encryption card
CN110766407A (en) Transaction verification method, accounting node and medium based on block chain
CN110647757A (en) Data processing method based on intelligent contract and related device
CN112288990A (en) Method, system, medium and device for generating internet of things event based on internet of things data
CN110570196B (en) Transaction data processing method, device, terminal equipment and storage medium
CN114513350B (en) Identity verification method, system 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
GR01 Patent grant
GR01 Patent grant