Data tamper-proofing method applied to coal mine safety monitoring system

By setting up a tamper-proof device between the coal mine security monitoring system and the database, and using a validator and signature mechanism, the problem of difficult implementation of data encryption in the prior art is solved, and efficient data tamper-proof and recovery is achieved, reducing the impact and cost of system performance.

CN119691788APending Publication Date: 2025-03-25TIANDI CHANGZHOU AUTOMATION +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411559361.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the existing coal mine security monitoring system, data encryption affects processing speed, increases storage requirements and I/O operation burden, and access rights control is difficult to truly implement, and it is impossible to effectively prevent illegal tampering and data recovery.

Method used

Set up an anti-tampering device between the coal mine security monitoring system and the database, regularly modify the database password through a validator, and use dynamic password algorithms to generate a key to ensure that only trusted users can access the database, and detect and restore illegal tampering records through the signature mechanism.

Benefits of technology

Effectively prevent illegal users from tampering with database data, can restore the original records after tampering, reduce the impact on system performance, improve query efficiency, and reduce costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691788A_ABST
    Figure CN119691788A_ABST
Patent Text Reader

Abstract

The invention discloses a data tamper-proofing method applied to a coal mine safety monitoring system, a tamper-proofing device is adopted, the tamper-proofing device is arranged between a database and the coal mine safety monitoring system, and the method comprises the following steps: the tamper-proofing device detects an operation request of the coal mine safety monitoring system on the database; obtaining and storing current verification information according to the operation request; verifying the current verification information by using a verifier in the tamper-proof device; if the verification is passed, the coal mine safety monitoring system can operate the database; otherwise, refusing the operation request of the coal mine safety monitoring system; wherein the verifier modifies the password of the database at a set interval time t. According to the method, all illegal tampering can be detected, the recorded content before tampering can be restored, the influence on the performance of the system is small, and the query efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of coal mine safety, and in particular to a data tamper-proofing method applied to a coal mine safety monitoring system. Background Art

[0002] At present, the coal mine safety monitoring system has extremely strict requirements for database security, because the database stores key safety parameters and monitoring data in the coal mine production process, and its security and stability are directly related to the safe production and personnel safety of the coal mine. At present, the database security is mainly ensured by conventional means such as data encryption or access control. Among them, data encryption mainly refers to the encryption of sensitive data to ensure that the data is not stolen, tampered with or leaked during storage and transmission. Access control is mainly based on the user's identity and job responsibilities, setting different levels of access rights. Only users with corresponding permissions can access sensitive data and functions in the database to prevent malicious operations and tampering of system information by illegal personnel.

[0003] The two existing anti-tampering methods have the following shortcomings:

[0004] (1) The encryption algorithm will affect the processing speed of the monitoring system: Using conventional encryption algorithms for monitoring data will cause the system processing speed to slow down, because the encryption algorithm involves complex mathematical operations, such as bit operations, polynomial operations, etc. These operations will consume a lot of CPU resources. Especially when processing large amounts of data, encryption operations may become a system bottleneck, resulting in a significant decrease in processing speed.

[0005] (2) Encrypted storage will cause additional storage requirements for the system: Encryption algorithms usually introduce additional data (such as initialization vector IV, key, padding data, etc.) to ensure data security, and these additional data will increase storage requirements. For example, AES encrypted data usually takes up more storage space than the original data. Some encryption algorithms may cause data expansion, that is, the size of the encrypted data exceeds the original data. This will further increase storage requirements, especially when processing large amounts of data.

[0006] (3) Encryption and decryption will increase the burden of I / O operations: When the encrypted data is stored on disk or transmitted over the network, additional read and write operations are required. This will increase the burden of I / O operations, especially in a high I / O load environment, especially in a coal mine safety monitoring system where a large amount of intensive data is stored and read, which may become a performance bottleneck.

[0007] (4) Access permission control cannot be truly implemented: The on-site environment of coal mines is relatively complex, and database access permissions cannot be truly kept confidential. Permission passwords are often leaked due to on-site maintenance or special user needs.

