Mine safety monitoring information encryption method, system and device and storage medium

By building an information encryption ledger on the blockchain and using smart contracts to encrypt the mine security monitoring information, the information security problem in mining production is solved, the secure storage and processing of data is realized, and the security and transparency of the system are enhanced.

CN120068108APending Publication Date: 2025-05-30UNIV OF SCI & TECH OF CHINA

Patent Information

Application Number
CN202510130137.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-05
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The existing technology is difficult to meet the information security needs of combining software and hardware in mining production, especially in the face of external attacks, which makes it difficult to ensure the security of data information.

Method used

By building an information encryption ledger on the blockchain, using smart contracts and encryption algorithms to encrypt and process and decrypt mine security monitoring information, build a mine knowledge graph, and obtain embedded vectors of all entities and relationships in the knowledge graph through an embedding method.

Benefits of technology

It realizes the secure and reliable storage and processing of mine production data, enhances the transparency and traceability of information, improves the coordinated security of software and hardware systems, and effectively avoids the potential risks of external attacks on mine production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120068108A_ABST
    Figure CN120068108A_ABST
Patent Text Reader

Abstract

The invention discloses a mine safety monitoring information encryption method, system and device and a storage medium, which are mutually corresponding schemes, and in the scheme, on one hand, various monitoring data of mine production are recorded in a distributed and decentralized data structure on the basis of a block chain, and the non-tampering and transparency characteristics of the block chain are improved; the security and credibility of the data are ensured, and the mode not only can effectively resist external attacks, but also can prevent internal personnel from performing unauthorized modification; and on the other hand, valuable information is extracted from the large-scale, complex and multi-source mine production data by utilizing a knowledge graph technology in deep learning, and is displayed and analyzed in a knowledge graph form, and the knowledge graph can reveal the relevance and mode among the data in a visual manner, so that the data can be displayed and analyzed more accurately. Therefore, decision makers are helped to understand and utilize data, and the operation efficiency and safety of mines are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mine knowledge data security monitoring, and particularly to a method, system, device and storage medium for encrypting mine safety monitoring information. Background Art

[0002] The mining industry provides essential raw materials for the industrial, energy and construction industries. With the automation and digital transformation of mine exploitation, mine information security has become a key challenge. Nowadays, information technology and digitization have had a profound impact on all industries, and the mining industry is no exception. By using automated equipment, remote operation and data analysis, mining companies have been able to significantly improve production efficiency, reduce costs and enhance workplace safety. However, as these technologies are increasingly widely applied, mine information security issues have become increasingly prominent.

[0003] The field of mine information security covers many aspects, including protecting sensitive data (such as geological information and mineral resource assessment) from unauthorized access, preventing network attacks from causing interruptions in the operation of important equipment, and ensuring reliable transmission and storage of data in harsh environments. In many cases, mine information security not only concerns the economic interests of the company, but may also directly affect the safety of workers' lives and environmental protection. Therefore, with the increasing degree of digitization and automation in the mining industry, the importance of mine information security has been growing.

[0004] The Chinese invention patent "A data center system for centralized management and display of underground monitoring and control data" with the authorization announcement number CN116543531 B relates to the technical field of centralized management and display of underground monitoring and control. The system includes a parameter acquisition and analysis module, an early warning parameter analysis module, a three-dimensional image acquisition and analysis module, an intelligent ventilation module, an early warning module, and a data cloud platform. By monitoring and analyzing from the aspect of the environment and natural disasters caused by the mine's own mining factors, the timeliness of timely handling of mine safety hazards is improved, and the safety monitoring and analysis results of the mine are made more comprehensive and rich. The data of the monitoring and control system is centralized and managed in the data center, serving as an important data support for the digital mine management system, and providing more convenient and efficient measures for emergency command, safety production management, and production scheduling.

[0005] The Chinese utility model patent with the authorization announcement number CN205809593, "A Device for Safety Monitoring and Regulation of Underground Environment Information in Metal Mines", belongs to the technical field of underground safety facilities in mines and is used for safety monitoring and regulation of underground environment information in metal mines. Its technical solution is that multiple switches are connected by optical fibers to form a ring data transmission network. The upper computer and the surface central server are respectively connected to one switch, and each switch is connected to more than one data acquisition device and more than one fan control device. This utility model can collect various underground environmental parameters to the surface computer through various monitoring sensors distributed at various positions underground, conduct safety monitoring of the underground environment; at the same time, it can send instructions to the fan frequency conversion cabinet of the fan control device underground according to the collected monitoring data through the surface computer, control the rotation speed of the underground fan, achieve a good ventilation effect, eliminate potential safety hazards, and ensure a safe underground production environment.

[0006] The Chinese invention patent with the authorization announcement number CN116976435B, "A Method for Constructing a Knowledge Graph Based on Network Security", extracts triple knowledge based on rules, adopts entity extraction and entity relationship extraction methods, extracts entity relationships based on the BERT language model. BERT randomly masks the unlabeled text training corpus using the masked language model, introduces the next sentence prediction training method to train the BERT model, inserts special markers before the entities in each sentence containing two entities to obtain the hidden state vectors of the entities, and uses self-attention and situation analysis to analyze the self-attention weighted scores; realizes efficient storage and acquisition of data through web crawler technology and graph database, improves the accuracy of query results based on the technology of knowledge graph retrieval, introduces situation analysis to evaluate the importance and credibility of entity relationships, and combines the method of situation analysis for network security maintenance.

