Method and system for saving data using blockchain based on domestic CPU and OS
By using the blockchain technology of domestic CPU and OS in intelligent machine video image recognition technology for data storage, the security risks in the data storage link are solved, and efficient and secure storage and management of data are achieved.
Patent Information
- Application Number
- CN202111521760.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-12-13
AI Technical Summary
The existing intelligent machine video image recognition technology has data security risks in the data storage and exchange process, especially in the data storage stage, where data plaintext storage may lead to data leakage, lacking unified access control and related identity authentication.
Data is saved using blockchain technology based on domestic CPUs and OS, target objects are identified through video image processing and neural networks, and data encryption and key management are used to use CA certificates and ECDH key negotiation algorithms to store the encrypted data on the blockchain to ensure data integrity and security.
Blockchain technology protects data from tampering, provides data security and integrity, reduces the risk of data leakage, and improves data security and reliability.
Smart Images

Figure CN114218603B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a method and system for storing data using blockchain based on a domestic CPU and OS. Background Art
[0002] With the development and extension of multiple application scenarios and fields such as smart cities, intelligent transportation, industrial detection, and smart safety supervision, the demand for machine video image recognition based on the information innovation environment has gradually emerged. At present, intelligent machine video image recognition technology provides real-time artificial intelligence processing capabilities for a large number of video image analysis, but there are still potential data security risks in data storage, data exchange and other links.
[0003] The tamper-proof nature of blockchain technology can play an important role in data anti-counterfeiting and traceability. Blockchain is a chain composed of blocks. In the computer field, linked lists are one of the most basic data structures. Blockchain is an extension and application of linked list data structures. Each block maintains its own data structure, and each block points to its next block. Blockchain uses a peer-to-peer network, in which all nodes are equal, without primary and secondary distinctions. This is the basis for the distributed and decentralized nature of blockchain.
[0004] The blockchain uses a digital encryption algorithm to encrypt all data on the chain and ensure that the data on the chain cannot be tampered with. The blockchain uses a consensus mechanism consistency protocol to ensure the consistency of data between nodes when transmitting data.
[0005] Based on artificial intelligence machine learning, video image processing technology has been widely used in personnel, object or monitoring analysis. Due to the limited computing and processing capabilities of the front-end equipment of camera acquisition, only relevant video image enhancement algorithms with limited effects are often performed according to existing practices. A large amount of data calculations also need to be processed on the server side. The original data and the result data after calculation and processing on the server side also flow between different data environments, which will inevitably lead to data security risks. The storage data source server of the original collected data may have vulnerabilities that have not been updated in time, and the database system reinforcement, lack of access control and data layer security protection. In the data storage stage, there may be data leakage caused by the storage of plain text data, lack of unified access control and related identity authentication. The main risks in the data processing and exchange stages are the lack of data access control and data desensitization mechanism.
[0006] Based on the above problems, the present invention proposes a method and system for saving data using blockchain based on domestic CPU and OS. Summary of the invention
[0007] In order to make up for the defects of the prior art, the present invention provides a simple and efficient method and system for saving data using blockchain based on domestic CPU and OS.
[0008] The present invention is achieved through the following technical solutions:
[0009] A method for storing data using blockchain based on domestic CPU and OS, characterized by comprising the following steps:
[0010] The first step is to use video cameras to collect video images of multiple surveillance locations, and obtain original video data and data to be processed through video segmentation and video replication; the segmented video images are imported into the neural network for training in chronological order, and the trained neural network is used to identify the target object in the video image; the feature information of the directional gradient histogram is extracted from the replicated video image to represent the object features of the target image, so as to detect the target object;
[0011] The second step is to determine the video image data that needs to be protected as the data to be uploaded to the chain based on business needs. The issued CA certificate has the public key and private key of each node. The public key and private key of the node on the chain are used to negotiate the key with each data viewing node to obtain the key for the chain.
[0012] The third step is to encrypt the data on the chain after obtaining the on-chain key, and transfer the encrypted on-chain data to the blockchain for storage to ensure the integrity of the encrypted on-chain data;
[0013] Step 4: When viewing data, the data viewing node obtains the key sent by the on-chain node, and then sends the public key stored in the data viewing node to the on-chain node. The public key of the data viewing node and the private key of the on-chain node are negotiated to obtain the on-chain key, which is combined with the on-chain key generated by the negotiation between the private key of the data viewing node and the public key of the on-chain node to obtain the final on-chain key of the key negotiation;
[0014] After the data viewing node obtains the valid on-chain key, it can decrypt the encrypted on-chain data requested for query and obtain the required decrypted data.
[0015] In the first step, the input video image is preprocessed, and then the gradient value of the pixel point is calculated to form a gradient histogram, and then the blocks (data blocks) are normalized, and finally the feature information HOG feature (high-dimensional vector) of the gradient histogram is collected and input into the support vector machine SVM (Support Vector Machine) for supervised learning to realize the detection of people or objects and obtain the data of people and objects;
[0016] The human and object data obtained from the identification and analysis are subjected to data fusion processing, the common analysis data are merged, the non-target analysis information outside the intersection is eliminated, and the target person or object in the intersection is introduced into the second-layer neural network for training. The behavioral data of the target person or object, including motion trajectory, deformation and color data, are identified and tracked through the training results.
[0017] In the second step, the on-chain node and each data viewing node use the ECDH (Elliptic Curve Diffie-Hellman key Exchange) key negotiation algorithm to negotiate the key.
[0018] In the third step, the method of saving the on-chain data includes but is not limited to obtaining a hash value by hashing the original video image, and then sending the original data and the hash value together to the Interstellar File System IPFS network. The network returns the storage address, and then the storage address is sent to the blockchain for storage.
[0019] In order to improve the efficiency of key calling and file query in each link node using data, in the third step, a correspondence table of files and on-chain keys is stored in the blockchain database to correspond the encrypted on-chain data and the on-chain keys used.
[0020] The present invention is a system for storing data using blockchain based on domestic CPU and OS, including a video image acquisition module, a video image processing and analysis module, a data chain module, a data encryption module, a blockchain storage module, a data query module and a data decryption module;
[0021] The video image acquisition module is responsible for acquiring video images of multiple monitoring locations using video cameras;
[0022] The video image processing and analysis module is responsible for obtaining original video data and data to be processed through video segmentation and video duplication; importing the segmented video images into the neural network in chronological order for training, and using the trained neural network to identify the target object in the video image; using the duplicated video image to extract feature information of the directional gradient histogram, which is used to represent the object features of the target image, so as to detect the target object;
[0023] The data uplink module is responsible for determining the video image data that needs to be protected as the data to be uploaded to the chain according to business needs; the issued CA certificate has the public key and private key of each node, and the public key and private key of the uplink node are used to negotiate the key with each data viewing node to obtain the uplink key;
[0024] The data encryption module is responsible for encrypting the data on the chain;
[0025] The blockchain storage module is responsible for storing encrypted on-chain data;
[0026] The data query module is responsible for obtaining the key sent by the on-chain node, and then sending the public key stored in the data viewing node itself to the on-chain node, and the on-chain key is obtained by negotiation between the public key of the data viewing node and the private key of the on-chain node, and is combined with the on-chain key generated by negotiation between the private key of the data viewing node and the public key of the on-chain node to obtain the final on-chain key of key negotiation;
[0027] The data decryption module is responsible for decrypting the encrypted on-chain data requested for query to obtain the required decrypted data.
[0028] The video image processing and analysis module is responsible for preprocessing the input video image, then calculating the gradient value of the pixel point to form a gradient histogram, then normalizing the blocks (data blocks), and finally collecting the feature information HOG feature (high-dimensional vector) of the gradient histogram and inputting it into the support vector machine SVM (Support Vector Machine) for supervised learning to detect people or objects and obtain people and object data;
[0029] The human and object data obtained from the identification and analysis are subjected to data fusion processing, the common analysis data are merged, the non-target analysis information outside the intersection is eliminated, and the target person or object in the intersection is introduced into the second-layer neural network for training. The behavioral data of the target person or object, including motion trajectory, deformation and color data, are identified and tracked through the training results.
[0030] The data uplink module uses the ECDH (Elliptic Curve Diffie-Hellman key Exchange) key negotiation algorithm for key negotiation.
[0031] The data encryption module obtains a hash value after encrypting the original video image through hashing, and then sends the original data and the hash value to the Interstellar File System IPFS network. The network returns the storage address, and then the storage address is sent to the blockchain for storage.
[0032] The blockchain storage module stores a correspondence table of files and on-chain keys, which corresponds the encrypted on-chain data and the on-chain keys used.
[0033] The beneficial effects of the present invention are as follows: the method and system for storing data using blockchain based on domestic CPU and OS, by decomposing multi-step data analysis layers for neural network training and recognition, not only saves computing resources, but also obtains more accurate multiple feature data, and obtains accurate video image analysis result data by fusing data information, thereby improving the recognition rate. At the same time, the blockchain can protect the data from being tampered with, thereby providing protection for user sensitive data. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Attached Figure 1 This is a schematic diagram of the method of using blockchain to save data based on domestic CPU and OS in the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0037] The method of using blockchain to save data based on domestic CPU and OS includes the following steps:
[0038] The first step is to use video cameras to collect video images of multiple surveillance locations, and obtain original video data and data to be processed through video segmentation and video replication; the segmented video images are imported into the neural network for training in chronological order, and the trained neural network is used to identify target objects in the video images, such as people, specific objects or areas; the feature information of the directional gradient histogram is extracted from the replicated video images to represent the object features of the target image, so as to detect the target object;
[0039] Step 2: Determine the video image data that needs to be protected as data to be uploaded to the chain based on business needs; issue CA certificates to nodes in each business link. The issued CA certificates have the public and private keys of each node. Use the public and private keys of the uploaded node to negotiate keys with each data viewing node to obtain the uploaded key;
[0040] The third step is to encrypt the data on the chain after obtaining the on-chain key, and transfer the encrypted on-chain data to the blockchain for storage to ensure the integrity of the encrypted on-chain data;
[0041] Step 4: When viewing data, the data viewing node obtains the key sent by the on-chain node, and then sends the public key stored in the data viewing node to the on-chain node. The public key of the data viewing node and the private key of the on-chain node are negotiated to obtain the on-chain key, which is combined with the on-chain key generated by the negotiation between the private key of the data viewing node and the public key of the on-chain node to obtain the final on-chain key of the key negotiation;
[0042] After the data viewing node obtains the valid on-chain key, it can decrypt the encrypted on-chain data requested for query and obtain the required decrypted data.
[0043] The acquired video image data can be classified according to business, and divided into raw video data, process analysis data and analysis conclusion data, including structured data and unstructured data. The data involving secrets that need to be protected is the data to be uploaded to the chain.
[0044] In the first step, the input video image is preprocessed, and then the gradient value of the pixel point is calculated to form a gradient histogram, and then the blocks (data blocks) are normalized, and finally the feature information HOG feature (high-dimensional vector) of the gradient histogram is collected and input into the support vector machine SVM (Support Vector Machine) for supervised learning to realize the detection of people or objects and obtain the data of people and objects;
[0045] The human and object data obtained from the identification and analysis are subjected to data fusion processing, the common analysis data are merged, the non-target analysis information outside the intersection is eliminated, and the target person or object in the intersection is introduced into the second-layer neural network for training. The behavioral data of the target person or object, including motion trajectory, deformation and color data, are identified and tracked through the training results.
[0046] The on-chain node is a node in the on-chain link of the data analysis end that has determined the original video image data and confirmed the analysis result data; the data viewing node includes the user end in each subsequent business link, and is a node that has a query and request for data. The on-chain key is a key jointly negotiated by the on-chain node and the data viewing node retrieved by the back-end monitoring, so the on-chain key also exists in the stage of retrieving video images and analyzing data, which can support the retrieval and decryption of the on-chain data at this node to obtain the original video image or plaintext analysis result data. In terms of business processing, it is convenient for the monitoring end to obtain data.
[0047] The chain nodes and each data viewing node are provided with a trusted digital signature key by the issuing CA certificate. Once each node has a digital certificate, it also has the private key and public key of each node, and key negotiation can be carried out while the data is encrypted and protected.
[0048] In the second step, the on-chain node and each data viewing node use the ECDH (Elliptic Curve Diffie-Hellman key Exchange) key negotiation algorithm to negotiate the key.
[0049] ECDH is used to establish secure shared encryption data in an insecure channel. Generally speaking, private keys are exchanged. This key is usually used as a "symmetric encryption" key by both parties in subsequent data transmission.
[0050] Since the ECDH key exchange protocol does not verify the identity of the sender of the public key, it cannot prevent man-in-the-middle attacks. If the listener intercepts the public key of the video image acquisition end (the source of the original data), it can replace it with the listener's own public key and send it to a third party in the business link. The listener can also intercept the public key of the third party, replace it with his own public key, and send it to the video image acquisition end. In this way, the listener can easily decrypt any information data sent between the two. And there is a situation where the data can be changed, re-encrypted with his own key, and then sent to the recipient, and the risk of such data being tampered with.
[0051] In order to solve the above problems, the on-chain node and each data viewing node use digital signatures to sign the public key before exchanging the public key. For example, a public certificate authority (CA) is used to provide both parties with a trusted digital signature key. After each node has a digital certificate, it also has the private key and public key of each node. In the business link, the data query user end must negotiate the on-chain password with the other parties, use its private key and the other party's public key, and use the ECDH key negotiation algorithm to negotiate the key. The negotiated information is the on-chain key.
[0052] In the third step, the method of saving the on-chain data includes but is not limited to obtaining a hash value by hashing the original video image, and then sending the original data and the hash value together to the Interstellar File System IPFS network. The network returns the storage address, and then the storage address is sent to the blockchain for storage.
[0053] The data uploaded to the chain is encrypted data. In other stages of the blockchain, it can only ensure that the data is not modified, but the content and information of the data center cannot be viewed, which can achieve data integrity and data protection.
[0054] The video image analysis process data and result data are already structured data. In the business processing link, this part of data is requested more frequently. In order to facilitate frequent data queries by the data user, considering the limitations of system resources in the domestic environment, targeted processing can be performed. In order to improve the efficiency of key calls and file queries in each link node using data, in the third step, a corresponding table of files and on-chain keys is stored in the blockchain database, and the encrypted on-chain data and the on-chain keys used are matched.
[0055] The system based on domestic CPU and OS using blockchain to save data includes video image acquisition module, video image processing and analysis module, data chain module, data encryption module, blockchain storage module, data query module and data decryption module;
[0056] The video image acquisition module is responsible for acquiring video images of multiple monitoring locations using video cameras;
[0057] The video image processing and analysis module is responsible for obtaining original video data and data to be processed through video segmentation and video duplication; importing the segmented video images into the neural network in chronological order for training, and using the trained neural network to identify the target object in the video image; using the duplicated video image to extract feature information of the directional gradient histogram, which is used to represent the object features of the target image, so as to detect the target object;
[0058] The data uplink module is responsible for determining the video image data that needs to be protected as the data to be uploaded to the chain according to business needs; the issued CA certificate has the public key and private key of each node, and the public key and private key of the uplink node are used to negotiate the key with each data viewing node to obtain the uplink key;
[0059] The data encryption module is responsible for encrypting the data on the chain;
[0060] The blockchain storage module is responsible for storing encrypted on-chain data;
[0061] The data query module is responsible for obtaining the key sent by the on-chain node, and then sending the public key stored in the data viewing node itself to the on-chain node, and the on-chain key is obtained by negotiation between the public key of the data viewing node and the private key of the on-chain node, and is combined with the on-chain key generated by negotiation between the private key of the data viewing node and the public key of the on-chain node to obtain the final on-chain key of key negotiation;
[0062] The data decryption module is responsible for decrypting the encrypted on-chain data requested for query to obtain the required decrypted data.
[0063] The video image processing and analysis module is responsible for preprocessing the input video image, then calculating the gradient value of the pixel point to form a gradient histogram, then normalizing the blocks (data blocks), and finally collecting the feature information HOG feature (high-dimensional vector) of the gradient histogram and inputting it into the support vector machine SVM (Support Vector Machine) for supervised learning to detect people or objects and obtain people and object data;
[0064] The human and object data obtained from the identification and analysis are subjected to data fusion processing, the common analysis data are merged, the non-target analysis information outside the intersection is eliminated, and the target person or object in the intersection is introduced into the second-layer neural network for training. The behavioral data of the target person or object, including motion trajectory, deformation and color data, are identified and tracked through the training results.
[0065] The data uplink module uses the ECDH (Elliptic Curve Diffie-Hellman key Exchange) key negotiation algorithm for key negotiation.
[0066] The data encryption module obtains a hash value after encrypting the original video image through hashing, and then sends the original data and the hash value to the Interstellar File System IPFS network. The network returns the storage address, and then the storage address is sent to the blockchain for storage.
[0067] The blockchain storage module stores a correspondence table of files and on-chain keys, which corresponds the encrypted on-chain data and the on-chain keys used.
[0068] The embodiment described above is only one specific implementation of the present invention. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for storing data using blockchain based on domestic CPU and OS, characterized in that: The following steps are involved: The first step is to use video cameras to collect video images from multiple surveillance locations, and obtain original video data and data to be processed through video segmentation and video replication; The segmented video images are introduced into the neural network in chronological order for training, and the trained neural network is used to identify the target object in the video image; the feature information of the directional gradient histogram is extracted by copying the video image to represent the object features of the target image, so as to detect the target object; Preprocess the input video image, calculate the gradient value of the pixel point, form a gradient histogram, and then normalize the blocks. Finally, collect the feature information of the gradient histogram HOG feature and input it into the support vector machine SVM for supervised learning to detect people or objects and obtain people and object data. The human and object data obtained by identification and analysis are fused, the common analysis data are merged, the non-target analysis information outside the intersection is eliminated, and the target human or object in the intersection is introduced into the second-layer neural network for training. The behavior data of the target human or object, including movement trajectory, deformation and color data, is identified and tracked through the training results; Step 2: The video image data that needs to be protected is used as the data to be uploaded to the chain based on business needs. The issued CA certificate has the public key and private key of each node. The public key and private key of the node on the chain are used to negotiate the key with each data viewing node to obtain the uploaded key. The third step is to encrypt the data on the chain after obtaining the on-chain key, and transfer the encrypted on-chain data to the blockchain for storage to ensure the integrity of the encrypted on-chain data; Step 4: When viewing data, the data viewing node obtains the key sent by the on-chain node, and then sends the public key stored in the data viewing node to the on-chain node. The public key of the data viewing node and the private key of the on-chain node are negotiated to obtain the on-chain key, which is combined with the on-chain key generated by the negotiation between the private key of the data viewing node and the public key of the on-chain node to obtain the final on-chain key of the key negotiation; After the data viewing node obtains the valid on-chain key, it can decrypt the encrypted on-chain data requested for query and obtain the required decrypted data.
2. The method for storing data using blockchain based on domestic CPU and OS according to claim 1 is characterized in that: In the second step, the on-chain node and each data viewing node use the ECDH key agreement algorithm to negotiate the key.
3. The method for storing data using blockchain based on domestic CPU and OS according to claim 1 is characterized in that: In the third step, the method of saving the on-chain data includes encrypting the original video image through hashing to obtain a hash value, and then sending the original data and the hash value together to the Interstellar File System IPFS network. The network returns the storage address, and then the storage address is sent to the blockchain for storage.
4. The method for storing data using blockchain based on domestic CPU and OS according to claim 1 is characterized in that: In order to improve the efficiency of key calling and file query in each link node using data, in the third step, a correspondence table of files and on-chain keys is stored in the blockchain database to correspond the encrypted on-chain data and the on-chain keys used.
5. A system for storing data using blockchain based on domestic CPU and OS, characterized by: It includes video image acquisition module, video image processing and analysis module, data uploading module, data encryption module, blockchain storage module, data query module and data decryption module; The video image acquisition module is responsible for acquiring video images of multiple monitoring locations using video cameras; The video image processing and analysis module is responsible for obtaining original video data and data to be processed through video segmentation and video replication; The segmented video images are introduced into the neural network in chronological order for training, and the trained neural network is used to identify the target object in the video image; the feature information of the directional gradient histogram is extracted by copying the video image to represent the object features of the target image, so as to detect the target object; The video image processing and analysis module is responsible for preprocessing the input video image, then calculating the gradient value of the pixel point to form a gradient histogram, and then normalizing the blocks, and finally collecting the feature information HOG feature of the gradient histogram and inputting it into the support vector machine SVM for supervised learning to achieve the detection of people or objects and obtain the data of people and objects; The human and object data obtained by identification and analysis are fused, the common analysis data are merged, the non-target analysis information outside the intersection is eliminated, and the target human or object in the intersection is introduced into the second-layer neural network for training. The behavior data of the target human or object, including movement trajectory, deformation and color data, is identified and tracked through the training results; The data uplink module is responsible for determining the video image data that needs to be protected as the data to be uploaded to the chain according to business needs; the issued CA certificate has the public key and private key of each node, and the public key and private key of the uplink node are used to negotiate the key with each data viewing node to obtain the uplink key; The data encryption module is responsible for encrypting the data on the chain; The blockchain storage module is responsible for storing encrypted on-chain data; The data query module is responsible for obtaining the key sent by the on-chain node, and then sending the public key stored in the data viewing node itself to the on-chain node, and the on-chain key is obtained by negotiation between the public key of the data viewing node and the private key of the on-chain node, and is combined with the on-chain key generated by negotiation between the private key of the data viewing node and the public key of the on-chain node to obtain the final on-chain key of key negotiation; The data decryption module is responsible for decrypting the encrypted on-chain data requested for query to obtain the required decrypted data.
6. The system for storing data using blockchain based on domestic CPU and OS according to claim 5 is characterized in that: The data uplink module uses the ECDH key negotiation algorithm to perform key negotiation.
7. The system for storing data using blockchain based on domestic CPU and OS according to claim 5 is characterized by: The data encryption module obtains a hash value after encrypting the original video image through hashing, and then sends the original data and the hash value to the Interstellar File System IPFS network. The network returns the storage address, and then the storage address is sent to the blockchain for storage.
8. The system for storing data using blockchain based on domestic CPU and OS according to claim 5 is characterized in that: The blockchain storage module stores a correspondence table of files and on-chain keys, which corresponds the encrypted on-chain data and the on-chain keys used.
Citation Information
Patent Citations
Method and device for data processing based on block chain
CN107426170A
Privacy protection method and device for blockchain
CN110826082A