Abnormal information acquisition and uploading method based on two-dimensional code

By generating encrypted QR codes on the terminal device and uploading them to the server, and recording the hash value of exception information in combination with blockchain technology, the problem of difficulty in effectively recording, transmitting and analyzing exception information in the existing technology is solved, and the safe and efficient collection and upload of exception information is achieved.

CN119865301AInactive Publication Date: 2025-04-22WEISSMAN (SHENZHEN) NEW ENERGY TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510037479.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-04-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to effectively record, transmit and analyze abnormal information generated by equipment failures, environmental abnormalities, etc., resulting in low management efficiency and data security problems. In addition, traditional information transmission methods have security risks.

Method used

The abnormal information collection and upload method based on the QR code is adopted. By generating an encrypted QR code on the terminal device, the mobile terminal device scans and uploads the abnormal information to the server. The server verifies the information and records its hash value to the blockchain database to ensure the security and traceability of the information.

Benefits of technology

It realizes the safe and efficient collection and upload of abnormal information, ensures the security and traceability of data, and improves the efficiency of abnormal information processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865301A_ABST
    Figure CN119865301A_ABST
Patent Text Reader

Abstract

The invention relates to the field of two-dimensional code information acquisition, and discloses a two-dimensional code-based abnormal information acquisition and uploading method, which comprises the following steps of: generating a two-dimensional code containing abnormal information on terminal equipment; scanning the two-dimensional code by using a mobile terminal device; the server verifies the received abnormal information; generating a unique identifier of the abnormal information from the hash value of the abnormal information, and recording the unique identifier in a distributed account book database based on the block chain technology; when the abnormal information is stored in a database, an authorized user is allowed to verify the integrity and authenticity of the abnormal information by accessing a block chain system; the block chain system is composed of a plurality of nodes, and each node is responsible for storing and verifying transaction data; a permission management mechanism is deployed on the server, and access to the block chain and the Internet of Things data and permission modification are limited, so that the security of information is protected; according to the invention, the security and traceability of the data are ensured, and the abnormal information processing efficiency is 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 two-dimensional code information collection, and in particular to a method for collecting and uploading abnormal information based on two-dimensional codes. Background Art

[0002] With the development of Internet of Things (IoT) technology, more and more devices and sensors are widely used in practical scenarios, such as smart homes, smart transportation, industrial Internet of Things, etc. These devices can monitor environmental changes in real time and collect large amounts of data.

[0003] However, abnormal information generated due to various reasons (such as equipment failure, environmental abnormalities, etc.) is difficult to be effectively recorded, transmitted and analyzed, resulting in inefficient management and data security issues; in addition, traditional information transmission methods have security risks and information may be tampered with or leaked. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a method for collecting and uploading abnormal information based on a QR code, which solves the problems mentioned in the above background.

[0005] The present invention provides the following technical solution: The present invention discloses a method for collecting and uploading abnormal information based on a QR code, comprising the following steps:

[0006] Generate a QR code containing abnormal information on the terminal device, and encrypt the QR code using an encryption algorithm to prevent information leakage;

[0007] Scan the QR code using a mobile terminal device, and upload the abnormal information to the server through a secure network interface;

[0008] The server verifies the received abnormal information;

[0009] The hash value of the abnormal information is used to generate a unique identifier for the abnormal information, and the unique identifier is recorded in a distributed ledger database based on blockchain technology;

[0010] While storing the exception information in the database, authorized users are allowed to verify the integrity and authenticity of the exception information by accessing the blockchain system;

[0011] The blockchain system is composed of multiple nodes, each of which is responsible for storing and verifying transaction data, and all nodes reach a consensus through a consensus mechanism;

[0012] Deploy a permission management mechanism on the server to limit access and modification permissions to blockchain and IoT data to protect the security of information.

[0013] As a preferred solution, the exception information includes but is not limited to: timestamp, location coordinates, exception type, exception description, image or video data, sensor data, status information of related equipment, environmental parameter data, and context information of event generation.