[0007] Traditional mine information security mainly focuses on constructing a monitoring system on the hardware side, collecting relevant data for safety evaluation and analysis. However, the solutions of the above three patents are pure software-level solutions and are not applicable to the mine production scenario. Taking CN116976435B as an example, this patent only constructs a knowledge graph for network security problems and is difficult to meet the information security requirements of the combination of software and hardware in mine production. These systems may lack the ability to control security risks in the face of external attacks and are difficult to ensure the security of data information. Due to the complexity of the mine production environment, this data security hidden danger may bring major safety risks to production.

[0008] In view of this, the present invention is specifically proposed. Summary of the Invention

[0009] The purpose of the present invention is to provide a method, system, device and storage medium for encrypting mine safety monitoring information, aiming to establish a safe and reliable solution for generating and processing mine information knowledge graphs.

[0010] The object of the present invention is achieved by the following technical solutions:

[0011] A method for encrypting mine safety monitoring information, comprising:

[0012] Obtain the original information of mine safety monitoring, preprocess it into original triples composed of head entities, tail entities and relationships, and perform encryption processing on the original triples to obtain each entity ID and relationship ID;

[0013] Construct an information encryption ledger on the blockchain. Each asset of the information encryption ledger contains relevant information of entities or relationships, namely: entity ID or relationship ID, corresponding embedding vector and hash value; among them, after obtaining the hash value corresponding to the entity ID and relationship ID based on the smart contract on the blockchain, store it in the information encryption ledger; and, after verifying the assets of the information encryption ledger, decrypt to obtain the original triples through a decryption algorithm, construct a mine knowledge graph using the original triples, and obtain the embedding vectors of all entities and relationships in the knowledge graph through an embedding method, and then store them in the information encryption ledger.

[0014] A mine safety monitoring information encryption system for implementing the foregoing method, the system comprising:

[0015] An original information preprocessing and encryption processing unit for obtaining the original information of mine safety monitoring, preprocessing it into original triples composed of head entities, tail entities and relationships, and performing encryption processing on the original triples to obtain each entity ID and relationship ID;

[0016] A processing and knowledge graph construction unit on the blockchain for constructing an information encryption ledger on the blockchain. Each asset of the information encryption ledger contains relevant information of entities or relationships, namely: entity ID or relationship ID, corresponding embedding vector and hash value; among them, after obtaining the hash value corresponding to the entity ID and relationship ID based on the smart contract on the blockchain, store it in the information encryption ledger; and, after verifying the assets of the information encryption ledger, decrypt to obtain the original triples through a decryption algorithm, construct a mine knowledge graph using the original triples, and obtain the embedding vectors of all entities and relationships in the knowledge graph through an embedding method, and then store them in the information encryption ledger.

[0017] A processing device, comprising: one or more processors; a memory for storing one or more programs;

[0018] Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the foregoing method.

[0019] A readable storage medium storing a computer program, which implements the foregoing method when the computer program is executed by a processor.

[0020] As can be seen from the technical solution provided by the present invention above, on the one hand, based on the blockchain, various monitoring data of mine production are recorded in a distributed and decentralized data structure. The immutable and transparent characteristics of the blockchain ensure the security and credibility of the data. This method can not only effectively resist external attacks but also prevent unauthorized modifications by internal personnel. On the other hand, using the knowledge graph technology in deep learning, valuable information is extracted from these large-scale, complex, and multi-source mine production data and presented and analyzed in the form of a knowledge graph. The knowledge graph can intuitively reveal the relevance and patterns between data, thereby helping decision-makers understand and utilize the data and improving the operation efficiency and safety of the mine. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0022] Figure 1 It is a schematic flowchart of a method for encrypting mine safety monitoring information provided by an embodiment of the present invention;

[0023] Figure 2 It is a schematic diagram of the construction process of a mine information security knowledge graph based on the blockchain provided by an embodiment of the present invention;

[0024] Figure 3 It is a schematic diagram of a system for encrypting mine safety monitoring information provided by an embodiment of the present invention;

[0025] Figure 4 It is a schematic diagram of a processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present invention.

[0027] First, the following explanations will be given for the terms that may be used in this article:

[0028] The term "and / or" means that either or both of the two can be realized. For example, X and / or Y means that it includes three cases: the case of "X" or "Y" and the case of "X and Y".

[0029] Descriptions with semantic meanings such as "comprising", "including", "containing", "having" or other similar ones should be interpreted as non-exclusive inclusion. For example, including a technical feature element (such as raw materials, components, ingredients, carriers, dosage forms, materials, dimensions, parts, components, mechanisms, devices, steps, processes, methods, reaction conditions, processing conditions, parameters, algorithms, signals, data, products or articles, etc.) should be interpreted as not only including the explicitly listed technical feature element, but also including other technical feature elements well-known in the art that are not explicitly listed.

[0030] The following provides a detailed description of a method, system, device and storage medium for encrypting mine safety monitoring information provided by the present invention. The content not described in detail in the embodiments of the present invention belongs to the prior art well-known to those skilled in the art. For those conditions not specified in the embodiments of the present invention, they are carried out according to the conventional conditions in the art or the conditions recommended by the manufacturer.