[0008] (5) Currently, most database encryption and access permissions can only detect data tampering records, but cannot restore data to its previous state.

[0009] The above problems not only increase the risks of coal mining, but may also lead to a large waste of resources and the occurrence of safety accidents. Summary of the invention

[0010] In order to solve the problems existing in the prior art, the present invention provides a data tamper-proof method applied to a coal mine safety monitoring system, which can effectively perform high-performance encryption on key production data. It also provides a mechanism to prevent third-party unauthorized users from accessing the database to tamper with records, and can restore the original records after tampering. At the same time, the anti-tampering device has a low cost and provides technical support for safe production in coal mines.

[0011] The technical solution adopted by the present invention to solve its technical problem is: a data tamper-proof method applied to a coal mine safety monitoring system, adopting an anti-tampering device, wherein the anti-tampering device is arranged between a database and the coal mine safety monitoring system, and the method comprises the following steps: the anti-tampering device detects an operation request of the coal mine safety monitoring system to the database; obtains and stores current verification information according to the operation request; verifies the current verification information using a verifier inside the anti-tampering device; if the verification passes, the coal mine safety monitoring system can operate the database; otherwise, the operation request of the coal mine safety monitoring system is rejected; wherein the verifier modifies the password of the database at a set interval time t.

[0012] Furthermore, the operation request includes: adding operation, updating operation and deleting operation.

[0013] Furthermore, when the coal mine safety monitoring system requests to read the data in the database, the anti-tampering device verifies the relationship between the signature of the previous record, the signature of the next record and the current record; only when the signature content of the current record contains the signature content of the previous record, and the signature content of the current record is included in the signature content of the next record, can the coal mine safety monitoring system read the data in the database.

[0014] Furthermore, the anti-tampering device periodically scans and checks the data records in the database. If it is found that the signature content does not match the record content and the signature content does not exist in the backup database, the record is considered to be an illegally added record and is directly deleted.

[0015] Furthermore, the anti-tampering device periodically scans and checks the data records in the database. If it is found that the signature content does not match the record content, but the signature content exists in the backup database, the record is considered to be an illegally tampered record; the original signature content in the backup database is decrypted, and the previous set of signature content included in the original signature content is deleted. The remaining content is the json serialized string of the current record. After deserializing the string, the original content of the record is obtained and updated back to the database.

[0016] Furthermore, the anti-tampering device periodically scans and checks the data records in the database. If a record is found to be deleted, the signature content of the record in the backup database is compared with the actual signature content. If a new signature line is found in the actual signature content, the record is considered to be illegally deleted; the deleted record is restored by decrypting the original signature content and then updating it back to the database.

[0017] Furthermore, for the new addition operation, the anti-tampering device adds two columns to the original data table, one column is a self-increment column, and the other column is a signature column; the acquisition process of the signature column includes:

[0018] Concatenate the strings of all columns in the data table and serialize them into json to obtain a serialized string S; obtain the signature column content S' of a newly added record in the data table, concatenate the serialized string S and the signature column content S' to obtain a string V; encrypt the string V to obtain a 128-bit array; convert the array to a string T, and insert a status bit in front of the string T to form a string T'.

[0019] Furthermore, the status bit uses different numbers to represent different request operations, 0 represents a new operation, 1 represents a modification operation, and 2 represents a deletion operation.

[0020] Furthermore, the verification process of the authenticator is as follows: the client generates a key K and sends it to the anti-tampering device; after receiving the key K, the anti-tampering device calculates the server's key K'; compares whether the keys K and K' are the same. If they are the same, it indicates that the user is a trusted user and the anti-tampering device can forward the operation request; otherwise, the user is an illegal user and returns directly.

[0021] Furthermore, the process of generating the database password includes: obtaining the current time according to the encryption accuracy, and keeping the server and the client synchronized. The current time is concatenated with the client public key file and encrypted using the MD5 algorithm. The encrypted string is the key K. The key K is converted into a byte

