An inspection data collection and verification method and system in a network-restricted environment

By generating offline inspection authorization credentials and acquisition control sequences in network-restricted environments, and establishing alignment relationships with hardware timestamps, the problem of on-site authenticity and reliability of inspection data in network-restricted environments is solved, and effective verification and result reliability of offline inspection data are achieved.

CN123185100APending Publication Date: 2026-11-27JIANGSU JITAO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611353664.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In environments with limited network coverage, existing technologies struggle to effectively verify the authenticity of offline inspection data and the reliability of the inspection process. This poses a risk of reusing historical data or using pre-prepared data as a substitute, impacting the reliability of inspection results.

Method used

By generating offline inspection authorization credentials, random control values, and monotonically increasing counters, a data acquisition control sequence is generated. The correct alignment relationship is established by combining hardware timestamps, and verification is performed through misalignment relationships to ensure the authenticity and consistency of the data collected on site.

Benefits of technology

It improves the verifiability and credibility of inspection data in network-limited environments, enabling offline data collection and independent re-verification after networking without the continuous online participation of cloud servers, thus ensuring the on-site authenticity and process credibility of inspection data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185100A_ABST
    Figure CN123185100A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of inspection data processing, and discloses a method and system for inspection data collection and verification in a network-restricted environment. When the network is abnormal, the inspection terminal generates a collection control sequence according to a random control value, a mandatory inspection item identifier, a previous inspection data digest value and an incremental count value after offline authorization verification, and obtains on-site collection data, lighting response data, inertia response data and a hardware timestamp. The response consistency is verified according to the correct alignment relationship and the misalignment alignment relationship, and an effective inspection data unit and an inspection data digest value are formed. After the network is restored, the cloud server reconstructs the collection control sequence, and verifies the response data, the digest continuity, the mandatory inspection item integrity and the collection requirements. The application solves the problem that the on-site authenticity of offline inspection data is difficult to verify in a network-restricted environment, and improves the verifiability of inspection data and the credibility of the inspection process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of inspection data processing technology, specifically relating to a method and system for inspection data acquisition and verification in a network-restricted environment. Background Technology

[0002] With the application of mobile terminals, cloud servers, and data acquisition devices in on-site inspections, inspectors can use inspection terminals to receive inspection tasks, collect inspection data, and upload the collected results to cloud servers for storage and verification. In underground spaces, remote areas, and other environments with poor communication conditions, inspection terminals may not be able to maintain a continuous network connection with the cloud server. Therefore, it is necessary to support the offline execution of inspection tasks and upload the inspection data generated during the offline period after the network is restored.

[0003] Existing offline inspection methods typically pre-cache inspection tasks, save collected data locally on the inspection terminal, and upload it centrally after network recovery. To ensure data integrity, timestamps, data digests, digital signatures, or integrity checks can also be used to verify the generated inspection data. These methods can determine to some extent whether the data has changed after its creation, but their verification object is mainly the data itself that has already been generated.

[0004] When the inspection terminal is disconnected from the cloud server, the cloud server cannot participate in the on-site inspection process in real time. Relying solely on the data uploaded after network recovery and its integrity information is insufficient to fully confirm whether the uploaded data was indeed generated during the corresponding inspection. When there is reuse of historical data, pre-prepared data replacing on-site data, or anomalies in offline inspection records, even if the uploaded data itself remains intact, the reliability of the inspection results may be affected. Therefore, improving the on-site authenticity of offline inspection data and the credibility of the inspection process in network-constrained environments is a problem that existing technologies need to further address. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for collecting and verifying inspection data in a network-restricted environment, so as to solve the problem that it is difficult to effectively verify the on-site authenticity and the credibility of the inspection process of existing offline inspection data, and improve the verifiability and overall credibility of inspection data in a network-restricted environment.

[0006] To achieve the above objectives, the present invention employs the following technical solution: A method for collecting and verifying inspection data in a network-restricted environment includes the following steps: The cloud server associates the inspection task version, saves random control values, and sends the inspection task version, offline inspection authorization certificate, random control values, and initial inspection data summary values ​​to the inspection terminal. The network anomaly is determined based on the network communication status, and the current increment count value is obtained by reading the monotonically increasing counter; after the offline verification of the authorization certificate and the current increment count value is passed, the offline check mode is entered. A data acquisition control sequence containing lighting control, media acquisition, and terminal movement prompts is generated using random control values, mandatory inspection item identifiers, previous inspection data summary values, and current incrementing count values. This sequence acquires on-site data, lighting response data, inertial response data, and hardware timestamps. The correct alignment relationship between the acquisition control sequence and the two types of response data is established based on the hardware timestamp. Multiple misalignment alignment relationships are formed by cyclic shifting of response feature segments and reordering of non-adjacent segments. The correct alignment consistency of the two types of response data reaches the consistency threshold and the difference between the consistency with the maximum misalignment alignment reaches the difference threshold. When the field acquisition data meets the acquisition requirements of the mandatory inspection items, a valid inspection data unit is formed. It is then combined with the previous inspection data summary value to generate the current inspection data summary value, which is used to generate the acquisition control sequence for the next mandatory inspection item. After the network is restored, upload the offline inspection authorization certificate, valid inspection data unit and on-site collected data, two types of response data and hardware timestamp; the cloud server reconstructs each collection control sequence with random control values, rebuilds the correct alignment relationship and misalignment alignment relationship and re-verifies the two types of response data; when the inspection data summary value is continuous, the mandatory inspection items are complete and the on-site collected data meets the collection requirements, the inspection task is determined to be verified as passed.

[0007] Preferably, the generation and distribution of the inspection task version, offline inspection authorization certificate, random control value, and initial inspection data digest value include: The cloud server generates an inspection task version based on the inspection task, determines the inspection terminal identifier, the set of mandatory inspection items, the collection requirements for each mandatory inspection item, and the allowed offline time period, and generates a summary of the mandatory inspection item set based on the set of mandatory inspection items and the collection requirements. The cloud server will determine the current value of the monotonically increasing counter read and sent by the terminal as the initial increment count value, determine the allowed counting range based on the initial increment count value, generate a random control value and a random control value digest, and generate an initial inspection data digest value based on the inspection task version, inspection terminal identifier, random control value digest, and initial increment count value. The cloud server generates an offline inspection authorization certificate that binds the inspection task version, inspection terminal identifier, mandatory inspection item set summary, allowed offline time period, allowed counting interval, random control value summary, and initial inspection data summary value. The offline inspection authorization certificate is digitally signed, and the inspection task version, digitally signed offline inspection authorization certificate, mandatory inspection item set, corresponding collection requirements, random control value, and initial inspection data summary value are sent to the inspection terminal. The mandatory inspection item set, corresponding collection requirements, random control value, initial increment count value, and initial inspection data summary value are then associated and saved with the inspection task version.

[0008] Preferably, the determination of network anomalies and the offline verification of authorization credentials and the current incrementing counter value include: According to the detection cycle, obtain the network access status and cloud server response status; when there is a check data upload task, determine the data upload path status based on the actual upload result; when there is no check data upload task, determine the data upload path status by sending probe data through the check data upload path. When no response is received from the cloud server, the cloud server response status is determined to be unreachable; when data transmission is not completed due to abnormal transmission connection, the data upload path status is determined to be unreachable; when a processing response has been received from the cloud server but the upload fails due to the server processing result, the data upload path status is determined to be reachable. A network anomaly is determined when the data upload path status is unreachable for a consecutive preset number of detection cycles, or when the network access status is abnormal for a consecutive preset number of detection cycles and the cloud server response status is unreachable. When the network is abnormal, check the digital signature and binding information of the offline inspection authorization certificate of the terminal, verify that the current time is within the allowed offline period, recalculate the random control value digest and compare it with the random control value digest in the offline inspection authorization certificate, compare the local initial inspection data digest value with the initial inspection data digest value in the offline inspection authorization certificate, and read the current increment value of the monotonically increasing counter. The current increment count value is within the allowed count range and is not lower than the initial increment count value. When the offline verification of the authorization certificate passes, the offline verification mode is entered.

[0009] Preferably, the generation of the acquisition control sequence and the corresponding data acquisition include: When starting the current mandatory inspection item, the monotonically increasing counter is incremented to obtain the current increment count value; if the current increment count value is within the allowed count range recorded in the offline inspection authorization certificate, the current mandatory inspection item is executed; otherwise, the offline inspection is stopped. The first mandatory inspection item uses the initial inspection data digest value as the previous inspection data digest value, and subsequent mandatory inspection items use the current inspection data digest value corresponding to the previous valid inspection data unit as the previous inspection data digest value. Input the random control value, the current mandatory inspection item identifier, the previous inspection data summary value, and the current incrementing count value into the preset pseudo-random sequence generation program to generate lighting control segments, media acquisition segments, terminal movement prompt segments, and inertial sensor sampling segments arranged in time. The system controls lighting components according to the lighting control segment, controls media acquisition according to the media acquisition segment, prompts inspectors to move the inspection terminal according to the terminal movement prompt segment, and collects inertial sensor output according to the inertial sensor sampling segment; it generates on-site acquisition data based on the media acquisition results, generates lighting response data based on the brightness changes of the corresponding inspection area, and generates inertial response data based on the inertial sensor output; The execution time, media acquisition time, and inertial sensor sampling time of each segment are recorded using the same hardware clock, forming a hardware timestamp associated with the field acquisition data, lighting response data, and inertial response data.