[0031] Embodiment 1

[0032] Considering that the existing technical solutions are difficult to meet the information security requirements of the combination of software and hardware in mine production, for this reason, the embodiments of the present invention provide a method for encrypting mine safety monitoring information, which is deeply integrated with the hardware facilities of the mine (such as sensors, monitoring devices and industrial control systems) to ensure that every link from data acquisition to storage has security guarantees. The decentralized feature of the blockchain effectively prevents data tampering and forgery, and at the same time realizes automated security control through the smart contract mechanism. Storing the knowledge graph on the blockchain not only guarantees the integrity and immutability of the data, but also enhances the traceability and transparency of the information, thereby improving the collaborative security of the software and hardware systems and effectively avoiding the potential risks brought by external attacks to mine production. The method mainly includes the following steps:

[0033] 1. Obtain the original information of mine safety monitoring, preprocess it into an original triple composed of a head entity, a tail entity and a relationship, and perform encryption processing on the original triple to obtain each entity ID and relationship ID.

[0034] In the embodiments of the present invention, the original information of mine safety monitoring obtained includes the mine safety monitoring information collected by each device. Taking the device as the head entity, the mine safety monitoring information collected by the device as the tail entity, and adding the relationship between the two to form an original triple; using the agreed key k, encrypt the head entity, the tail entity and the relationship respectively to obtain the corresponding entity ID and relationship ID.

[0035] 2. Build an information encryption ledger on the blockchain. Each asset in the information encryption ledger contains relevant information about entities or relationships, namely: entity ID or relationship ID, corresponding embedding vector, and hash value. Among them, after obtaining the hash value corresponding to the entity ID and relationship ID based on the smart contract on the blockchain, it is stored in the information encryption ledger. And, after verifying the assets in the information encryption ledger, the original triple is obtained by decrypting through a decryption algorithm. The original triple is used to construct a mine knowledge graph, and the embedding vectors of all entities and relationships in the knowledge graph are obtained through an embedding method and then stored in the information encryption ledger.

[0036] In the embodiment of the present invention, the information encryption ledger includes an entity ledger and a relationship ledger. Among them, each asset in the entity ledger contains an entity ID, corresponding embedding vector, and hash value. And, it also includes a triple set constructed based on the entity ID. And, when an asset is deleted or modified, a corresponding flag bit is added to the asset. Each asset in the relationship ledger contains a relationship ID, corresponding embedding vector, and hash value.

[0037] In the embodiment of the present invention, a smart contract is built on the blockchain. The smart contract includes two channels corresponding to entities and relationships. When adding a new asset to the information encryption ledger, after verification through the corresponding channel, a hash calculation is performed to obtain the corresponding hash value.

[0038] In the embodiment of the present invention, after verifying the assets in the information encryption ledger, the original triple is obtained by decrypting through a decryption algorithm. Using the original triple to construct a mine knowledge graph includes: calculating the hash value using the information in the assets of the information encryption ledger and comparing it with the hash value included in the assets. If the two are equal, the verification is passed. Then, the original triple is obtained by decrypting using the key k used during encryption processing. The same processing is performed on all assets, and the obtained original triples are used to construct a mine knowledge graph.

[0039] In the embodiment of the present invention, the obtaining of the embedding vectors of all entities and relationships in the knowledge graph through the embedding method includes: using the embedding method of knowledge graph representation learning to map the entities and relationships in the knowledge graph to a vector space to obtain the corresponding vector representation, that is, the embedding vector. Among them, the embedding method of knowledge graph representation learning has been pre-trained so that the embedding method of knowledge graph representation learning learns the vector representations of entities and relationships, making the correct triples closer in the vector space and the wrong triples farther away.

[0040] The above solution in the embodiment of the present invention further includes: managing the knowledge graph on the blockchain:

[0041] (1) Create a new triple: If the new triple is a new entity and a new relationship, encrypt it and then create a new asset in the information encryption ledger for storage; if the new triple contains an existing entity or relationship, read the corresponding entity ID or relationship ID, and the embedding vector from the existing asset, recalculate the hash value, create a new asset for storage, and add a flag bit to the corresponding existing asset to indicate that the existing asset has been modified.

[0042] (2) Update the triple content: That is, update the head entity, tail entity, or relationship; if the updated content contains a new entity or relationship, update it in the same way as creating a new triple; if the updated content does not contain a new entity and a new relationship, then: when updating the head entity, the original triple should be saved in the ledger corresponding to the new head entity, so the new triple needs to be moved from its original set to the set of its new head entity. When updating the tail entity, directly update the entity ID, embedding vector, and hash value in the asset. When updating the relationship, directly update the relationship ID, embedding vector, and hash value in the asset. After that, add a flag bit to the updated asset to indicate that the asset has been modified. The principle of the above update is that each triple is stored in a set indexed by its head entity. For example, A stores all triples with A as the head entity. When the head entity of a triple is updated to, its storage location needs to be updated accordingly.

[0043] For ease of understanding, two examples are provided below to illustrate. The new triple created contains an existing entity or relationship. For example, there is an existing entity A, and a new triple (A, E, F) is added, where E is a new relationship and F is a new entity. The updated content does not contain a new entity and a new relationship. For example, entities A and B, and relationship C already exist, but there is no triple (A, C, B). Then, when updating the relationship between entities A and B to the triple (A, C, B), follow the content in (2).

