A fire inspection method and system for dynamically updating QR codes using hash changes

The method of dynamically updating the QR code through hash changes has solved the problem that static QR codes are prone to cheating, ensuring that fire inspection personnel must go to the site for inspection, and achieving standardized and strict fire inspections.

CN114386012BActive Publication Date: 2025-06-06SHANGHAI OHSA DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111645596.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-06-06
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

Existing QR codes are prone to cheating during fire protection and fire prevention inspections. Static QR codes cannot effectively prevent fire inspection personnel from copying QR codes by taking photos, resulting in the inability to achieve real fire prevention inspections.

Method used

The method of dynamically updating the QR code with hash change is adopted. By reading the current system time, location information, device ID and hash transform value, a sequence of numbers is generated, and the key encryption is performed to generate new QR code information and update the QR code in real time.

Benefits of technology

It effectively prevents fire inspection personnel from cheating by copying the QR code, ensuring that fire inspection personnel must arrive at the site for inspection, and achieves standardized and strict fire inspections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114386012B_ABST
    Figure CN114386012B_ABST
Patent Text Reader

Abstract

The present invention discloses a fire inspection method and system for dynamically updating a QR code by applying a hash change. By dynamically updating the QR code, the problem of a static QR code never changing is effectively solved, and the vulnerability of a static QR code of "fake fire inspection" is solved. That is, the QR code is dynamically updated for each fire inspection, and the QR code is different for each fire inspection. When the fire inspector scans the QR code of the equipment and retrieves the fire inspection task list, a message will be sent to the cloud server to trigger the QR code update instruction. The cloud server will generate a new QR code according to the process described below. The new QR code will be sent to the tag base station or gateway on site through the network. The tag base station or gateway will send the new QR code to the QR code receiving display installed on the device to display the new QR code. In this way, after each fire inspection scans the QR code, the QR code will be updated, so that the QR code on the device is a dynamic update process, avoiding the loopholes such as the QR code being photographed and repeatedly scanned, and "fake fire inspection".
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of fire safety, and in particular relates to a fire inspection method and system for dynamically updating a two-dimensional code by applying hash changes. Background Art

[0002] In the early days, fire inspections were mostly conducted using paper records. Fire inspectors received fire inspection tasks, took fire inspection materials, went to on-site fire inspections, and recorded the status and information of fire inspection equipment. This fire inspection method obviously has the disadvantages of high work costs, difficult supervision, difficult data statistics, and low feedback efficiency. Paper fire inspections require on-site fire inspection records, which are then entered into the computer, which is time-consuming and laborious, easy to remember wrong, and prone to false fire inspections. Supervisors need to conduct on-site spot checks, which has low management efficiency, especially since there are many and scattered fire inspection points, and paper single data is scattered in various departments, which cannot be summarized in a unified manner, and cannot be fed back in time after problems are found.

[0003] With the popularity of smart phones and smart devices, QR codes have been widely used in fire inspections, realizing the information management of one object and one code for fire equipment. First, generate QR codes for all equipment that needs fire inspection and store them in the cloud server on the cloud, and paste the corresponding equipment QR codes on the fire inspection equipment. When performing daily tasks, fire inspectors use smart phone APP software to scan the equipment QR code. By identifying the QR code, the smart phone can easily identify the equipment to be operated and obtain the content items and task list of the equipment to be inspected from the cloud server. Through the task list, fire inspectors can clearly know which inspections need to be carried out, and record the inspection results and the status of the equipment on site in real time. If a fault is found, the problem can be recorded in detail, and photos can be taken and sent to the cloud server; if there is no problem with the equipment, it is marked as passed. In this way, the system background can easily understand the operation and maintenance status of the equipment, fire inspectors can also add fire inspection records, maintenance personnel can receive maintenance task reminders in real time, and managers can view the status of the equipment. The cloud server receives the data uploaded by the fire inspection, and can easily realize the daily management of the equipment through equipment ledger management and maintenance management. In particular, by taking photos on site, recording the real scene, and automatically obtaining the maintenance person information and recording time, it is easy to make the equipment, fire inspectors, fire inspection time, and fire inspection content all correspond one to one and record them accurately.

[0004] The use of QR codes for fire prevention inspections fully utilizes the smartphones that everyone has. By downloading and installing the corresponding APP, there is no need to equip other equipment. This is a big step forward in convenience and informatization.

[0005] However, while QR code fire inspection has a convenient side, it also has the problem of easy cheating. As mentioned earlier, this QR code is static, that is, the QR code of the device is always unchanged. For example, some fire inspectors can easily take pictures of the QR code in advance, and then they do not need to go to the on-site fire inspection, they only need to scan the picture to complete the sign-in. In this way, the purpose of the real fire inspection cannot be achieved.