[0010] Preferably, the correct alignment relationship, misalignment alignment relationship, and consistency verification include: Lighting control state sequence and brightness change characteristic sequence are formed based on lighting control segments and lighting response data; motion prompt state sequence and inertial response characteristic sequence are formed based on terminal motion prompt segments and inertial response data. Based on the hardware timestamp and the allowable response delay corresponding to the inspection task version, the lighting control state sequence and brightness change feature sequence, and the motion prompt state sequence and inertial response feature sequence are time-aligned to form the correct alignment relationship of the corresponding response data types. Each response feature sequence is divided into three or more response feature segments. The feature values ​​and internal order of each segment are kept unchanged. Non-zero cyclic shift and two non-adjacent response feature segments are swapped to form multiple misalignment alignment relationships. These relationships are then combined with the correct alignment relationships to form a corresponding set of alignment relationships. When both the control state sequence and the corresponding response feature sequence have non-zero variance, calculate their normalized correlation coefficients under correct alignment and various misalignment relationships, and verify them according to the following conditions: ; In the formula, Indicates the data type of the response. and These represent lighting response data and inertial response data, respectively. Represents the response data type The corresponding correct alignment relationship, Represents the response data type The corresponding set of alignment relationships, express Alignment relationships in Represents the response data type In alignment The normalized correlation coefficient is below. and These represent the response data types respectively. The corresponding consistency threshold and difference threshold; When the variance of either the control state sequence or the corresponding response feature sequence is zero, it is determined that the corresponding response data has failed the consistency verification. If both types of response data meet the above conditions, and the on-site collected data meets the collection requirements corresponding to the current mandatory inspection item, then the current mandatory inspection item is determined to meet the formation conditions of a valid inspection data unit.

[0011] Preferably, the generation of the valid inspection data unit and the current inspection data summary value includes: When the current mandatory inspection item meets the conditions for forming a valid inspection data unit, the summary values ​​of the acquisition control sequence, field acquisition data, lighting response data, inertial response data and hardware timestamp are calculated respectively, and the inspection task version, mandatory inspection item identifier, current incrementing count value and each summary value are combined to form a valid inspection data unit; The valid inspection data units are encoded according to the preset field order. The encoding result is combined with the previous inspection data summary value and the summary is calculated to generate the current inspection data summary value. The previous inspection data summary value and the current inspection data summary value are associated with and saved with the valid inspection data units. When there is a next mandatory inspection item, the current inspection data summary value is used as the previous inspection data summary value of the next mandatory inspection item, and together with the random control value, the next mandatory inspection item identifier, and the current incrementing count value obtained when starting the next mandatory inspection item, it is used to generate the acquisition control sequence of the next mandatory inspection item.

[0012] Preferably, the data upload after network recovery includes: After the network is restored, check the terminal to upload the offline verification authorization certificate; The data to be uploaded is formed by effectively inspecting the data units and their corresponding field-collected data, lighting response data, inertial response data, and hardware timestamp encoding, and is divided into multiple data blocks. Data block identifiers are generated according to the inspection task version, the current inspection data summary value, and the data block sequence number. Data block summary values ​​are generated for each data block, and data integrity verification values ​​are generated by arranging the data block summary values ​​according to the data block sequence number. An upload list is generated for each valid inspection data unit. The upload list includes the inspection task version, mandatory inspection item identifier, previous inspection data summary value, current inspection data summary value, current increment count value, data block identifier and data block summary value of each data block, and data integrity verification value. The inspection terminal sends the upload list to the cloud server. The cloud server identifies missing data blocks based on the upload list and received data blocks, and checks the terminal uploads the corresponding missing data blocks. After all data blocks have been received, the cloud server verifies the data block identifier and data block digest value, regenerates the data integrity check value, and compares it with the data integrity check value in the upload list. If the comparison matches, it is determined that the corresponding valid check data unit and associated data have been completely uploaded; otherwise, the upload remains incomplete.

[0013] Preferably, the reconstruction and verification of the acquisition control sequence includes: The cloud server verifies the offline inspection authorization certificate, obtains the allowed counting range and the random control value and initial inspection data summary value corresponding to the inspection task version; verifies that the current incrementing count value of each valid inspection data unit is within the allowed counting range and is not repeated, and determines the inspection order according to the current incrementing count value; The first valid inspection data unit uses the initial inspection data summary value as the previous inspection data summary value. According to the inspection order, the random control value, the mandatory inspection item identifier, the previous inspection data summary value and the current incrementing count value are input into the same preset pseudo-random sequence generation program as the inspection terminal to reconstruct the acquisition control sequence. Based on the reconstructed acquisition control sequence, the uploaded field acquisition data, the two types of response data, and the hardware timestamp, the corresponding summary value is recalculated and compared with the summary value in the valid check data unit; if the comparison is consistent, the correct alignment relationship and the misalignment alignment relationship are reconstructed and the consistency verification is performed again; When the verification is successful, the current inspection data digest value is regenerated based on the valid inspection data unit and the previous inspection data digest value. It is then compared with the current inspection data digest value in the upload list and continuously compared with the previous inspection data digest value in the next upload list. This process is repeated to complete the reconstruction and verification of each mandatory inspection item.

[0014] Preferably, the reconstruction and verification of each mandatory inspection item includes: The cloud server retrieves the set of mandatory inspection items corresponding to the inspection task version and the collection requirements for each mandatory inspection item. Verify that the identifiers of each mandatory inspection item are unique, that the set of identifiers of each mandatory inspection item is the same as the set of mandatory inspection items, and verify that the data collected on site meets the collection requirements of the corresponding mandatory inspection items. When the acquisition control sequence reconstruction and consistency verification are passed, the summary values ​​are consistent, the summary values ​​of adjacent inspection data are continuous, the mandatory inspection items are complete, and the on-site acquisition data meets the corresponding acquisition requirements, the inspection task is deemed to have passed verification.

[0015] This invention also provides a system for collecting and verifying inspection data in a network-restricted environment, used to execute the inspection data collection and verification method described above in a network-restricted environment, including an inspection terminal and a cloud server: The cloud server includes a task management module and a reconstruction verification module, while the inspection terminal includes an offline mode control module, a data acquisition control module, a data unit generation module, and a data upload module. The task management module is used to generate and distribute inspection task versions, offline inspection authorization credentials, random control values, and initial inspection data summary values, and to save random control values ​​in association with the inspection task version; The offline mode control module is used to determine network anomalies based on network communication status, read the current increment value of the monotonically increasing counter, and enter the offline check mode when the offline check of the authorization certificate and the current increment value verification pass. The data acquisition and control module is used to generate a data acquisition and control sequence based on random control values, mandatory inspection item identifiers, previous inspection data summary values, and current incrementing count values, and to acquire on-site data acquisition, lighting response data, inertial response data, and hardware timestamps. The data unit generation module is used to establish a correct alignment relationship based on the hardware timestamp. After cyclic shifting of response feature fragments and reordering of non-adjacent fragments, a misaligned alignment relationship is formed. The correct alignment consistency of the two types of response data reaches the consistency threshold and the difference between the data and the maximum misaligned alignment consistency reaches the difference threshold. When the field-collected data meets the collection requirements, a valid inspection data unit is formed and the current inspection data summary value is generated. The data upload module is used to upload offline inspection authorization credentials, valid inspection data units, and associated data after the network is restored; The reconstruction and verification module is used to reconstruct the acquisition control sequence based on random control values, mandatory inspection item identifiers, previous inspection data summary values, and current incrementing count values. It reconstructs correct alignment relationships and misalignment alignment relationships and re-verifies the two types of response data. It verifies the continuity of inspection data summary values, the completeness of mandatory inspection items, and whether the on-site acquired data meets the acquisition requirements. When each verification passes, the inspection task is determined to have passed verification.

[0016] The beneficial effects of this invention are as follows: Under network anomaly conditions, this invention controls offline inspection by checking authorization credentials and incrementing counter values, and generates a data acquisition control sequence based on random control values, mandatory inspection item identifiers, previous inspection data summary values, and the current incrementing counter value. It utilizes hardware timestamps to establish the correct alignment relationship between the data acquisition control sequence and lighting response data and inertial response data, and verifies this by comparing misaligned alignment relationships. This allows the verification of inspection data to no longer rely solely on existing data content, but can be judged based on the actual on-site responses generated during the current inspection process. This improves the ability to identify the reuse of historical data, pre-prepared data substitution, and data that does not match the current acquisition process, thereby enhancing the on-site authenticity of offline inspection data and the reliability of the inspection process.