[0044] (3) Delete a triple: Add a flag bit to the corresponding asset in the ledger of the triple's head entity to indicate that the asset has been deleted; if there are other triples with the same head entity in the corresponding asset, update and then add the asset again. Since each entity corresponds to the ledger of the set of all triples with it as the head entity, when deleting a triple, only the entity needs to be processed.

[0045] To more clearly show the technical solution provided by the present invention and the technical effects produced, the method provided by the embodiments of the present invention will be described in detail below with specific embodiments.

[0046] As Figure 1 shown, the overall process of the above method is presented. As Figure 2As shown in the figure, a schematic diagram of the construction process of a blockchain-based mine information security knowledge graph is presented. The following will introduce it from three aspects: data processing under the blockchain, knowledge graph construction on the blockchain, and mine knowledge graph management oriented to the blockchain.

[0047] I. Data processing under the blockchain.

[0048] Step a1: Formatting processing of data. The data collected by various sensors and manually monitored and recorded in the mine are used as the original data of the knowledge graph. The original data records the monitoring values at different times of multiple mine monitoring facilities and their surrounding data, such as power supply status, temperature, humidity, and pressure in the mine shaft, etc. According to the triple form required by the knowledge graph, the original data is preprocessed. The triple form is as follows. Taking each device as the subject, all triples are saved in JSON format relative to the subject. For example: ["monitor", "measures", "temperature"].

[0049] Step a2: Encryption of triples. The Advanced Encryption Standard (AES) is a commonly used symmetric encryption algorithm. It can provide sufficient security and has hardware acceleration support on most modern hardware, with high efficiency. By pre-agreeing on the key k, AES is used to encrypt the entity and relationship names n of the triples to obtain their object IDs, that is, n d . On the chain, the triples are stored through object IDs to hide their actual content. Taking the head entity as the subject, the triples are classified according to the subject. The key-value form of the JSON object is as follows, where each object has two keys, including its subject object name and the encrypted triples. x, y, z are the substitutes for the encrypted IDs. For example:

[0050] {"subject name": "x", "triples": [{"head entity name": "x", "relationship name": "y", "tail entity name": "z"}]}

[0051] At this time, the formed JSON file is a comparison of the original triples and the encrypted IDs. Since a symmetric encryption algorithm is used, other users with the key can restore the encrypted object IDs to obtain the original triple data by using the corresponding decryption algorithm.

[0052] Of course, users can choose other encryption algorithms according to the actual situation or requirements. The present invention does not limit the type of encryption algorithm.

[0053] II. Knowledge graph construction on the blockchain.

[0054] Step b1: Design and construct two information encryption ledgers. One is for entities and the other is for relationships. These ledgers protect the privacy of the knowledge graph by associating the off-chain knowledge graph with its actual entities and relationships, preventing illegal access and using the stored hash values to protect data integrity. Each asset in these ledgers contains important information about the mine data entities and relationships, including identifiers, object IDs, embeddings, and hash values. The ledgers are saved in JSON key-value format. To ensure security and traceability, all ledger content is not allowed to be modified or deleted. Therefore, an additional flag bit f is required to implement the deletion and modification operations required by the knowledge graph. In the ledger, assets without the flag bit are available; while assets with the flag f = 1 are invalidated, which may have been deleted or modified.

[0055] For the entity ledger, in step a2, the encrypted triple results in JSON format have been obtained. To ensure the security of on-chain storage, in the blockchain, only the encrypted IDs are stored instead of the original entity and relationship names. That is, read the key-value pairs of each item in the triple of the input JSON, and form new triples in order. For {"head entity name": "x", "relationship name": "y", "tail entity name": "z"}, construct a new triple as (x, y, z). The entity ledger will store the object ID of the head entity, denoted as x; the embedding vector e x ; combined with the classification information, a new set of triples l = [(x, y 1 , z 1 ), (x, y 2 , z 2 ), ……]; and the hash value for verification.

[0056] For the relationship ledger, there is no need to record the information related to the triples, only the embedding needs to be recorded. The relationship ledger needs to store the object ID of the relationship, denoted as y; the embedding vector e y ; the hash value for verification.

[0057] Step b2: Build a smart contract for the blockchain. A smart contract is an automatically executed contract written in a programmatic way and runs on the blockchain to perform automatic encryption and other operations on the mine knowledge data. All the following steps will use the smart contract to interact with the ledger built on the blockchain. There are many open-source smart contract architectures currently, such as HyperLedger Fabric, OpenZeppelin, Hardhat, etc.

[0058] Taking HyperLedger Fabric as an example, the present invention establishes two channels corresponding to "entities" and "relationships" on HyperLedger Fabric and deploys two sets of blockchain code solutions. When a user interacts with the ledger through a channel, the encryption algorithm can ensure the security of the blockchain. When a new asset needs to be added to the ledger, after verifying the identity through a smart contract, the encrypted JSON file obtained in step a2 is provided to the smart contract. The smart contract will analyze the JSON content, classify the entities and relationships, and convert them into the form required by the ledger. Then, encryption calculations are performed on information such as object IDs, triples, identification bits, and embeddings respectively.