[0006] In response to the fact that fire inspectors are reluctant to go to the scene for fire inspections, a technical solution based on positioning technology combined with QR code scanning has emerged. This solution determines whether the fire inspectors have arrived at the scene based on the positioning information of the mobile phone. However, an applicable scenario is required here, that is, the scenario where the fire inspection points are relatively scattered. Because fire-fighting equipment is often concentrated in one building, the distance between each fire-fighting equipment that needs to be inspected is relatively close. Mobile phone positioning often cannot distinguish between different fire-fighting equipment that are relatively close. Therefore, the positioning solution is not suitable for fire inspections of fire-fighting equipment in most scenarios. Summary of the invention

[0007] The present invention provides a fire prevention inspection method for dynamically updating a QR code by applying hash changes, so as to solve the technical problems inherent in static QR codes in the prior art, that is, they are easy to be photographed and cheated.

[0008] A fire prevention inspection method for dynamically updating a QR code by applying a hash change comprises the following steps:

[0009] Use the communication terminal to scan the QR code of the fire inspection equipment, retrieve the task list of related points, and report the QR code scanning information to the cloud server;

[0010] The cloud service end triggers the QR code update step: by reading the current system time, location information, the device ID of the fire inspection device and one or more influencing factors including the hash transformation value, combining or transforming to generate a digital sequence, then performing key encryption processing on the digital sequence to generate a new sequence value, and then generating new QR code information according to the encrypted digital sequence; the updated QR code information is sent to the QR code receiving and displaying terminal of the fire inspection point through the network to display the updated QR code information;

[0011] The updated two-dimensional code information is used to complete each fire prevention inspection item on the associated point task list.

[0012] The cloud server triggers the QR code update step further comprising:

[0013] The system triggers the generation of a new QR code, and the system automatically obtains the adapted equipment category code and inspection part code from the system through the equipment ID, and performs an XOR operation on the two codes to obtain the fire inspection code;

[0014] After the fire check code is generated, the current system time is read, a timestamp is obtained from the current time, the 8-bit hexadecimal timestamp is converted into a 32-bit binary code, and the lower 8 bits of the 32-bit binary timestamp are "OR"ed with the previously obtained 8-bit binary code to obtain a new 32-bit binary pseudo-random sequence;

[0015] Perform hash changes on this new pseudo-random sequence to obtain a 32-bit hash value;

[0016] The updated QR code information is used to complete the verification of each fire prevention inspection item and the corresponding item object on the associated point task list. In particular, the terminal can parse the equipment ID, obtain the equipment category code and the inspection part code, and verify it with the inspection part code corresponding to the fire prevention inspection item, and further complete the verification step.

[0017] A fire inspection system for dynamically updating a QR code by applying a hash change, comprising:

[0018] QR code receiving and display terminal: used to display the QR code information of fire inspection equipment;

[0019] Communication terminal: used to retrieve the task list of related points and report the QR code scanning information to the cloud server;

[0020] The cloud service terminal further includes a QR code update device, a communication module and a fire inspection control device,

[0021] The QR code updating device further comprises:

[0022] Trigger module: used to trigger the QR code update;

[0023] A hash transformation value generation module is used to generate a hash transformation value after reading information including the current system time;

[0024] A digital sequence generation module is used to generate a digital sequence by combining or transforming one or more influencing factors including the current system time, location information, device ID and hash transformation value;

[0025] Encryption module: used to encrypt digital sequences;

[0026] QR code generation module: used to generate new QR code information according to the encrypted digital sequence;

[0027] Cloud communication module: used to establish communication with the communication terminal and the QR code receiving and displaying terminal through the network;

[0028] The fire inspection control device is used to complete each fire inspection item on the associated point task list using the updated QR code information.

[0029] The communication terminal further comprises:

[0030] Scanning module: used to read the scanned QR code information;

[0031] Decoding module: used to decode the two-dimensional code information;

[0032] Verification module: used to recalculate the authentication code with the pre-stored or currently obtained key, and compare it with the message authentication code sent by the cloud server. If the two are the same, the verification is successful;

[0033] Terminal communication module: used to return the successfully verified QR code scanning information to the cloud service end.

[0034] A method for dynamically updating a QR code based on a hash change for fire prevention inspection, comprising:

[0035] The cloud service end receives the QR code information of the scanning fire inspection equipment reported by the communication terminal;

[0036] The cloud server triggers a QR code update step;

[0037] The cloud server generates a hash transformation value by reading the current system time;

[0038] The cloud service end combines or transforms one or more influencing factors including the location information, the device ID of the fire inspection device and the hash transformation value to generate a digital sequence;

[0039] Then, the digital sequence is encrypted with a key to generate a new sequence value;

[0040] Generate new QR code information according to the encrypted digital sequence;

[0041] The updated two-dimensional code information is sent to the two-dimensional code receiving and displaying terminal at the fire prevention inspection point through the network to display the updated two-dimensional code information.