[0014] As a preferred solution, the encryption algorithm adopts the following formula

[0015]

[0016] Wherein, Q(t) represents the generated QR code content, E(A(t), N) represents the encryption of the abnormal information A(t) using a symmetric encryption algorithm (such as AES), N is the encryption key, H(C(t)) represents the content processed by the hash function C(t) to ensure data integrity, and ⊕ represents a bitwise XOR operation.

[0017] As a preferred solution, the security level of information upload can be evaluated by the following formula:

[0018]

[0019] Among them, S upload Indicates the security level of the uploaded information, E HTTPS It represents the security level provided by the HTTPS encryption method, U represents the user identity information, T represents the timestamp, R(t) represents the function of the uploaded data packet size, reflecting the impact of the data volume on security, M(ω) represents the function of the network delay during the upload process, reflecting the impact of the network environment on security, α and β are weight coefficients, which are used to evaluate the relative impact of data size and network delay on security.

[0020] As a preferred solution, the verification level of abnormal information can be calculated by the following formula:

[0021]

[0022] Among them, V(A) represents the verification level of abnormal information, P i It is represented as the standard value of information field i, W i It is expressed as the weight of field i, reflecting the importance of the field, C(∑I i ) represents the result of the abnormal information integrity check, based on field I i The checksum of

[0023] As a preferred solution, the unique identifier is generated using the following formula:

[0024] H(E)=HMAC(K,E||T||C)

[0025] Among them, H(E) represents the hash value of the abnormal information as its unique identifier, HMAC represents the keyed hash message authentication code algorithm to ensure the unforgeability of the hash value, K represents the key used for the HMAC algorithm, E represents the abnormal information, and C represents the context information.

[0026] As a preferred solution, the user's access rights can be calculated using the following formula

[0027]

[0028] Where A(u) represents the access permission level for u, R j It is represented as the permission level of role j, D(u, R j ) is used for u for the role R j The degree of access rights, m represents the total number of roles.

[0029] As a preferred solution, the blockchain system supports multiple types of blockchain architectures, including public chains, private chains or alliance chains.

[0030] As a preferred solution, the server automatically classifies and processes the uploaded abnormal information according to preset rules, and issues real-time alarms for abnormal situations based on set thresholds.

[0031] As a preferred solution, the blockchain system has a data backup and recovery mechanism.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] The present invention provides a safe and efficient method for collecting and uploading abnormal information, which utilizes QR code and blockchain technology to ensure the security and traceability of data and improve the efficiency of abnormal information processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 The present invention is a flowchart of the abnormal information collection and uploading method. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 are within the scope of protection of the present invention.

[0036] See also Figure 1 A method for collecting and uploading abnormal information based on a QR code in this embodiment includes the following steps:

[0037] Generate a QR code containing abnormal information on the terminal device, and encrypt the QR code using an encryption algorithm to prevent information leakage;

[0038] Scan the QR code with a mobile terminal device and upload the abnormal information to the server through a secure network interface, including but not limited to encrypting it using the HTTPS protocol to ensure data transmission security. The TLS / SSL layer of the HTTPS protocol provides confidentiality and integrity protection for data transmission. To further enhance security, end-to-end encryption technology may be considered;

[0039] The server verifies the received abnormal information, including format verification, integrity check and correctness verification of the information contained in the QR code, to ensure the accuracy and validity of the abnormal information;

[0040] The hash value of the abnormal information is used to generate a unique identifier for the abnormal information, and the unique identifier is recorded in a distributed ledger database based on blockchain technology. The database uses a programmable smart contract to ensure the non-tamperability and traceability of the information;

[0041] While storing the abnormal information in the database, authorized users are allowed to verify the integrity and authenticity of the abnormal information by accessing the blockchain system, so as to trace the source and modification history of the information and provide a transparent data access mechanism;

[0042] The blockchain system consists of multiple nodes, each of which is responsible for storing and verifying transaction data, and all nodes reach a consensus through a consensus mechanism, which can be proof of work, proof of stake, etc., to ensure the security and consistency of data storage;