[0059] Select a hash function (e.g., SHA-256), denoted as H(X), which converts the input data (of any length, denoted as X) into an output of a fixed length (256 bits, denoted as h X )), i.e., h X = H(X). The specific calculation process includes a series of bit operations and logical operations, such as bitwise exclusive OR, bitwise AND, bitwise OR, bitwise NOT, cyclic left shift, etc. By using the SHA-256 encryption algorithm, encryption calculations can be performed on each piece of information of the assets in the ledger. The obtained results are concatenated to get the final hash result. By verifying this hash value, it can be determined whether the assets in the ledger have been tampered with. Since the method of calculating by entries and then concatenating is adopted, by reading the position where the hash value is incorrect, it can be judged which entries of the assets have problems, which is convenient for tracing and troubleshooting security issues.

[0060] Step b3: Construction of the mine knowledge graph. By interacting with off-chain storage, verify the identity and request the JSON objects of all records. Then, to construct the knowledge graph, access the encrypted classification ledger (encrypted information ledger) of entity and relationship information to obtain its encrypted triple association structure. Next, use the hash provided by the blockchain ledger to verify the triples and determine whether the triples have been modified. Through the key k, the corresponding relationship between the encrypted triple elements provided by the blockchain ledger and the original entities and relationships can be decrypted, and the encrypted triples are decrypted into the original triples, and then a complete mine knowledge graph is constructed.

[0061] Step b4: Embedding vectors of the knowledge graph. The embedding process of the knowledge graph is a deep learning process and requires a certain amount of computing power. Therefore, this process can be used as the proof of work of the blockchain. The proof-of-work mechanism aims to ensure that nodes in the network compete or prove their participation through a certain algorithm to obtain the right to modify the ledger. The first node to successfully solve the problem will obtain the right to create a new block and modify the ledger. Other nodes will verify the validity of the block and accept the modification after reaching a consensus.

[0062] TransE is an embedding method commonly used in knowledge graph representation learning. The goal of this method is to map entities and relationships in a knowledge graph into a low-dimensional continuous vector space so that relationships in the knowledge graph can be inferred through vector operations. In TransE, each entity and relationship is represented as a vector of a fixed dimension. For a triple (x, y, z) in a mine knowledge graph, it represents that there is a relationship y between entity x and entity z. To learn the vector representation (h, r, t) of (x, y, z), TransE proposes a distance-based loss function, which aims to minimize the distance between correct triples. Specifically, TransE assumes that relationship y can be obtained by adding the vector representation h of entity x to the relationship vector r to get the vector representation t of entity z. This can be expressed by the following formula:

[0063] h + r = t

[0064] However, since the vector representations of entities and relationships are in the same vector space, this equation does not always hold. Therefore, TransE introduces a distance metric function d to measure the distance between the correct triple (h, r, t) and the incorrect triple (h ′ , r, t ′ ). For the L 2 distance, assuming the dimension of the vector is n, the distance metric function d can be defined as:

[0065]

[0066] where (h, r, t) is the vectorized representation of (x, y, z), (h, r, t) are three n-dimensional vectors, i ranges from 1 to n, which are n dimensions. Taking n = 2 as an example, the above formula can be understood as the situation on a two-dimensional plane, and the above distance is the square root of the sum of the squares of the differences in the horizontal and vertical coordinates.

[0067] To minimize the distance between correct triples and incorrect triples, TransE uses a distance-based loss function to learn the vector representations of entities and relationships:

[0068]

[0069] where, represents the set of correct triples in the training set, represents the set of incorrect triples in the training set, [·] + represents the operation of taking the positive value, γ is a predefined hyperparameter called the margin. The set of incorrect triples is obtained by randomly taking It is obtained by replacing the head and tail entities of the triples in []. By minimizing the loss function, TransE can learn the vector representations of entities and relationships, making the correct triples closer and the incorrect triples farther in the vector space. This property of the embedding vectors can provide a reference basis for the effectiveness of ledger modification.

[0070] III. Mine knowledge graph management for blockchain.

[0071] There are three main operations that affect the state of the knowledge graph: creating new triples, updating or deleting existing triples. The present invention implements these operations by querying the off-chain and distributed ledgers to simplify the knowledge graph management process without having to reconstruct the entire knowledge graph, nor modify and decentralize again. After each modification, the hash in the subject entity must be recalculated to account for the new changes.

[0072] Step c1: Create new triples. The new triples can contain existing or new entities and relationships. For completely new entities and relationships, just create new corresponding assets for them in the ledger. For triples containing existing entities, since deleting operations on the ledger are not allowed, it is necessary to first read the corresponding content of the original assets in the ledger, add the new triples to the triple set, calculate the new hash value, then add them to the ledger, and add a flag bit f = 1 to the original assets.

[0073] Step c2: Modify triple content. There are three cases: head entity, tail entity, or relationship update. Before the update, first verify whether there are new entities or relationships. If so, use the same method as in c1. For the first case (head entity update), the new triples are moved from their original set to the set of their new subject. For the second case (tail entity update), directly modify its object using the new object ID retrieved from the entity ledger. In the third case (relationship update), update the triples with the new relationship. After that, re-upload the entry containing the modified triple content to the ledger and add a flag bit f = 1 to the original assets.

[0074] Step c3: Delete triples. In this case, just remove the triples from the off-chain records and add a flag bit f = 1 to the assets with the corresponding ID in the ledger. If there are other triples for the head entity of the corresponding asset, it is necessary to update and re-add the ledger assets.