[0042] The hash transformation value further includes: the cloud server actively reads the current time, and obtains the current time information in the format of year, month, day, hour, minute, and second. The system uses the MD5 algorithm to hash this time information into a random 32-bit string.

[0043] The key point of the present invention is a method for dynamically updating a QR code based on a hash change. After the fire inspector scans the QR code on the QR code display with a mobile phone APP, after reading the task list of the associated point, the QR code update process is automatically triggered while the fire inspection operation is performed. The system automatically reads the current time and performs a hash change on the current time value, ensuring that the QR code is different each time it is generated and is dynamically updated. At the same time, the system uses the device ID and the hash value to perform encryption operations to obtain a new digital sequence and generate a new QR code. This new QR code is sent to the QR code receiving and displaying terminal at the device end, and the whole process enables the QR code to be dynamically updated. The method for dynamically updating the QR code is applied in the field of fire inspection, which can fundamentally solve the inherent problems of static QR codes that are easy to take pictures and easy to cheat. Since the QR code is dynamically updated, the fire inspector cannot copy the QR code. Only by strictly arriving at the scene for fire inspection can the purpose of standardized fire inspection and strict fire inspection be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments.

[0045] Figure 1 It is a principle flow chart of a fire inspection method for dynamically updating a QR code by applying a hash change;

[0046] Figure 2 A flowchart of an example of a fire inspection method for dynamically updating a QR code using a hash change;

[0047] Figure 3 is an example diagram of the generation process of a pseudo-random sequence;

[0048] Figure 4 This is another example flow chart of a fire inspection method that dynamically updates a QR code by applying hash changes. DETAILED DESCRIPTION

[0049] The following is a further detailed description of a device operation status determination method proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description and claims.

[0050] There is also a solution that analyzes the shooting time. When taking a photo, each mobile phone will automatically record the shooting time, and the fire inspection APP cannot read photos through the mobile phone album. Therefore, the system can analyze the uploaded on-site pictures to get the shooting time of the photo. This method can also determine whether the fire inspector took the photo on the spot, that is, through the on-site pictures taken, to prevent the fire inspector from cheating. However, the fire inspector can modify the mobile phone time to modify the time of taking the picture, or use other related APPs to modify the picture shooting time. In any case, in theory, the fire inspector can still cheat by modifying the shooting time.

[0051] At present, there is also a solution for fire inspection using dynamic QR codes. In this solution, the QR codes set at the points that need to be inspected are updated regularly. According to the set time period, the QR codes are changed regularly, so that the QR codes scanned each time are different. In this way, fire inspectors cannot "cheat" by taking photos of the QR codes. However, this dynamic QR code is automatically updated regularly according to the pre-set time period. The cost of the background regular update communication interaction is high, and the storage processing cost is high. That is, this method, because the QR code is automatically updated at a set time period, in fact, when there is no need for fire inspection, the QR code will also be updated. That is, during the period when the QR code is not needed, it is also updated regularly, which consumes a lot of power and has a high implementation cost.

[0052] Embodiment 1

[0053] See also Figure 1 , which is a flow chart of a fire inspection method for dynamically updating a QR code using a hash change. It includes the following steps:

[0054] S110: Use the communication terminal to scan the QR code of the fire inspection equipment, retrieve the task list of related points, and report the QR code scanning information to the cloud server.

[0055] The communication terminal reads the QR code data and can directly report it to the cloud server, which will authenticate the QR code information. It can also read the QR code data, decode and authenticate it by itself, and only return the authenticated QR code information to the cloud server.

[0056] If authentication is performed on a communication terminal, "and reporting the QR code scanning information to the cloud server" may further include:

[0057] The communication terminal reads the scanned QR code information;

[0058] Decoding the QR code information;

[0059] Recalculate the authentication code with the pre-stored or currently obtained key, and compare it with the message authentication code sent by the cloud server. If the two are the same, the authentication is successful;

[0060] The successfully verified QR code scanning information is returned to the cloud service end.

[0061] Generally speaking, a fire inspection APP is provided on a communication terminal (such as a mobile phone). By entering the fire inspection APP of this mobile phone, the corresponding rights of this mobile phone and the corresponding personnel ID information of the inspector can be obtained. After entering the APP, the task list of the person can be obtained. For example, the alarm device on a certain floor of a certain building needs to be inspected within a certain time point. When the inspector walks to the alarm device, the QR code information of the device is scanned, the QR code information is decoded, and the authentication code is calculated using the obtained key. The authentication code can be returned to the cloud server together with the identification and time point corresponding to the local fire inspection APP, and the cloud server authenticates whether it passes. Considering the calculation of the cloud server, it can also be authenticated directly on the local side. After entering the fire inspection APP, the cloud server obtains the message that the fire inspection APP has been entered, and sends the key and message authentication code corresponding to the first device QR code that needs to be checked in the task list to the communication terminal. After the communication terminal successfully authenticates the QR code, it sends the authentication information corresponding to the QR code of the subsequent devices that need to be checked in sequence. The above is only an authentication method and process, and is not intended to be limited to this solution.