[16] array A, and the array A is divided into two byte[8] arrays B1 and B2. Each bit of the arrays B1 and B2 is XORed to form a new byte[8] array C, and the leftmost bit of each array element of the array C is taken to form a final eight-digit number, which is the current dynamic password.

[0022] The beneficial effect of the present invention is that the present invention adds an anti-tampering device between the coal mine safety monitoring system and the database, isolates the database and the coal mine safety monitoring system, and the interaction between the two must be completed through the anti-tampering device. In order to prevent illegal users from illegally modifying and accessing the database by obtaining the database authorization password, the present invention regularly modifies the database password through a verifier, and the verifier generates the password through a dynamic password algorithm, and regularly modifies the password through a set interval time t, so that even if an illegal user obtains the authorization password, he cannot log in to the database. The present invention can not only detect all illegal tampering, but also restore the recorded content before tampering, which has little impact on the performance of the system and has high query efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0024] Figure 1 It is an architecture diagram of the isolation database of the anti-tampering device and the coal mine safety monitoring system of the present invention.

[0025] Figure 2 It is a flow chart of the anti-tampering method of the present invention.

[0026] Figure 3 It is a verification flow chart of the verifier of the present invention. DETAILED DESCRIPTION

[0027] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0028] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0029] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0030] like Figures 1 to 3 As shown, the data tamper-proof method applied to the coal mine safety monitoring system of the present invention adopts an anti-tamper device, and the anti-tamper device is arranged between the database and the coal mine safety monitoring system. The method comprises the following steps: the anti-tamper device detects the operation request of the coal mine safety monitoring system to the database; obtains and stores the current verification information according to the operation request; verifies the current verification information by using the verifier inside the anti-tamper device; if the verification is passed, the coal mine safety monitoring system can operate the database; otherwise, the operation request of the coal mine safety monitoring system is rejected; wherein the verifier modifies the password of the database at a set interval time t.

[0031] The present invention designs an anti-tampering method in view of the data security requirements and specific environment of the coal mine safety monitoring system. An anti-tampering device is added between the coal mine safety monitoring system and the database to isolate the database and the coal mine safety monitoring system. The interaction between the two must be completed through the anti-tampering device. In order to prevent illegal users from illegally modifying and accessing the database by obtaining the database authorization password, the present invention uses a validator to regularly modify the database password. The validator generates the password through a dynamic password algorithm and regularly modifies the password at a set interval t (for example, 5s). In this way, even if an illegal user obtains the authorization password, he cannot log in to the database (because the password has changed).

[0032] Specifically, the verification process of the authenticator is as follows: the client generates a key K through a dynamic password algorithm and sends it to the anti-tampering device; after receiving the key K, the anti-tampering device calculates the server's key K'; compares whether the keys K and K' are the same. If they are the same, it indicates that the user is a trusted user and the anti-tampering device can forward the operation request; otherwise, the user is an illegal user and returns directly.

[0033] The encryption process of the client public key file is: concatenate the project information and the implementation unit information (project information first, implementation unit information second), and then encrypt them using the DES algorithm. For example, if the project information is "KJ95X Coal Mine Monitoring System" and the implementation unit information is "Shandong Beizao Coal Mine", the concatenation is "KJ95X Coal Mine Monitoring System Shandong Beizao Coal Mine", and the string is encrypted with the DES algorithm to generate the string "QFwMUIaqJ9t8jNb8ALPLcQOriwP / K4mQdbRYRzXvJWpFys mKHtK / yJwo2NBeJG6a". Save the string in the client as a public key file and send it to the trusted client that needs to be deployed.