[0075] The above solutions provided by the embodiments of the present invention mainly have the following advantages:

[0076] (1) The mine safety detection and early warning method based on the knowledge graph and blockchain proposed by the present invention can more accurately reflect the relationships between entities. By optimizing the knowledge graph, the relationships between entities can be more precisely described, thereby improving the quality and usability of the knowledge graph.

[0077] (2) The method proposed by the present invention adopts decentralized storage. Traditional data storage is usually stored on a centralized server, which may lead to the risks of single-point failure and data tampering. The decentralized feature of the blockchain can make the storage of the knowledge graph more secure and difficult to be controlled or tampered with by a single entity. The decentralized server ensures the robustness and reliability of the safety system in mine production, making it safer.

[0078] (3) The method proposed by the present invention has transparency and traceability. The blockchain technology provides the characteristics of immutability and audit trail. Every update of the knowledge graph will be recorded on the blockchain, which means that the data source and change history are transparent and easy to trace. This is crucial for ensuring the accuracy and credibility of information and provides an effective means for the safety guarantee and responsibility implementation of mine production.

[0079] (4) The method proposed by the present invention has strong security. The blockchain protects data from unauthorized access and modification through encryption technology, which can ensure the security of the transmission process of mine knowledge data.

[0080] For the convenience of explaining the solution process, a specific example is given below. This example is the entire construction process of the mine information security knowledge graph based on the blockchain. For the convenience of explanation, example parameters are substituted below, but the specific implementation is not limited to the specific parameters of this example.

[0081] (1) Data processing under the blockchain.

[0082] Step a1: Assume that there is a monitoring device in the mine, named J, which measures the temperature data T in the mine. The data is organized in the form of triples, i.e., (J, measures, T), where J is the head entity, "measures" is the relationship, and T is the tail entity. In addition, there are multiple groups of similar information organized in the form of triples. Considering that there are too many examples to enumerate, they will not be elaborated here.

[0083] Step a2: Denote the key as k. Taking the measured temperature T as an example, after being calculated by the encryption algorithm M, the encrypted entity object ID is T m = M(k, T). The remaining nodes can use the key k to execute the decryption algorithm M', and obtain the original entity T = M'(k, T m ). Denote the encrypted result of (J, measures, T) as (j, r, t), then the generated JSON file is:

[0084] {"J":"j","triples":[{"J":"j","measures":"r","T":"t"}]}

[0085] (2) Method for constructing the knowledge graph on the blockchain.

[0086] Step b1: Design and construct an entity ledger and a relationship ledger. The format of the entity ledger is as follows:

[0087] {"Entity ID":"","Triple list":[],"Embedding vector":[],"Hash":"","Flag":""}

[0088] Among them, the key-value data format of each item is: the entity ID is a string; the triple list is a list, and the elements in it are triples composed of strings; the embedding vector is a multi-dimensional array composed of a large number of floating-point numbers; the hash is a string; the flag is a boolean value.

[0089] The format of the relationship ledger is as follows:

[0090] {"Relationship ID":"","Embedding vector":"","Hash":""}

[0091] Among them, the data format of each key-value item is: the relationship ID and the hash are strings, and the embedding vector is a multi-dimensional array composed of floating-point numbers.

[0092] Step b2: Denote the hash function used for encryption as H(x). When the JSON file obtained in step a2 arrives, the smart contract first queries the ledger. If it is empty, a new one is created. If there are assets with the same entity ID, they are read and merged. At this time, if the ledger is empty, for each subject, an entity ledger asset is generated as follows:

[0093] {"Entity ID":"j","Triple list":[(j,r,t)],"Embedding vector":e j ,"Hash":"h j "}

[0094] Among them, j is the encrypted entity ID read; the triple list is the encrypted head entity, relationship, and tail entity ID read; the embedding vector e j is read or calculated from the corresponding asset in the ledger. Here, a new graph is constructed, so e j will be calculated in the following steps b3 - b4; the hash value h j = P(H(j), H([(j,r,t)], H(e j ))), where P(.) represents concatenation.

[0095] Meanwhile, the newly generated relationship ledger asset is as follows:

[0096] {"Relationship ID":"r","Embedding vector":e r ,"Hash":"h r "}

[0097] where r is the encrypted relationship ID; the embedding vector e r is the same as e j , which is the embedding of the relationship r here; the hash h r = P(H(r), H(e r ))

[0098] Step b3: First, access all the ledger contents in the blockchain. Assume the obtained ledgers are:

[0099] {"Entity ID": "j", "Triple list": [(j, r, t)], "Embedding vector": e j , "Hash": "h j "}

[0100] {"Entity ID": "k", "Triple list": [(k, r, q)], "Embedding vector": e k , "Hash": "h k "}

[0101] {"Relationship ID": "r", "Embedding vector": e r , "Hash": "h r1 "}

[0102] Then, first calculate the hash value h j ′ = P(H(j), H([(j, r, t)], H(e j ))), and compare it with h j1 . If h j = h j ′, it means the ledger content is reliable; otherwise, the flag bit f = 1 should be added. The same verification is performed for h k , h r . After all the ledger contents are verified to be safe and reliable, according to the key k, use the decryption algorithm M′ in step a2 to decrypt the triple to obtain two triples:

[0103] (J, Measurement, T), (K, Measurement, Q)

[0104] where K is another measuring instrument and Q is the index it measures. Based on these triples, the construction of the knowledge graph can be completed.

[0105] Step b4: According to the knowledge graph obtained in b3, use the TransE algorithm to perform embedding calculation on all triples to obtain the embedding vector representations of all entities and relationships:

[0106] J → e J , Measurement → e r , K → e k , T → e T , Q → E Q

[0107] Among them, the 6 embedding vectors should satisfy the following relationship:

[0108] e J +e r =E T

[0109] E K +E r =E Q

[0110] (3) Blockchain-oriented mine knowledge graph management.

[0111] Step c1: Create a new triple. For the knowledge graph in b3, assume that a new triple (T, impact, C) is added, where C represents production. At this time, the triples corresponding to all existing head entities remain unchanged, and T becomes a new head entity. Therefore, it is necessary to call steps b2 - b4 to create a new ledger asset entry for it.

[0112] Step c2: Modify the triple content. Assume that the measurement index T becomes T v , then after reading, first add a flag bit to the old ledger to indicate that it has been modified:

[0113] {"entity ID": "j", "triple list": [(j, r, t)], "embedding vector": e j , "hash": "h j ", f = 1}

[0114] Then add a new ledger containing the modified triple content:

[0115] {"entity ID": "j", "triple list": [(j, r, t1′)], "embedding vector": e j , "hash": "h j "}

[0116] where t1′ is obtained by encrypting the new T′ using the method in step a2, and t1 ′ =M(k, T ′ )

[0117] Step c3: Delete the triple. If (K, measurement, Q) needs to be deleted, only need to add a flag bit to its corresponding ledger:

[0118] {"entity ID": "k", "triple list": [(k, r, q)], "embedding vector": e k , "hash": "h k ", f = 1}

[0119] Since there are no other triples with k as the head entity, there is no need to add new ledger entries again.

[0120] From the description of the above embodiments, those skilled in the art can clearly understand that the above embodiments can be implemented by software or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solutions of the above embodiments can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

[0121] Embodiment 2

[0122] The present invention also provides a mine safety monitoring information encryption system, which is mainly used to implement the method provided in the foregoing embodiments, such as Figure 3 shown, the system mainly includes:

[0123] An original information preprocessing and encryption processing unit, which is used to obtain the original information of mine safety monitoring, preprocess it into original triples composed of a head entity, a tail entity and a relationship, and perform encryption processing on the original triples to obtain each entity ID and relationship ID;

[0124] A processing and knowledge graph construction unit on the blockchain, which is used to construct an information encryption ledger on the blockchain. Each asset of the information encryption ledger contains relevant information of an entity or a relationship, that is: an entity ID or a relationship ID, a corresponding embedding vector and a hash value; among them, after obtaining the hash value corresponding to the entity ID and the relationship ID based on the smart contract on the blockchain, it is stored in the information encryption ledger; and, after verifying the assets of the information encryption ledger, decrypt the original triples through a decryption algorithm, use the original triples to construct a mine knowledge graph, and obtain the embedding vectors of all entities and relationships in the knowledge graph through an embedding method, and then store them in the information encryption ledger.

[0125] In addition, considering that the foregoing method also involves the process of managing the knowledge graph on the blockchain, therefore, a knowledge graph management module on the blockchain is also provided in the system to implement the three management solutions provided in the foregoing embodiments.

[0126] Considering that the main technical details involved in the above system have been introduced in detail in the previous embodiments, they will not be repeated here.

[0127] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules as needed, that is, the internal structure of the system is divided into different functional modules to complete all or part of the functions described above.

[0128] Embodiment III

[0129] The present invention also provides a processing device, such as Figure 4 shown, which mainly includes: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the foregoing embodiments.

[0130] Furthermore, the processing device further includes at least one input device and at least one output device; in the processing device, the processor, the memory, the input device, and the output device are connected through a bus.

[0131] In the embodiments of the present invention, the specific types of the memory, the input device, and the output device are not limited; for example:

[0132] The input device can be a touch screen, an image acquisition device, a physical button, or a mouse, etc.;

[0133] The output device can be a display terminal;

[0134] The memory can be a Random Access Memory (RAM), or a non-volatile memory, such as a disk memory.

[0135] Embodiment IV

[0136] The present invention also provides a readable storage medium storing a computer program, which implements the method provided in the foregoing embodiments when the computer program is executed by a processor.

[0137] In the embodiments of the present invention, the readable storage medium as a computer-readable storage medium can be disposed in the foregoing processing device, for example, as the memory in the processing device. In addition, the readable storage medium can also be various media that can store program codes, such as a USB flash drive, a mobile hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disc.

[0138] As described above, it is only the preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A mine safety monitoring information encryption method, characterized in that: include: The original information of mine safety monitoring is obtained and preprocessed into original triples consisting of head entity, tail entity and relationship. The original triples are encrypted to obtain the ID of each entity and the ID of the relationship. An information encryption ledger is constructed on the blockchain, and each asset in the information encryption ledger contains relevant information of an entity or relationship, namely: an entity ID or a relationship ID, a corresponding embedding vector and a hash value; wherein, the hash value corresponding to the entity ID and the relationship ID is obtained based on the smart contract on the blockchain and then stored in the information encryption ledger; and, after verifying the assets in the information encryption ledger, the original triples are decrypted by a decryption algorithm to obtain the original triples, the original triples are used to construct a mine knowledge graph, and the embedding vectors of all entities and relationships in the knowledge graph are obtained by an embedding method, and then stored in the information encryption ledger.