[0062] S120: The cloud server triggers and performs the QR code update step.

[0063] After the cloud server receives the message that the communication terminal returns the successful QR code authentication, it triggers the step of starting the corresponding device QR code update. Of course, when the communication terminal returns the QR code information, the cloud server can also directly perform QR code authentication and then trigger the QR code information update. A relatively simple way is: in the list of related point tasks in the fire inspection APP, QR code authentication is required. Set a QR code scanning step, and the scanned QR code is directly transmitted to the cloud server. After the cloud server directly authenticates it, the QR code information update process is triggered for the successfully authenticated QR code.

[0064] The update process can further be: by reading the current system time, location information, one or more influencing factors including the device ID and hash transformation value of the fire inspection equipment, combining or transforming them to generate a digital sequence, then performing key encryption processing on the digital sequence to generate a new sequence value, and then generating new QR code information based on the encrypted digital sequence; the updated QR code information is sent to the QR code receiving and display terminal at the fire inspection point via the network to display the updated QR code information.

[0065] The hash value further includes:

[0066] The original data stream is composed of information including the current time point of the system or the time point of receiving the QR code scanning information and the equipment ID information of the fire inspection equipment, and the character format of the original data stream is converted. The data stream conversion format is specified as a character vector or a string scalar, and then the MD5 algorithm is used to hash a random 32-bit string composed of four 32-bit groups. After cascading these four 32-bit groups, a 128-bit hash value will be generated, which is the hash transformation value.

[0067] The hash transformation value can also be implemented in other ways, for example, it further includes: the cloud server actively reads the current time, and obtains the current time information in the format of year, month, day, hour, minute, and second. The system uses the MD5 algorithm to hash this time information into a random 32-bit string.

[0068] MD5 can use time, time plus location, or time plus device ID to convert character formats, and then use the MD5 algorithm to hash a random 32-bit string. It should also be noted that the hash algorithm can use MD5 or other algorithms. MD5 is Message-Digest Algorithm 5, which is used to ensure the integrity and consistency of information transmission. It is one of the hash algorithms widely used by computers. MD5 is generally implemented in mainstream programming languages. The MD5 algorithm has the following characteristics: 1. Compressibility: For data of any length, the length of the calculated MD5 value is fixed. 2. Easy to calculate: It is easy to calculate the MD5 value from the original data. 3. Anti-modification: Any change to the original data, even if only one byte is modified, will result in a very different MD5 value. 4. Strong anti-collision: Given the original data and its MD5 value, it is very difficult to find data with the same MD5 value (i.e., forged data). SHA-256 is also a secure hash algorithm. There are 2 to the power of 256 combinations of SHA-256. The original data is divided into N modules and iterated N times. Combined with its own unidirectionality, it cannot be cracked within a limited time.

[0069] The hash transformation value can be directly combined with one or more influencing factors such as the address and device ID to form a digital sequence, or various algorithms can be used to transform the digital sequence. The digital sequence is encrypted with a key to generate a new sequence value, and then a new QR code information is generated based on the encrypted digital sequence. In addition, the digital sequence can directly generate the QR code information, or it can be encrypted to generate a new sequence and then generate the QR code information.

[0070] The digital sequence generated after combination or transformation further includes:

[0071] The device ID and the hash value directly form a digital sequence, or

[0072] First, the device ID and hash transformation value of the fire inspection equipment are directly combined into a digital sequence, and then the digital sequence is used to generate a 1*13 letter array and a 1*19 pure digital array respectively using a regular matching algorithm, and the 1*13 letter array is reassembled into a string, and a new function is defined to use num2str to convert it into a digital format sequence, and the generated new digital format sequence is combined with the 1*19 digital sequence to generate a 32-bit random digital sequence.

[0073] S130: Use the updated QR code information to complete each fire prevention inspection item on the associated point task list.

[0074] “The updated QR code information is sent to the QR code receiving and displaying terminal at the fire prevention inspection point via the network” further includes:

[0075] The newly generated QR code on the cloud server is transmitted to the tag base station / gateway through the network. The tag base station / gateway sends the updated QR code to the QR code receiving and display terminal through the local area network inside the building.

[0076] Each QR code receiving and displaying terminal has a unique address. The tag base station / gateway sends the new QR code to the corresponding QR code receiving and displaying terminal on the fire-fighting equipment through addressing, so as to update the QR code and display the new QR code.

[0077] “Using the updated QR code information to complete each fire prevention inspection item on the associated point task list” further includes:

[0078] Obtain the content items and task list to be checked for the device from the cloud server;

[0079] Through the task list, the fire inspection personnel are informed of which inspections need to be carried out, and the inspection results and the status of the on-site equipment are recorded in real time together with the QR code information on the associated points and reported to the cloud service end;