[0017] This invention further associates valid inspection data units with the previous inspection data summary value to generate the current inspection data summary value, and makes it participate in the collection and control of subsequent mandatory inspection items. After the network is restored, the cloud server reconstructs the collection control sequence and re-verifies the response data, while checking the continuity of the data summary value, the completeness of the mandatory inspection items, and whether the on-site collected data meets the collection requirements. It can achieve offline collection and independent re-verification after networking without the need for the cloud server to continuously participate in the inspection, taking into account the continuous execution requirements of inspection tasks in network-limited environments and the ability to verify inspection data after the fact, thereby improving the data continuity and verification reliability of the entire inspection task. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 The main flowchart for the inspection data collection and verification method under network-restricted environments; Figure 2 The main flowchart for verifying the alignment of the acquired control sequence with the two types of response data is shown below. Figure 3 A flowchart illustrating the data upload and cloud reconstruction verification process after network recovery; Figure 4 This is a structural diagram of an inspection data acquisition and verification system in a network-restricted environment. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention are within the scope of protection of the present invention.

[0020] One embodiment of the present invention provides a method for inspection data acquisition and verification in a network-constrained environment, including steps S1-S5. The method can be executed by an inspection terminal and a cloud server that communicate with each other. The inspection terminal is used to receive inspection tasks, perform offline inspections, generate acquisition control sequences, and acquire on-site acquisition data and corresponding response data. The cloud server is used to generate inspection tasks and offline inspection authorization information, and to reconstruct and verify the data generated during the offline inspection after the network is restored. The following detailed description of each step of this embodiment further illustrates the method.

[0021] The overall process of the inspection data collection and verification method under network-restricted environments is as follows: Figure 1 As shown, the process includes, in sequence, the generation of inspection task and offline inspection basic data, network anomaly determination and entry into offline inspection mode, generation of acquisition control sequence and on-site data acquisition, verification of correct alignment and misalignment and generation of inspection data summary, and data upload and cloud reconstruction verification after network recovery.

[0022] S1. The cloud server associates the inspection task version, saves the random control value, and sends the inspection task version, offline inspection authorization certificate, random control value, and initial inspection data summary value to the inspection terminal. In S1, before the terminal enters the offline inspection mode, the cloud server determines the scope of the inspection task, the offline execution conditions, and the basic data required to generate the acquisition control sequence. It also retains the data foundation required to re-verify the offline inspection process after the network is restored.

[0023] Specifically, the cloud server generates an inspection task version based on the inspection task to be executed, and determines the inspection terminal identifier, the set of mandatory inspection items, the collection requirements for each mandatory inspection item, and the allowed offline time period. The inspection task version identifies the content of the currently issued inspection task; the inspection terminal identifier identifies the inspection terminal that will execute this inspection task; the set of mandatory inspection items contains all the mandatory inspection items required to be completed in this inspection task, and each mandatory inspection item has a corresponding mandatory inspection item identifier; the collection requirements specify the data type, quantity, collection duration, and other collection conditions set by the corresponding inspection task that the on-site data collected for the corresponding mandatory inspection items must meet; and the allowed offline time period limits the effective time range of this offline inspection authorization.

[0024] The cloud server generates a mandatory inspection item set summary based on the mandatory inspection item set and the corresponding collection requirements for each mandatory inspection item. Specifically, the mandatory inspection item identifiers and corresponding collection requirements are encoded according to a preset field order, and a summary calculation is performed on the resulting encoded results to obtain the mandatory inspection item set summary. The mandatory inspection item set summary is used to represent the mandatory inspection items and collection requirements corresponding to this inspection task, and serves as a component of the subsequent offline inspection authorization certificate, allowing the inspection terminal to verify the consistency between the currently used mandatory inspection item set and collection requirements and the current offline inspection authorization.

[0025] Before generating the offline inspection authorization certificate, the inspection terminal reads the current value of a monotonically increasing counter and sends it to the cloud server. The cloud server determines the received current value as the initial increment count value. The monotonically increasing counter is set on the inspection terminal, and its count value is updated in the increasing direction. The initial increment count value is used to characterize the counting status of the inspection terminal at the time of issuing this offline inspection authorization certificate.

[0026] The cloud server determines the allowed counting range based on the initial incrementing count value. The allowed counting range is used to limit the range of incrementing count values ​​that can be used during this offline inspection. It can be determined based on the number of mandatory inspection items and the range of counting operations allowed to be performed in this offline inspection, and serves as the basis for subsequent judgment on whether the current incrementing count value falls within the authorized scope of this offline inspection.

[0027] Furthermore, the cloud server generates random control values ​​and performs a digest calculation on these values ​​to obtain a random control value digest. The random control value is used subsequently, along with the mandatory inspection item identifier, the previous inspection data digest value, and the current incrementing count value, to generate the corresponding mandatory inspection item's acquisition control sequence. The random control value digest is written into the offline inspection authorization certificate, enabling the inspection terminal to verify the consistency between the current random control value and the current offline inspection authorization by recalculating the random control value digest and comparing it. Therefore, the random control value and the random control value digest are used for acquisition control sequence generation and authorization consistency verification, respectively.

[0028] The cloud server further generates an initial inspection data digest value based on the inspection task version, inspection terminal identifier, random control value digest, and initial incrementing count value. During implementation, the above data can be encoded according to a preset field order, and a digest calculation can be performed on the encoded results. The initial inspection data digest value is used to form the starting state of the data digest for this inspection task; when executing the first mandatory inspection item subsequently, the initial inspection data digest value is used as the previous inspection data digest value.

[0029] The cloud server generates an offline inspection authorization certificate that binds the inspection task version, inspection terminal identifier, mandatory inspection item set summary, allowed offline time period, allowed counting interval, random control value summary, and initial inspection data summary value, and digitally signs the offline inspection authorization certificate. The binding refers to the above data participating in the certificate generation as authorization information within the same offline inspection authorization certificate, enabling the inspection terminal to verify the correspondence between the corresponding task data and the current offline inspection authorization during subsequent verification. The digital signature is used to verify the data integrity and source validity of the offline inspection authorization certificate and can be implemented using existing digital signature methods; no specific digital signature algorithm is limited.

[0030] After the offline inspection authorization certificate is generated, the cloud server sends the inspection task version, the digitally signed offline inspection authorization certificate, the set of mandatory inspection items, the corresponding collection requirements, the random control value, and the initial inspection data summary value to the inspection terminal.

[0031] Simultaneously, the cloud server associates and saves the set of mandatory inspection items, corresponding collection requirements, random control values, initial incremental count values, and initial inspection data summary values ​​with the inspection task version. This association and saving means that the cloud server can obtain the corresponding data based on the inspection task version. The random control values ​​are used to regenerate the corresponding collection control sequence after network recovery; the initial incremental count values ​​and initial inspection data summary values ​​provide benchmarks for subsequent incremental count verification and inspection data summary continuity verification, respectively.

[0032] S2. Determine network anomalies based on network communication status, read the monotonically increasing counter to obtain the current increment count value; after offline verification of the authorization certificate and the current increment count value, enter offline check mode; In S2, the terminal first determines whether the current communication status meets the conditions for entering the offline inspection mode, and then verifies the offline inspection authorization certificate formed in S1 and the current counting status of the terminal to distinguish between actual network anomalies, instantaneous communication fluctuations, and cloud server business processing failures.

[0033] Specifically, the inspection terminal acquires network access status and cloud server response status according to a detection cycle. The network access status indicates whether the inspection terminal currently has a network connection available for communication; the cloud server response status indicates whether the inspection terminal can obtain a response from the cloud server through the current network.

[0034] The terminal further determines the data upload path status. When a data upload task exists, the data upload path status is determined based on the actual upload results; when no data upload task exists, probe data is sent through the upload path of the data being checked, and the data upload path status is determined based on the transmission results of the probe data. Therefore, even when no formal upload task exists, the actual upload path used for the check data can still be detected.

[0035] When the terminal fails to receive a response from the cloud server, the cloud server response status is determined to be unreachable; when data transmission is not completed due to abnormal transmission connection, the data upload path status is determined to be unreachable.

[0036] When the terminal has received a response from the cloud server, but the upload task is not completed due to the business processing result returned by the cloud server, the data upload path status is determined to be reachable. That is, when the data can reach the cloud server through the corresponding communication path and the terminal has received a response, the business processing result of the server on the data is not used as the basis for judging that the communication path is unreachable, thereby avoiding misjudging the server's business processing failure as a network anomaly.

[0037] The inspection terminal determines network anomalies based on the status results of multiple consecutive detection cycles. A network anomaly is determined when the data upload path status is unreachable for a preset number of consecutive detection cycles; or, when the network access status is abnormal for a preset number of consecutive detection cycles and the cloud server response status is unreachable. The preset number is set according to the communication environment and the requirements of the inspection task regarding the network status switching response speed, to reduce the possibility of erroneous switching caused by instantaneous network jitter or occasional communication failures.