2. A mine safety monitoring information encryption method according to claim 1, characterized in that: The original information of mine safety monitoring is obtained and preprocessed into an original triple consisting of a head entity, a tail entity and a relationship, and the original triple is encrypted to obtain each entity ID and relationship ID, including: The original information of mine safety monitoring obtained includes the mine safety monitoring information collected by each device, with the device as the head entity and the mine safety monitoring information collected by the device as the tail entity, and the relationship between the two is added to form an original triple; Use the agreed key k to encrypt the head entity, tail entity and relationship respectively to obtain the corresponding entity ID and relationship ID.

3. A mine safety monitoring information encryption method according to claim 1, characterized in that: The information encryption ledger includes an entity ledger and a relationship ledger; Each asset in the entity ledger includes an entity ID, a corresponding embedding vector and a hash value; and also includes a set of triples constructed based on the entity ID; and when an asset is deleted or modified, a corresponding marker is added to the asset; Each asset in the relational ledger contains a relation ID, a corresponding embedding vector, and a hash value.

4. A mine safety monitoring information encryption method according to claim 1 or 3, characterized in that: The method of obtaining the hash value corresponding to the entity ID and the relationship ID based on the smart contract on the blockchain includes: A smart contract is built on the blockchain. The smart contract contains two channels corresponding to entities and relationships. When a new asset is added to the information encryption ledger, it is verified through the corresponding channel and then hashed to obtain the corresponding hash value.

5. A mine safety monitoring information encryption method according to claim 1, characterized in that: After verifying the assets of the information encrypted ledger, the original triples are obtained by decryption algorithm, and the mining knowledge graph is constructed using the original triples, including: The hash value is calculated using the information in the asset of the information encryption ledger and compared with the hash value contained in the asset. If the two are equal, the verification is passed; then, the original triple is decrypted using the key k used in the encryption process; The same process is performed on all assets, and the original triples obtained are used to construct the mine knowledge graph.

6. A mine safety monitoring information encryption method according to claim 1, characterized in that: The embedding method for obtaining the embedding vectors of all entities and relations in the knowledge graph includes: Use the embedding method of knowledge graph representation learning to map the entities and relationships in the knowledge graph to the vector space and obtain the corresponding vector representation, i.e., the embedding vector; Among them, the embedding method for knowledge graph representation learning is pre-trained so that the embedding method for knowledge graph representation learning learns vector representations of entities and relationships, so that in the vector space, correct triplets are closer and incorrect triplets are farther away.

7. A mine safety monitoring information encryption method according to claim 1, characterized in that: The method also includes: managing the knowledge graph on the blockchain, including: Create a new triple: If the new triple is a new entity and a new relationship, encrypt it and create a new asset in the information encryption ledger for storage; if the new triple contains an existing entity or relationship, read the corresponding entity ID or relationship ID and embedding vector from the existing asset, recalculate the hash value, create a new asset for storage, and add a mark bit to the corresponding existing asset to indicate that the existing asset has been modified; Update triple content: that is, update the head entity, tail entity or relationship; if the updated content contains new entities or relationships, then use the method of creating new triples to update; if the updated content does not contain new entities and new relationships, then: when updating the head entity, move the new triple from its original set to the set of its new head entity; when updating the tail entity, directly update the entity ID, embedding vector and hash value in the asset; when updating the relationship, directly update the relationship ID, embedding vector and hash value in the asset, and then add a marker bit to the updated asset to indicate that the asset has been modified; Delete triples: Add a mark bit to the asset corresponding to the triple to indicate that the asset has been deleted; if there are other triples in the header entity of the corresponding asset, update it and add the asset again.

8. A mine safety monitoring information encryption system, characterized in that: For implementing the method described in any one of claims 1 to 7, the system comprises: The original information preprocessing and encryption processing unit is used to obtain the original information of mine safety monitoring, and preprocess it into an original triple consisting of a head entity, a tail entity and a relationship, encrypt the original triple to obtain each entity ID and relationship ID; The processing and knowledge graph construction unit on the blockchain is used to construct an information encryption ledger on the blockchain. Each asset in the information encryption ledger contains relevant information of an entity or a relationship, namely: an entity ID or a relationship ID, a corresponding embedding vector and a hash value; wherein, the hash value corresponding to the entity ID and the relationship ID is obtained based on the smart contract on the blockchain and then stored in the information encryption ledger; and, after verifying the assets of the information encryption ledger, the original triples are decrypted by the decryption algorithm to obtain the original triples, the original triples are used to construct a mine knowledge graph, and the embedding vectors of all entities and relationships in the knowledge graph are obtained by the embedding method, and then stored in the information encryption ledger.

9. A processing device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • A data center system for centralized management and display of downhole monitoring data

    CN116543531B

  • A knowledge graph construction method based on network security

    CN116976435B

  • Metal underground mine environmental information safety monitoring and regulation and control device

    CN205809593U

Cited By

  • Mineral resource reserve intelligent management method and system based on big data

    CN120724481A