[0080] If a fault is found, save and record the problem, take photos, and send the image and text information to the cloud server; if there is no problem with the device, it will be marked as passed.

[0081] Embodiment 2

[0082] The method for dynamically updating a two-dimensional code for fire inspection based on hash changes of the present invention is implemented as follows: Figure 2 As shown in FIG. 1 , it mainly consists of three parts: a smartphone, a cloud service, and a QR code receiving and displaying device. These devices are interconnected through the network.

[0083] Each fire protection facility that needs fire inspection is equipped with a QR code receiving and display device to display the unique QR code information of the equipment, so as to realize the information management of one object and one code for fire protection equipment. The QR codes of all equipment that need fire inspection are stored in the cloud server on the cloud. When performing daily tasks, fire inspectors use smartphone APP software to scan the QR code of the equipment. By identifying the QR code, the smartphone can easily identify the equipment to be operated and obtain the content items and task list of the equipment to be inspected from the cloud server. Through the task list, fire inspectors can clearly know which inspections need to be carried out, and record the inspection results and the status of the equipment on site in real time. If a fault is found, the problem can be recorded in detail, and photos can be taken and sent to the cloud server; if there is no problem with the equipment, it will be marked as passed. In this way, the system background can easily understand the operation and maintenance status of the equipment, fire inspectors can add fire inspection records; maintenance personnel can receive maintenance task reminders in real time; managers can view the status of the equipment. The cloud server receives the data uploaded by the fire inspection, and can easily realize the daily management of the equipment through equipment ledger management, maintenance management, etc. In particular, by taking photos on site, recording the real scene, and automatically obtaining the maintenance person information and recording time, it is easy to make the equipment, fire inspectors, fire inspection time, and fire inspection content all correspond one to one and record them accurately.

[0084] When the smartphone APP scans the QR code of the equipment to be inspected for fire prevention, it goes through the QR code reading and decoding processes, and completes the key verification and decryption processes at the same time, and retrieves the task list of related points. At the same time, the mobile phone reports the successful scanning of the QR code to the cloud server, triggering the QR code update process.

[0085] After receiving the triggering information of the QR code update, the cloud service end will actively read the current time, and obtain the current time information in the format of year, month, day, hour, minute, and second. The system will perform a hash change on this time information, and can select different hash change algorithms according to the complexity of the QR code, such as SHA1. This embodiment selects MD5 as the hash change method, and obtains a hash value of a fixed length through the hash change. The system will form a digital sequence with the device ID and hash value of the current device, and perform key encryption on this digital sequence. The encryption uses a symmetric encryption algorithm, and this embodiment selects DES as the encryption algorithm. After generating a new digital sequence, generate an updated new QR code according to this encrypted new sequence.

[0086] Since the time read by the system changes at any time, the hash value obtained by hashing the time information is a changing value, which cannot be the same before and after. This ensures that the QR code obtained by using this hash value is dynamically changing and cannot be the same before and after. At the same time, through the hash change, the generated QR code cannot be imitated, and others cannot know the information before the hash change.

[0087] The device ID is the unique code of the fire-fighting equipment. The digital sequence composed of the device ID and the hash value obtained by the hash change is then encrypted with the key to generate a new sequence. The device ID can be encrypted together to protect it, so that the QR code generated by the device has encryption measures. Others cannot crack the entire QR code generation process, cannot know the rules of QR code generation, and cannot copy the entire QR code, thus ensuring the uniqueness and confidentiality of the QR code.

[0088] The newly generated QR code on the cloud server is transmitted to the tag base station / gateway through the network. The tag base station / gateway can send the updated QR code to the QR code receiving and display terminal through the local area network inside the building.

[0089] Each QR code receiving and displaying terminal has a unique address. The tag base station / gateway sends the new QR code to the corresponding QR code receiving and displaying terminal on the fire-fighting equipment through addressing. After receiving the QR code, the QR code receiving and displaying terminal will update the QR code and display the new QR code.

[0090] Through such a process, the fire inspectors use the mobile phone APP to scan the QR code, read the task list of the related points, and perform the fire inspection. The system automatically reports that the QR code is read correctly, triggering the cloud server to start the QR code update. By reading the system time, hash changes, device ID and hash value together, a digital sequence is generated, and the digital sequence is encrypted with a key to generate a new sequence value. Then, a new QR code is generated based on the encrypted digital sequence. The new QR code is sent to the QR code receiving and display terminal at the fire inspection point through the network, and the updated QR code is displayed. The system realizes the update of dynamic QR code.

[0091] Embodiment 3

[0092] The following is an example to illustrate this.

[0093] 1. How to generate the fire inspection code:

[0094]