[0038] Upon confirming a network anomaly, the inspection terminal does not immediately enter offline inspection mode. Instead, it further verifies the offline inspection authorization credential. The inspection terminal first verifies the digital signature of the offline inspection authorization credential and checks the binding information within it. Specifically, it compares the current inspection task version and inspection terminal identifier with the corresponding information in the offline inspection authorization credential. It then regenerates a summary of the mandatory inspection items based on the locally stored set of mandatory inspection items and corresponding collection requirements, and compares this summary with the summary of the mandatory inspection items in the offline inspection authorization credential.

[0039] The system checks the terminal to obtain the current time and verifies that the current time is within the allowed offline period recorded in the offline inspection authorization certificate; it recalculates the random control value digest based on the locally stored random control value and compares it with the random control value digest in the offline inspection authorization certificate; at the same time, it compares the locally stored initial inspection data digest value with the initial inspection data digest value in the offline inspection authorization certificate.

[0040] After completing the above verification, the terminal reads the monotonically increasing counter to obtain the current increment count value before entering the offline inspection mode, and compares the current increment count value with the allowed counting range and the initial increment count value. When the current increment count value is within the allowed counting range and not lower than the initial increment count value, it is determined that the current counting status meets the authorization requirements for this offline inspection.

[0041] The current incrementing count value read by S2 is used to determine the counting status of the terminal when entering the offline inspection mode; when S3 starts to execute specific mandatory inspection items, it is also necessary to increment the same monotonically increasing counter, and use the current incrementing count value obtained after incrementing as the input of the current mandatory inspection item acquisition control sequence.

[0042] When the digital signature and binding information of the offline inspection authorization certificate are verified, the current time is within the allowed offline period, the random control value digest and the initial inspection data digest values ​​are consistent, and the current incrementing count value meets the requirements of the allowed counting range and the initial incrementing count value, the inspection terminal enters the offline inspection mode; if any necessary verification condition is not met, it does not enter the offline inspection mode.

[0043] S3. Generate a collection control sequence containing lighting control, media acquisition, and terminal movement prompts using random control values, mandatory inspection item identifiers, previous inspection data summary values, and current incrementing count values, and acquire on-site collection data, lighting response data, inertial response data, and hardware timestamps. After the terminal enters offline inspection mode, it determines the current mandatory inspection item to be executed according to the mandatory inspection item set. When starting the current mandatory inspection item, the monotonically increasing counter is incremented once, and the incremented count value is read as the current increment count value corresponding to the current mandatory inspection item.

[0044] The inspection terminal compares the current incrementing count value with the allowed count range in the offline inspection authorization certificate. If the current incrementing count value is within the allowed count range, the current mandatory inspection item continues to be executed; if the current incrementing count value exceeds the allowed count range, the offline inspection stops.

[0045] Before generating the acquisition control sequence for the current mandatory inspection item, determine the corresponding previous inspection data summary value. For the first mandatory inspection item in this inspection task, the initial inspection data summary value generated by S1 is used as the previous inspection data summary value; for subsequent mandatory inspection items, the current inspection data summary value corresponding to the previous valid inspection data unit is used as the previous inspection data summary value.

[0046] The random control value, the current mandatory inspection item identifier, the previous inspection data summary value, and the current incrementing count value are input into a preset pseudo-random sequence generation program. This preset pseudo-random sequence generation program employs deterministic generation rules, meaning that the same input data and program will produce the same output. This allows the inspection terminal to generate the corresponding acquisition control sequence during offline periods, and enables the cloud server to regenerate the acquisition control sequence based on the same input after network recovery.

[0047] In practice, the random control value, the current mandatory inspection item identifier, the previous inspection data summary value, and the current incrementing count value can be combined according to the preset field order. The preset pseudo-random sequence generation program generates pseudo-random output based on the combined input. Then, according to the preset mapping rules, lighting control segments, media acquisition segments, terminal movement prompt segments, and inertial sensor sampling segments arranged in time are formed, which constitute the acquisition control sequence corresponding to the current mandatory inspection item.

[0048] The lighting control segment is used to determine the control status of the lighting components within the corresponding time interval; the media acquisition segment is used to determine the execution time of media acquisition; the terminal movement prompt segment is used to output a prompt to the inspector to move the inspection terminal at the corresponding time; and the inertial sensor sampling segment is used to determine the sampling time of the inertial sensor.

[0049] The inspection terminal controls the lighting components according to the lighting control segments, causing brightness changes in the corresponding inspection area related to the lighting control status; it performs media acquisition according to the media acquisition segments and generates on-site acquisition data based on the media acquisition results. The on-site acquisition data is generated according to the acquisition requirements corresponding to the current mandatory inspection items, and its data type, acquisition quantity, and acquisition duration are determined by the corresponding acquisition requirements.

[0050] Furthermore, lighting response data is generated based on the brightness changes of the corresponding inspection area in the media acquisition results. In practice, brightness information of the inspection area can be extracted from image or video data corresponding to the lighting control time, and lighting response data is generated based on brightness changes at continuous sampling times or corresponding time intervals. The lighting response data characterizes the response generated after the lighting control is actually applied to the site, rather than using the lighting control command itself as the response data.

[0051] The inspection terminal prompts the inspector to move the terminal according to the terminal movement prompt segment, and collects the inertial sensor output according to the inertial sensor sampling segment, forming inertial response data based on the inertial sensor output. The inertial response data is used to characterize the actual motion changes of the inspection terminal within the time interval corresponding to the terminal movement prompt.

[0052] To ensure that subsequent control actions and on-site responses can be time-correlated, the terminal is checked to use the same hardware clock to record the execution time of lighting control segments, media acquisition segments, terminal movement prompt segments, and inertial sensor sampling segments. At the same time, the media acquisition time and the inertial sensor sampling time are recorded, and a hardware timestamp is generated that is associated with the on-site acquired data, lighting response data, and inertial response data.

[0053] The same hardware clock refers to the fact that all kinds of execution times and sampling times can be mapped to the common hardware time reference of the inspection terminal, so that different control actions and different types of response data can be compared on a unified time scale; for acquisition components with their own timing mechanisms, the corresponding sampling times can be mapped to the common hardware time reference.

[0054] Control states and corresponding response characteristics employ numerical representation rules that reflect the same direction or degree of control change. For lighting response data, lighting control states are represented by state values ​​based on the corresponding lighting state or lighting control level, and brightness responses are represented by brightness changes in the corresponding inspection area. For inertial response data, movement prompt states are represented by state values ​​based on the corresponding movement states, and inertial responses are represented by motion changes corresponding to those movement states. The same response data type uses consistent state representation and response characteristic determination rules in both correct alignment verification and misalignment verification for all mandatory inspection items.

[0055] After processing by S3, the current mandatory inspection items form the acquisition control sequence, field acquisition data, lighting response data, inertial response data, and corresponding hardware timestamps, providing input for S4 to verify the consistency between the acquisition control sequence and the field response based on the actual time relationship.

[0056] S4. Establish the correct alignment relationship between the acquisition control sequence and the two types of response data according to the hardware timestamp. Multiple misalignment alignment relationships are formed by cyclic shifting of response feature segments and reordering of non-adjacent segments. The correct alignment consistency of the two types of response data reaches the consistency threshold and the difference between the consistency with the maximum misalignment alignment reaches the difference threshold. When the field acquisition data meets the acquisition requirements of the mandatory inspection items, a valid inspection data unit is formed. It is then combined with the previous inspection data summary value to generate the current inspection data summary value, which is used to generate the acquisition control sequence for the next mandatory inspection item. The alignment verification process between the acquired control sequence and the lighting response data and inertial response data is as follows: Figure 2 As shown. The inspection terminal establishes a correct alignment relationship based on the hardware timestamp and the allowable response delay, and forms multiple misaligned alignment relationships by non-zero cyclic shifting of response feature fragments and reordering of non-adjacent fragments. The correct alignment relationship and the misaligned alignment relationship are compared for consistency. A valid inspection data unit is formed when both types of response data pass the verification and the on-site collected data meets the collection requirements.

[0057] Specifically, for the lighting response data, a lighting control state sequence is formed based on the lighting control segments in S3, and a brightness change feature sequence is formed based on the lighting response data. The lighting control state sequence represents the lighting control state within each corresponding time interval in chronological order, and the brightness change feature sequence represents the actual brightness change after the lighting control is applied to the inspection area.

[0058] In one implementation, the brightness statistics of the corresponding inspection area are extracted within each lighting control time interval, brightness change features are formed based on the changes in brightness statistics over time, and a brightness change feature sequence is formed according to the hardware timestamp.

[0059] For inertial response data, a motion prompt state sequence is formed based on the terminal's motion prompt segments, and an inertial response feature sequence is formed based on the inertial response data. In practice, the motion change characteristics within the corresponding time interval can be determined based on one or more of the acceleration data and angular velocity data output by the inertial sensor, and an inertial response feature sequence is formed according to the inertial sensor sampling time.

[0060] The lighting control state sequence and the brightness change characteristic sequence form one corresponding sequence, and the movement prompt state sequence and the inertial response characteristic sequence form another corresponding sequence. Consistency verification is performed on both types of response data separately; direct numerical comparison of the original physical quantities of the brightness change data and the inertial response data is not conducted.

