A method and system for authenticity determination of multi-dimensional sensor data
Patent Information
- Application Number
- CN202611041469.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]然而,目前的此类方式或传统方法,存在显著问题
[0054]上述多维度传感器数据的真实性判定方法及系统,获取校准任务要求,基于校准任务要求,生成任务流水号,并基于校准任务要求和任务流水号,创建得到校准任务对象;获取任务流水号对应的实时传感器数据,并对实时传感器数据进行整合加密,得到加密现场数据包;其中,实时传感器数据包括设备身份信息;基于校准任务对象,对加密现场数据包进行基础多维度规则验证,得到合规验证结果;获取设备身份信息对应的历史行为序列,并将实时传感器数据和历史行为序列输入到异常检测模型中,生成异常验证结果;在决策规则库中匹配合规验证结果和异常验证结果对应的现场真实性判定结果,生成现场真实性判定报告。能够杜绝设备差异导致的数据不可比问题;实现客观数据驱动的自动化流程,显著降低监督成本,并形成不可篡改的原始证据;引入机器学习,具备发现未知、复杂或隐蔽作弊模式的能力,有效提高现场校准真实性判定的可靠性。
Smart Images

Figure CN122926076A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data recognition, and in particular relates to a method and system for determining the authenticity of multi-dimensional sensor data. Background Technology
[0002] With the development of on-site metrology and calibration technology, increasingly stringent requirements have been placed on the authenticity of the operation process, the reliability of the data, and the traceability of the entire process. Against this backdrop, relying on information technology for operation supervision and management has become a trend, such as using the positioning function of general-purpose mobile devices to confirm personnel presence.
[0003] In traditional technical models, ensuring the authenticity of on-site calibration operations mainly relies on the conscientiousness of calibration personnel, manually filled-out paper records or reports, and limited technical means for verification. Typical methods include: calibration personnel manually recording the time, location, and environmental parameters, and submitting paper or electronic reports afterward; or using non-dedicated mobile devices to collect only GPS location information and compare it simply with the task information to achieve the most basic on-site supervision.
[0004] However, current methods, or traditional approaches, have significant problems. First, the ability to verify the authenticity of the operation is weak, failing to effectively prove whether the calibration was genuinely performed by designated personnel at the specified time, location, and under compliant environmental conditions, posing a risk of proxy calibration and sham calibration. Second, supervision and verification are costly, relying on post-event manual report review or on-site supervision, which is inefficient and lacks comprehensive coverage. Third, due to the lack of standardized management of operational terminal equipment, the significant differences in sensor accuracy between different devices result in insufficient credibility and comparability of the collected auxiliary data, making it impossible to form a unified and reliable basis for judgment. Finally, records generated by traditional methods are easily tampered with and lack objectivity, failing to meet the stringent requirements for a complete chain of evidence in the calibration process. Summary of the Invention
[0005] Therefore, it is necessary to provide a method and system for determining the authenticity of multi-dimensional sensor data that can reduce supervision costs, form tamper-proof original evidence, and proactively identify risks associated with abnormal patterns, in order to address the aforementioned technical problems.
[0006] Firstly, this application provides a method for determining the authenticity of multi-dimensional sensor data, including:
[0007] Obtain the calibration task requirements, generate a task serial number based on the calibration task requirements, and create a calibration task object based on the calibration task requirements and the task serial number.
[0008] The system acquires the real-time sensor data corresponding to the task serial number, integrates and encrypts the real-time sensor data to obtain an encrypted field data packet; the real-time sensor data includes device identity information.
[0009] Based on the calibration task object, basic multi-dimensional rule verification is performed on the encrypted on-site data packets to obtain compliance verification results;
[0010] Obtain the historical behavior sequence corresponding to the device identity information, and input the real-time sensor data and historical behavior sequence into the anomaly detection model to generate anomaly verification results;
[0011] Match the compliance verification results and abnormal verification results with the on-site authenticity determination results in the decision rule base, and generate an on-site authenticity determination report.
[0012] Furthermore, the anomaly verification results include anomalous data and discrete risk levels;
[0013] Real-time sensor data and historical behavior sequences are input into the anomaly detection model to generate anomaly verification results, including:
[0014] Historical behavior sequences and real-time sensor data are input into the feature extraction layer of the anomaly detection model for feature extraction, resulting in a verification feature vector.
[0015] The verification feature vector is input into the self-attention classification layer of the anomaly detection model to perform anomaly pattern detection, and anomaly risk probability value and attention weight list are obtained.
[0016] Based on the built-in risk level mapping rules in the anomaly detection model, the risk level mapping layer converts the anomaly risk probability value into a discrete risk level.
[0017] The abnormal data identification layer in the anomaly detection model sorts the attention weights in descending order based on the attention weight list to obtain the sorted attention weight list. The top K attention weights are extracted from the sorted attention weight list to obtain the key attention weights. The real-time sensor data components corresponding to the key attention weights in the real-time sensor data are set as abnormal data.
[0018] By integrating abnormal data and discrete risk levels, anomaly verification results are obtained.
[0019] Furthermore, the method also includes:
[0020] Obtain historical calibration task records, business metadata, and manual verification records. Based on the manual verification records, perform preliminary annotation on the associated historical calibration task records and business metadata to obtain the original annotated dataset.
[0021] Based on the original labeled dataset, static feature data of each historical calibration task record is extracted, and the temporal features of the static feature data of each historical calibration task record in the same device are calculated to obtain the temporal feature dataset; among which, the temporal features include movement pattern features, environmental deviation features and behavioral statistical features.
[0022] Based on domain knowledge rules, data augmentation is performed on the time-series feature dataset to obtain the model training dataset;
[0023] Based on the model training dataset, the anomaly detection model framework is trained with the goal of minimizing the total loss value, and the parameters of each anomaly detection model are obtained.
[0024] The performance of each anomaly detection model parameter is evaluated to obtain the performance evaluation results. Based on the performance evaluation results, the optimal anomaly detection model parameter is selected and fixed to obtain the anomaly detection model.
[0025] Furthermore, the total loss value is calculated using the following formula:
[0026] ;
[0027] In the formula, This is the total loss value. To monitor the classification of losses, For attention sparsity loss, For loss of attentional consistency, and These are the weighting coefficients;
[0028] The formula for calculating attention sparsity loss is as follows:
[0029] ;
[0030] In the formula, N is the number of samples, i is the sample index, T is the sequence length, and t is the sequence time step index. Let be the scalar weight of the attention distribution vector of the i-th sample at the t-th time step. It is a very small positive number;
[0031] The formula for calculating attention consistency loss is as follows:
[0032] ;
[0033] In the formula, Let j be the set of sample pairs (j, k) with the same label. Let P be the total number of elements in set P. Let be the Euclidean length of the vector. Let j be the attention distribution vector of the j-th sample. Let be the attention distribution vector of the k-th sample.
[0034] Furthermore, based on domain knowledge rules, data augmentation is performed on the time-series feature dataset to obtain the model training dataset, including:
[0035] Based on manual verification records, samples were screened from the time-series feature dataset to obtain a basic seed dataset. Then, class imbalance was processed from the basic seed dataset to obtain a seed dataset.
[0036] Based on domain knowledge rules, anomaly patterns are synthesized from the seed dataset to obtain an augmented dataset;
[0037] Using samples in the augmented dataset as a reference, unsupervised anomaly detection is performed on unlabeled samples in the time-series feature dataset to obtain the augmented dataset;
[0038] Based on the chronological order, the expanded dataset is divided into a training set, a validation set, and a test set to obtain the model training dataset.
[0039] Furthermore, the calibration task requirements include spatiotemporal condition range, environmental condition range, and equipment model constraints; real-time sensor data also includes timestamps and environmental data.
[0040] Based on the calibration task object, basic multi-dimensional rule verification is performed on the encrypted on-site data packets to obtain compliance verification results, including:
[0041] Based on the calibration task object, the encrypted field data packet is decrypted to obtain the decrypted field data;
[0042] By comparing the equipment model constraints and the equipment identity information in the decrypted field data, the equipment consistency verification results are obtained;
[0043] By comparing the on-site GPS coordinates in the spatiotemporal conditions and environmental data, the location compliance verification results are obtained.
[0044] By comparing the range of spatiotemporal conditions and the timestamp, the time compliance verification result is obtained; by comparing the range of environmental conditions and the temperature and humidity data in the environmental data, the environmental compliance verification result is obtained.
[0045] Based on the weights of the verification results, the compliance verification results are obtained by weighted summation of the equipment consistency verification results, location compliance verification results, time compliance verification results, and environmental compliance verification results.
[0046] Secondly, this application also provides a system for determining the authenticity of multi-dimensional sensor data, including:
[0047] The task module is used to obtain calibration task requirements, generate a task serial number based on the calibration task requirements, and create a calibration task object based on the calibration task requirements and the task serial number.
[0048] The integration module is used to acquire the real-time sensor data corresponding to the task serial number, and to integrate and encrypt the real-time sensor data to obtain an encrypted field data packet; wherein, the real-time sensor data includes device identity information;
[0049] The verification module is used to perform basic multi-dimensional rule verification on encrypted field data packets based on calibration task objects to obtain compliance verification results.
[0050] The anomaly module is used to obtain the historical behavior sequence corresponding to the device identity information, and input the real-time sensor data and historical behavior sequence into the anomaly detection model to generate anomaly verification results;
[0051] The reporting module is used to match the compliance verification results and abnormal verification results with the on-site authenticity determination results in the decision rule base and generate an on-site authenticity determination report.
[0052] Thirdly, this application also provides a computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement any step of the method provided in the first aspect of this application.
[0053] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any step of the method provided in the first aspect of this application.
[0054] The aforementioned method and system for determining the authenticity of multi-dimensional sensor data involves: acquiring calibration task requirements; generating a task serial number based on these requirements; creating a calibration task object based on both the requirements and the serial number; acquiring the real-time sensor data corresponding to the serial number and integrating and encrypting it to obtain an encrypted field data package; the real-time sensor data including device identity information; performing basic multi-dimensional rule verification on the encrypted field data package based on the calibration task object to obtain a compliance verification result; acquiring the historical behavior sequence corresponding to the device identity information and inputting the real-time sensor data and the historical behavior sequence into an anomaly detection model to generate an anomaly verification result; and matching the compliance verification result and the anomaly verification result with the corresponding field authenticity determination result in the decision rule base to generate a field authenticity determination report. This approach effectively eliminates data incomparability issues caused by device differences; achieves an automated process driven by objective data, significantly reducing supervision costs and forming tamper-proof original evidence; and incorporates machine learning, enabling the discovery of unknown, complex, or concealed cheating patterns, effectively improving the reliability of field calibration authenticity determination. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 This is a schematic diagram of the process for determining the authenticity of multi-dimensional sensor data according to an embodiment of the present invention;
[0057] Figure 2 This is a schematic diagram of the structure of a multi-dimensional sensor data authenticity determination system provided in an embodiment of the present invention; Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0059] In one embodiment, such as Figure 1 As shown, a method for determining the authenticity of multi-dimensional sensor data is provided. This embodiment illustrates the application of this method to an authenticity determination terminal. It is understood that this method can also be applied to an authenticity determination server, and further to a system including both an authenticity determination terminal and an authenticity determination server, and is implemented through the interaction between the two. In this embodiment, the method includes the following steps:
[0060] Step 101: Obtain the calibration task requirements, generate a task serial number based on the calibration task requirements, and create a calibration task object based on the calibration task requirements and the task serial number.
[0061] Specifically, calibration task requirements refer to the set of directives issued by the field calibration system or management personnel when initiating a field calibration operation. Calibration task requirements specify the conditions that the calibration operation must meet. These requirements may include time and space constraints, environmental constraints, and equipment model constraints.
[0062] Optionally, the task serial number can be an automatically generated and globally unique string or numeric sequence identifier. The task serial number can be used to accurately identify and track specific calibration task instances, ensuring that all data, operations, and records related to the calibration task instance can be accurately associated.
[0063] Optionally, the calibration task object can be a structured data entity created in memory or storage. The calibration task object can be used to integrate all the specific details of the calibration task requirements and the task serial number to form a complete, programmable, and transferable digital representation of the task.
[0064] Optionally, the authenticity verification terminal can receive and read the calibration task requirements for this task from the superior management system after obtaining authorization. The authenticity verification terminal can automatically generate a unique task serial number according to preset generation rules. The authenticity verification terminal can bind and encapsulate the obtained calibration task requirements with the generated task serial number, and instantiate a calibration task object in memory. The calibration task object serves as the core basis for all subsequent verification processes.
[0065] For example, a task serial number can be obtained by combining a timestamp, a random number, and a sequence number.
[0066] Step 102: Obtain the real-time sensor data corresponding to the task serial number, and integrate and encrypt the real-time sensor data to obtain an encrypted field data packet.
[0067] Optionally, real-time sensor data may include device identification information.
[0068] Specifically, real-time sensor data refers to the physical environment data stream collected in real time by the field terminal through its built-in or external sensor hardware during calibration tasks. In addition to device identification information, real-time sensor data may also include timestamps and environmental data. The field terminal can be a device of a uniform model.
[0069] Optionally, the device identification information can be information that uniquely identifies the field terminal performing this calibration task.
[0070] Optionally, the encrypted field data packet can be a data block that cannot be directly read, obtained by packaging real-time sensor data in a specific format and then encrypting it using an encryption algorithm. The purpose of the encrypted field data packet is to ensure the confidentiality and integrity of the data during transmission and storage, and to prevent tampering or theft.
[0071] Optionally, the authenticity verification terminal can continuously collect real-time sensor data based on the currently executing task sequence number. The terminal can assemble and package all real-time sensor data, including device identity information, timestamps, and environmental data, according to a predefined data structure. The terminal can then use a pre-set encryption key to encrypt the packaged data, generating an encrypted on-site data packet.
[0072] Step 103: Based on the calibration task object, perform basic multi-dimensional rule verification on the encrypted field data packets to obtain compliance verification results.
[0073] Specifically, basic multi-dimensional rule verification can refer to the process of automatically comparing and checking the compliance of multiple aspects of real-time sensor data in encrypted field data packets according to the provisions in the calibration task object.
[0074] Optionally, the compliance verification results can be quantitative scores or qualitative conclusions, and can be used to comprehensively reflect the degree of compliance of on-site data with various hard rules.
[0075] Optionally, the authenticity assessment terminal can decrypt the encrypted field data packets to read the raw information from the field sensors contained within. The terminal can then compare the field information decrypted from the encrypted field data packets with each of the pre-defined task requirements in the calibration task. This comparison and verification process can be performed simultaneously across multiple dimensions. The terminal can verify whether the device model of the submitted data is completely consistent with the device model constraints specified in the calibration task and check whether the device has been successfully registered. The terminal can calculate the actual distance between the location represented by the GPS positioning information collected on-site and the calibration location specified in the calibration task, and determine whether this distance is within the allowable error range. The terminal can determine whether the timestamps recorded in the field data fall within the calibration time window specified in the calibration task. The terminal can determine whether the environmental temperature and humidity data collected on-site meet the environmental conditions specified in the calibration task. The terminal can assign pre-defined weights to the verification results for each dimension, and through weighted calculation, summarize to obtain a comprehensive score and / or grade conclusion.
[0076] Step 104: Obtain the historical behavior sequence corresponding to the device identity information, and input the real-time sensor data and historical behavior sequence into the anomaly detection model to generate anomaly verification results.
[0077] Specifically, device identification information can be information that uniquely identifies the field terminal performing this calibration task.
[0078] Optionally, the historical behavior sequence can refer to an ordered set of historical calibration data records generated by the device in the past, which are associated with the current device identity information. The historical behavior sequence can be used to characterize the device's behavior pattern under normal conditions.
[0079] Optionally, the anomaly detection model can be an artificial intelligence analysis model. The core function of the anomaly detection model can be to establish a normal behavior benchmark by learning the historical behavior sequence of the device and to determine whether the newly input real-time sensor data shows an anomaly that deviates significantly from the normal pattern.
[0080] Optionally, the anomaly verification result can be the conclusion generated after anomaly detection model analysis. The anomaly verification result can include discrete risk levels and anomalous data, where the discrete risk level can be used to represent the overall degree of anomaly risk in the data of this calibration task; the anomalous data can be used to identify specific data points or data segments that are determined to be anomalous by the model.
[0081] Optionally, the authenticity verification terminal can query historical data recorded by the device during past calibration tasks in the background database based on the device identity information extracted from the real-time sensor data. This historical data, arranged chronologically, constitutes the device's historical behavior sequence. The authenticity verification terminal can then submit the real-time sensor data collected in the current task, along with the device's historical behavior sequence, to a pre-trained anomaly detection model for analysis. The anomaly detection model analyzes and calculates the real-time sensor data and the device's historical behavior sequence. The analysis process of the anomaly detection model can at least include determining whether the current overall behavior pattern is abnormal relative to the historical normal pattern, outputting a discrete risk level representing the probability of an anomaly; and if an anomaly risk is determined, it can further identify and mark which specific data components or time periods are abnormal from the real-time sensor data; the marked data is the anomalous data. The anomaly verification result output by the anomaly detection model can include the discrete risk level and the conclusion of the specific anomalous data.
[0082] Step 105: Match the compliance verification results and abnormal verification results with the on-site authenticity determination results in the decision rule base, and generate an on-site authenticity determination report.
[0083] Specifically, a decision rule base can be a collection of rules that store various decision-making logics. The decision rule base can be used to define how different compliance verification results and different exception verification results are combined and mapped to the decision conclusion.
[0084] Optionally, the on-site authenticity determination result can be a conclusion on whether the on-site execution of this calibration task was genuine.
[0085] Optionally, the on-site authenticity determination report can be used to summarize the entire process and conclusions of this determination. The on-site authenticity determination report may include the task serial number, compliance verification results, abnormal verification results, and on-site authenticity determination results, and may also include key evidence and determination basis.
[0086] Optionally, the authenticity assessment terminal can submit compliance verification results and anomaly verification results as input to a decision rule base for matching. The decision rule base performs reasoning based on preset logic. Based on the matched on-site authenticity assessment results, the authenticity assessment terminal can automatically integrate all key information of this task and generate a complete on-site authenticity assessment report in a formatted manner.
[0087] For example, the preset logic can be: if the compliance verification result is passed and the risk level of the abnormal verification result is low, it is determined to be genuine; if the compliance verification result is passed but the risk level of the abnormal verification result is high, it is determined to be suspected of being fake.
[0088] The multi-dimensional sensor data authenticity determination method provided in this embodiment obtains calibration task requirements, generates a task serial number based on the calibration task requirements, and creates a calibration task object based on the calibration task requirements and the task serial number; obtains the real-time sensor data corresponding to the task serial number, and integrates and encrypts the real-time sensor data to obtain an encrypted field data package; wherein, the real-time sensor data includes device identity information; based on the calibration task object, performs basic multi-dimensional rule verification on the encrypted field data package to obtain a compliance verification result; obtains the historical behavior sequence corresponding to the device identity information, and inputs the real-time sensor data and the historical behavior sequence into an anomaly detection model to generate an anomaly verification result; matches the compliance verification result and the anomaly verification result with the corresponding field authenticity determination result in the decision rule base to generate a field authenticity determination report. Through the above methods, the data incomparability problem caused by device differences can be eliminated; an automated process driven by objective data can be realized, significantly reducing supervision costs and forming tamper-proof original evidence; machine learning is introduced, which has the ability to discover unknown, complex or hidden cheating patterns, effectively improving the reliability of field calibration authenticity determination.
[0089] In one embodiment, the anomaly verification result may include anomaly data and discrete risk levels;
[0090] Real-time sensor data and historical behavior sequences are input into the anomaly detection model to generate anomaly verification results, including:
[0091] Step 201: Input the historical behavior sequence and real-time sensor data into the feature extraction layer of the anomaly detection model to extract features and obtain the verification feature vector.
[0092] Optionally, the feature extraction layer of the anomaly detection model can be a component of the anomaly detection model. The feature extraction layer can consist of fully connected layers, convolutional layers, or recurrent neural network layers. The function of the feature extraction layer in the anomaly detection model is to automatically learn and extract high-level abstract information from the input raw data that effectively represents the essence of the data and contributes to subsequent judgments.
[0093] Optionally, the validation feature vector can be the output of the feature extraction layer of the anomaly detection model after processing historical behavior sequences and real-time sensor data. The validation feature vector can be a refined and compressed digital representation that reflects the feature patterns of the current real-time sensor data in the context.
[0094] Optionally, the authenticity determination terminal can input the decrypted real-time sensor data and historical behavior sequences associated with the current device obtained from the database into the feature extraction layer of the loaded anomaly detection model. The feature extraction layer of the anomaly detection model can process the input sequence data, including encoding the raw sensor readings and calculating the sequence's statistical characteristics, trend characteristics, periodic characteristics, or more complex deep features. The core function of the feature extraction layer of the anomaly detection model is to transform time-series data of varying lengths and dimensions into fixed-length, information-rich verification feature vectors. After completing the calculations, the feature extraction layer of the anomaly detection model can output verification feature vectors representing the core information of the current data pattern and pass these verification feature vectors to the next layer of the model.
[0095] Step 202: Input the verification feature vector into the self-attention classification layer of the anomaly detection model to perform anomaly pattern detection and obtain anomaly risk probability values and attention weight list.
[0096] Specifically, the self-attention classification layer of anomaly detection models can be implemented based on a self-attention mechanism. The self-attention mechanism allows the model to dynamically evaluate the correlation and importance between different feature elements within a vector when processing validation feature vectors, thereby enabling a better understanding of the overall structure and contextual dependencies of the data.
[0097] Optionally, the anomaly risk probability value can be a continuous value between 0 and 1, output by the self-attention classification layer of the anomaly detection model. The anomaly risk probability value can directly quantify the likelihood that the current real-time sensor data belongs to an anomalous mode; the closer the anomaly risk probability value is to 1, the higher the risk and the more likely it is to be anomaly.
[0098] Optionally, the attention weight list can be a list generated simultaneously by the self-attention classification layer of the anomaly detection model during the computation process. Each element in the attention weight list can correspond to a weight score of one or more feature elements in the verification feature vector. The weight score can reflect the contribution or importance of that feature element to the calculation of the anomaly risk probability value.
[0099] Optionally, the authenticity determination terminal can input the verification feature vector into the self-attention classification layer of the anomaly detection model. The self-attention classification layer of the anomaly detection model can perform calculations on the verification feature vector. The self-attention mechanism can calculate the relationships between the various parts of the verification feature vector and, based on knowledge learned during training, focus on the most critical combination feature patterns for anomaly detection. The self-attention classification layer of the anomaly detection model can output an anomaly risk probability value that integrates all information and a list of attention weights recording the importance of each part during the calculation process.
[0100] Step 203: Based on the risk level mapping layer with built-in risk level mapping rules in the anomaly detection model, convert the anomaly risk probability value into a discrete risk level.
[0101] Optionally, the risk level mapping layer in the anomaly detection model, which includes built-in risk level mapping rules, can contain a set of predefined, manually set threshold rules. The risk level mapping layer can be used to map continuous anomaly risk probability values to a limited number of levels that are easier for the business to understand.
[0102] Optionally, the discrete risk level can be the output of the risk level mapping layer in the anomaly detection model, which has built-in risk level mapping rules. Discrete risk levels can use a limited number of level labels to describe the degree of risk, and are more intuitive for decision-makers than continuous numerical values such as anomaly risk probability values.
[0103] For example, discrete risk levels can include high, medium, and low risk, or normal, warning, and abnormal.
[0104] Optionally, the authenticity determination terminal can input the anomaly risk probability value into the risk level mapping layer in the anomaly detection model. The risk level mapping layer makes a judgment based on its built-in mapping rules, and outputs the corresponding discrete risk level according to the rules.
[0105] For example, the mapping rule can be defined as follows: if the probability value of abnormal risk is less than 0.3, it is mapped to low risk; if the probability value of abnormal risk is between 0.3 and 0.7, it is mapped to medium risk; if the probability value of abnormal risk is greater than 0.7, it is mapped to high risk.
[0106] Step 204: Through the anomaly data identification layer in the anomaly detection model, the attention weights are sorted in descending order based on the attention weight list to obtain the sorted attention weight list. The top K attention weights are extracted from the sorted attention weight list to obtain the key attention weights, and the real-time sensor data components corresponding to the key attention weights in the real-time sensor data are set as anomaly data.
[0107] Optionally, the anomaly data identification layer in the anomaly detection model can be a component responsible for locating specific anomalies. The anomaly data identification layer itself does not perform complex calculations; its main function is to backtrack and label the original input data based on a list of attention weights.
[0108] Optionally, the sorted attention weight list can be a new list obtained by arranging the weight values in the attention weight list from largest to smallest by the anomaly data recognition layer in the anomaly detection model. Sorting the attention weight list allows the items with the highest weights to be placed first.
[0109] Optionally, the key attention weights can be the top K largest attention weights extracted from the top of the ranked attention weight list by the anomaly identification layer in the anomaly detection model. The top K key attention weights can be considered to correspond to the features or time points that contribute the most to the anomaly judgment.
[0110] Optionally, anomalous data can be specific data points or data segments marked as suspicious, output by the anomalous data identification layer in the anomaly detection model. Anomalous data can be a subset of the original real-time sensor data, specifically referring to the real-time sensor data components corresponding to the focus attention weights.
[0111] Optionally, the authenticity assessment terminal can pass the attention weight list generated by the self-attention classification layer of the anomaly detection model to the anomaly data identification layer. The anomaly data identification layer can sort all weight values in the attention weight list from largest to smallest to generate a sorted attention weight list. The anomaly data identification layer can read a preset parameter K and extract K weights from the beginning of the sorted attention weight list to obtain the key attention weights. The anomaly data identification layer can find the feature dimension in the verification feature vector associated with each key attention weight based on its index position in the original attention weight list. The anomaly data identification layer can map this feature dimension back to the specific sensor reading at the corresponding specific time point in the original real-time sensor data through the records of the feature extraction layer of the anomaly detection model. The anomaly data identification layer can mark the mapped specific reading as anomaly data.
[0112] Step 205: Integrate the abnormal data and discrete risk levels to obtain the anomaly verification results.
[0113] Optionally, the anomaly verification results can be combined with the overall risk assessment of the anomaly detection model and the specific location of anomaly evidence.
[0114] Optionally, the authenticity assessment terminal can collect the discrete risk levels output by the risk level mapping layer of the anomaly detection model's built-in risk level mapping rules, as well as the list of anomalous data output by the anomaly data identification layer of the anomaly detection model. The authenticity assessment terminal can combine the discrete risk levels and the list of anomalous data to obtain the anomaly verification result.
[0115] In one embodiment, the method further includes:
[0116] Step 301: Obtain historical calibration task records, business metadata, and manual verification records. Based on the manual verification records, perform preliminary annotation on the associated historical calibration task records and business metadata to obtain the original annotated dataset.
[0117] Optionally, a historical calibration task record can be a collection of process and result data generated and stored during past calibration tasks performed and completed by the device. A historical calibration task record may include real-time sensor data at the time of the task, basic multi-dimensional rule verification results, and on-site authenticity assessment reports.
[0118] Optionally, the business metadata can be data describing the business attributes of the calibration task, and the business metadata can come from the task management system. The business metadata may include, but is not limited to, task type, model of the device being calibrated, information of the calibration personnel performing the task, and special environmental conditions required by the task.
[0119] Optionally, the manual verification record can be a conclusive record formed by management personnel or quality inspectors after manually reviewing the records of completed historical calibration tasks. The manual verification record may record the labels that the task was manually determined to be genuine, questionable, or false, and may include remarks.
[0120] Optionally, the original labeled dataset can be an initial dataset for model training formed by associating and integrating the device's historical calibration task records, associated business metadata, and manual verification records, and labeling each record as normal or abnormal based on the judgment conclusions in the manual verification records.
[0121] Optionally, the authenticity verification terminal can batch read a large number of historical calibration task records and associated business metadata from the historical database and business database. The terminal can also retrieve the manual verification records for the corresponding historical calibration task records from the audit system. The terminal can link the historical calibration task records, business metadata, and manual verification records for the same calibration task using key fields such as task serial number and device identifier, forming a complete integrated record containing the original data, business context, and manual verification results. Based on the manual verification conclusions in the manual verification records, the terminal can assign tags to each integrated record.
[0122] For example, if a manual verification record determines that a task is genuine, the record can be marked as a normal sample; if it is determined to be false or questionable, it can be marked as an abnormal sample.
[0123] Step 302: Based on the original labeled dataset, extract the static feature data of each historical calibration task record, and calculate the temporal features of the static feature data of each historical calibration task record in the same device to obtain the temporal feature dataset.
[0124] Optionally, time-series features may include mobility pattern features, environmental deviation features, and behavioral statistical features.
[0125] Optionally, static feature data can be features that describe the attributes of a single historical calibration task and are directly extracted from its associated business metadata. Static feature data can be independent and discrete, such as GPS coordinates, average temperature and humidity, task duration, and type of equipment being calibrated for a single task.
[0126] Optionally, the temporal characteristics can be dynamic characteristics calculated from the static characteristic data of a device over multiple tasks within a historical period, arranged in chronological order, and reflecting changes or patterns in the device's behavior. Temporal characteristics may include mobility pattern characteristics, environmental deviation characteristics, and behavioral statistical characteristics.
[0127] For example, movement pattern characteristics may include the distance, speed, and directional patterns of the device's movement between different task locations. Environmental deviation characteristics may include the fluctuation range of temperature and humidity in the historical task environment of the device, and the average deviation from standard environmental conditions. Behavioral statistical characteristics may include the time period distribution of the tasks performed by the device, the stability of task frequency, and task intervals.
[0128] Optionally, the temporal feature dataset can be a new dataset obtained by processing the original labeled dataset. In the temporal feature dataset, each data sample can correspond to the state of the device at a certain point in time, and the data sample can contain static feature data extracted from the current task record and temporal features calculated based on the historical task sequence of the device.
[0129] Optionally, the authenticity assessment terminal can traverse each historical calibration task record in the original labeled dataset, parse and calculate a set of static feature data from the records. The terminal can group all historical calibration task records and their corresponding static feature data according to device identity information. Within each device group, the terminal can sort the records in ascending order according to the task completion timestamp to obtain the historical task sequence for each device. For each device, the terminal can slide a time window over its historical task sequence and calculate the temporal features of the static feature data within the window. The terminal can combine the static feature data of each device at each task time point with the temporal features calculated based on its history to obtain new samples for each device containing temporal context information. The set of all samples containing temporal context information constitutes the temporal feature dataset. Samples in the temporal feature dataset can inherit the manually labeled tags from the original labeled dataset.
[0130] For example, calculating time-series features may include calculating movement pattern features between recent task locations; calculating environmental deviation features between recent task environment data and standard values; and calculating behavioral statistical features of task execution time.
[0131] Step 303: Based on domain knowledge rules, perform data augmentation on the time-series feature dataset to obtain the model training dataset.
[0132] Optionally, domain knowledge rules can be descriptive rules about abnormal calibration behavior patterns summarized by calibration experts or business personnel based on their experience. Domain knowledge rules can be used to guide data augmentation.
[0133] Optionally, the model training dataset can be a collection of data obtained by performing a series of augmentation and partitioning operations on the temporal feature dataset, used to directly train the anomaly detection model framework. The model training dataset can include a training set, a validation set, and a test set.
[0134] Optionally, the authenticity assessment terminal can filter the time-series feature dataset based on the reliability of manually verified records, selecting samples with high-quality and clear labeling to form the basic seed dataset. The terminal can use oversampling or undersampling techniques to address the severe imbalance between normal and abnormal samples in the basic seed dataset, resulting in a class-balanced seed dataset. The terminal can apply domain knowledge rules to programmatically simulate abnormal patterns based on normal samples in the seed dataset. Newly synthesized samples are labeled as abnormal and added to the dataset, resulting in an augmented dataset. Using samples in the augmented dataset as a reference, the terminal can run an unsupervised anomaly detection algorithm on unlabeled samples in the time-series feature dataset that have not undergone manual verification. The terminal can also label unlabeled samples identified by the algorithm as highly similar to known abnormal patterns in the augmented dataset as abnormal and add them to the dataset, forming an expanded dataset. Finally, the terminal can divide the expanded dataset chronologically into subsets for model parameter training, hyperparameter tuning during training, and final model performance evaluation. These three subsets are called the model training dataset.
[0135] For example, the authenticity determination terminal can modify the GPS coordinates of a sample based on the rules of location jump anomalies, making it move in a way that is impossible from its historical location; or modify the temperature and humidity data based on the rules of environmental change anomalies.
[0136] Step 304: Based on the model training dataset, train the anomaly detection model framework with the goal of minimizing the total loss value to obtain the parameters of each anomaly detection model.
[0137] Optionally, the anomaly detection model framework can be a model architecture that defines the overall structure, composition, and connection relationships of each layer of the anomaly detection model, but whose specific internal parameters have not yet been determined. The anomaly detection model framework can be a template or an empty shell.
[0138] Optionally, the total loss value can be a scalar value, used to quantify the overall discrepancy between the predictions of the current anomaly detection model framework and the true labels in the model training dataset, given the parameters. The total loss value is calculated by a weighted sum of the supervised classification loss, attention sparsity loss, and attention consistency loss. The training objective can be to find a set of parameters that minimizes the total loss value.
[0139] Optionally, the parameters of each anomaly detection model can be any adjustable variable in the anomaly detection model framework. These parameters may include connection weights and bias terms of each layer in the neural network. During training, the parameters of each anomaly detection model can be continuously updated.
[0140] Optionally, the authenticity determination terminal can assign random initial values to the parameters of each anomaly detection model in the anomaly detection model framework. The authenticity determination terminal can take a batch of sample data from the training set of the model training dataset and input it into the anomaly detection model framework. The data sequentially passes through a feature extraction layer, a self-attention classification layer, etc., to obtain the predicted anomaly risk probability. The authenticity determination terminal can be used to compare the model's predicted output with the true labels of the samples and calculate the total loss value. The total loss value can measure the accuracy of the model's classification, the concentration and consistency of the attention mechanism. The authenticity determination terminal can use the backpropagation algorithm to calculate the gradient of the total loss value with respect to each anomaly detection model parameter. The gradient indicates how to fine-tune each parameter to reduce the total loss value. The authenticity determination terminal can use optimization algorithms to update the parameters of each anomaly detection model along the direction of gradient descent. The authenticity determination terminal can repeatedly execute the training process, traversing multiple rounds on the training set of the model training dataset until the total loss value decreases to a minimum and tends to stabilize, or reaches a preset number of training rounds. At this point, the anomaly detection model framework has learned and fixed parameters for each anomaly detection model.
[0141] Step 305: Perform performance evaluation on the parameters of each anomaly detection model, obtain the performance evaluation results, and select and fix the optimal anomaly detection model parameters among the parameters of each anomaly detection model based on the performance evaluation results to obtain the anomaly detection model.
[0142] Optionally, the performance evaluation results can be quantitative metrics obtained by evaluating the trained model with specific anomaly detection model parameters using the validation or test set in the model training dataset. Performance evaluation results may include accuracy, precision, recall, F1 score, and area under the ROC curve, etc.
[0143] Optionally, the optimal anomaly detection model parameters can refer to the set of parameters that achieves the best performance evaluation result on the validation set among multiple sets of anomaly detection model parameters generated under multiple training sessions or different training configurations.
[0144] Optionally, the anomaly detection model can be a complete AI model with anomaly detection capabilities. The anomaly detection model can consist of a fixed anomaly detection model framework and a set of determined optimal anomaly detection model parameters selected through performance evaluation.
[0145] Optionally, the authenticity assessment terminal can use the validation set from the model training dataset (which was not involved in the training process) to evaluate the trained model with specific anomaly detection model parameters. The authenticity assessment terminal can input validation set samples into the model, obtain prediction results, compare them with the true labels, calculate evaluation metrics, and obtain performance evaluation results. The authenticity assessment terminal can perform multiple rounds of training to obtain multiple sets of different anomaly detection model parameters. The authenticity assessment terminal can compare the performance evaluation results of all anomaly detection model parameters on the validation set and select the best-performing set of parameters as the optimal anomaly detection model parameters. The authenticity assessment terminal can fix the optimal anomaly detection model parameters and combine them with the anomaly detection model framework. The authenticity assessment terminal can use the test set to perform final performance verification of the selected anomaly detection model and deploy the selected anomaly detection model to the production environment for anomaly detection tasks.
[0146] In one embodiment, the total loss value can be calculated using the following formula:
[0147] ;
[0148] In the formula, This is the total loss value. To monitor the classification of losses, For attention sparsity loss, For loss of attentional consistency, and These are the weighting coefficients.
[0149] Optionally, the total loss value can be a scalarized target value used to guide the training process of the anomaly detection model framework. The training objective can be to minimize the total loss value by adjusting the parameters of each anomaly detection model.
[0150] Alternatively, the supervised classification loss can be a loss term that measures the difference between the predicted output of the anomaly detection model framework and the true labels in the model training dataset.
[0151] Optionally, the attention sparsity loss can be a loss term of the list of attention weights generated by the self-attention classification layer used to constrain the anomaly detection model.
[0152] Optionally, the attention consistency loss can be a loss term used to constrain the self-attention classification layer of the anomaly detection model to produce similar attention patterns for samples of the same type.
[0153] Optionally, the weighting coefficients can be pre-defined hyperparameters greater than or equal to 0, which can be used to adjust the proportion of attention sparsity loss and attention consistency loss in the total loss value.
[0154] The formula for calculating attention sparsity loss can be:
[0155] ;
[0156] In the formula, N is the number of samples, i is the sample index, T is the sequence length, and t is the sequence time step index. Let be the scalar weight of the attention distribution vector of the i-th sample at the t-th time step. It is a very small positive number.
[0157] Optionally, the number of samples can refer to the total number of samples in the current batch of model training datasets used to calculate the loss.
[0158] Optionally, the sample index can be an index number used to iterate through each sample from 1 to N. The sequence length can refer to the total number of sequence time steps for a single sample input to the anomaly detection model. The sequence time step index can be an index number used to iterate through each time step from 1 to T. The scalar weight of the attention distribution vector of the i-th sample at the t-th time step can be a specific value in the attention weight list, representing the degree of attention the model pays to the features at the t-th time step when processing the i-th sample. The extremely small positive number can be a tiny constant added to prevent the logarithm of the value 0 from being taken.
[0159] Optionally, the negative entropy of the attention weight list can be calculated. Entropy is a measure of the randomness of a distribution. Entropy is highest when attention weights are evenly distributed; it decreases when attention weights are concentrated in one or a few time steps. The goal is to make most weights in the attention weight list close to zero, with only a very small number of weights having larger values. This forces the anomaly detection model's self-attention classification layer to select the most limited and critical features from the sequence as the basis for judgment, rather than focusing on all features equally. This makes the decision-making process of the anomaly detection model easier to understand.
[0160] The formula for calculating attention consistency loss can be:
[0161] ;
[0162] In the formula, Let j be the set of sample pairs (j, k) with the same label. Let P be the total number of elements in set P. Let be the Euclidean length of the vector. Let j be the attention distribution vector of the j-th sample. Let be the attention distribution vector of the k-th sample.
[0163] Optionally, each element in the set of sample pairs (j,k) with the same label can be a pair of sample indices (j,k), and the sample pairs have the same manually labeled labels in the model training dataset.
[0164] Optionally, the total number of elements in set P can be the total number of pairs of samples with the same label used to calculate the loss. The attention distribution vector of the j-th sample can contain the attention weights of the j-th sample at all T time steps. The attention distribution vector of the k-th sample can contain the attention weights of the k-th sample at all T time steps. The range of cosine similarity is [-1, 1], and the closer the value is to 1, the more consistent the directions of the two vectors are.
[0165] In one embodiment, based on domain knowledge rules, data augmentation is performed on the time-series feature dataset to obtain a model training dataset, including:
[0166] Step 501: Based on the manual verification records, the time-series feature dataset is sampled to obtain the basic seed dataset, and the basic seed dataset is subjected to class imbalance processing to obtain the seed dataset.
[0167] Optionally, the base seed dataset can be a high-quality, high-reliability subset of data selected from the time-series feature dataset based on the accuracy and clarity of manually verified records. Each sample in the base seed dataset has a relatively reliable normal or abnormal label provided by manually verified records.
[0168] Optionally, class imbalance handling can be a data preprocessing technique used to address the problem of a significant disparity between the number of normal class samples and the number of abnormal class samples in the base seed dataset. In real-world scenarios, abnormal samples are usually far fewer than normal samples, and this imbalance can severely impact the effectiveness of subsequent model training.
[0169] Optionally, the seed dataset can be a dataset obtained by class imbalance processing of the base seed dataset. The ratio of normal to abnormal samples in the seed dataset can be adjusted to be relatively balanced, making it more suitable for subsequent model training and data augmentation.
[0170] Optionally, the authenticity assessment terminal can traverse the time-series feature dataset and check the manual verification records corresponding to each sample. The terminal can set filtering rules, and the set of samples filtered by these rules becomes the basic seed dataset. The terminal can count the number of normal and abnormal samples in the basic seed dataset. When the number of abnormal samples is significantly less than the number of normal samples, indicating a severe class imbalance, the terminal can use technical means to adjust the number of samples in both classes. The terminal can choose an appropriate strategy to process the dataset, aiming to achieve an acceptable ratio between the two classes after processing. The resulting dataset is the seed dataset.
[0171] For example, class imbalance handling may include oversampling the minority class by randomly copying existing anomalous samples or using algorithms such as SMOTE to generate similar synthetic anomalous samples to increase their number; and undersampling the majority class by randomly discarding a portion of normal samples to reduce their number.
[0172] For example, the filtering rule could be to retain only the samples corresponding to records that have a clear, undisputed conclusion of truth or falsehood and whose verification personnel have complete notes.
[0173] Step 502: Based on domain knowledge rules, perform anomaly pattern synthesis on the seed dataset to obtain the augmented dataset.
[0174] Optionally, anomaly pattern synthesis can be a process of constructing new, logically consistent anomalous samples by procedurally modifying or combining typical anomalous behavior patterns described by domain knowledge rules, based on existing data in the seed dataset.
[0175] Optionally, the augmented dataset can be a larger dataset with richer abnormal patterns obtained by adding a batch of abnormal samples to the seed dataset through abnormal pattern synthesis technology, based on the authenticity determination terminal.
[0176] Optionally, the authenticity assessment terminal can load predefined domain knowledge rules. The terminal can select a portion of normal samples from the seed dataset as a base and modify specific features of these normal samples according to different domain knowledge rules. The terminal can then add a large number of newly synthesized anomalous samples to the original seed dataset. Augmenting the dataset can effectively increase the diversity and quantity of anomalous samples.
[0177] For example, based on the geolocation jump rule, the authenticity determination terminal can randomly modify the GPS coordinates of a normal sample, causing an unreasonable and large displacement between it and its historical location in the previous task. After modification, the sample's label is changed from normal to abnormal.
[0178] Step 503: Using the samples in the augmented dataset as a reference, perform unsupervised anomaly detection on the unlabeled samples in the time-series feature dataset to obtain the augmented dataset.
[0179] Optionally, unlabeled samples may refer to historical task samples in the time-series feature dataset that have not been covered by manually checked records and therefore have no normal or abnormal labels.
[0180] Alternatively, unsupervised anomaly detection can be implemented based on machine learning methods. Unsupervised anomaly detection does not require samples to have pre-existing labels, but rather identifies a minority of samples that are significantly different from the majority of samples by analyzing the distribution, density, or distance of the data itself.
[0181] Optionally, the augmented dataset can be a collection of samples from the time-series feature dataset that are identified as high-probability anomalies by unsupervised anomaly detection algorithms and are currently unlabeled. These samples are then labeled as anomalies and merged into the augmented dataset. The augmented dataset can further utilize information from the unlabeled data.
[0182] Optionally, the authenticity assessment terminal can use an augmented dataset to train or train multiple unsupervised anomaly detection models, allowing the unsupervised anomaly detection models to learn the data distribution characteristics of normal and known anomalies. The authenticity assessment terminal can input all unlabeled samples from the time-series feature dataset into the trained unsupervised anomaly detection model. The unsupervised anomaly detection model can calculate anomaly scores for each unlabeled sample or provide a prediction of whether it is an anomaly. The authenticity assessment terminal can set a confidence threshold to filter out unlabeled samples that are judged as anomalies by the unsupervised anomaly detection model with high confidence. The authenticity assessment terminal can then label the newly selected high-confidence anomaly samples as anomalies and add them as new samples to the augmented dataset. The resulting dataset after merging is the augmented dataset.
[0183] Step 504: Based on the chronological order, divide the expanded dataset into a training set, a validation set, and a test set to obtain the model training dataset.
[0184] Optionally, the training set can be a subset of data partitioned from the augmented dataset, used to directly train the anomaly detection model framework and adjust the parameters of each anomaly detection model. The anomaly detection model framework can learn patterns from the training set.
[0185] Optionally, the validation set can be a subset of data partitioned from the augmented dataset, used during model training to evaluate model performance, tune model hyperparameters, and perform early stopping, etc. The validation set does not participate in parameter updates but can be used to guide the training process.
[0186] Optionally, the test set can be a subset of data partitioned from the augmented dataset, used to independently evaluate the generalization performance of the anomaly detection model after model training is complete. The test set is completely invisible during training and tuning and can be used to simulate the model's performance on real new data.
[0187] Optionally, the model training dataset can be a collective term for the three subsets: training set, validation set, and test set. The model training dataset can serve as the data foundation for training, developing, and evaluating anomaly detection models.
[0188] Optionally, the authenticity assessment terminal can ensure that all samples in the entire augmented dataset are arranged in strict ascending order from earliest to latest according to the timestamps of their corresponding calibration tasks. The authenticity assessment terminal can also partition the sorted augmented dataset along the time series according to a pre-defined proportion. Through this partitioning, the authenticity assessment terminal can obtain a model training dataset that is structurally complete, meets the requirements of time series prediction, and has clearly defined uses for each part. The model training dataset can be directly used in the model training and evaluation process.
[0189] In one embodiment, calibration task requirements may include spatiotemporal condition range, environmental condition range, and device model constraints, and real-time sensor data may also include timestamps and environmental data;
[0190] Based on the calibration task object, basic multi-dimensional rule verification is performed on the encrypted on-site data packets to obtain compliance verification results, including:
[0191] Step 601: Based on the calibration task object, decrypt the encrypted field data packet to obtain the decrypted field data.
[0192] Optionally, encrypted field data packets can be used to ensure the security and integrity of data during transmission and storage.
[0193] Optionally, the decrypted field data can be the original structured data recovered after decrypting the encrypted field data packets using a key and algorithm paired with the encryption process. The content of the decrypted field data is completely consistent with the real-time sensor data before encryption, and may include fields such as device identification information, timestamps, and environmental data that can be directly read and processed.
[0194] Optionally, the authenticity verification terminal can retrieve the encrypted field data packet to be verified from storage or memory and prepare the calibration task object. The authenticity verification terminal can obtain the decryption key from the calibration task object or local secure storage. The authenticity verification terminal can invoke a decryption algorithm, taking the encrypted field data packet and decryption key as input, and perform the decryption operation. After successful decryption, the authenticity verification terminal obtains structured, plaintext decrypted field data. This decrypted field data can serve as the input data source for all subsequent rule verification steps.
[0195] Step 602: Compare the device model constraints and device identity information in the decrypted field data to obtain the device consistency verification result.
[0196] Optionally, the equipment model constraint can be a condition explicitly specified in the calibration task requirements and the calibration task object. The equipment model constraint can mean that this calibration task must be performed and data collected by a field terminal of a specific model. The equipment model constraint is a specific equipment model string.
[0197] Optionally, the device identification information can be a data field in the decrypted field data, and can be used to uniquely identify the field terminal collecting the data. The device identification information may include the device model, device serial number, and unique device ID, etc.
[0198] Optionally, the equipment consistency verification result can be a binary or Boolean conclusion, used to indicate whether the field terminal used for field data acquisition is completely consistent with the equipment model constraints required by the task.
[0199] Optionally, the authenticity verification terminal can read the equipment model constraint from the calibration task object. The terminal can parse the equipment identity information field from the decrypted field data and extract the specific equipment model information. The terminal can then precisely compare the equipment model string extracted from the decrypted field data with the equipment model constraint string in the calibration task object. If the two strings are identical, the terminal determines that the equipment model meets the requirements and generates a pass or genuine equipment consistency verification result; if the strings are different, it generates a fail or false equipment consistency verification result.
[0200] Step 603: Compare the on-site GPS coordinates in the spatiotemporal condition range and environmental data to obtain the location compliance verification results.
[0201] Optionally, the spatiotemporal condition range can be the permissible range regarding the location and time of the task execution specified in the calibration task requirements and the calibration task object. Within the spatiotemporal condition range, the location range can be defined by the GPS coordinates of the center point and the maximum permissible radius distance.
[0202] Optionally, environmental data can be a component of the decrypted field data, including various environmental readings collected from field terminal sensors, among which the most important is the field GPS coordinates, i.e., the precise geographical location of the field terminal at the time of data collection.
[0203] Optionally, the location compliance verification result can be a binary or Boolean conclusion, indicating whether the actual geographical location at the time of data collection falls within the geographical area covered by the spatiotemporal conditions specified in the task.
[0204] Optionally, the authenticity verification terminal can extract the center coordinates and maximum permissible distance threshold of the target location from the spatiotemporal condition range of the calibration task object. The authenticity verification terminal can also extract the on-site GPS coordinates from the environmental data of the decrypted on-site data. Using spherical geometry formulas, the authenticity verification terminal can calculate the actual straight-line distance between the on-site GPS coordinates and the center coordinates within the spatiotemporal condition range. The authenticity verification terminal can then compare the calculated actual distance with the maximum permissible distance threshold specified within the spatiotemporal condition range. If the actual distance is less than or equal to the maximum permissible distance threshold, the authenticity verification terminal can determine that the location meets the requirements and generate a passed location compliance verification result; otherwise, it generates a failed location compliance verification result.
[0205] Step 604: Compare the spatiotemporal condition range and timestamp to obtain the time compliance verification result, and compare the environmental condition range and temperature and humidity data in the environmental data to obtain the environmental compliance verification result.
[0206] Optionally, the timestamp can be the precise date and time of completion of data collection recorded in the decrypted field data.
[0207] Optionally, the time compliance verification result can be a binary or Boolean conclusion, which can be used to indicate whether the timestamp of data submission falls within the time window covered by the time and space conditions specified by the task.
[0208] Optionally, the environmental conditions range can be the permissible range of environmental conditions required for calibration operations as specified in the calibration task requirements and calibration task objects, and may include the upper and lower limits of temperature and humidity.
[0209] Optionally, the temperature and humidity data can be specific readings from environmental data, including on-site temperature and humidity values.
[0210] Optionally, the environmental compliance verification result can be a binary or Boolean conclusion, used to indicate whether the actual temperature and humidity data at the time of data collection simultaneously meet the upper and lower limits of temperature and humidity requirements specified in the task's environmental conditions range.
[0211] Optionally, the authenticity verification terminal can extract the start and end times specified for the calibration task from the spatiotemporal condition range of the calibration task object, construct a time window, and extract timestamps from the decryption site data. The authenticity verification terminal can check whether the timestamp is later than or equal to the start time and earlier than or equal to the end time. If the timestamp is within the time window, the authenticity verification terminal can generate a passed time compliance verification result; otherwise, it generates a failed time compliance verification result. The authenticity verification terminal can extract the environmental condition range from the calibration task object and extract specific temperature and humidity data from the environmental data of the decryption site data. The authenticity verification terminal can perform two checks: whether the temperature value is within the range formed by the minimum and maximum temperatures; and whether the humidity value is within the range formed by the minimum and maximum humidity. Only when both the temperature and humidity values simultaneously meet their respective condition ranges can the authenticity verification terminal generate a passed environmental compliance verification result; if either condition is not met, a failed environmental compliance verification result is generated.
[0212] Step 605: Based on the weights of the verification results, the equipment consistency verification results, location compliance verification results, time compliance verification results, and environmental compliance verification results are weighted and summed to obtain the compliance verification results.
[0213] Optionally, the verification result weights can be pre-assigned numerical weights for the four dimensions of equipment consistency verification results, location compliance verification results, time compliance verification results, and environmental compliance verification results, respectively, to represent the importance of each dimension in the overall authenticity determination. The sum of all weights can be 1.
[0214] Optionally, the authenticity determination terminal can, based on the binary verification result, multiply the quantification result of each dimension by the corresponding verification result weight, and add all the products together to obtain the compliance verification result.
[0215] Optionally, the compliance verification result can be a quantified total score or a grade conclusion based on a secondary division of the total score, which can comprehensively reflect the overall degree of compliance of the on-site data across the four hard rule dimensions.
[0216] Optionally, the authenticity assessment terminal can convert the binary verification result into a calculable numerical value. The terminal can read predefined verification result weights from the calibration task object. The total compliance verification score calculated by the terminal through weighted summation is the most direct compliance verification result. The terminal can then map this score to a more intuitive level conclusion based on a preset total score threshold.
[0217] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0218] Based on the same inventive concept, this application also provides a system for determining the authenticity of multi-dimensional sensor data to implement the aforementioned method for determining the authenticity of multi-dimensional sensor data. The solution provided by this system is similar to the implementation described in the above method. Therefore, the specific limitations in one or more embodiments of the system for determining the authenticity of multi-dimensional sensor data provided below can be found in the limitations of the method for determining the authenticity of multi-dimensional sensor data described above, and will not be repeated here.
[0219] In one exemplary embodiment, such as Figure 2 As shown, a multi-dimensional sensor data authenticity determination system 700 is provided, comprising:
[0220] Task module 701 is used to obtain calibration task requirements, generate a task serial number based on the calibration task requirements, and create a calibration task object based on the calibration task requirements and the task serial number.
[0221] The integration module 702 is used to acquire the real-time sensor data corresponding to the task serial number, and to integrate and encrypt the real-time sensor data to obtain an encrypted field data packet; wherein, the real-time sensor data includes device identity information;
[0222] The verification module 703 is used to perform basic multi-dimensional rule verification on encrypted field data packets based on the calibration task object to obtain compliance verification results.
[0223] The anomaly module 704 is used to obtain the historical behavior sequence corresponding to the device identity information, and input the real-time sensor data and the historical behavior sequence into the anomaly detection model to generate anomaly verification results;
[0224] Report module 705 is used to match the compliance verification results and abnormal verification results with the on-site authenticity determination results in the decision rule base and generate an on-site authenticity determination report.
[0225] Furthermore, the anomaly verification results include anomalous data and discrete risk levels;
[0226] Exception module 704 is also used for:
[0227] Historical behavior sequences and real-time sensor data are input into the feature extraction layer of the anomaly detection model for feature extraction, resulting in a verification feature vector.
[0228] The verification feature vector is input into the self-attention classification layer of the anomaly detection model to perform anomaly pattern detection, and anomaly risk probability value and attention weight list are obtained.
[0229] Based on the built-in risk level mapping rules in the anomaly detection model, the risk level mapping layer converts the anomaly risk probability value into a discrete risk level.
[0230] The abnormal data identification layer in the anomaly detection model sorts the attention weights in descending order based on the attention weight list to obtain the sorted attention weight list. The top K attention weights are extracted from the sorted attention weight list to obtain the key attention weights. The real-time sensor data components corresponding to the key attention weights in the real-time sensor data are set as abnormal data.
[0231] By integrating abnormal data and discrete risk levels, anomaly verification results are obtained.
[0232] Furthermore, the authenticity determination system 700 for multi-dimensional sensor data also includes a training module for:
[0233] Obtain historical calibration task records, business metadata, and manual verification records. Based on the manual verification records, perform preliminary annotation on the associated historical calibration task records and business metadata to obtain the original annotated dataset.
[0234] Based on the original labeled dataset, static feature data of each historical calibration task record is extracted, and the temporal features of the static feature data of each historical calibration task record in the same device are calculated to obtain the temporal feature dataset; among which, the temporal features include movement pattern features, environmental deviation features and behavioral statistical features.
[0235] Based on domain knowledge rules, data augmentation is performed on the time-series feature dataset to obtain the model training dataset;
[0236] Based on the model training dataset, the anomaly detection model framework is trained with the goal of minimizing the total loss value, and the parameters of each anomaly detection model are obtained.
[0237] The performance of each anomaly detection model parameter is evaluated to obtain the performance evaluation results. Based on the performance evaluation results, the optimal anomaly detection model parameter is selected and fixed to obtain the anomaly detection model.
[0238] The total loss value is calculated using the following formula:
[0239] ;
[0240] In the formula, This is the total loss value. To monitor the classification of losses, For attention sparsity loss, For loss of attentional consistency, and These are the weighting coefficients;
[0241] The formula for calculating attention sparsity loss is as follows:
[0242] ;
[0243] In the formula, N is the number of samples, i is the sample index, T is the sequence length, and t is the sequence time step index. Let be the scalar weight of the attention distribution vector of the i-th sample at the t-th time step. It is a very small positive number;
[0244] The formula for calculating attention consistency loss is as follows:
[0245] ;
[0246] In the formula, Let j be the set of sample pairs (j, k) with the same label. Let P be the total number of elements in set P. Let be the Euclidean length of the vector. Let j be the attention distribution vector of the j-th sample. Let be the attention distribution vector of the k-th sample.
[0247] Furthermore, the training module is also used for:
[0248] Based on manual verification records, samples were screened from the time-series feature dataset to obtain a basic seed dataset. Then, class imbalance was processed from the basic seed dataset to obtain a seed dataset.
[0249] Based on domain knowledge rules, anomaly patterns are synthesized from the seed dataset to obtain an augmented dataset;
[0250] Using samples in the augmented dataset as a reference, unsupervised anomaly detection is performed on unlabeled samples in the time-series feature dataset to obtain the augmented dataset;
[0251] Based on the chronological order, the expanded dataset is divided into a training set, a validation set, and a test set to obtain the model training dataset.
[0252] Furthermore, the calibration task requirements include spatiotemporal condition range, environmental condition range, and equipment model constraints; real-time sensor data also includes timestamps and environmental data.
[0253] Verification module 703 is also used for:
[0254] Based on the calibration task object, the encrypted field data packet is decrypted to obtain the decrypted field data;
[0255] By comparing the equipment model constraints and the equipment identity information in the decrypted field data, the equipment consistency verification results are obtained;
[0256] By comparing the on-site GPS coordinates in the spatiotemporal conditions and environmental data, the location compliance verification results are obtained.
[0257] By comparing the range of spatiotemporal conditions and the timestamp, the time compliance verification result is obtained; by comparing the range of environmental conditions and the temperature and humidity data in the environmental data, the environmental compliance verification result is obtained.
[0258] Based on the weights of the verification results, the compliance verification results are obtained by weighted summation of the equipment consistency verification results, location compliance verification results, time compliance verification results, and environmental compliance verification results.
[0259] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method for determining the authenticity of multi-dimensional sensor data as described above.
[0260] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0261] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0262] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. A method for determining the authenticity of multi-dimensional sensor data, characterized in that, The method includes: Obtain the calibration task requirements, generate a task serial number based on the calibration task requirements, and create a calibration task object based on the calibration task requirements and the task serial number. The real-time sensor data corresponding to the task serial number is obtained, and the real-time sensor data is integrated and encrypted to obtain an encrypted field data packet; wherein, the real-time sensor data includes device identity information; Based on the calibration task object, the encrypted field data packet is subjected to basic multi-dimensional rule verification to obtain a compliance verification result. Obtain the historical behavior sequence corresponding to the device identity information, and input the real-time sensor data and the historical behavior sequence into the anomaly detection model to generate anomaly verification results; Match the compliance verification result and the abnormal verification result with the on-site authenticity determination result in the decision rule base, and generate an on-site authenticity determination report.
2. The method according to claim 1, characterized in that, The anomaly verification results include anomalous data and discrete risk levels; The step of inputting the real-time sensor data and the historical behavior sequence into the anomaly detection model to generate anomaly verification results includes: The historical behavior sequence and the real-time sensor data are input into the feature extraction layer of the anomaly detection model for feature extraction to obtain a verification feature vector. The verification feature vector is input into the self-attention classification layer of the anomaly detection model to perform anomaly pattern detection and obtain anomaly risk probability value and attention weight list. Based on the risk level mapping layer with built-in risk level mapping rules in the anomaly detection model, the anomaly risk probability value is converted into a discrete risk level. The abnormal data identification layer in the abnormal detection model sorts the attention weights in descending order based on the attention weight list to obtain a sorted attention weight list. The top K attention weights are extracted from the sorted attention weight list to obtain the key attention weights. The real-time sensor data component corresponding to the key attention weight in the real-time sensor data is set as the abnormal data. By integrating the abnormal data and the discrete risk levels, the anomaly verification result is obtained.
3. The method according to claim 2, characterized in that, The method further includes: Obtain historical calibration task records, business metadata, and manual verification records. Based on the manual verification records, perform preliminary annotation on the associated historical calibration task records and business metadata to obtain the original annotated dataset. Based on the original labeled dataset, static feature data of each historical calibration task record is extracted, and the temporal features of the static feature data of each historical calibration task record in the same device are calculated to obtain a temporal feature dataset; wherein, the temporal features include movement pattern features, environmental deviation features and behavioral statistical features; Based on domain knowledge rules, the time-series feature dataset is augmented to obtain the model training dataset. Based on the training dataset of the aforementioned model, the anomaly detection model framework is trained with the goal of minimizing the total loss value, and the parameters of each anomaly detection model are obtained. The performance of each of the anomaly detection model parameters is evaluated to obtain the performance evaluation results. Based on the performance evaluation results, the optimal anomaly detection model parameters among the anomaly detection model parameters are selected and fixed to obtain the anomaly detection model.
4. The method according to claim 3, characterized in that, The total loss value is calculated using the following formula: ; In the formula, The total loss value, To monitor the classification of losses, For attention sparsity loss, For loss of attentional consistency, and These are the weighting coefficients; The formula for calculating the attention sparsity loss is as follows: ; In the formula, N is the number of samples, i is the sample index, T is the sequence length, and t is the sequence time step index. Let be the scalar weight of the attention distribution vector of the i-th sample at the t-th time step. It is a very small positive number; The formula for calculating the attention consistency loss is as follows: ; In the formula, Let j be the set of sample pairs (j, k) with the same label. Let P be the total number of elements in set P. Let be the Euclidean length of the vector. Let j be the attention distribution vector of the j-th sample. Let be the attention distribution vector of the k-th sample.
5. The method according to claim 3, characterized in that, The domain knowledge-based rules are used to augment the time-series feature dataset to obtain the model training dataset, which includes: Based on the manual verification records, the time-series feature dataset is sampled to obtain a basic seed dataset, and the basic seed dataset is subjected to class imbalance processing to obtain a seed dataset. Based on the domain knowledge rules, anomaly patterns are synthesized from the seed dataset to obtain an enhanced dataset; Using the samples in the augmented dataset as a reference, unsupervised anomaly detection is performed on the samples in the time-series feature dataset that are unlabeled to obtain the augmented dataset; Based on the chronological order, the expanded dataset is divided into a training set, a validation set, and a test set to obtain the model training dataset.
6. The method according to claim 1, characterized in that, The calibration task requirements include spatiotemporal condition range, environmental condition range, and equipment model constraints. The real-time sensor data also includes timestamps and environmental data. Based on the calibration task object, the encrypted field data packet undergoes basic multi-dimensional rule verification to obtain compliance verification results, including: Based on the calibration task object, the encrypted field data packet is decrypted to obtain decrypted field data; By comparing the device model constraint with the device identity information in the decrypted site data, the device consistency verification result is obtained; By comparing the spatiotemporal condition range with the on-site GPS coordinates in the environmental data, the location compliance verification result is obtained. By comparing the spatiotemporal condition range with the timestamp, a time compliance verification result is obtained; and by comparing the environmental condition range with the temperature and humidity data in the environmental data, an environmental compliance verification result is obtained. Based on the weights of the verification results, the compliance verification results are weighted and summed, including the device consistency verification results, the location compliance verification results, the time compliance verification results, and the environmental compliance verification results, to obtain the compliance verification result.
7. A system for determining the authenticity of multi-dimensional sensor data, characterized in that, The system includes: The task module is used to obtain calibration task requirements, generate a task serial number based on the calibration task requirements, and create a calibration task object based on the calibration task requirements and the task serial number. An integration module is used to acquire the real-time sensor data corresponding to the task serial number, and to integrate and encrypt the real-time sensor data to obtain an encrypted field data packet; wherein, the real-time sensor data includes device identity information; The verification module is used to perform basic multi-dimensional rule verification on the encrypted field data packet based on the calibration task object to obtain a compliance verification result; An anomaly module is used to obtain the historical behavior sequence corresponding to the device identity information, and input the real-time sensor data and the historical behavior sequence into the anomaly detection model to generate anomaly verification results; The reporting module is used to match the compliance verification results and the abnormal verification results with the on-site authenticity determination results in the decision rule base, and generate an on-site authenticity determination report.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.