[0095] Facility category code: Each fire protection facility is coded with an 8-bit binary code according to its category, such as fire extinguisher code 11000001, smoke sensor code 11000010, fire hydrant code 11000011, fire pump 11001010, etc. These codes are set in advance when the system is set up according to the category of the facility and stored in the cloud system.

[0096] Inspection location code: According to the type of the location for key fire inspection, each type has an 8-bit binary code, such as the fire channel code 01100010, kitchen 01100011, pump room 01100001, etc. Different codes represent different types of key fire inspection locations. The fire inspection locations are classified and coded in advance. When the system is initially created, the codes of the fire inspection locations are preset and stored in the cloud system.

[0097] During the initial system setup, each equipment ID is associated with a specific facility category code and inspection location code in the system.

[0098] Fire inspection code: The fire inspection code is generated by performing an XOR operation on the facility category code and the inspection location code. The generation formula is as follows:

[0099] Fire inspection code = facility category code ⊕ inspection location code

[0100] The specific description is as shown above. Once the system receives the information and triggers the generation of a new QR code, the cloud system will automatically query the system through the device ID to obtain the bound device category code and inspection part code. The system will perform an XOR operation on these two codes. The principle is shown in the formula above. After the XOR operation, the result is the fire inspection code.

[0101] After the fire check code is generated, it is still an 8-bit binary code.

[0102] 2. Pseudo-random sequence generation method

[0103] The system reads the current system time (year, month, day, hour, minute, second), obtains the timestamp from the current time, converts the 8-bit hexadecimal timestamp into a 32-bit binary, and performs an "OR" operation on the lower 8 bits of the 32-bit binary timestamp and the previously obtained 8-bit binary code to obtain a new 32-bit binary pseudo-random sequence. The pseudo-random sequence generation process is as follows: Figure 3 as shown.

[0104] The system performs a hash change on this new pseudo-random sequence to obtain a 32-bit hash value.

[0105] The location of the generation of fire check codes and pseudo-random sequences in the entire system is as follows: Figure 4 As shown. That is:

[0106] Each equipment ID is associated with a specific facility category code and inspection location code in the system. The fire inspection code is generated by performing an XOR operation on the facility category code and the inspection location code.

[0107] After the cloud server receives the message that the communication terminal returns the successful QR code authentication, it triggers the step of starting the corresponding device QR code update. Of course, when the communication terminal returns the QR code information, the cloud server can also directly perform QR code authentication and then trigger the QR code information update. A relatively simple way is: in the list of related point tasks in the fire inspection APP, QR code authentication is required. Set a QR code scanning step, and the scanned QR code is directly transmitted to the cloud server. After the cloud server directly authenticates it, the QR code information update process is triggered for the successfully authenticated QR code.

[0108] The update process can be further as follows: trigger the generation of a new QR code, and the cloud system will automatically query the system through the device ID to obtain the bound device category code and inspection part code. The system performs an XOR operation on these two codes, and the result is a fire inspection code. After the fire inspection code is generated, the fire inspection code is still an 8-bit binary code. The system reads the current system time (year, month, day, hour, minute, second), obtains the timestamp from the current time, and converts the 8-bit hexadecimal timestamp into a 32-bit binary. The lower 8 bits of the 32-bit binary timestamp are "OR"ed with the previously obtained 8-bit binary code to obtain a new 32-bit binary pseudo-random sequence. Perform a hash change on this new pseudo-random sequence to obtain a 32-bit hash value. Use the updated QR code information to complete each fire inspection item on the associated point task list.

[0109] Each terminal decodes the QR code to parse out the device ID, facility category code and inspection part code, etc., which can not only complete the authentication, but more importantly, parse out the device ID from the current QR code information, and further parse out the facility category code and inspection part code, and cross-check with the facility category code and inspection part code related to the content items to be inspected and the task list in the APP, so as to improve security and process accuracy.

[0110] Embodiment 4

[0111] A fire inspection system for dynamically updating a QR code by applying a hash change, comprising:

[0112] QR code receiving and display terminal: used to display the QR code information of fire inspection equipment;

[0113] Communication terminal: used to retrieve the task list of related points and report the QR code scanning information to the cloud server;

[0114] The cloud service end further includes a QR code update device, a cloud communication module and a fire inspection control device.

[0115] The QR code updating device further comprises:

[0116] Trigger module: used to trigger the QR code update;

[0117] A hash transformation value generation module is used to generate a hash transformation value after reading information including the current system time;

[0118] A digital sequence generation module is used to generate a digital sequence by combining or transforming one or more influencing factors including the current system time, location information, device ID and hash transformation value;

[0119] Encryption module: used to encrypt digital sequences;

[0120] QR code generation module: used to generate new QR code information according to the encrypted digital sequence;

[0121] Cloud communication module: used to establish communication with the communication terminal and the QR code receiving and displaying terminal through the network;

[0122] The fire inspection control device is used to complete each fire inspection item on the associated point task list using the updated QR code information.

