CN116341017A - Data processing method, device, equipment and medium - Google Patents

Data processing method, device, equipment and medium Download PDF

Info

Publication number
CN116341017A
CN116341017A CN202111576848.5A CN202111576848A CN116341017A CN 116341017 A CN116341017 A CN 116341017A CN 202111576848 A CN202111576848 A CN 202111576848A CN 116341017 A CN116341017 A CN 116341017A
Authority
CN
China
Prior art keywords
data
target
blockchain
sub
stored
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
CN202111576848.5A
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.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN202111576848.5A priority Critical patent/CN116341017A/en
Publication of CN116341017A publication Critical patent/CN116341017A/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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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/602Providing cryptographic facilities or services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention provides a data processing method, a device, equipment and a medium, which are used for solving the problem that in the prior art, data are stored in the same server, and when the server is hacked, the data stored in the server are tampered. In the embodiment of the invention, the electronic equipment encrypts the first data to be uploaded, so that the safety of the first data is ensured, and the target data is stored in the blockchain, thereby avoiding the storage of repeated data in the blockchain and avoiding the waste of resources. In addition, the electronic device stores the target data in the blockchain and also sends the target data to other nodes of the blockchain, that is, in the embodiment of the invention, the target data is stored in each node of the blockchain, so that when a single node is tampered with the attack data, the data stored in the other nodes are not tampered, and the situation that the single server is attacked and the data is tampered is avoided.

Description