[0043] Deploy a permission management mechanism on the server to limit access and modification permissions to blockchain and IoT data to protect the security of information, including a multi-level user authentication mechanism to ensure that only authorized users can access sensitive data.

[0044] In summary, the present invention uses an encryption algorithm to encrypt abnormal information and transmits it through a secure network interface, which greatly reduces the risk of data leakage and tampering. At the same time, blockchain technology is used to ensure that data cannot be tampered with and is traceable, thereby strengthening the security protection of information.

[0045] By using the distributed ledger technology of blockchain, authorized users can verify the integrity and authenticity of abnormal information by accessing the blockchain system. The generated hash value is used as a unique identifier to ensure the validity of the information and avoid information forgery and tampering.

[0046] The collection of abnormal information includes not only basic information such as timestamps and location coordinates, but also covers various types of information such as images, video data, sensor data, etc., providing rich data support and laying the foundation for subsequent data analysis and decision-making;

[0047] By evaluating the security level of uploaded information, the security risks in the information transmission process can be analyzed in a quantitative manner, providing a basis for further security measures;

[0048] The verification level of abnormal information is set according to the standard value and importance of the information field, thereby ensuring that key data is processed first and improving the efficiency and accuracy of abnormal information review;

[0049] By calculating the user's access rights, it is possible to flexibly control the user's access rights to blockchain and IoT data based on their roles and their permission levels, ensuring secure access to sensitive information.

[0050] Furthermore, the abnormal information includes but is not limited to: timestamp, location coordinates (latitude and longitude information, which can be obtained through GPS or other positioning technologies), abnormality type (predefined abnormality type classification, such as: equipment failure, environmental abnormality, security incident, etc.), abnormality description (text or voice description), image or video data (which can be obtained through a camera), sensor data (such as: temperature, humidity, pressure, vibration, etc.), status information of related equipment (such as equipment unique identification code, model, manufacturer information and software version), environmental parameter data (such as temperature, humidity, air pressure, etc.), context information generated by the event (such as the location of the abnormal event, the course of the event, witness statements, etc.), all collected abnormal information is encrypted by a specific algorithm to generate a QR code containing the encrypted information, and the abnormal information is collected through a terminal device (such as: a smart phone equipped with a sensor, an industrial controller, etc.).

[0051] Furthermore, the encryption algorithm adopts the following formula

[0052]

[0053] Wherein, Q(t) represents the generated QR code content, E(A(t), N) represents the encryption of the abnormal information A(t) using a symmetric encryption algorithm (such as AES), N is the encryption key, H(C(t)) represents the content processed by the hash function C(t) to ensure data integrity, ⊕ represents the bitwise XOR operation, and key management needs to adopt a secure and reliable mechanism, such as key storage and management based on hardware security module (HSM), and C(t) can contain summary information of the abnormal information;

[0054] Assume that A(t) is abnormal information, and after encryption with AES, the ciphertext E(A(t), N) is obtained. This means that even if an attacker obtains the QR code, he cannot directly read the abnormal information in it. Symmetric encryption algorithms such as AES are currently widely used encryption methods, which are fast and efficient. Symmetric encryption uses the same key for encryption and decryption, effectively improving key security. The security management of the key N preferably uses a management solution based on a hardware security module (HSM). HSM can provide strong physical and logical security to ensure that the key is not leaked or tampered with.

[0055] If C(t) is the hash value of abnormal information (temperature is too high), any slight change (temperature is too low) will make the calculated hash value H(C(t)) completely different, thereby detecting the change of information. C(t) can be designed to include a summary of the abnormal information or other relevant metadata. This part is intended to provide data integrity. If the data is tampered with during transmission or storage, the hash value will not match;