[0123] The communication terminal further comprises:

[0124] Scanning module: used to read the scanned QR code information;

[0125] Decoding module: used to decode the two-dimensional code information;

[0126] Verification module: used to recalculate the authentication code with the pre-stored or currently obtained key, and compare it with the message authentication code sent by the cloud server. If the two are the same, the verification is successful;

[0127] Terminal communication module: used to return the successfully verified QR code scanning information to the cloud service end.

[0128] Embodiment 5

[0129] A method for dynamically updating a QR code based on a hash change for fire prevention inspection, comprising:

[0130] The cloud service end receives the QR code information of the scanning fire inspection equipment reported by the communication terminal;

[0131] The cloud server triggers a QR code update step;

[0132] The cloud server generates a hash transformation value by reading the current system time;

[0133] The cloud service end combines or transforms one or more influencing factors including the location information, the device ID of the fire inspection device and the hash transformation value to generate a digital sequence;

[0134] Then, new QR code information is generated for the digital sequence;

[0135] The updated two-dimensional code information is sent to the two-dimensional code receiving and displaying terminal at the fire prevention inspection point through the network to display the updated two-dimensional code information.

[0136] The cloud service end can independently develop a dynamically updated QR code module based on hash changes, and the present invention also requires protection of the module and the simple processing process. In addition, the hash transformation value further includes: the cloud service end actively reads the current time, and the time obtains the current time information in the format of year, month, day, hour, minute, and second. The system uses the MD5 algorithm to hash a random 32-bit string of characters for this time information, and generates a new sequence value after the key encryption processing of the digital sequence, and then generates the QR code information according to the encrypted digital sequence.

[0137] The method for dynamically updating a two-dimensional code for fire inspection based on hash changes described in the present invention effectively avoids the inherent problems of static two-dimensional codes by means of dynamic two-dimensional codes. A two-dimensional code receiving and displaying device is installed on each device to be inspected for fire prevention. Each time a fire inspector scans a two-dimensional code for fire inspection, it will report to the cloud server to trigger the generation of a new two-dimensional code. When a new two-dimensional code is generated, the system will automatically read the current time, generate a new digital sequence through hash changes and device ID, and the new digital sequence will be encrypted by an encryption algorithm to generate an encrypted digital sequence. A new two-dimensional code is generated using the encrypted digital sequence, and the new two-dimensional code is sent to a tag base station or gateway through the network. The tag base station or gateway then sends the new two-dimensional code to the two-dimensional code receiving and displaying device installed on the fire inspection device through a local area network. By dynamically updating the two-dimensional code, that is, the two-dimensional code scanned for each fire inspection is different, it is impossible for the fire inspector to cheat in advance by photographing the two-dimensional code, and it is necessary to go to the site to scan the two-dimensional code to complete the fire inspection task.

[0138] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit and essential features of the present invention. Therefore, the embodiments should be regarded as exemplary and non-restrictive in all respects, and the scope of the present invention is limited by the appended claims rather than the above description.

Claims

1. A fire prevention inspection method that dynamically updates the QR code using hash changes, It is characterized in that The following steps are involved: Use the communication terminal to scan the QR code of the fire inspection equipment, retrieve the task list of the associated fire inspection equipment, and report the QR code scanning information to the cloud server; The cloud service end triggers the QR code receiving and displaying terminal of the fire inspection device to update the QR code, and the specific steps are as follows: a digital sequence is generated by reading the current cloud service end time, location information, the device ID of the fire inspection device and the hash transformation value combination or transformation, and then the digital sequence is encrypted with a key to generate a new sequence value, and then a new QR code information is generated according to the encrypted digital sequence; the QR code information is sent to the QR code receiving and displaying terminal of the fire inspection device through the network to display the QR code information; Using the QR code information to complete each fire inspection item on the task list associated with the fire inspection equipment; Obtaining the hash transformation value further includes: composing an original data stream with information including the current cloud service time or the time point of receiving the QR code scanning information and the device ID of the fire inspection device, and converting the original data stream into a character format, specifying the character format as a character vector or a string scalar, and then obtaining a random 32-bit character string through the MD5 algorithm, wherein the character string consists of four 32-bit groups, and cascading these four 32-bit groups will generate a hash transformation value of a 128-bit hash value.

2. The method according to claim 1, It is characterized in that The hash transformation value further includes: the current cloud server time is obtained in the format of year, month, day, hour, minute, and second to obtain current time information, and the current time information is obtained as a random 32-bit string through the MD5 algorithm.

3. The method according to claim 1, It is characterized in that The digital sequence generated after combination or transformation further includes: The device ID and the hash value directly form a digital sequence, or First, the device ID and hash transformation value of the fire inspection equipment are directly combined into a digital sequence, and then the digital sequence is used to generate a 1*13 letter array and a 1*19 pure digital array respectively using a regular matching algorithm, and the 1*13 letter array is reassembled into a string, and a new function is defined to use num2str to convert it into a digital format sequence, and the digital format sequence is combined with the 1*19 pure digital array to generate a 32-bit random digital sequence.