[0034] The process of generating the database password includes: obtaining the current time according to the encryption accuracy (for example, if the client's accuracy is minutes, the encryption accuracy is minutes), and the server and the client keep the time synchronized. The current time is concatenated with the client's public key file and encrypted using the MD5 algorithm. The encrypted string is the key K. For example, the current time is "202409221503", and after being concatenated with the public key file, it is "202409221503QFwMUIaqJ9t8jNb8ALPLcQOriwP / K4mQdbRYRzXvJWpFysmKHt K / yJwo2NBeJG6a". After being encrypted using the MD5 algorithm, the string "osdWikdTNckbm2zcZ bNmBQ==" is obtained. Convert the key K into a byte

[16] array A, and divide the array A into two byte[8] arrays B1 and B2. Perform XOR operation on each bit of arrays B1 and B2 to form a new byte[8] array C. Take the leftmost bit of each element of array C (for example, "36" takes "3") to form a final eight-digit number, which is the current dynamic password.

[0035] In the coal mine safety monitoring system, the operation requests to the database are mainly add operation, update operation and delete operation. The anti-tampering device has different processing methods for different operation requests.

[0036] For new operations: the anti-tampering device adds two columns to the original data table, one is a self-increment column, and the other is a signature column. The process of obtaining the signature column includes: concatenating the strings of all columns in the data table and serializing them into json to obtain a serialized string S; obtaining the signature column content S' of a newly added record in the data table, concatenating the serialized string S and the signature column content S' to obtain a string V; encrypting the string V to obtain a 128-bit array; converting the array to a string T, and inserting a status bit in front of the string T to form a string T'. The status bit uses different numbers to represent different request operations, 0 represents a new operation, 1 represents a modification operation, and 2 represents a deletion operation. String T' is the signature column content S' required for the next new record. The entire signature column is a new signature column content calculated by merging all the columns of the current row plus the previous signature column content. The signature column is attached to the corresponding position of the record row and backed up in the anti-tampering device. After doing this, modifying the data in any row requires modifying the signature column contents of all records following the row record. If illegal tampering is to go undetected, the workload is enormous, and it is not just as simple as changing a piece of data.

[0037] For update operation: the tamper-proof device changes the status bit of the signature column of the modified record to 1, and adds a new record. The content of the new record is the content of this modification, and the status bit of the signature column of the new record is set to 0. For deletion operation: the tamper-proof device changes the status bit of the signature column of the deleted record to 2.

[0038] When the coal mine safety monitoring system requests to read data from the database, the anti-tampering device verifies the signature of the previous record, the signature of the next record and the relationship with the current record; the coal mine safety monitoring system can read the data from the database only when the signature content of the current record contains the signature content of the previous record and the signature content of the current record is included in the signature content of the next record.

[0039] The anti-tampering device periodically scans and checks the data records in the database. If it is found that the signature content does not match the record content and the signature content does not exist in the backup database, the record is considered to be an illegally added record and is directly deleted.

[0040] The anti-tampering device periodically scans and checks the data records in the database. If it is found that the signature content does not match the record content, but the signature content exists in the backup database, the record is considered to be an illegally tampered record; the original signature content in the backup database is decrypted, and the previous set of signature content contained in the original signature content is deleted. The remaining content is the json serialized string of the current record. After deserializing the string, the original content of the record is obtained and updated back to the database.

[0041] The anti-tampering device periodically scans and checks the data records in the database. If a record is found to be deleted, the signature content of the record in the backup database is compared with the actual signature content. If a new signature line is found in the actual signature content, the record is considered to be illegally deleted. The deleted record can be restored by decrypting the original signature content and then updating it back to the database.

[0042] In summary, the data tamper-proof method applied to the coal mine safety monitoring system of the present invention proposes an innovative tamper-proof method, and the encryption operation of the original record is also very simple, without a tedious encryption process. Other tamper-proof processes are all carried out in the tamper-proof device, and the signature column set by the present invention is an inclusive signature. The next signature content will include all the previous signature column contents, which will significantly increase the difficulty of tampering. Even if tampering is to be done, the tamperer will have to pay a very high price (all signature columns after the tampered record must be changed, otherwise the record cannot be read). The present invention can not only detect all illegal tampering, but also restore the record content before tampering, which has little impact on the performance of the system and high query efficiency.

[0043] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.

Claims

1. A data tamper-proof method applied to a coal mine safety monitoring system, characterized in that: Using an anti-tampering device, the anti-tampering device is set between the database and the coal mine safety monitoring system. The method includes the following steps: The anti-tampering device detects the operation request of the coal mine safety monitoring system to the database; Acquire and store current verification information according to the operation request; The current verification information is verified by using a verifier inside the anti-tampering device; if the verification is successful, the coal mine safety monitoring system can operate the database; otherwise, the operation request of the coal mine safety monitoring system is rejected; The authenticator modifies the password of the database at a set interval t.

2. The data tamper-proof method for coal mine safety monitoring system according to claim 1, characterized in that: The operation request includes: adding operation, updating operation and deleting operation.

3. The data tamper-proof method for coal mine safety monitoring system according to claim 2, characterized in that: When the coal mine safety monitoring system requests to read the data in the database, the anti-tampering device verifies the signature of the previous record, the signature of the next record and the relationship with the current record; the coal mine safety monitoring system can read the data in the database only when the signature content of the current record contains the signature content of the previous record and the signature content of the current record is included in the signature content of the next record.

4. The data tamper-proof method applied to a coal mine safety monitoring system according to claim 2, characterized in that: The anti-tampering device periodically scans and checks the data records in the database. If it is found that the signature content does not match the record content and the signature content does not exist in the backup database, the record is considered to be an illegally added record and is directly deleted.

5. The data tamper-proof method for coal mine safety monitoring system according to claim 2, characterized in that: The anti-tampering device periodically scans and checks the data records in the database. If it is found that the signature content does not match the record content, but the signature content exists in the backup database, the record is considered to be an illegally tampered record; the original signature content in the backup database is decrypted, and the previous set of signature content included in the original signature content is deleted. The remaining content is the json serialized string of the current record. After deserializing the string, the original content of the record is obtained and updated back to the database.

6. The data tamper-proof method for coal mine safety monitoring system according to claim 2, characterized in that: The anti-tampering device periodically scans and checks the data records in the database. If a record is found to be deleted, the signature content of the record in the backup database is compared with the actual signature content. If a new signature line is found in the actual signature content, the record is considered to be illegally deleted. The deleted record can be restored by decrypting the original signature content and then updating it back to the database.

7. The data tamper-proof method applied to a coal mine safety monitoring system according to claim 2, characterized in that: For the new addition operation, the anti-tampering device adds two columns to the original data table, one is a self-increment column, and the other is a signature column; the acquisition process of the signature column includes: Concatenate the strings of all columns in the data table and serialize them into json to obtain a serialized string S; obtain the signature column content S' of a newly added record in the data table, concatenate the serialized string S and the signature column content S' to obtain a string V; encrypt the string V to obtain a 128-bit array; convert the array to a string T, and insert a status bit in front of the string T to form a string T'.

8. The data tamper-proof method for coal mine safety monitoring system according to claim 7, characterized in that: The status bit uses different numbers to represent different request operations, 0 represents a new operation, 1 represents a modification operation, and 2 represents a deletion operation.

9. The data tamper-proof method for coal mine safety monitoring system according to claim 1, characterized in that: The verification process of the authenticator is as follows: the client generates a key K and sends it to the anti-tampering device; after receiving the key K, the anti-tampering device calculates the server's key K'; compares whether the keys K and K' are the same. If they are the same, it indicates that the user is a trusted user and the anti-tampering device can forward the operation request; otherwise, the user is an illegal user and returns directly.

10. The data tamper-proof method applied to a coal mine safety monitoring system according to claim 9, characterized in that: The process of generating the database password includes: obtaining the current time according to the encryption accuracy, and keeping the server and client synchronized. The current time is concatenated with the client public key file and encrypted using the MD5 algorithm. The encrypted string is the key K. The key K is converted into a byte[16] array A, and the array A is divided into two byte[8] arrays B1 and B2. Each bit of the arrays B1 and B2 is XORed to form a new byte[8] array C, and the leftmost bit of each array element of array C is taken to form a final eight-digit number, which is the current dynamic password.