[0061] Furthermore, based on the hardware timestamp and the allowable response delay corresponding to the inspection task version, the lighting control state sequence and brightness change feature sequence, and the motion prompt state sequence and inertial response feature sequence are time-aligned respectively.

[0062] The allowable response delay is used to limit the time range within which the corresponding on-site response is permitted after the acquisition control action occurs. For lighting response data, it can be determined based on the time required for the lighting control segment to execute until a detectable brightness change occurs in the inspection area and is acquired by the media; for inertial response data, it can be determined based on the time required for the terminal's movement prompt output to generate a corresponding motion change in the inspection terminal and be acquired by the inertial sensor.

[0063] In one implementation, the time difference between the execution time of the control action and the occurrence time of the corresponding response characteristic can be recorded by repeatedly executing the acquisition and control process normally. The allowable response delay for the corresponding response data type can be determined based on the obtained time difference. Allowable response delays can be set for lighting response data and inertial response data respectively.

[0064] Response latency, consistency threshold, and difference threshold are allowed to be predetermined as verification parameters corresponding to the inspection task version. Both the inspection terminal and the cloud server obtain the same corresponding verification parameters according to the inspection task version to ensure that the consistency verification performed by the inspection terminal in S4 and the re-verification performed by the cloud server in S5 use the same verification basis.

[0065] For lighting response data, the actual execution time of the lighting control segment is used as a benchmark, and the corresponding brightness change characteristics are determined within the allowable response delay range based on the hardware timestamp, thus forming the correct alignment relationship for the lighting response data. For inertial response data, the actual execution time of the terminal movement prompt segment is used as a benchmark, and the corresponding inertial response characteristics are determined within the allowable response delay range, thus forming the correct alignment relationship for the inertial response data.

[0066] When multiple response sample values ​​exist within the allowable response delay range corresponding to a control state, a response feature for the corresponding time interval is formed based on the response sample values ​​within that range. Then, an alignment relationship is established between this response feature and the corresponding control state. Thus, each control state corresponds to a response feature formed according to the same rules, facilitating subsequent consistency comparisons using the same calculation method under both correct and misaligned alignment conditions.

[0067] Therefore, the correct alignment relationship is formed based on the actual hardware time relationship and allowable response delay during this on-site data acquisition process, rather than by selecting the alignment result with the highest correlation after traversing different time positions.

[0068] After establishing the correct alignment, each response feature sequence is divided into three or more response feature segments according to time sequence. The number of response feature segments is determined based on the length of the response feature sequence and the number of samples, ensuring that each response feature segment contains sampled data that can characterize the response changes within the corresponding time interval. The same segment division results are used for correct alignment verification and misalignment verification of the same response data type.

[0069] When constructing misalignment relationships, the feature values ​​and internal order of each response feature segment remain unchanged, and only the positional relationship of the response feature segment relative to the control state sequence is changed.

[0070] One approach is to perform a non-zero cyclic shift, which involves cyclically moving the response feature segments one or more positions according to their arrangement, thereby changing the time correspondence between the original control state and the response features. Another approach is to select two non-adjacent response feature segments and swap their positions, while keeping the positions of other response feature segments and the feature values ​​and internal order of the swapped segments unchanged, thus forming a misaligned alignment relationship where the local time correspondence changes.

[0071] Multiple misalignment alignment relationships are formed by non-zero cyclic shifting and transposing two non-adjacent response feature fragments, respectively. These misalignment alignment relationships are then combined with the correct alignment relationships to form an alignment relationship set for the corresponding response data type. The above misalignment processing only changes the corresponding position of the response feature relative to the control state, without changing the response feature value itself used for verification.

[0072] When both the control state sequence and the corresponding response feature sequence have non-zero variance, the normalized correlation coefficients are calculated for both the correct alignment and each misalignment. The normalized correlation coefficient can be determined by dividing the covariance of the control state sequence and the response feature sequence by the product of their standard deviations. For the same response data type, the same normalized correlation calculation rule is used for both correct and misalignment.

[0073] The normalized correlation coefficient is a dimensionless result. The lighting response data and the inertial response data are calculated within their respective response data types. Therefore, there is no issue of direct comparison of dimensions between the original data of different physical quantities.

[0074] After obtaining the normalized correlation coefficients corresponding to each alignment relationship, the consistency of the lighting response data and the inertial response data is verified according to the following conditions: ; In the formula, Indicates the data type of the response. and These represent lighting response data and inertial response data, respectively. Represents the response data type The corresponding correct alignment relationship, Represents the response data type The corresponding set of alignment relationships, express Alignment relationships in Represents the response data type In alignment The normalized correlation coefficient is below. and These represent the response data types respectively. The corresponding consistency threshold and difference threshold; Consistency threshold Used to determine whether the control state and corresponding response characteristics meet the required consistency under correct alignment; difference threshold. This is used to determine whether the normalized correlation coefficient corresponding to a correct alignment is sufficiently different from the maximum normalized correlation coefficient among all misaligned alignments.

[0075] Consistency threshold Sum and difference thresholds Different response data types can be pre-calibrated before the corresponding inspection task version is put into use. Specifically, multiple sets of calibration data generated during normal execution according to the acquisition control sequence are acquired. Normalized correlation coefficients are calculated for each set of calibration data based on correct alignment and multiple misalignment relationships. The consistency threshold is determined based on the distribution of the normalized correlation coefficients corresponding to the correct alignment under normal execution conditions. The difference threshold is determined based on the distribution of the difference between the normalized correlation coefficient corresponding to the correct alignment and the normalized correlation coefficient corresponding to the maximum misalignment. The determined threshold corresponds to the version of the inspection task, and it is not required that the lighting response data and inertial response data use the same threshold.

[0076] For any response data type, if the normalized correlation coefficient corresponding to the correct alignment reaches the consistency threshold, it indicates that the control state and response characteristics established according to the actual time relationship have achieved the required degree of consistency. Simultaneously, if the difference between the normalized correlation coefficient corresponding to the correct alignment and the normalized correlation coefficient corresponding to the maximum misalignment alignment reaches the difference threshold, it indicates that the correct alignment formed according to the actual hardware time relationship has the required degree of distinction compared to the misalignment formed by artificially altering the time relationship. When both conditions are met, the corresponding response data is determined to have passed the consistency verification.

[0077] When the variance of any sequence in the control state sequence or the corresponding response feature sequence is zero, it is determined that the corresponding response data has not passed the consistency verification, and the normalized correlation coefficient is not used for judgment to avoid obtaining invalid verification results when there is no effective change in the sequence or the normalized correlation calculation conditions are not met.

[0078] If both the lighting response data and the inertial response data pass the above consistency verification, and the on-site data collected by S3 meets the collection requirements corresponding to the current mandatory inspection item, then the current mandatory inspection item meets the conditions for forming a valid inspection data unit.

[0079] When the current mandatory inspection item meets the conditions for forming a valid inspection data unit, the summary values ​​of the acquisition control sequence, field acquisition data, lighting response data, inertial response data, and hardware timestamp are calculated respectively. The inspection task version, the mandatory inspection item identifier corresponding to the current mandatory inspection item, the current incrementing count value, and the above summary values ​​are then combined to form a valid inspection data unit.

[0080] After a valid inspection data unit is formed, it is encoded according to the preset field order. The encoding result is combined with the previous inspection data summary value corresponding to the current mandatory inspection item, and a summary calculation is performed to generate the current inspection data summary value. The previous inspection data summary value and the current inspection data summary value are then associated with and saved with the valid inspection data unit.

[0081] For the first mandatory inspection item, the previous inspection data summary value is the initial inspection data summary value generated by S1; for subsequent mandatory inspection items, the previous inspection data summary value is the current inspection data summary value corresponding to the previous valid inspection data unit.

[0082] When a next mandatory inspection item exists, the current inspection data summary value is used as the previous inspection data summary value for the next mandatory inspection item. When starting the next mandatory inspection item, the monotonically increasing counter is incremented according to S3 to obtain the current increment count value corresponding to the next mandatory inspection item. The random control value, the next mandatory inspection item identifier, the previous inspection data summary value, and the current increment count value are input together into the preset pseudo-random sequence generation program to generate the acquisition control sequence for the next mandatory inspection item.

[0083] Only after both types of response data of the previous mandatory inspection item have passed the consistency verification and formed a valid inspection data unit can its current inspection data summary value participate in the generation of the collection control sequence of the next mandatory inspection item, so that a continuous data dependency relationship is formed between adjacent mandatory inspection items.

[0084] S5. After the network is restored, upload the offline inspection authorization certificate, valid inspection data unit and on-site collected data, two types of response data and hardware timestamp; the cloud server reconstructs each collection control sequence with random control values, rebuilds the correct alignment relationship and misalignment alignment relationship and re-verifies the two types of response data; when the inspection data summary value is continuous, the mandatory inspection items are complete and the on-site collected data meets the collection requirements, the inspection task is determined to be verified as passed.