[0056] Bitwise XOR operation is a common technique in encryption. If the two inputs are the same, the result is 0; if they are different, the result is 1. This operation can increase the complexity of the output, making it difficult for the cracker to reconstruct the original data without knowing any of the inputs. By performing XOR operation on the encrypted information E(A(t), N) and the hash value H(C(t)), not only the generated QR code Q(t) has information security, but also the effectiveness of preventing replay attacks is improved. Even if the attacker knows some information of C(t), he cannot easily obtain the original abnormal information A(t);

[0057] In summary, through symmetric encryption, the abnormal information in the QR code has high confidentiality, which can effectively prevent information leakage. The use of hash functions ensures the integrity of information during transmission and storage. Once the data is tampered with, the recipient can identify it in time. Combined with QR code technology, it is easy to trace the source of the event, and through decryption and hash verification, the abnormal information can be verified.

[0058] Furthermore, the security level of information upload can be evaluated by the following formula:

[0059]

[0060] Among them, S upload It is expressed as the security level of the uploaded information, which is a comprehensive indicator that reflects the security protection capability of the information during transmission. HTTPSdenoted as the security level provided by the HTTPS encryption method, U as the user identity information, T as the timestamp, R(t) as the function of the uploaded data packet size, reflecting the impact of the data volume on security, M(ω) as the function of the network delay during the upload process, reflecting the impact of the network environment on security, and α and β are weight coefficients used to evaluate the relative impact of data size and network delay on security;

[0061] α indicates the importance of data packet size in information security. Larger data packets may encounter more security risks during processing. When the data packet is large, attackers have a greater chance of intercepting and modifying the data. Therefore, we need to be more vigilant and enhance the encryption strength of the data. When designing the system, the value of α can be determined according to the actual application scenario. For example, when large-capacity data transmission involves sensitive information, a higher α value can be set to improve the security level.

[0062] β represents the impact of network latency on the security of information upload, reflecting the quality of the network environment. High latency may mean network interruption or data packet loss, increasing the risk of retransmission and data hijacking. Therefore, it is necessary to adjust the security policy according to the network status. In the case of poor network conditions, the weight of β should be appropriately increased to ensure that the security of information can be maintained in a high-latency environment.

[0063] In actual applications, by monitoring the network status and data transmission volume, the security risks of the current environment are continuously evaluated, and α and β are adjusted as needed. The weight coefficient can also be dynamically adjusted according to the user's usage habits and the sensitivity of the uploaded data, or in different network environments (such as 4G, 5G or Wi-Fi), the optimal weight value can be determined according to the speed and delay, thereby improving the flexibility and security of the entire system.

[0064] Furthermore, the verification level of the abnormal information can be calculated by the following formula

[0065]

[0066] Among them, V(A) represents the verification level of abnormal information, P i It is represented as the standard value of information field i, W i It is expressed as the weight of field i, reflecting the importance of the field, C(∑I i ) represents the result of the abnormal information integrity check, based on field I i Checksum (such as CRC check);

[0067] After receiving the data, the integrity check can be performed by following the steps below:

[0068] Data format validation: Ensure that the received data format complies with predefined specifications, for example, detecting JSON format, XML tags, etc.

[0069] Data type validation: Check the data type of each field to ensure that its type is consistent with the standard. For example, longitude and latitude should be floating point numbers, and timestamps should be in a valid time format (such as UTC).

[0070] Validation: For the latitude and longitude fields, check their range (latitude should be between -90 and 90 degrees, longitude should be between -180 and 180 degrees), and verify the timestamp to ensure its logical consistency (for example, the start time is less than the end time, the timestamp does not exceed the current time, etc.);

[0071] Implementation of integrity check: CRC or other hash algorithms (such as SHA-256) are used to calculate the information field and generate a hash value. For example, after reading the data, the calculated hash value is compared with the hash value contained in the transmission to ensure that the data has not been tampered with.

[0072] When V(A),is high, the server can further process the received abnormal information and trigger,corresponding monitoring alarms and response measures.,Conversely, when V(A),is low, it may mean that there is a problem with the,information. The system can choose to refuse to process this information and,mark it as a potential threat or data error.

[0073] Furthermore, the unique identifier is generated using the following formula:

[0074] H(E)=HMAC(K,E||T||C)

[0075] Among them, H(E) represents the hash value of the abnormal information as its unique identifier, HMAC represents the keyed hash message authentication code algorithm to ensure the unforgeability of the hash value, K represents the key used for the HMAC algorithm, E represents the abnormal information, and C represents the context information;

[0076] Choose a suitable blockchain platform to distribute the stored data to ensure data persistence and security. The data structure stored on the blockchain needs to be carefully designed to optimize storage efficiency and query efficiency. The following solutions can be considered:

[0077] Store core data on the chain and store detailed information off the chain: Store summary information of abnormal information (such as time, location, type, etc.) on the blockchain, and store detailed information off the chain, and associate them through hash values. This can reduce storage pressure on the chain and improve efficiency;

[0078] Merkle tree structure: Use the Merkle tree structure to batch store and verify multiple abnormal information to improve efficiency.

[0079] Furthermore, the user's access rights can be calculated by the following formula:

[0080]

[0081] Where A(u) represents the access permission level for u, R j It is represented as the permission level of role j, D(u, R j ) is used for u for the role R j The degree of access rights (for example, 0 means no permission, 1 means read permission, and 2 means read and write permission), and m means the total number of roles;

[0082] When designing a permission management mechanism, you need to first identify and define all roles in the system and their corresponding permission levels. When refining permissions, you need to perform hierarchical management based on the type of operation (such as read, write, delete, etc.). Permission management also needs to be combined with a multi-level user identity authentication mechanism to ensure that the accessing users are real. Implementing an audit and monitoring mechanism is a key link in ensuring the effectiveness of permission management. You can regularly check and record user access logs to ensure that all accesses comply with preset permission policies. In particular, detailed records should be kept for traceability and auditing of access to critical data.

[0083] Furthermore, the system supports various types of blockchain architectures, including public chains, private chains or consortium chains, to adapt to different application requirements and business models, and provide flexibility and scalability. Supporting multiple blockchain architectures is not a simple technical integration, but requires the system architecture to have sufficient flexibility and scalability to adapt to the needs of different architectures, and to have cross-platform access capabilities to ensure that the system can run stably in multiple operating systems, including but not limited to Windows, Linux, iOS and Android;

[0084] Public chains are suitable for application scenarios that require complete decentralization, transparency and openness, such as digital currency and supply chain tracking. Private chains are suitable for scenarios with high requirements for data confidentiality, such as internal enterprise data management and authority control. Consortium chains are suitable for scenarios that need to balance data security and partial decentralization, such as cooperation between financial institutions and supply chain management.

[0085] Furthermore, the server automatically classifies and processes the uploaded abnormal information according to preset rules, and issues real-time alarms for abnormal situations based on set thresholds to ensure timely response to potential security threats. The classification of abnormal events can be achieved through a Bayesian classifier, and the classification result can be calculated by the following formula:

[0086]

[0087] Where C(x) represents the classification of abnormal event x, P(k|x) represents the posterior probability of class label k given event x, P(x|k) represents the likelihood of observing x under class k, and P(k) represents the prior probability of class k;

[0088] In system design and implementation, the components of automated processing and real-time alerting can be constructed as follows:

[0089] Data collection module: used to collect abnormal information such as system logs and network traffic in real time;

[0090] Anomaly classification module: contains the Bayesian classifier, which is responsible for classifying and processing the collected data;

[0091] Alarm processing module: evaluates the classification results according to the rules, detects whether an alarm is triggered, and notifies through appropriate channels;

[0092] Decision-making and response module: Execute specific response measures based on classification and alarm information to improve the security of the system.

[0093] Furthermore, the system has a data backup and recovery mechanism to protect data information stored in the server and blockchain system, ensure data security and reliability, and ensure that normal business can be restored when data is lost or damaged. It also supports off-site backup to enhance system security and disaster recovery capabilities.