4. The method according to claim 1, It is characterized in that The cloud server triggers the QR code update step further comprising: Automatically query the cloud service end through the device ID to obtain the adapted device category code and inspection part code, perform an XOR operation on the device category code and the inspection part code to obtain a fire prevention inspection code; Read the current cloud server time, obtain a timestamp from the current cloud server time, convert the timestamp format from 8-bit hexadecimal to 32-bit binary, perform an OR operation on the lower 8 bits of the 32-bit binary of the timestamp and the fire check code to obtain a new 32-bit binary pseudo-random sequence result; Calculate the 32-bit hash transformation value based on the result of the pseudo-random sequence; The QR code information is used to complete the verification of each fire inspection item and the corresponding item object on the associated fire inspection equipment task list.

5. The method according to claim 1, It is characterized in that The step of sending the two-dimensional code information to the two-dimensional code receiving and displaying terminal of the fire inspection equipment through the network further includes: The two-dimensional code information is transmitted to the tag base station / gateway through the network, and the tag base station / gateway sends the two-dimensional code information to the two-dimensional code receiving and displaying terminal through the local area network inside the building; Each two-dimensional code receiving and displaying terminal has a unique address. The tag base station / gateway sends the two-dimensional code information to the corresponding two-dimensional code receiving and displaying terminal on the fire inspection equipment through addressing, so as to update and display the two-dimensional code information.

6. The method according to claim 1, It is characterized in that "And report the QR code scanning information to the cloud server" further includes: The communication terminal reads the scanned QR code information; Decoding the QR code information; Recalculate the authentication code with the pre-stored or currently obtained key, and compare it with the message authentication code sent by the cloud server. If the two are the same, the authentication is successful; The successfully verified QR code scanning information is returned to the cloud service end.

7. A fire inspection system that dynamically updates QR codes using hash changes. It is characterized in that include: QR code receiving and display terminal: used to display the QR code information of fire inspection equipment; Communication terminal: used to retrieve the task list of associated fire inspection equipment and report the QR code scanning information to the cloud server; The cloud service end further includes a QR code update device, a cloud communication module and a fire inspection control device. The QR code updating device further comprises: Trigger module: used to trigger the QR code update; A hash transformation value generation module, used to read information including the current cloud server time and the device ID of the fire inspection device and then generate a hash transformation value; A digital sequence generation module, which is used to generate a digital sequence by combining or transforming the current cloud server time, location information, device ID and hash transformation value; Encryption module: used to encrypt digital sequences; QR code generation module: used to generate new QR code information according to the encrypted digital sequence; Cloud communication module: used to establish communication with the communication terminal and the QR code receiving and displaying terminal through the network; The fire inspection control device is used to complete each fire inspection item on the associated fire inspection equipment task list using the updated two-dimensional code information.

8. The system of claim 7, It is characterized in that The communication terminal further comprises: Scanning module: used to read the scanned QR code information; Decoding module: used to decode the two-dimensional code information; Verification module: used to recalculate the authentication code with the pre-stored or currently obtained key, and compare it with the message authentication code sent by the cloud server. If the two are the same, the verification is successful; Terminal communication module: used to return the successfully verified QR code scanning information to the cloud service end.

9. A method for dynamically updating QR codes based on hash changes for fire inspection, It is characterized in that include: The communication terminal scans the QR code information of the fire inspection equipment, retrieves the associated task list, and reports the QR code scanning information to the cloud server; The cloud service end receives the QR code information of the fire inspection device scanned and reported by the communication terminal; The cloud server triggers a QR code update step; The cloud server generates a hash transformation value by reading information including the current cloud server time and the device ID of the fire inspection device; The cloud server combines or transforms the current time and location information of the cloud server, the device ID of the fire inspection device and the hash transformation value to generate a digital sequence; Then, new QR code information is generated for the digital sequence; The new QR code information is sent to the QR code receiving and displaying terminal of the fire inspection device through the network to display the new QR code information, and the new QR code information is used to obtain the content items and task list of the fire inspection device from the cloud service end.

10. The method according to claim 9, It is characterized in that The hash transformation value further includes: the cloud server actively reads the current cloud server time, the current cloud server time obtains the current time information in the format of year, month, day, hour, minute, and second, and the cloud server obtains a random 32-bit string by using the MD5 algorithm for the current time information; A new sequence value is generated only after the digital sequence is encrypted with a key, and then the new two-dimensional code information is generated according to the encrypted digital sequence.

Citation Information

Patent Citations

  • Dynamic ID based RFID safety authentication method with search secret key

    CN103338110A

  • Network device peer-to-peer trusted authentication method and system

    CN108650223A