[0085] The data upload and cloud reconstruction verification process after network recovery is as follows: Figure 3 As shown. After the network is restored, the inspection terminal uploads the offline inspection authorization certificate and the data generated during the offline inspection, and completes the data upload through data blocks and upload list; after confirming that the uploaded data is complete, the cloud server reconstructs the acquisition control sequence according to the same input relationship as the inspection terminal, re-establishes the correct alignment relationship and misalignment alignment relationship, and re-verifies the two types of response data, further verifying the continuity of the inspection data summary value, the completeness of the mandatory inspection items, and the requirements for on-site data acquisition.

[0086] When the inspection terminal determines that the network has been restored and is able to transmit data with the cloud server based on the network communication status, it first uploads the offline inspection authorization certificate to the cloud server.

[0087] For each valid inspection data unit, the inspection terminal encodes the valid inspection data unit and its corresponding on-site collected data, lighting response data, inertial response data and hardware timestamp to form data to be uploaded, and divides the data to be uploaded into multiple data blocks according to the preset data block division rules.

[0088] The inspection terminal generates a data block identifier for each data block based on the inspection task version, the current inspection data digest value of the corresponding valid inspection data unit, and the data block sequence number. The data block identifier is used to determine the inspection task to which the data block belongs, the valid inspection data unit, and the location of the data block.

[0089] Furthermore, a digest calculation is performed on each data block to generate a corresponding data block digest value. The data block digest values ​​are then arranged according to their sequence numbers, and the arranged digest values ​​are combined sequentially and a digest calculation is performed again to generate a data integrity verification value. Thus, the data block digest value is used to verify the data content of a single data block, while the data integrity verification value is used to verify whether the overall data formed by all data blocks in the corresponding order is complete.

[0090] An upload list is generated for each valid inspection data unit. The upload list includes the inspection task version, mandatory inspection item identifier, previous inspection data summary value, current inspection data summary value, current increment count value, data block identifier and data block summary value for each data block, and data integrity verification value.

[0091] The inspection terminal first sends the upload list to the cloud server. The cloud server then identifies the missing data blocks based on the upload list and the already received data blocks. The inspection terminal then uploads the corresponding missing data blocks, enabling it to continue uploading incompletely received data should a communication interruption occur again after network recovery, without having to repeatedly upload correctly received data blocks.

[0092] After receiving the data blocks, the cloud server regenerates the corresponding data block digest value according to the same digest calculation rules as the inspection terminal, and compares it with the data block digest values ​​in the upload list. After all data blocks have been received and the digest values ​​of each data block match, the regenerated data block digest values ​​are arranged according to the data block sequence number. The arranged data block digest values ​​are then combined sequentially, digest calculation is performed, and a new data integrity verification value is generated. This value is then compared with the data integrity verification value in the upload list.

[0093] When the data integrity check values ​​are consistent, it is determined that the corresponding valid check data unit and the associated field-collected data, lighting response data, inertial response data, and hardware timestamp have been completely uploaded; if there are missing data blocks, inconsistent data block summary values, or inconsistent data integrity check values, the corresponding data remains in the state of incomplete upload.

[0094] After the data upload is completed, the cloud server verifies the offline inspection authorization certificate and obtains the allowed counting range, the random control value corresponding to the inspection task version, the initial inspection data digest value, and the corresponding verification parameters used by S4.

[0095] The cloud server obtains the current increment count value from each valid inspection data unit, verifies that each current increment count value is within the allowed counting range and is non-repeating, and determines the inspection order of each valid inspection data unit according to the current increment count value. Since S3 increments the monotonically increasing counter when starting each mandatory inspection item, the order determined by the current increment count value is used to restore the sequential relationship of each valid inspection data unit.

[0096] For the first valid inspection data unit in the inspection sequence, the initial inspection data digest value is used as the previous inspection data digest value. The random control value corresponding to the inspection task version, the current mandatory inspection item identifier, the previous inspection data digest value, and the current incrementing count value are input into the same preset pseudo-random sequence generation program as the inspection terminal to reconstruct the acquisition control sequence of the corresponding mandatory inspection item.

[0097] For subsequent valid inspection data units, after the previous valid inspection data unit has been reconstructed and verified, the current inspection data summary value of the previous valid inspection data unit, which has been regenerated and verified by the cloud server, is used as the previous inspection data summary value of the current valid inspection data unit. Then, the corresponding acquisition control sequence is reconstructed by combining the random control value, the current mandatory inspection item identifier, and the current incrementing count value with the same preset pseudo-random sequence generation program.

[0098] Therefore, the "reconstruction of each acquisition control sequence with random control values" in S5 uses the random control values ​​saved in the S1 associated inspection task version as the basis for reconstruction, and completes the reconstruction by combining the mandatory inspection item identifier, the previous inspection data summary value and the current incrementing count value according to the same input relationship as S3, instead of simply using random control values ​​to generate acquisition control sequences separately.

[0099] After the acquisition control sequence is reconstructed, the cloud server recalculates the corresponding summary value based on the reconstructed acquisition control sequence and the uploaded field acquisition data, lighting response data, inertial response data and hardware timestamps, and compares it with the corresponding summary value in the valid check data unit.

[0100] Specifically, when the reconstructed acquisition control sequence's corresponding summary value matches the acquisition control sequence summary value in the valid inspection data unit, it indicates that the acquisition control sequence regenerated based on the basic data stored on the cloud server is consistent with the acquisition control sequence corresponding to the formation of the current valid inspection data unit; when the recalculated summary values ​​of the uploaded field acquisition data, lighting response data, inertial response data, and hardware timestamp are consistent with the corresponding summary values ​​in the valid inspection data unit, it indicates that the currently uploaded data is consistent with the data corresponding to the formation of the valid inspection data unit.

[0101] After the summary values ​​are compared and found to be consistent, the cloud server does not directly use the consistency verification result formed by the terminal in S4. Instead, it uses the reconstructed acquisition control sequence, uploaded lighting response data, inertial response data and hardware timestamp to re-execute the response consistency verification in S4.

[0102] Specifically, the cloud server, following the same response feature formation rules as S4, reconstructs the lighting control state sequence and brightness change feature sequence based on the reconstructed lighting control segments and lighting response data; it also reconstructs the motion prompt state sequence and inertial response feature sequence based on the reconstructed terminal motion prompt segments and inertial response data; and re-establishes the correct alignment relationship between the two types of response data based on the same hardware timestamp processing rules and the allowable response delay corresponding to the check task version.

[0103] Further, following the same response feature segmentation rules, non-zero cyclic shift rules, and non-adjacent response feature segment reordering rules as in S4, multiple misalignment alignment relationships are re-formed, and the consistency of the lighting response data and inertial response data is re-verified according to the same normalized correlation calculation rules, consistency threshold, and difference threshold.

[0104] For each response data type, the response data is determined to pass cloud verification when the consistency of the correct alignment reaches the corresponding consistency threshold, and the difference between the correct alignment consistency and the maximum misalignment consistency among all misalignment alignments reaches the corresponding difference threshold; when both types of response data meet the above conditions, the response consistency verification corresponding to the currently valid check data unit is determined to pass.

[0105] The cloud server re-executes response feature formation, time alignment, misalignment relationship construction, and consistency judgment, instead of only verifying and checking the consistency judgment results uploaded by the terminal, so that the verification process after network recovery has an independent basis for reconstruction and re-verification.

[0106] After the response consistency verification is passed, the cloud server encodes the current valid check data unit according to the same preset field order as S4, and combines the encoding result with the corresponding previous check data digest value to re-execute the digest calculation and generate the current check data digest value.

[0107] For the first valid inspection data unit, the initial inspection data digest value is used as the previous inspection data digest value; for subsequent valid inspection data units, the current inspection data digest value, which is regenerated and verified by the cloud server from the previous valid inspection data unit, is used as the previous inspection data digest value.

[0108] The cloud server compares the regenerated current inspection data digest value with the current inspection data digest value in the corresponding upload list. If a next valid inspection data unit exists, it further compares the regenerated current inspection data digest value with the previous inspection data digest value in the next upload list. If the comparison matches, the inspection data digest values ​​between adjacent valid inspection data units are determined to be continuous.

[0109] The above processes are executed sequentially according to the inspection order determined by the current incrementing count value, until the reconstruction of the acquisition control sequence of each valid inspection data unit, the comparison of each summary value, the consistency verification of the two types of response data, and the continuity verification of adjacent inspection data summary values ​​are completed.

[0110] After the reconstruction and verification of each mandatory inspection item are completed, the cloud server obtains the set of mandatory inspection items corresponding to the inspection task version and the collection requirements corresponding to each mandatory inspection item.

[0111] The cloud server verifies that the mandatory inspection item identifiers in each valid inspection data unit are unique, and compares the set of mandatory inspection item identifiers with the mandatory inspection item set corresponding to the inspection task version. If the two sets are the same, it is determined that the mandatory inspection items for this inspection task are complete.

[0112] Furthermore, based on the collection requirements corresponding to each mandatory inspection item, the corresponding on-site collection data is verified to determine whether the data type, collection quantity, collection duration, and other collection conditions configured for the corresponding inspection task meet the collection requirements of the current mandatory inspection item.