[0094] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for collecting and uploading abnormal information based on a QR code, characterized in that: The following steps are involved: Generate a QR code containing abnormal information on the terminal device, and encrypt the QR code using an encryption algorithm to prevent information leakage; Scan the QR code using a mobile terminal device, and upload the abnormal information to the server through a secure network interface; The server verifies the received abnormal information; The hash value of the abnormal information is used to generate a unique identifier for the abnormal information, and the unique identifier is recorded in a distributed ledger database based on blockchain technology; While storing the exception information in the database, authorized users are allowed to verify the integrity and authenticity of the exception information by accessing the blockchain system; The blockchain system is composed of multiple nodes, each of which is responsible for storing and verifying transaction data, and all nodes reach a consensus through a consensus mechanism; Deploy a permission management mechanism on the server to limit access and modification permissions to blockchain and IoT data to protect the security of information.

2. The method for collecting and uploading abnormal information based on a QR code according to claim 1, characterized in that: The exception information includes, but is not limited to: timestamp, location coordinates, exception type, exception description, image or video data, sensor data, status information of related equipment, environmental parameter data, and context information of event generation.

3. The method for collecting and uploading abnormal information based on a QR code according to claim 1, characterized in that: The encryption algorithm uses the following formula Wherein, Q(t) represents the generated QR code content, E(A(t), N) represents the encryption of the abnormal information A(t) using a symmetric encryption algorithm (such as AES), N is the encryption key, H(C(t)) represents the content processed by the hash function C(t) to ensure data integrity, and ⊕ represents a bitwise XOR operation.

4. The method for collecting and uploading abnormal information based on a QR code according to claim 3 is characterized in that: The security level of information uploaded can be evaluated by the following formula Among them, S upload Indicates the security level of the uploaded information, E HTTPS It represents the security level provided by the HTTPS encryption method, U represents the user identity information, T represents the timestamp, R(t) represents the function of the uploaded data packet size, reflecting the impact of the data volume on security, M(ω) represents the function of the network delay during the upload process, reflecting the impact of the network environment on security, α and β are weight coefficients, which are used to evaluate the relative impact of data size and network delay on security.

5. The method for collecting and uploading abnormal information based on a QR code according to claim 4 is characterized in that: The verification level of abnormal information can be calculated by the following formula Among them, V(A) represents the verification level of abnormal information, P i It is represented as the standard value of information field i, W i It is expressed as the weight of field i, reflecting the importance of the field, C(∑I i ) represents the result of the abnormal information integrity check, based on field I i The checksum of 6. The method for collecting and uploading abnormal information based on a QR code according to claim 5, characterized in that: The unique identifier is generated using the following formula H(E)=HMAC(K,E||T||C) Among them, H(E) represents the hash value of the abnormal information as its unique identifier, HMAC represents the keyed hash message authentication code algorithm to ensure the unforgeability of the hash value, K represents the key used for the HMAC algorithm, E represents the abnormal information, and C represents the context information.

7. The method for collecting and uploading abnormal information based on a QR code according to claim 6, characterized in that: The user's access rights can be calculated using the following formula Where A(u) represents the access permission level for u, R j It is represented as the permission level of role j, D(u, R j ) is used for u for the role R j The degree of access rights, m represents the total number of roles.

8. The method for collecting and uploading abnormal information based on a QR code according to claim 1, characterized in that: The blockchain system supports multiple types of blockchain architectures, including public chains, private chains or consortium chains.

9. The method for collecting and uploading abnormal information based on a QR code according to claim 1, characterized in that: The server automatically classifies and processes the uploaded abnormal information according to preset rules, and issues real-time alarms for abnormal situations based on set thresholds.

10. The method for collecting and uploading abnormal information based on a QR code according to claim 1, characterized in that: The blockchain system has a data backup and recovery mechanism.

Citation Information

Cited By

  • Block chain-based two-dimensional code data security detection method and system

    CN120124113A

  • Blockchain-based two-dimensional code data security detection method and system

    CN120124113B

  • Block chain-based after-sales service quality real-time monitoring method and system

    CN120338801A