Data processing method, device, equipment and medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method, apparatus, device, and medium.
Background
With the continuous development of cloud computing and big data technology, the data volume also presents an exponential rising trend, and along with this, various security events such as data leakage frequently occur. Abnormal behaviors such as data theft and unauthorized access not only easily cause industry sensitive information leakage and serious loss of brand reputation of organizations, but also seriously infringe citizen privacy and increasingly threaten network information security. In addition, the internet is currently in the decentralised wave, and data security and trust are also becoming more important.
In the prior art, data is typically stored in the same server, however, data is stored in the same server, and when the server is hacked, the data stored in the server is tampered with.
Disclosure of Invention
The embodiment of the invention provides a data processing method, a device, equipment and a medium, which are used for solving the problem that in the prior art, data are stored in the same server, and when the server is hacked, the data stored in the server are tampered.
In a first aspect, an embodiment of the present invention provides a data processing method, where the method includes:
acquiring an uploading instruction carrying first data; acquiring first data carried in the uploading instruction;
encrypting the first data, acquiring encrypted target data, judging whether data matched with the target data exist in data stored in a blockchain deployed by the electronic equipment, if not, storing the target data in the blockchain, and sending the target data to other nodes of the blockchain.
Further, encrypting the first data, and obtaining the encrypted target data includes:
performing hash operation on the first data;
and encrypting the first data after hash operation by adopting a preset encryption algorithm to obtain encrypted target data.
Further, after the encrypting the first data and obtaining the encrypted target data, before the judging whether the data matched with the target data exists in the data stored in the blockchain deployed by the electronic device, the method further includes:
dividing the target data into each target sub-data with the number of the included characters as the preset number according to the number of the characters in the target data and the preset number of the preset sub-data;
the sending the target data to other nodes of the blockchain includes:
and sending each target sub-data to other nodes of the blockchain.
Further, the determining whether the data matched with the target data exists in the data stored in the blockchain deployed by the electronic device includes:
acquiring target sub-data carrying an identification head in the target sub-data, and acquiring the target identification head carried by the target sub-data; and acquiring each identification head carrying sub-data of the identification head stored in the blockchain deployed by the electronic equipment, and determining whether each acquired identification head has the identification head matched with the target identification head.
Further, if the target data exists in the data stored in the blockchain deployed by the electronic device, the method further includes:
deleting each target sub-data corresponding to the target data; or (b)
Acquiring sub-data corresponding to the identification head matched with the target identification head, deleting second data belonging to the sub-data stored in the blockchain, sending a notification of deleting the second data to other nodes of the blockchain, and storing each target sub-data corresponding to the target data.
In a second aspect, an embodiment of the present invention further provides a data processing apparatus, including:
the acquisition module is used for acquiring an uploading instruction carrying first data; acquiring first data carried in the uploading instruction;
the processing module is used for encrypting the first data, acquiring encrypted target data, judging whether data matched with the target data exist in data stored in a block chain deployed by the electronic equipment, if not, storing the target data in the block chain, and sending the target data to other nodes of the block chain.
Further, the processing module is further configured to perform a hash operation on the first data; and encrypting the first data after hash operation by adopting a preset encryption algorithm to obtain encrypted target data.
Further, the processing module is further configured to segment the target data into each target sub-data with the number of characters included as the preset number according to the number of characters in the target data and the preset number of sub-data;
the processing module is further configured to send each target sub-data to other nodes of the blockchain.
Further, the processing module is further configured to obtain target sub-data carrying a identifier header in the target sub-data, and obtain a target identifier header carried by the target sub-data; and acquiring each identification head carrying sub-data of the identification head stored in the blockchain deployed by the electronic equipment, and determining whether each acquired identification head has the identification head matched with the target identification head.
Further, if the target data exists in the data stored in the blockchain deployed by the electronic device, the processing module is further configured to delete each target sub-data corresponding to the target data; or acquiring sub-data corresponding to the identification head matched with the target identification head, deleting second data belonging to the sub-data stored in the blockchain, sending a notification of deleting the second data to other nodes of the blockchain, and storing each target sub-data corresponding to the target data.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes at least a processor and a memory, where the processor is configured to execute the steps of any of the data processing methods described above when executing a computer program stored in the memory.
In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of any of the data processing methods described above.
In the embodiment of the invention, after the electronic equipment acquires the uploading instruction carrying the first data, acquiring the first data carried in the uploading instruction, encrypting the first data, acquiring the encrypted target data, judging whether the block chain deployed by the electronic equipment has data matched with the target data or not after acquiring the target data, if not, storing the target data in the block chain, and transmitting the target data to other nodes of the block chain. In the embodiment of the invention, after the electronic equipment acquires the uploading instruction carrying the first data, the first data is encrypted, so that the safety of the first data is ensured, and when the data matched with the target data does not exist in the data stored in the blockchain deployed by the electronic equipment, the target data is stored in the blockchain, thereby avoiding the storage of repeated data in the blockchain and avoiding the resource waste. In addition, the electronic device stores the target data in the blockchain and also sends the target data to other nodes of the blockchain, that is, in the embodiment of the invention, the target data is stored in each node of the blockchain, so that when a single node is tampered with the attack data, the data stored in the other nodes are not tampered, and the situation that the single server is attacked and the data is tampered is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a data processing process according to an embodiment of the present invention;
FIG. 2 is a detailed schematic diagram of a data processing process according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail below with reference to the attached drawings, wherein it is apparent that the embodiments described are only some, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to avoid the situation that when data are stored in a server and the server is hacked, the data stored in the server are tampered, the embodiment of the invention provides a data processing method, a device, equipment and a medium.
Example 1:
fig. 1 is a schematic diagram of a data processing process according to an embodiment of the present invention, where the process includes the following steps:
s101: acquiring an uploading instruction carrying first data; and acquiring first data carried in the uploading instruction.
The data processing method provided by the embodiment of the invention is applied to the electronic equipment, and the electronic equipment can be special equipment or common equipment loaded with a preset encryption module.
In the embodiment of the invention, when the need of uploading data exists, the first data to be uploaded can be selected from the page displayed by the electronic equipment, and the electronic equipment can acquire the uploading instruction carrying the first data. The method includes that a user selects first data to be uploaded in a page displayed by the electronic device, clicks a button such as submit, and the electronic device acquires an uploading instruction carrying the first data.
In addition, in the embodiment of the invention, before the user selects the first data to be uploaded, login information can be input into the page of the electronic device, the login information comprises information of a user name and a password, the electronic device verifies the input password according to the stored password corresponding to the user name, and after the electronic device verifies the login information, the page of the electronic device displays the first data which can be selected.
S102: encrypting the first data, acquiring encrypted target data, judging whether data matched with the target data exist in data stored in a blockchain deployed by the electronic equipment, if not, storing the target data in the blockchain, and sending the target data to other nodes of the blockchain.
In order to ensure the security of the first data, the electronic device may encrypt the first data after acquiring the first data, and store the target data by referring to the encrypted first data as the target data, thereby improving the security of the data.
In addition, in order to avoid the waste of resources caused by repeated storage of the same data, in the embodiment of the present invention, the electronic device further determines whether there is data matching the target data in the data stored in the blockchain deployed thereon, where the data matching the target data is specifically data consistent with the target data. If the data matched with the target data does not exist in the data stored in the block chain deployed on the electronic equipment, the target data is stored in the block chain deployed on the electronic equipment, and the target data is sent to other nodes of the block chain, so that each node of the block chain stores the target data.
When the target data is sent to other nodes of the blockchain, a data transmission path can be established on the basis of the blockchain, and the target data is sent to the other nodes of the blockchain through the established data transmission path. Specifically, how to establish a data transmission path based on a blockchain and how to transmit data through the established data transmission path is the prior art and is not described herein.
In the embodiment of the invention, after the electronic equipment acquires the uploading instruction carrying the first data, the first data is encrypted, so that the safety of the first data is ensured, and when the data matched with the target data does not exist in the data stored in the blockchain deployed by the electronic equipment, the target data is stored in the blockchain, thereby avoiding the storage of repeated data in the blockchain and avoiding the resource waste. In addition, the electronic device stores the target data in the blockchain and also sends the target data to other nodes of the blockchain, that is, in the embodiment of the invention, the target data is stored in each node of the blockchain, so that when a single node is tampered with the attack data, the data stored in the other nodes are not tampered, and the situation that the single server is attacked and the data is tampered is avoided.
Example 2:
in order to improve the security of the data, in the embodiment of the present invention, encrypting the first data, and obtaining the encrypted target data includes:
performing hash operation on the first data;
and encrypting the first data after hash operation by adopting a preset encryption algorithm to obtain encrypted target data.
In order to improve the security of the data to be uploaded, in the embodiment of the present invention, after the electronic device acquires the first data, the electronic device may perform a hash operation on the first data. In order to further prevent the data from being leaked during uploading and still being easy to crack, after the electronic equipment performs hash operation on the first data, a preset encryption algorithm is adopted to encrypt the first data after the hash operation, and an encryption result is used as target data. In the embodiment of the invention, the identification heads in the data encrypted by different data by adopting a preset encryption algorithm are different.
In the embodiment of the invention, after encrypting the first data after hash operation by adopting a preset encryption algorithm, whether the encrypted data is encrypted again can be determined according to whether the encryption level of the data is carried in an uploading instruction or not, if the encryption level of the data is not carried, the encryption is not needed again, if the encryption level of the data is carried, the hash operation is carried out on the first data, and if the encryption level of the data is carried, the encryption of the corresponding level of the encryption level is carried again, if the encryption level of the data is not carried, the encryption of the encryption level is carried again, so that the security requirement cannot be met, and in order to further ensure the security of the first data. Specifically, the uploading instruction may carry a security level and a secret key corresponding to the first data, where the security level may be a level selected by a user on a page of the electronic device, and the secret key and a security algorithm corresponding to the security level are used to encrypt the first data at the security level.
Fig. 2 is a detailed schematic diagram of a data processing procedure according to an embodiment of the present invention.
S201: and verifying the login information.
The user inputs login information through the electronic equipment, and the electronic equipment verifies the login information.
S202: and receiving an uploading instruction carrying the first data.
S203: and judging whether the uploading instruction carries the confidentiality level of the data, if so, executing S204, and if not, executing S205.
S204: and carrying out hash operation on the first data, and encrypting the first data after the hash operation by adopting a preset encryption algorithm. And acquiring a secret key carried in the uploading instruction, and encrypting the first data encrypted by adopting the secret key and a secret algorithm corresponding to the secret level to acquire target data. And performs S206.
S205: and carrying out hash operation on the first data, and encrypting the first data after the hash operation by adopting a preset encryption algorithm to obtain target data. And performs S206.
S206: and storing the target data in the block chain, and sending the target data to other nodes of the block chain.
Example 3:
in order to further improve the security of the data to be uploaded, in the above embodiments, after encrypting the first data and obtaining the encrypted target data, before determining whether there is data matching the target data in the data stored in the blockchain deployed by the electronic device, the method further includes:
dividing the target data into each target sub-data with the number of the included characters as the preset number according to the number of the characters in the target data and the preset number of the sub-data;
the sending the target data to other nodes of the blockchain includes:
and sending each target sub-data to other nodes of the blockchain.
Because the target data may be subjected to the situation that the data is leaked due to malicious packet capturing when the target data is sent to other nodes of the blockchain, in the embodiment of the invention, the electronic device can segment the target data into a plurality of target sub-data, the electronic device stores each target sub-data in the blockchain of the electronic device and sends each target sub-data to other nodes of the blockchain.
Specifically, after the electronic device obtains the encrypted target data, the electronic device may first obtain the number of characters included in the target data, and segment the target data into a plurality of target sub-data according to the number of characters included in the target data and the preset number of preset sub-data. The number of characters included in the target sub-data is a preset number, where the preset number may be any number greater than the number of characters included in the identification header of the first data, for example, the number of characters included in the identification header is 100, and the preset number may be 256.
The number of characters contained in the target data may not be a positive integer multiple of the preset number, that is, the target data may not be split equally, so in the embodiment of the present invention, when the data is split, the first character of the target data may start to split, the target data may be split into a plurality of target sub-data containing characters with the preset number, until the number of the last remaining characters is less than the preset number, and the last remaining characters are split into the last target sub-data.
In addition, after the electronic device acquires each target sub-data corresponding to the target data, the electronic device scrambles the target sub-data and sends the target sub-data to other nodes of the blockchain.
In the embodiment of the invention, when the target data is sent to other nodes of the blockchain, each target sub-data corresponding to the target data is sent, so that only one target sub-data is grabbed when a packet is grabbed, and the target sub-data is not complete, and the complete target data cannot be acquired according to one target sub-data, thereby avoiding the leakage of the target data and improving the safety of the data.
In addition, in the embodiment of the invention, when the target sub-data is sent to other nodes of the blockchain, other target sub-data except the target sub-data where the identification head is located can be compressed, so that the occupation ratio of the target sub-data is reduced, the target sub-data can be quickly sent to other nodes of the blockchain, and the transmission efficiency is improved.
And after receiving the data, other nodes in the blockchain automatically refresh, and record relevant information of the received data in an account book corresponding to the node. Specifically, how the blockchain automatically refreshes and how the related information of the received data is recorded in the corresponding account book is the prior art, and is not described herein again.
Example 4:
in order to avoid resource waste, based on the above embodiments, in the embodiment of the present invention, the determining whether the data matching the target data exists in the data stored in the blockchain deployed by the electronic device includes:
acquiring target sub-data carrying an identification head in the target sub-data, and acquiring the target identification head carried by the target sub-data; and acquiring each identification head carrying sub-data of the identification head stored in the blockchain deployed by the electronic equipment, and determining whether each acquired identification head has the identification head matched with the target identification head.
Because the same data may be repeatedly stored, which causes resource waste, in the embodiment of the present invention, the electronic device may determine whether there is data matching the target data in the data stored in the blockchain deployed thereon, thereby determining whether to store the target data.
Specifically, when the first data is encrypted, only the identification heads corresponding to the same data are consistent, so in the embodiment of the invention, if the blockchain deployed by the electronic device has the same data as the target data, the identification heads of the data stored in the blockchain have the same identification heads as the identification heads of the target data, and in the embodiment of the invention, not all the target sub-data corresponding to the target data do not contain the identification heads, but only one of the target sub-data contains the identification heads. Therefore, in the embodiment of the invention, when judging whether the data identical to the target data exists in the blockchain, the target identification head contained in the target sub-data containing the identification head can be acquired, each identification head in the data stored in the blockchain is acquired, and whether the identification head consistent with the target identification head exists in each identification head is determined.
In the embodiment of the invention, the number of the characters contained in the target sub-data is greater than that of the characters contained in the identification header of the first data, and the identification header is generally positioned at the head of the data, so that after the first data is divided to obtain a plurality of target sub-data, the first target sub-data is the target sub-data containing the identification header, and the target identification header carried by the target sub-data is obtained. And checking whether an identification head consistent with the target identification head is stored in a block chain deployed by the electronic equipment. Specifically, in order to improve the processing efficiency of the electronic device, the blockchain deployed by the electronic device may store each identifier header carrying sub-data of the identifier header, so after the electronic device obtains the target identifier header, the electronic device may obtain each identifier header carrying sub-data of the identifier header stored in the blockchain deployed by the electronic device, and determine whether there is an identifier header consistent with the target identifier header in each identifier header. If the identification head consistent with the target identification head exists, the fact that data matched with the target data exists in the data stored in the blockchain deployed by the electronic equipment is explained; if the identification head consistent with the target identification head does not exist, the fact that the data matched with the target data does not exist in the data stored in the blockchain deployed by the electronic equipment is indicated.
In addition, since the identifier header is generally recorded at the initial position of the target data, and the number of characters contained in the target sub-data is greater than the number of data contained in the identifier header, in the embodiment of the present invention, when the identifier header of the target data is acquired, the identifier header of the first target sub-data that is segmented may be acquired, specifically, for each target sub-data, the sorting identifier corresponding to the target sub-data may be determined according to the position of the target sub-data in the target data. And acquiring target sub-data with the sequence identification being a preset identification, and determining the identification head of the acquired target sub-data as a target identification head, wherein the preset identification is usually 1.
Example 5:
in order to avoid resource waste, in the embodiments of the present invention, if the target data exists in the data stored in the blockchain deployed by the electronic device, the method further includes:
deleting each target sub-data corresponding to the target data; or (b)
Acquiring sub-data corresponding to the identification head matched with the target identification head, deleting second data belonging to the sub-data stored in the blockchain, sending a notification of deleting the second data to other nodes of the blockchain, and storing each target sub-data corresponding to the target data.
In the embodiment of the invention, if the target data exists in the data stored in the blockchain deployed by the electronic equipment, in order to avoid resource waste, the electronic equipment can delete each target sub-data corresponding to the target data, so that each target sub-data corresponding to the target data is not stored in the blockchain, and the resource waste is avoided.
In addition, the electronic device can delete the data which is stored in the blockchain and is the same as the target data, and inform other nodes of the blockchain to delete the data which is the same as the target data. Specifically, the electronic device may acquire an identifier header stored in a blockchain deployed by the electronic device and matched with the target identifier header, acquire sub-data corresponding to the identifier header, delete second data to which the sub-data stored in the blockchain belongs, and send a notification of deleting the second data to other nodes of the blockchain, where after receiving the notification of deleting the second data, the other nodes of the blockchain delete the stored second data. In addition, the electronic device stores each target sub-data corresponding to the target data, and sends each target sub-data corresponding to the target data to other nodes of the blockchain, and the other nodes of the blockchain store each target sub-data corresponding to the target data after receiving the target sub-data.
In the embodiment of the invention, when the user selects the first data to be uploaded, the user can correspondingly select the category of the first data, and when the blockchain stores the target sub-data corresponding to the first data, the target sub-data corresponding to the first data is stored in the storage position corresponding to the category, that is, when the data is stored, the data is stored in a classified mode.
Example 6:
fig. 3 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, where the apparatus includes:
an obtaining module 301, configured to obtain an upload instruction carrying first data; acquiring first data carried in the uploading instruction;
the processing module 302 is configured to encrypt the first data, obtain encrypted target data, determine whether data matching the target data exists in data stored in a blockchain deployed by the electronic device, and if not, store the target data in the blockchain, and send the target data to other nodes of the blockchain.
In a possible implementation manner, the processing module 302 is further configured to perform a hash operation on the first data; and encrypting the first data after hash operation by adopting a preset encryption algorithm to obtain encrypted target data.
In a possible implementation manner, the processing module 302 is further configured to segment the target data into each target sub-data with the number of characters included as the preset number according to the number of characters in the target data and the preset number of sub-data;
the processing module 302 is further configured to send each target sub-data to other nodes of the blockchain.
In a possible implementation manner, the processing module 302 is further configured to obtain target sub-data carrying an identifier header in the target sub-data, and obtain a target identifier header carried by the target sub-data; and acquiring each identification head carrying sub-data of the identification head stored in the blockchain deployed by the electronic equipment, and determining whether each acquired identification head has the identification head matched with the target identification head.
In a possible implementation manner, if the target data exists in the data stored in the blockchain deployed by the electronic device, the processing module 302 is further configured to delete each target sub-data corresponding to the target data; or acquiring sub-data corresponding to the identification head matched with the target identification head, deleting second data belonging to the sub-data stored in the blockchain, sending a notification of deleting the second data to other nodes of the blockchain, and storing each target sub-data corresponding to the target data.
Example 7:
fig. 4 is a schematic structural diagram of an electronic device according to the present invention, and on the basis of the foregoing embodiments, an embodiment of the present invention further provides an electronic device, as shown in fig. 4, including: the processor 401, the communication interface 402, the memory 403 and the communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete communication with each other through the communication bus 404;
the memory 403 has stored therein a computer program which, when executed by the processor 401, causes the processor 401 to perform the steps of:
acquiring an uploading instruction carrying first data; acquiring first data carried in the uploading instruction;
encrypting the first data, acquiring encrypted target data, judging whether data matched with the target data exist in data stored in a blockchain deployed by the electronic equipment, if not, storing the target data in the blockchain, and sending the target data to other nodes of the blockchain.
In one possible implementation manner, the encrypting the first data, and obtaining the encrypted target data includes:
performing hash operation on the first data;
and encrypting the first data after hash operation by adopting a preset encryption algorithm to obtain encrypted target data.
In one possible implementation manner, after encrypting the first data and obtaining the encrypted target data, before determining whether there is data matching the target data in the data stored in the blockchain deployed by the electronic device, the method further includes:
dividing the target data into each target sub-data with the number of the included characters as the preset number according to the number of the characters in the target data and the preset number of the preset sub-data;
the sending the target data to other nodes of the blockchain includes:
and sending each target sub-data to other nodes of the blockchain.
In one possible implementation, the determining whether there is data matching the target data in the data stored in the blockchain deployed by the electronic device includes:
acquiring target sub-data carrying an identification head in the target sub-data, and acquiring the target identification head carried by the target sub-data; and acquiring each identification head carrying sub-data of the identification head stored in the blockchain deployed by the electronic equipment, and determining whether each acquired identification head has the identification head matched with the target identification head.
In one possible implementation, if the target data exists in the data stored in the blockchain deployed by the electronic device, the method further includes:
deleting each target sub-data corresponding to the target data; or (b)
Acquiring sub-data corresponding to the identification head matched with the target identification head, deleting second data belonging to the sub-data stored in the blockchain, sending a notification of deleting the second data to other nodes of the blockchain, and storing each target sub-data corresponding to the target data.
The communication bus mentioned by the server may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; but also digital instruction processors (Digital Signal Processing, DSP), application specific integrated circuits, field programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
Example 8:
on the basis of the above embodiments, the embodiments of the present invention further provide a computer readable storage medium having stored therein a computer program executable by an electronic device, which when run on the electronic device, causes the electronic device to perform the steps of:
the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of:
acquiring an uploading instruction carrying first data; acquiring first data carried in the uploading instruction;
encrypting the first data, acquiring encrypted target data, judging whether data matched with the target data exist in data stored in a blockchain deployed by the electronic equipment, if not, storing the target data in the blockchain, and sending the target data to other nodes of the blockchain.
In one possible implementation manner, the encrypting the first data, and obtaining the encrypted target data includes:
performing hash operation on the first data;
and encrypting the first data after hash operation by adopting a preset encryption algorithm to obtain encrypted target data.
In one possible implementation manner, after encrypting the first data and obtaining the encrypted target data, before determining whether there is data matching the target data in the data stored in the blockchain deployed by the electronic device, the method further includes:
dividing the target data into each target sub-data with the number of the included characters as the preset number according to the number of the characters in the target data and the preset number of the preset sub-data;
the sending the target data to other nodes of the blockchain includes:
and sending each target sub-data to other nodes of the blockchain.
In one possible implementation, the determining whether there is data matching the target data in the data stored in the blockchain deployed by the electronic device includes:
acquiring target sub-data carrying an identification head in the target sub-data, and acquiring the target identification head carried by the target sub-data; and acquiring each identification head carrying sub-data of the identification head stored in the blockchain deployed by the electronic equipment, and determining whether each acquired identification head has the identification head matched with the target identification head.
In one possible implementation, if the target data exists in the data stored in the blockchain deployed by the electronic device, the method further includes:
deleting each target sub-data corresponding to the target data; or (b)
Acquiring sub-data corresponding to the identification head matched with the target identification head, deleting second data belonging to the sub-data stored in the blockchain, sending a notification of deleting the second data to other nodes of the blockchain, and storing each target sub-data corresponding to the target data.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A data processing method, applied to an electronic device, the method comprising:
acquiring an uploading instruction carrying first data; acquiring first data carried in the uploading instruction;
encrypting the first data, acquiring encrypted target data, judging whether data matched with the target data exist in data stored in a blockchain deployed by the electronic equipment, if not, storing the target data in the blockchain, and sending the target data to other nodes of the blockchain.
2. The method of claim 1, wherein encrypting the first data to obtain encrypted target data comprises:
performing hash operation on the first data;
and encrypting the first data after hash operation by adopting a preset encryption algorithm to obtain encrypted target data.
3. The method of claim 1, wherein the encrypting the first data, after obtaining the encrypted target data, is preceded by determining whether there is data matching the target data in data stored in a blockchain deployed by the electronic device, the method further comprising:
dividing the target data into each target sub-data with the number of the included characters as the preset number according to the number of the characters in the target data and the preset number of the preset sub-data;
the sending the target data to other nodes of the blockchain includes:
and sending each target sub-data to other nodes of the blockchain.
4. The method of claim 3, wherein the determining whether there is data in the blockchain-saved data of the electronic device deployment that matches the target data comprises:
acquiring target sub-data carrying an identification head in the target sub-data, and acquiring the target identification head carried by the target sub-data; and acquiring each identification head carrying sub-data of the identification head stored in the blockchain deployed by the electronic equipment, and determining whether each acquired identification head has the identification head matched with the target identification head.
5. The method of claim 4, wherein if the target data is present in the data stored in the blockchain of the electronic device deployment, the method further comprises:
deleting each target sub-data corresponding to the target data; or (b)
Acquiring sub-data corresponding to the identification head matched with the target identification head, deleting second data belonging to the sub-data stored in the blockchain, sending a notification of deleting the second data to other nodes of the blockchain, and storing each target sub-data corresponding to the target data.
6. A data processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring an uploading instruction carrying first data; acquiring first data carried in the uploading instruction;
the processing module is used for encrypting the first data, acquiring encrypted target data, judging whether data matched with the target data exist in data stored in a block chain deployed by the electronic equipment, if not, storing the target data in the block chain, and sending the target data to other nodes of the block chain.
7. The apparatus of claim 6, wherein the processing module is further configured to hash the first data; and encrypting the first data after hash operation by adopting a preset encryption algorithm to obtain encrypted target data.
8. The apparatus of claim 6, wherein the processing module is further configured to segment the target data into each target sub-data having the number of characters of the preset number according to the number of characters in the target data and the preset number of sub-data;
the processing module is further configured to send each target sub-data to other nodes of the blockchain.
9. An electronic device comprising at least a processor and a memory, the processor being adapted to perform the steps of the data processing method according to any of claims 1-5 when executing a computer program stored in the memory.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, performs the steps of the data processing method of any of claims 1-5.
CN202111576848.5A 2021-12-22 2021-12-22 Data processing method, device, equipment and medium Pending CN116341017A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111576848.5A CN116341017A (en) 2021-12-22 2021-12-22 Data processing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111576848.5A CN116341017A (en) 2021-12-22 2021-12-22 Data processing method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN116341017A true CN116341017A (en) 2023-06-27