[0113] When the acquisition control sequence of each mandatory inspection item has been reconstructed and passed the consistency verification of the two types of response data, the summary values ​​are consistent, the summary values ​​of adjacent inspection data are continuous, the identifiers of each mandatory inspection item are unique and their combined set is the same as the set of mandatory inspection items, and all on-site acquired data meet the corresponding acquisition requirements, the cloud server determines that the inspection task verification has passed. If any necessary verification condition fails, the inspection task verification is not confirmed, and the corresponding failed verification item can be recorded for subsequent processing.

[0114] Therefore, this embodiment forms a complete technology chain, from the pre-establishment of inspection tasks and offline inspection authorization data, network anomaly detection and offline mode control, generation of acquisition control sequences based on the current task status, verification of correct alignment and misalignment based on lighting response data and inertial response data, continuous generation of effective inspection data units and inspection data summaries, to the cloud server regenerating the acquisition control sequences based on the original input and independently verifying them after network recovery. Even without the need for a cloud server to continuously participate in on-site inspections, it is still possible to reconstruct and verify offline inspection data and corresponding inspection processes after network recovery, thereby improving the verifiability of offline inspection data, the authenticity of the site, and the reliability of the inspection process in network-constrained environments.

[0115] like Figure 4 As shown, the present invention also provides a system for collecting and verifying inspection data in a network-restricted environment, used to execute the method for collecting and verifying inspection data in a network-restricted environment as described above, including an inspection terminal and a cloud server: The cloud server includes a task management module and a reconstruction verification module, while the inspection terminal includes an offline mode control module, a data acquisition control module, a data unit generation module, and a data upload module. The task management module is used to generate and distribute inspection task versions, offline inspection authorization credentials, random control values, and initial inspection data summary values, and to save random control values ​​in association with the inspection task version; The offline mode control module is used to determine network anomalies based on network communication status, read the current increment value of the monotonically increasing counter, and enter the offline check mode when the offline check of the authorization certificate and the current increment value verification pass. The data acquisition and control module is used to generate a data acquisition and control sequence based on random control values, mandatory inspection item identifiers, previous inspection data summary values, and current incrementing count values, and to acquire on-site data acquisition, lighting response data, inertial response data, and hardware timestamps. The data unit generation module is used to establish a correct alignment relationship based on the hardware timestamp. After cyclic shifting of response feature fragments and reordering of non-adjacent fragments, a misaligned alignment relationship is formed. The correct alignment consistency of the two types of response data reaches the consistency threshold and the difference between the data and the maximum misaligned alignment consistency reaches the difference threshold. When the field-collected data meets the collection requirements, a valid inspection data unit is formed and the current inspection data summary value is generated. The data upload module is used to upload offline inspection authorization credentials, valid inspection data units, and associated data after the network is restored; The reconstruction and verification module is used to reconstruct the acquisition control sequence based on random control values, mandatory inspection item identifiers, previous inspection data summary values, and current incrementing count values. It reconstructs correct alignment relationships and misalignment alignment relationships and re-verifies the two types of response data. It verifies the continuity of inspection data summary values, the completeness of mandatory inspection items, and whether the on-site acquired data meets the acquisition requirements. When each verification passes, the inspection task is determined to have passed verification.

[0116] In the above system, the task management module generates the basic task data required for offline inspection, the offline mode control module determines whether the inspection terminal can enter the offline inspection mode, the acquisition control module generates the acquisition control sequence corresponding to the mandatory inspection items and obtains the on-site response, the data unit generation module verifies the on-site response and forms a continuous inspection data status, the data upload module transmits the offline inspection data after the network is restored, and the reconstruction verification module re-executes the key verification process using the basic task data stored in the cloud and the uploaded original data. This forms a system processing structure in which the offline execution of the inspection terminal and the subsequent independent re-verification by the cloud server are interconnected.

[0117] In summary, this invention can balance offline execution of inspection tasks and subsequent verification of inspection data under network-limited conditions, improve the on-site authenticity, process reliability, and data continuity of offline inspection data, and can adapt to on-site inspection environments with intermittent network or insufficient network coverage, thus having good engineering application value.

[0118] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for collecting and verifying inspection data in a network-restricted environment, characterized in that, Includes the following steps: The cloud server associates the inspection task version, saves random control values, and sends the inspection task version, offline inspection authorization certificate, random control values, and initial inspection data summary values ​​to the inspection terminal. The network anomaly is determined based on the network communication status, and the current increment count value is obtained by reading the monotonically increasing counter; after the offline verification of the authorization certificate and the current increment count value is passed, the offline check mode is entered. A data acquisition control sequence containing lighting control, media acquisition, and terminal movement prompts is generated using random control values, mandatory inspection item identifiers, previous inspection data summary values, and current incrementing count values. This sequence acquires on-site data, lighting response data, inertial response data, and hardware timestamps. The correct alignment relationship between the acquisition control sequence and the two types of response data is established based on the hardware timestamp. Multiple misalignment alignment relationships are formed by cyclic shifting of response feature segments and reordering of non-adjacent segments. The correct alignment consistency of the two types of response data reaches the consistency threshold and the difference between the consistency with the maximum misalignment alignment reaches the difference threshold. When the field acquisition data meets the acquisition requirements of the mandatory inspection items, a valid inspection data unit is formed. It is then combined with the previous inspection data summary value to generate the current inspection data summary value, which is used to generate the acquisition control sequence for the next mandatory inspection item. After the network is restored, upload the offline inspection authorization certificate, valid inspection data unit and on-site collected data, two types of response data and hardware timestamp; the cloud server reconstructs each collection control sequence with random control values, rebuilds the correct alignment relationship and misalignment alignment relationship and re-verifies the two types of response data; when the inspection data summary value is continuous, the mandatory inspection items are complete and the on-site collected data meets the collection requirements, the inspection task is determined to be verified as passed.

2. The method for collecting and verifying inspection data in a network-restricted environment according to claim 1, characterized in that, The generation and distribution of the inspection task version, offline inspection authorization certificate, random control value, and initial inspection data digest value include: The cloud server generates an inspection task version based on the inspection task, determines the inspection terminal identifier, the set of mandatory inspection items, the collection requirements for each mandatory inspection item, and the allowed offline time period, and generates a summary of the mandatory inspection item set based on the set of mandatory inspection items and the collection requirements. The cloud server will determine the current value of the monotonically increasing counter read and sent by the terminal as the initial increment count value, determine the allowed counting range based on the initial increment count value, generate a random control value and a random control value digest, and generate an initial inspection data digest value based on the inspection task version, inspection terminal identifier, random control value digest, and initial increment count value. The cloud server generates an offline inspection authorization certificate that binds the inspection task version, inspection terminal identifier, mandatory inspection item set summary, allowed offline time period, allowed counting interval, random control value summary, and initial inspection data summary value. The offline inspection authorization certificate is digitally signed, and the inspection task version, digitally signed offline inspection authorization certificate, mandatory inspection item set, corresponding collection requirements, random control value, and initial inspection data summary value are sent to the inspection terminal. The mandatory inspection item set, corresponding collection requirements, random control value, initial increment count value, and initial inspection data summary value are then associated and saved with the inspection task version.

3. The method for collecting and verifying inspection data in a network-restricted environment according to claim 2, characterized in that, The determination of network anomalies and the offline verification of authorization credentials and the current incrementing counter value include: According to the detection cycle, obtain the network access status and cloud server response status; when there is a check data upload task, determine the data upload path status based on the actual upload result; when there is no check data upload task, determine the data upload path status by sending probe data through the check data upload path. When no response is received from the cloud server, the cloud server response status is determined to be unreachable; when data transmission is not completed due to abnormal transmission connection, the data upload path status is determined to be unreachable; when a processing response has been received from the cloud server but the upload fails due to the server processing result, the data upload path status is determined to be reachable. A network anomaly is determined when the data upload path status is unreachable for a consecutive preset number of detection cycles, or when the network access status is abnormal for a consecutive preset number of detection cycles and the cloud server response status is unreachable. When the network is abnormal, check the digital signature and binding information of the offline inspection authorization certificate of the terminal, verify that the current time is within the allowed offline period, recalculate the random control value digest and compare it with the random control value digest in the offline inspection authorization certificate, compare the local initial inspection data digest value with the initial inspection data digest value in the offline inspection authorization certificate, and read the current increment value of the monotonically increasing counter. The current increment count value is within the allowed count range and is not lower than the initial increment count value. When the offline verification of the authorization certificate passes, the offline verification mode is entered.

4. The method for collecting and verifying inspection data in a network-restricted environment according to claim 1, characterized in that, The generation of the acquisition control sequence and the corresponding data acquisition include: When starting the current mandatory inspection item, the monotonically increasing counter is incremented to obtain the current increment count value; if the current increment count value is within the allowed count range recorded in the offline inspection authorization certificate, the current mandatory inspection item is executed; otherwise, the offline inspection is stopped. The first mandatory inspection item uses the initial inspection data digest value as the previous inspection data digest value, and subsequent mandatory inspection items use the current inspection data digest value corresponding to the previous valid inspection data unit as the previous inspection data digest value. Input the random control value, the current mandatory inspection item identifier, the previous inspection data summary value, and the current incrementing count value into the preset pseudo-random sequence generation program to generate lighting control segments, media acquisition segments, terminal movement prompt segments, and inertial sensor sampling segments arranged in time. The system controls lighting components according to the lighting control segment, controls media acquisition according to the media acquisition segment, prompts inspectors to move the inspection terminal according to the terminal movement prompt segment, and collects inertial sensor output according to the inertial sensor sampling segment; it generates on-site acquisition data based on the media acquisition results, generates lighting response data based on the brightness changes of the corresponding inspection area, and generates inertial response data based on the inertial sensor output; The execution time, media acquisition time, and inertial sensor sampling time of each segment are recorded using the same hardware clock, forming a hardware timestamp associated with the field acquisition data, lighting response data, and inertial response data.

5. The method for collecting and verifying inspection data in a network-constrained environment according to claim 4, characterized in that, The correct alignment relationship, misalignment alignment relationship, and consistency verification include: Lighting control state sequence and brightness change characteristic sequence are formed based on lighting control segments and lighting response data; motion prompt state sequence and inertial response characteristic sequence are formed based on terminal motion prompt segments and inertial response data. Based on the hardware timestamp and the allowable response delay corresponding to the inspection task version, the lighting control state sequence and brightness change feature sequence, and the motion prompt state sequence and inertial response feature sequence are time-aligned to form the correct alignment relationship of the corresponding response data types. Each response feature sequence is divided into three or more response feature segments. The feature values ​​and internal order of each segment are kept unchanged. Non-zero cyclic shift and two non-adjacent response feature segments are swapped to form multiple misalignment alignment relationships. These relationships are then combined with the correct alignment relationships to form a corresponding set of alignment relationships. When both the control state sequence and the corresponding response feature sequence have non-zero variance, calculate their normalized correlation coefficients under correct alignment and various misalignment relationships, and verify them according to the following conditions: ; In the formula, Indicates the data type of the response. and These represent lighting response data and inertial response data, respectively. Represents the response data type The corresponding correct alignment relationship, Represents the response data type The corresponding set of alignment relationships, express Alignment relationships in Represents the response data type In alignment The normalized correlation coefficient is below. and These represent the response data types respectively. The corresponding consistency threshold and difference threshold; When the variance of either the control state sequence or the corresponding response feature sequence is zero, it is determined that the corresponding response data has failed the consistency verification. If both types of response data meet the above conditions, and the on-site collected data meets the collection requirements corresponding to the current mandatory inspection item, then the current mandatory inspection item is determined to meet the formation conditions of a valid inspection data unit.

6. The method for collecting and verifying inspection data in a network-restricted environment according to claim 5, characterized in that, The generation of the valid inspection data unit and the current inspection data summary value includes: When the current mandatory inspection item meets the conditions for forming a valid inspection data unit, the summary values ​​of the acquisition control sequence, field acquisition data, lighting response data, inertial response data and hardware timestamp are calculated respectively, and the inspection task version, mandatory inspection item identifier, current incrementing count value and each summary value are combined to form a valid inspection data unit; The valid inspection data units are encoded according to the preset field order. The encoding result is combined with the previous inspection data summary value and the summary is calculated to generate the current inspection data summary value. The previous inspection data summary value and the current inspection data summary value are associated with and saved with the valid inspection data units. When there is a next mandatory inspection item, the current inspection data summary value is used as the previous inspection data summary value of the next mandatory inspection item, and together with the random control value, the next mandatory inspection item identifier, and the current incrementing count value obtained when starting the next mandatory inspection item, it is used to generate the acquisition control sequence of the next mandatory inspection item.

7. The method for collecting and verifying inspection data in a network-restricted environment according to claim 6, characterized in that, The data upload after network recovery includes: After the network is restored, check the terminal to upload the offline verification authorization certificate; The data to be uploaded is formed by effectively inspecting the data units and their corresponding field-collected data, lighting response data, inertial response data, and hardware timestamp encoding, and is divided into multiple data blocks. Data block identifiers are generated according to the inspection task version, the current inspection data summary value, and the data block sequence number. Data block summary values ​​are generated for each data block, and data integrity verification values ​​are generated by arranging the data block summary values ​​according to the data block sequence number. An upload list is generated for each valid inspection data unit. The upload list includes the inspection task version, mandatory inspection item identifier, previous inspection data summary value, current inspection data summary value, current increment count value, data block identifier and data block summary value of each data block, and data integrity verification value. The inspection terminal sends the upload list to the cloud server. The cloud server identifies missing data blocks based on the upload list and received data blocks, and checks the terminal uploads the corresponding missing data blocks. After all data blocks have been received, the cloud server verifies the data block identifier and data block digest value, regenerates the data integrity check value, and compares it with the data integrity check value in the upload list. If the comparison matches, it is determined that the corresponding valid check data unit and associated data have been completely uploaded; otherwise, the upload remains incomplete.

8. The method for collecting and verifying inspection data in a network-restricted environment according to claim 7, characterized in that, The reconstruction and verification of the acquisition control sequence includes: The cloud server verifies the offline inspection authorization certificate, obtains the allowed counting range and the random control value and initial inspection data summary value corresponding to the inspection task version; verifies that the current incrementing count value of each valid inspection data unit is within the allowed counting range and is not repeated, and determines the inspection order according to the current incrementing count value; The first valid inspection data unit uses the initial inspection data summary value as the previous inspection data summary value. According to the inspection order, the random control value, the mandatory inspection item identifier, the previous inspection data summary value and the current incrementing count value are input into the same preset pseudo-random sequence generation program as the inspection terminal to reconstruct the acquisition control sequence. Based on the reconstructed acquisition control sequence, the uploaded field acquisition data, the two types of response data, and the hardware timestamp, the corresponding summary value is recalculated and compared with the summary value in the valid check data unit; if the comparison is consistent, the correct alignment relationship and the misalignment alignment relationship are reconstructed and the consistency verification is performed again; When the verification is successful, the current inspection data digest value is regenerated based on the valid inspection data unit and the previous inspection data digest value. It is then compared with the current inspection data digest value in the upload list and continuously compared with the previous inspection data digest value in the next upload list. This process is repeated to complete the reconstruction and verification of each mandatory inspection item.

9. The method for collecting and verifying inspection data in a network-restricted environment according to claim 8, characterized in that, The reconstruction and verification of each mandatory inspection item includes: The cloud server retrieves the set of mandatory inspection items corresponding to the inspection task version and the collection requirements for each mandatory inspection item. Verify that the identifiers of each mandatory inspection item are unique, that the set of identifiers of each mandatory inspection item is the same as the set of mandatory inspection items, and verify that the data collected on site meets the collection requirements of the corresponding mandatory inspection items. When the acquisition control sequence reconstruction and consistency verification are passed, the summary values ​​are consistent, the summary values ​​of adjacent inspection data are continuous, the mandatory inspection items are complete, and the on-site acquisition data meets the corresponding acquisition requirements, the inspection task is deemed to have passed verification.

10. A system for collecting and verifying inspection data in a network-restricted environment, used to execute the method for collecting and verifying inspection data in a network-restricted environment as described in any one of claims 1-9, characterized in that, This includes checking the terminal and cloud server: The cloud server includes a task management module and a reconstruction verification module, while the inspection terminal includes an offline mode control module, a data acquisition control module, a data unit generation module, and a data upload module. The task management module is used to generate and distribute inspection task versions, offline inspection authorization credentials, random control values, and initial inspection data summary values, and to save random control values ​​in association with the inspection task version; The offline mode control module is used to determine network anomalies based on network communication status, read the current increment value of the monotonically increasing counter, and enter the offline check mode when the offline check of the authorization certificate and the current increment value verification pass. The data acquisition and control module is used to generate a data acquisition and control sequence based on random control values, mandatory inspection item identifiers, previous inspection data summary values, and current incrementing count values, and to acquire on-site data acquisition, lighting response data, inertial response data, and hardware timestamps. The data unit generation module is used to establish a correct alignment relationship based on the hardware timestamp. After cyclic shifting of response feature fragments and reordering of non-adjacent fragments, a misaligned alignment relationship is formed. The correct alignment consistency of the two types of response data reaches the consistency threshold and the difference between the data and the maximum misaligned alignment consistency reaches the difference threshold. When the field-collected data meets the collection requirements, a valid inspection data unit is formed and the current inspection data summary value is generated. The data upload module is used to upload offline inspection authorization credentials, valid inspection data units, and associated data after the network is restored; The reconstruction and verification module is used to reconstruct the acquisition control sequence based on random control values, mandatory inspection item identifiers, previous inspection data summary values, and current incrementing count values. It reconstructs correct alignment relationships and misalignment alignment relationships and re-verifies the two types of response data. It verifies the continuity of inspection data summary values, the completeness of mandatory inspection items, and whether the on-site acquired data meets the acquisition requirements. When each verification passes, the inspection task is determined to have passed verification.