Family

ID=86874693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111576848.5A Pending CN116341017A (en) 2021-12-22 2021-12-22 Data processing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116341017A (en)

Similar Documents

Publication Publication Date Title
CN110113167B (en) Information protection method and system of intelligent terminal and readable storage medium
CN107770159B (en) Vehicle accident data recording method and related device and readable storage medium
TW201642135A (en) Detecting malicious files
CN108880812B (en) Method and system for data encryption
Al-Jaberi et al. Data integrity and privacy model in cloud computing
CN105871805A (en) Anti-stealing-link method and device
CN112784823B (en) Face image recognition method, face image recognition device, computing equipment and medium
US20220019676A1 (en) Threat analysis and risk assessment for cyber-physical systems based on physical architecture and asset-centric threat modeling
CN103888429A (en) Virtual machine starting method, correlation devices and systems
CN115473722A (en) Data encryption method and device, electronic equipment and storage medium
CN111585995A (en) Method and device for transmitting and processing safety wind control information, computer equipment and storage medium
CN109951291B (en) Content sharing method and device based on trusted execution environment and multimedia equipment
CN113630412B (en) Resource downloading method, resource downloading device, electronic equipment and storage medium
CN117240625B (en) Tamper-resistant data processing method and device and electronic equipment
CN116455572B (en) Data encryption method, device and equipment
CN110381114B (en) Interface request parameter processing method and device, terminal equipment and medium
CN113542187A (en) File uploading and downloading method and device, computer device and medium
CN114331648A (en) Bid file processing method, device, equipment and storage medium
CN113569265B (en) Data processing method, system and device
CN116341017A (en) Data processing method, device, equipment and medium
CN112926490A (en) Finger vein image recognition method, device, computing equipment and medium
CN114615087B (en) Data sharing method, device, equipment and medium
CN114791834B (en) Application program starting method and device, electronic equipment and storage medium
CN117499159B (en) Block chain-based data transaction method and device and electronic equipment
CN117349867B (en) Intelligent contract deployment method, system, equipment and 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