Soil multi-parameter sensor time sequence data calibration method based on coding mechanism

Through the soil multi-parameter sensor timing data calibration method based on the encoding mechanism, the measurement data of electromagnetic soil sensors is calibrated, which solves the problem of sensor measurement deviation and improves the credibility of soil condition analysis.

CN119510709AActive Publication Date: 2025-02-25INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411547968.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-25
Estimated Expiration
2044-11-01

AI Technical Summary

Technical Problem

Electromagnetic soil sensors are prone to deviations when measuring soil parameters, resulting in a decrease in the credibility of soil condition analysis and need to be calibrated for measurement data.

Method used

The soil multi-parameter sensor timing data calibration method is adopted based on the encoding mechanism. By obtaining the target measurement data within the target time period, inputting it into the target calibration model, feature extraction and calibration of the data is performed, and self-attention module and data calibration module are used to perform self-attention module. Supervised training and supervised fine-tuning to output calibration data.

Benefits of technology

It improves the credibility of soil condition analysis, and uses the model to calibrate the target measurement data to reduce sensor measurement deviation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119510709A_ABST
    Figure CN119510709A_ABST
Patent Text Reader

Abstract

The invention provides a soil multi-parameter sensor time sequence data calibration method based on a coding mechanism, and is applied to the technical field of sensor calibration. The method comprises: obtaining target measurement data for target soil measured in a target time period, the target measurement data comprising measurement data of a target attribute and measurement data of a related attribute, and the related attribute representing a soil attribute having an influence on the target attribute; inputting the target measurement data into a target calibration model, and outputting target calibration data for the target attribute, the target calibration model performing self-supervision training on a self-attention module of the calibration model by using the first training sample data under the condition that network parameters of a data calibration module of the calibration model remain unchanged to obtain an intermediate model; and under the condition that the network parameters of the self-attention module of the intermediate model remain unchanged, performing supervised fine tuning on the data calibration module of the intermediate model by using the second training sample data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of sensor calibration, and more specifically, to a soil multi-parameter sensor time series data calibration method based on an encoding mechanism, a data calibration model training method, and a measurement data calibration method. Background Art

[0002] Soil sensors are a general term for monitoring soil moisture conditions, and can be divided into: soil moisture sensors, soil moisture meters, soil moisture meters, soil moisture sensors, soil temperature sensors, soil salinity sensors, etc. Electromagnetic soil sensors can be deployed over a large area with high density to form a grid monitoring network, and are deployed densely in key areas. They have the characteristics of supporting the collection of high temporal and spatial resolution data. However, the sensing elements of electromagnetic sensors are limited by their own performance or affected by the environment, and the measured soil parameters are prone to deviations, resulting in a decrease in the credibility of subsequent analysis of soil conditions. Therefore, the measured data needs to be calibrated. Summary of the invention

[0003] In view of this, the present disclosure provides a soil multi-parameter sensor time series data calibration method based on a coding mechanism, a data calibration model training method, a measurement data calibration method, an apparatus, an electronic device, a storage medium and a program product.

[0004] One aspect of the present disclosure provides a soil multi-parameter sensor time series data calibration method based on a coding mechanism, comprising: obtaining target measurement data for a target soil measured within a target time period, wherein the target measurement data includes measurement data for a target attribute of the target soil and measurement data for a related attribute of the target soil, and the related attribute represents a soil attribute that has an impact on the target attribute; inputting the target measurement data into a target calibration model, and outputting target calibration data for the target attribute, wherein the target calibration model is obtained by performing self-supervisory training on a self-attention module of the calibration model using first training sample data while keeping the network parameters of the data calibration module of the calibration model unchanged, to obtain an intermediate model; and by performing supervised fine-tuning on the data calibration module of the intermediate model using second training sample data while keeping the network parameters of the self-attention module of the intermediate model unchanged, and the data volume of the second training sample data is smaller than the data volume of the first training sample data.

[0005] According to an embodiment of the present disclosure, target measurement data is input into a target calibration model, and target calibration data for target attributes is output, including: inputting the target measurement data into the target calibration model, performing feature extraction on the target measurement data, and obtaining target time series features and target space features, wherein the target space features characterize the correlation between the relevant attributes and the target attributes; and performing data calibration according to the target time series features and the target space features to obtain target calibration data.

[0006] According to an embodiment of the present disclosure, feature extraction is performed on target measurement data to obtain target temporal features and target spatial features, including: slicing the target measurement data according to a preset slice length to obtain at least one target slice sequence; performing position coding processing on each target slice sequence to obtain a target coding sequence for each target slice sequence; and feature extraction is performed on each target coding sequence to obtain a target temporal feature and a target spatial feature for each target coding sequence.

[0007] According to an embodiment of the present disclosure, the target attribute includes soil moisture content, and the related attributes include at least one of the following: soil temperature, soil water potential, soil electrical conductivity, and soil pH.

[0008] According to an embodiment of the present disclosure, target measurement data is obtained by measuring using a soil sensor.

[0009] According to an embodiment of the present disclosure, the first training sample data includes a first training sample sequence;

[0010] When the network parameters of the data calibration module of the calibration model remain unchanged, the self-attention module of the calibration model is self-supervisedly trained using the first training sample data to obtain an intermediate model, including: inputting the first training sample sequence into the self-attention module, masking the first training sample sequence to obtain a masked sample sequence; performing position encoding on the masked sample sequence to obtain an encoded masked sample sequence; extracting features from the encoded masked sample sequence, outputting a first sample temporal feature and a first sample spatial feature; decoding and reconstructing the first sample temporal feature and the first sample spatial feature to obtain a reconstructed sample sequence; determining first loss information for the self-attention module based on the masked sample sequence and the reconstructed sample sequence; and iteratively adjusting the network parameters of the self-attention module using the first loss information until the first loss information satisfies a first iteration stop condition, and using the network obtained when the first iteration stop condition is satisfied as the intermediate model.

[0011] According to an embodiment of the present disclosure, before masking the first training sample sequence, it also includes: slicing the first training sample sequence using a preset slice length to obtain at least one sample slice sequence; masking each sample slice sequence to obtain a mask sample sequence for each sample slice sequence.

[0012] According to an embodiment of the present disclosure, the second training sample data includes a second training sample sequence and sample labels for the second training sample sequence; when the network parameters of the self-attention module of the intermediate model remain unchanged, the intermediate model is supervised fine-tuned using the second training sample data, including: inputting the second training sample sequence into the self-attention module of the intermediate model, outputting second sample time series features and second sample space features; inputting the second sample time series features and the second sample space features into the data calibration module of the intermediate model, and outputting a sample calibration sequence; determining second loss information based on the sample calibration sequence and the sample labels; using the second loss information to iteratively adjust the network parameters of the data calibration module until the second loss information meets the second iteration stop condition, and using the network obtained when the second iteration stop condition is met as the target calibration model.

[0013] Another aspect of the present disclosure provides a training method for a data calibration model, wherein the data calibration model includes a self-attention module and a data calibration module, and the method includes: while the network parameters of the data calibration module remain unchanged, using first training sample data to perform self-supervised training on the calibration model to obtain an intermediate model; while the network parameters of the self-attention module of the intermediate model remain unchanged, using second training sample data to perform supervised training on the intermediate model to obtain a trained calibration model, wherein the data volume of the second training sample data is less than the data volume of the first training sample data.

[0014] Another aspect of the present disclosure provides a method for calibrating measurement data, which is applied to a data calibration platform, the data calibration platform including at least one calibration model, the method including: in response to a request for calibration for target soil data, obtaining the data to be calibrated in the request for calibration, the data to be calibrated including measurement data for target attributes and measurement data for related attributes, the related attributes representing soil attributes that have an impact on the target attributes; in response to a selection operation for a target calibration model in at least one calibration model, calling the target calibration model, wherein the target calibration model is trained by the method; inputting the data to be calibrated into the target calibration model, and outputting the target calibration data for the target attributes.

[0015] Another aspect of the present disclosure provides a soil multi-parameter sensor time series data calibration device based on a coding mechanism, comprising:

[0016] A first acquisition module is used to acquire target measurement data for a target soil measured within a target time period, wherein the target measurement data includes measurement data for a target attribute of the target soil and measurement data for a related attribute of the target soil, and the related attribute represents a soil attribute that has an impact on the target attribute; a first calibration module is used to input the target measurement data into a target calibration model, and output target calibration data for the target attribute, wherein the target calibration model is obtained by performing self-supervisory training on a self-attention module of the calibration model using first training sample data while keeping the network parameters of the data calibration module of the calibration model unchanged, to obtain an intermediate model; and the data calibration module of the intermediate model is fine-tuned in a supervised manner using second training sample data while keeping the network parameters of the self-attention module of the intermediate model unchanged, and the data volume of the second training sample data is less than the data volume of the first training sample data.

[0017] Another aspect of the present disclosure provides a training device for a data calibration model, wherein the data calibration model includes a self-attention module and a data calibration module, and the device includes: a self-supervised training module, which is used to perform self-supervised training on the calibration model using first training sample data while the network parameters of the data calibration module remain unchanged, so as to obtain an intermediate model; and a supervised training module, which is used to perform supervised training on the intermediate model using second training sample data while the network parameters of the self-attention module of the intermediate model remain unchanged, so as to obtain a trained calibration model, wherein the data volume of the second training sample data is less than the data volume of the first training sample data.

[0018] Another aspect of the present disclosure provides a measurement data calibration device, which is applied to a data calibration platform, wherein the data calibration platform includes at least one calibration model, and the device includes: a second acquisition module, which is used to respond to a request for calibration for target soil data, and obtain the data to be calibrated in the request for calibration, wherein the data to be calibrated includes measurement data for target attributes and measurement data for related attributes, and the related attributes represent soil attributes that have an impact on the target attributes; a calling module, which is used to respond to a selection operation for a target calibration model in at least one calibration model, and call the target calibration model, wherein the target calibration model is trained using the above method; and a second calibration module, which is used to input the data to be calibrated into the target calibration model, and output target calibration data for the target attribute.

[0019] Another aspect of the present disclosure provides an electronic device, including: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above method.

[0020] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.

[0021] Another aspect of the present disclosure provides a computer program product, which includes computer executable instructions, and the instructions are used to implement the above method when executed.

[0022] According to the embodiment of the present disclosure, by adopting the technical means of obtaining the target measurement data for the target soil measured within the target time period, wherein the target measurement data includes the measurement data of the target attribute and the measurement data of the related attribute; then inputting the target measurement data into the target calibration model, outputting the target calibration data for the target attribute, and using the model to calibrate the target measurement data, the target measurement data has a high accuracy, thereby helping to improve the reliability of the analysis of the soil condition. At the same time, the target calibration model is obtained by self-supervising the self-attention module of the calibration model using the first training sample data while the network parameters of the data calibration module of the calibration model remain unchanged, and the intermediate model is obtained by using the second training sample data to supervise the fine-tuning of the data calibration module of the intermediate model while the network parameters of the self-attention module of the intermediate model remain unchanged, and the data volume of the second training sample data is less than the data volume of the first training sample data. By using the first training sample data to perform self-supervised training on the self-attention module, the self-attention module can learn the temporal characteristics of the data, and then using the labeled second training sample data to supervise the fine-tuning of the data calibration module, at this time, only a small amount of second training sample data is needed to obtain a good calibration result, so that the calibration data is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0024] Figure 1 An exemplary system architecture to which a soil multi-parameter sensor time series data calibration method based on an encoding mechanism can be applied according to an embodiment of the present disclosure is schematically shown;

[0025] Figure 2 A flowchart of a soil multi-parameter sensor time series data calibration method based on a coding mechanism according to an embodiment of the present disclosure is schematically shown;

[0026] Figure 3 The flowchart of the feature extraction method according to the embodiment of the present disclosure is schematically shown;

[0027] Figure 4The principle diagram of the soil multi-parameter sensor time series data calibration method based on the encoding mechanism according to the embodiment of the present disclosure is schematically shown;

[0028] Figure 5 A flowchart of a training method for self-supervised training according to an embodiment of the present disclosure is schematically shown;

[0029] Figure 6 A flowchart of a supervised training method according to an embodiment of the present disclosure is schematically shown;

[0030] Figure 7 A schematic diagram schematically illustrates a method for training a target calibration model according to an embodiment of the present disclosure;

[0031] Figure 8 A flowchart of a method for training a data calibration model according to an embodiment of the present disclosure is schematically shown;

[0032] Fig. 9 A flow chart schematically shows a method for calibrating measurement data according to another embodiment of the present disclosure;

[0033] Fig.10 The block diagram of a soil multi-parameter sensor time series data calibration device based on a coding mechanism according to an embodiment of the present disclosure is schematically shown;

[0034] Fig.11 A block diagram schematically shows a training device for a data calibration model according to an embodiment of the present disclosure;

[0035] Fig.12 A block diagram schematically shows a calibration device for measuring data according to another embodiment of the present disclosure; and

[0036] Fig.13 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0037] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0038] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0039] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0040] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0041] In the embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc. of the data involved (for example, including but not limited to user personal information) are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security, and national security.

[0042] In the embodiments of the present disclosure, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.

[0043] Figure 1 The exemplary system architecture 100 to which the soil multi-parameter sensor time series data calibration method based on the coding mechanism can be applied according to an embodiment of the present disclosure is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0044] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a terminal device 101, a terminal device 102, a terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0045] The user can use the terminal device 101, the terminal device 102, and the terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, the terminal device 102, and the terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (only for example).

[0046] Terminal device 101, terminal device 102, and terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0047] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0048] It should be noted that the calibration method for measurement data provided in the embodiment of the present disclosure can generally be performed by the server 105. Accordingly, the calibration device for measurement data provided in the embodiment of the present disclosure can generally be arranged in the server 105. The calibration method for measurement data provided in the embodiment of the present disclosure can also be performed by a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, the terminal device 102, the terminal device 103 and / or the server 105. Accordingly, the calibration device for measurement data provided in the embodiment of the present disclosure can also be arranged in a server or server cluster that is different from the server 105 and can communicate with the terminal device 101, the terminal device 102, the terminal device 103 and / or the server 105. Alternatively, the calibration method for measurement data provided in the embodiment of the present disclosure can also be performed by the terminal device 101, the terminal device 102 or the terminal device 103, or can also be performed by other terminal devices that are different from the terminal device 101, the terminal device 102 or the terminal device 103. Accordingly, the measurement data calibration device provided in the embodiments of the present disclosure may also be arranged in the terminal device 101, the terminal device 102 or the terminal device 103, or in other terminal devices different from the terminal device 101, the terminal device 102 or the terminal device 103.

[0049] For example, the target measurement data may be originally stored in any one of the terminal device 101, the terminal device 102, or the terminal device 103 (for example, the terminal device 101, but not limited thereto), or may be stored on an external storage device and may be imported into the terminal device 101. Then, the terminal device 101 may locally execute the measurement data calibration method provided in the embodiment of the present disclosure, or send the target measurement data to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive the target measurement data may execute the measurement data calibration method provided in the embodiment of the present disclosure.

[0050] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0051] Figure 2 The flowchart of the soil multi-parameter sensor time series data calibration method based on the encoding mechanism according to the embodiment of the present disclosure is schematically shown.

[0052] like Figure 2 As shown, the method includes operations S210 to S220.

[0053] In operation S210, target measurement data for target soil measured within a target time period is acquired, wherein the target measurement data includes measurement data of target properties of the target soil and measurement data of related properties of the target soil, wherein the related properties represent soil properties that have an impact on the target properties.

[0054] In operation S220, the target measurement data is input into the target calibration model, and the target calibration data for the target attribute is output. The target calibration model is obtained by performing self-supervisory training on the self-attention module of the calibration model using the first training sample data while the network parameters of the data calibration module of the calibration model remain unchanged, thereby obtaining an intermediate model; while the network parameters of the self-attention module of the intermediate model remain unchanged, the data calibration module of the intermediate model is fine-tuned in a supervised manner using the second training sample data, and the data volume of the second training sample data is less than the data volume of the first training sample data.

[0055] According to an embodiment of the present disclosure, the target attribute may include soil moisture content, and the related attributes include at least one of the following: soil temperature, soil water potential, soil electrical conductivity, and soil pH.

[0056] According to an embodiment of the present disclosure, the target measurement data may be obtained by measuring with a soil sensor, which may be an electromagnetic soil sensor.

[0057] For example, a soil moisture sensor is used to measure soil moisture content, a soil temperature sensor is used to measure soil temperature, a soil water potential sensor is used to measure soil water potential, a soil conductivity sensor is used to measure soil conductivity, and a soil pH sensor is used to measure soil pH.

[0058] According to an embodiment of the present disclosure, the target time period may be arbitrarily set according to calibration requirements, for example, the target time period may be one day, two days, one week, etc.

[0059] According to the embodiment of the present disclosure, by adopting the technical means of obtaining the target measurement data for the target soil measured within the target time period, wherein the target measurement data includes the measurement data of the target attribute and the measurement data of the related attribute; then inputting the target measurement data into the target calibration model, outputting the target calibration data for the target attribute, and using the model to calibrate the target measurement data, the target measurement data has a high accuracy, thereby helping to improve the reliability of the analysis of the soil condition. At the same time, the target calibration model is obtained by self-supervising the self-attention module of the calibration model using the first training sample data while the network parameters of the data calibration module of the calibration model remain unchanged, and the intermediate model is obtained by using the second training sample data to supervise the fine-tuning of the data calibration module of the intermediate model while the network parameters of the self-attention module of the intermediate model remain unchanged, and the data volume of the second training sample data is less than the data volume of the first training sample data. By using the first training sample data to perform self-supervised training on the self-attention module, the self-attention module can learn the temporal characteristics of the data, and then using the labeled second training sample data to supervise the fine-tuning of the data calibration module, at this time, only a small amount of second training sample data is needed to obtain a good calibration result, so that the calibration data is more accurate.

[0060] According to an embodiment of the present disclosure, the method may further include: performing vector conversion on the target measurement data to obtain a target input vector, wherein the target input vector is a multi-dimensional time-aligned vector.

[0061] According to an embodiment of the present disclosure, target measurement data is input into a target calibration model, and outputting target calibration data for target attributes includes: inputting the target measurement data into the target calibration model, performing feature extraction on the target measurement data to obtain target time series features and target space features; and performing data calibration according to the target time series features and the target space features to obtain target calibration data.

[0062] According to an embodiment of the present disclosure, the target calibration model may include a self-attention module and a data calibration module, wherein the self-attention module is used to extract temporal features and spatial features of target measurement data, and the data calibration module is used for data calibration.

[0063] According to an embodiment of the present disclosure, target measurement data is input into a target calibration model, and target calibration data for target attributes is output, including: inputting a target input vector into a self-attention module, performing feature extraction on the target input vector, and obtaining target temporal features and target spatial features; inputting the target temporal features and target spatial features into a data calibration module for data calibration, and outputting target calibration data.

[0064] Figure 3 The flowchart of the feature extraction method according to the embodiment of the present disclosure is schematically shown.

[0065] like Figure 3 As shown, this embodiment includes operations S310 to S330.

[0066] In operation S310, target measurement data is sliced ​​according to a preset slice length to obtain at least one target slice sequence.

[0067] According to an embodiment of the present disclosure, the preset slice length may be set according to actual needs. For example, the preset slice length may include 50 measurement values, 60 measurement values, etc.

[0068] In operation S320, position coding processing is performed on each target slice sequence to obtain a target coding sequence of each target slice sequence.

[0069] In operation S330, feature extraction is performed on each target coding sequence to obtain target temporal features and target spatial features of each target coding sequence.

[0070] According to an embodiment of the present disclosure, the self-attention module may include a slicing layer, a position encoding layer, a self-attention layer, and a feed-forward connection layer.

[0071] According to an embodiment of the present disclosure, inputting a target input vector into a self-attention module, performing feature extraction on the target input vector, and obtaining target temporal features and target spatial features may also include: inputting a target input vector into a slicing layer, slicing the target input vector according to a preset slicing length, and obtaining at least one target slicing sequence; inputting at least one target slicing sequence into a position encoding layer, performing position encoding processing on each target slicing sequence, and obtaining a target encoding sequence of each target slicing sequence; inputting a target encoding sequence of each target slicing sequence into a self-attention layer for self-attention feature extraction, and obtaining a self-attention feature matrix; inputting the self-attention feature matrix into a feedforward connection layer, and outputting target sequence features and target spatial features.

[0072] According to an embodiment of the present disclosure, the feed-forward connection layer may include two fully connected layers.

[0073] Figure 4The schematic diagram shows a principle diagram of a soil multi-parameter sensor time series data calibration method based on a coding mechanism according to an embodiment of the present disclosure.

[0074] like Figure 4 As shown, in this embodiment, the target attribute for the target soil is soil moisture content, and the related attributes include soil temperature, soil water potential, soil conductivity, and soil pH. First, the soil moisture content of the target soil is measured using a soil moisture sensor 410 to obtain a soil moisture value 411; the soil temperature is measured using a soil temperature sensor 420 to obtain a soil temperature value 421; the soil water potential is measured using a soil water potential sensor 430 to obtain a soil water potential value 431; the soil conductivity is measured using a soil conductivity sensor 440 to obtain a soil conductivity value 441; the soil pH is measured using a soil pH sensor 450 to obtain a soil pH value 451. It should be noted that, according to the preset target time period and the preset measurement interval, the soil moisture value 411, the soil temperature value 421, the soil water potential value 431, the soil conductivity value 441, and the soil pH value 451 are all measured at the measurement interval as a series of values. Then, the soil moisture value 411, the soil temperature value 421, the soil water potential value 431, the soil conductivity value 441 and the soil pH value 451 are obtained to obtain the target measurement data 460; then, the target measurement data is vector-converted to obtain the target input vector 470, where M in the target input vector 470 is the measurement interval; then, the target input vector is input into the self-attention module 481 in the target calibration model 480 for feature extraction to obtain the target time series feature and the target space feature 482; then, the target time series feature and the target space feature 482 are input into the data calibration module 483 in the target calibration model 480 for data calibration, and the target calibration data 490 is output.

[0075] According to an embodiment of the present disclosure, various parameters of the soil are measured using a soil sensor, and the soil data with large deviations obtained at this time are input into a target calibration model for calibration. The measured soil moisture content is calibrated using multiple soil parameters including temperature, water potential, electrical conductivity, and pH, and the moisture content data with large deviations measured by the soil sensor is calibrated to a range with smaller deviations.

[0076] Figure 5 A flowchart of a training method for self-supervised training according to an embodiment of the present disclosure is schematically shown.

[0077] The training method of this embodiment is obtained by performing self-supervisory training on the self-attention module of the calibration model using the first training sample data while the network parameters of the data calibration module of the calibration model remain unchanged, specifically including the following: Figure 5 Operation S510 to operation S570 are shown.

[0078] In operation S510, a first training sample sequence is sliced ​​using a preset slice length to obtain at least one sample slice sequence.

[0079] According to an embodiment of the present disclosure, the self-attention module includes a slicing layer, which can be used to slice the first training sample sequence to obtain at least one sample slice sequence.

[0080] According to an embodiment of the present disclosure, the first training sample sequence may include measurement data for the target attribute and measurement data for the related attributes.

[0081] According to an embodiment of the present disclosure, the target attribute may be soil moisture content, and the related attributes may be soil temperature, soil water potential, soil conductivity, and soil pH. Therefore, the first training sample sequence may include a sequence of five dimensions.

[0082] For example, the first training sample sequence is constructed using multiple soil parameters measured by different soil sensors. Problems such as sensor drift and sensitivity decline gradually increase over time. Therefore, considering the impact of historical measurement data on the current measurement data value of the sensor, the multi-dimensional historical measurement values ​​are aligned in time to obtain the first training sample sequence. The time step of the first training sample sequence is fixed to M, such as 1, and the dimension of the input vector is N, which is specifically 5 dimensions here, namely soil moisture content, temperature, water potential, conductivity and pH.

[0083] According to an embodiment of the present disclosure, slicing the first training sample sequence using a preset slicing length to obtain at least one sample slicing sequence may include: using a sliding window with a preset operation length of S to slice the first training sample sequence at any given time as the slicing position to obtain at least one sample slicing sequence.

[0084] In operation S520, mask processing is performed on each sample slice sequence to obtain a mask sample sequence of each sample slice sequence.

[0085] According to an embodiment of the present disclosure, the self-attention module may further include a mask layer, which is used to perform mask processing on each sample slice sequence to obtain a mask sample sequence of each sample slice sequence.

[0086] According to an embodiment of the present disclosure, performing mask processing on each sample slice sequence may include: for each sample slice sequence, according to a preset mask ratio, randomly deleting the data contained in the sample slice to obtain a mask sample sequence, which is recorded as Specifically, the preset mask ratio may be 20%.

[0087] In operation S530, position encoding is performed on the mask sample sequence to obtain an encoded mask sample sequence.

[0088] According to an embodiment of the present disclosure, the self-attention module may further include a position encoding layer, which performs position encoding processing on the mask sample sequence to obtain an encoded mask sample sequence.

[0089] According to an embodiment of the present disclosure, the position encoding layer stores the relative or absolute position of the data in the mask sample sequence. The output result of the position encoding layer is represented by PE, and the dimension of PE is the same as the dimension of the input embedding, that is, the mask sample sequence input to the position encoding layer. The calculation formula is as follows:

[0090] (1);

[0091] (2);

[0092] Among them, pos represents the position of the current data in the mask sample sequence, d represents the dimension of PE, 2i represents the even dimension, and 2i+1 represents the odd dimension (i.e., 2i≤d, 2i+1≤d). Formulas (1) and (2) enable PE to adapt to sequences longer than all time series in the training set, allowing the model to easily calculate relative positions.

[0093] In operation S540, feature extraction is performed on each encoded mask sample sequence, and a first sample temporal feature and a first sample spatial feature of each mask sample sequence are output.

[0094] According to an embodiment of the present disclosure, the self-attention module may further include a self-attention sub-module, which uses the self-attention sub-module to extract features from each encoded mask sample sequence and output the first sample temporal features and first sample spatial features of each mask sample sequence.

[0095] According to an embodiment of the present disclosure, the self-attention submodule may be composed of k (k ≥ 1) sequentially connected blocks. Each block includes a multi-head attention layer and a feedforward connection layer.

[0096] The multi-head attention layer is formed by combining multiple Self-Attentions. The input of Self-Attention is the encoded mask sample sequence, denoted as

[0097] . You can use the linear transformation matrix , , Calculate Q, K, and V. After obtaining the matrices Q, K, and V, you can calculate the output of Self-Attention. The calculation formula is as follows

[0098] (3);

[0099] in, , , The matrix is ​​randomly generated using the Xavier initialization method. is the number of columns of the Q and K matrices, i.e., the vector dimension. The formula calculates the inner product of each row vector of the matrix Q and K. In order to prevent the inner product from being too large, it is divided by The square root of .

[0100] The multi-head attention layer includes multiple Self-Attention layers. The self-attention submodule is used to extract features from each encoded mask sample sequence. Outputting the first sample temporal features and the first sample spatial features of each mask sample sequence may include: firstly, the input Pass them to multiple different Self-Attentions respectively, and calculate multiple output matrices After that, the multi-head attention mechanism converts multiple output matrices Splice them together to get the output of the multi-head attention mechanism . Pass E into the feedforward connection layer to obtain the first sample time series feature representation The feedforward connection layer can be a two-layer fully connected layer, coupled with the Gaussian Error Linear Unit (GELU) activation function to implement the feedforward operation. The corresponding formula is as follows:

[0101] (4).

[0102] In operation S550, decoding and reconstruction processing is performed on the first sample timing feature to obtain a reconstructed sample sequence.

[0103] According to an embodiment of the present disclosure, a reconstruction module may be used to perform decoding and reconstruction processing on the first sample timing feature to obtain a reconstructed sample sequence.

[0104] According to an embodiment of the present disclosure, the reconstruction module may be composed of a projection layer, an activation and normalization layer, and a prediction head to form a decoder for decoding and reconstruction processing. The corresponding formula is as follows:

[0105] (5);

[0106] (6);

[0107] in That is the reconstructed sample sequence obtained by reconstruction.

[0108] In operation S560, first loss information for the self-attention module is determined based on the mask sample sequence and the reconstructed sample sequence.

[0109] In operation S570, the network parameters of the self-attention module are iteratively adjusted using the first loss information until the first loss information satisfies a first iteration stop condition, and the network obtained when the first iteration stop condition is satisfied is used as an intermediate model.

[0110] According to an embodiment of the present disclosure, the first loss information may be a mean absolute error or a root mean square error between the mask sample sequence and the reconstructed sample sequence.

[0111] The temporal characteristics of the samples are learned by minimizing the mean absolute error or root mean square error between the reconstructed sample sequence and the masked sample sequence, and the self-attention module is trained to obtain the intermediate model.

[0112] According to an embodiment of the present disclosure, the first iteration stopping condition may be that the mean absolute error or the root mean square error reaches a first preset value.

[0113] According to an embodiment of the present disclosure, the self-attention module may further include a linear layer and a normalization layer. The above method may further include mapping the mask sample sequence to a higher-dimensional space through a linear layer, and using a normalization layer to normalize the values ​​of the high-dimensional space to obtain a normalized mask sample sequence D, which is expressed as the following formula (7):

[0114] Formula (7).

[0115] It should be noted that after the model training is completed, during the data calibration process using the trained data calibration model, no data masking operation and no decoding and reconstruction operation are performed.

[0116] Figure 6 A flowchart of a supervised training method according to an embodiment of the present disclosure is schematically shown.

[0117] The training method of this embodiment is obtained by using the second training sample data to perform supervised fine-tuning on the intermediate model while the network parameters of the self-attention module of the intermediate model remain unchanged. Specifically, the method includes the following steps: Figure 6 Operations S610 to S640 are shown.

[0118] In operation S610, the second training sample sequence is input into the self-attention module of the intermediate model, and a second sample temporal feature and a second sample spatial feature are output.

[0119] According to an embodiment of the present disclosure, the second training sample data includes a second training sample sequence and a sample label for the second training sample sequence. The second training sample sequence includes measurement data for a target attribute and measurement data for a related attribute.

[0120] The sample label can be a real measurement of soil moisture content collected by using a high-precision soil sensor.

[0121] In operation S620, the second sample temporal features and the second sample spatial features are input into a data calibration module of the intermediate model, and a sample calibration sequence is output.

[0122] According to an embodiment of the present disclosure, the data calibration module may include three gated recurrent unit (GRU) layers, one dropout layer, and two fully connected layers.

[0123] According to an embodiment of the present disclosure, the second sample time series feature and the second sample space feature are Input the data calibration module of the intermediate model and obtain the sample calibration sequence recorded as

[0124] , the formula is as follows:

[0125] (8);

[0126] In operation S630, second loss information is determined based on the sample calibration sequence and the sample tags.

[0127] In operation S640, the network parameters of the data calibration module are iteratively adjusted using the second loss information until the second loss information satisfies a second iteration stop condition, and the network obtained when the second iteration stop condition is satisfied is used as a target calibration model.

[0128] According to an embodiment of the present disclosure, the second loss information may be the MSE between the sample calibration sequence and the sample label.

[0129] The temporal characteristics of the samples are learned by minimizing the mean absolute error or root mean square error between the sample calibration sequence and the sample label, and the data calibration module is fine-tuned in a supervised manner to obtain the target calibration model.

[0130] According to an embodiment of the present disclosure, the second iteration stopping condition may be that the mean absolute error or the root mean square error reaches a second preset value.

[0131] Figure 7 A schematic diagram of a training method for a target calibration model according to an embodiment of the present disclosure is schematically shown.

[0132] like Figure 7As shown, the training method of the target calibration model in this embodiment includes a self-supervised pre-training part for the self-attention module 720 and a supervised fine-tuning part for the data calibration module 730. First, obtain a training sample sequence 710, and the training sample sequence 710 consists of multiple soil measurement parameters that change over time; input the training sample sequence 710 into the self-attention module 720, use the slicing layer in the self-attention module 720 to slice the training sample sequence 710 to obtain a sample slice sequence, input the sample slice sequence into the mask layer to mask the sample slice sequence to obtain a mask sample sequence; then position encode the mask sample sequence to obtain an encoded mask sample sequence; then map the encoded mask sample sequence to a higher space through a linear mapping and normalization layer, normalize the values ​​in the high space, and then input the multi-head attention layer for feature extraction to obtain an output matrix; then the output matrix is ​​sequentially passed through the residual connection and normalization layer, the feedforward connection layer, the residual connection and normalization layer to obtain the sample time series features ; Then the sample time series features The decoder 740, which consists of a projection layer, an activation and normalization layer, and a prediction head, is input to reconstruct the masked samples to obtain a reconstructed sample sequence. The network parameters of the self-attention module 720 are then iteratively adjusted based on the reconstructed sample sequence and the masked sample sequence. After the self-attention module 720 is trained, its network parameters are fixed and supervised fine-tuning of the data calibration module 730 is performed. The time series features output by the trained self-attention module 720 are The gated recurrent unit layer, the discard layer and the fully connected layer of the data calibration module 730 are input in sequence, and a sample calibration sequence is output; then, the network parameters of the data calibration module 730 are iteratively adjusted based on the sample calibration sequence and the sample labels, and finally a target calibration model is obtained.

[0133] According to the embodiments of the present disclosure, the present disclosure constructs quantifiable indicators that affect the measurement results of electromagnetic soil sensors and the historical values ​​of the measurement values ​​of soil sensors into a feature set by considering the influence of time changes and multiple soil parameters on the measurement results of electromagnetic soil sensors. The feature set is the input of the target calibration model, and the true value, i.e., the sample label, adopts the industry standard detection result.

[0134] In one embodiment, the training of the target calibration model may include self-supervised pre-training and supervised fine-tuning. First, a large amount of unlabeled first training sample data is required, and self-supervised pre-training is performed using a self-attention mechanism to obtain multi-dimensional time series features of the first training sample data and generate a high-level representation that can contain time series features. Then, a small amount of second training sample data containing true values ​​is used to fine-tune the target calibration model.

[0135] The model training method of the disclosed embodiment has obtained the time series characteristics of the training data in the pre-training stage, so that the convergence speed in the fine-tuning training process is faster than that of the traditional model. Therefore, the validity of the calibration data can be ensured when there is only a small amount of true value training data, and relatively more accurate soil data can be obtained when the sensor is not calibrated. The user can use the model on the constructed calibration platform, select the soil data to be calibrated and select the model to obtain the calibration result of the template calibration model.

[0136] According to the embodiments of the present disclosure, the measurement data collected by the uncalibrated electromagnetic soil sensor is calibrated through an end-to-end deep learning model to obtain a measurement result with smaller deviation, thereby providing purer data for subsequent soil data analysis and improving credibility. The temporal characteristics of a large amount of observation data are learned through the masked self-attention mechanism, so that better results can be obtained by fine-tuning with less labeled data, thereby solving the problem of model effectiveness when a large amount of labeled data cannot be obtained.

[0137] According to the embodiments of the present disclosure, during the long-term use of the soil sensor, the sensor measurement results drift. At this time, the calibration model of the related technology needs to be retrained with a large amount of labeled data, but it is difficult to obtain a large amount of labeled data. The model training method provided by the present disclosure has good mobility because it learns the characteristics of the sensor measurement values ​​in the time dimension in the pre-training stage. After the sensor drifts, only a small amount of labeled data is needed for secondary calibration to continue to work, so the service life of the soil sensor can be extended to a certain extent.

[0138] In some embodiments, the target calibration model can be implemented in code based on the pytorch platform. The loss function uses indicators such as mean absolute error and root mean square error to evaluate the model. The ratio of the pre-training data set to the fine-tuning training data set to the test data set is 6:2:2. The hyperparameters can be set as follows: the sample mask rate in the self-supervised pre-training is 0.2, the sliding window size is 50, the step size is 1, the batch-size is 256, the pre-training epochs is 50, the fine-tuning epochs is 100, the optimization function is set to Adam, and the model is finally saved in pt format.

[0139] Figure 8 A flowchart of a method for training a data calibration model according to an embodiment of the present disclosure is schematically shown.

[0140] like Figure 8 As shown, the data calibration model of this embodiment includes a self-attention module and a data calibration module, and the training method includes operations S810 to S820.

[0141] In operation S810, while the network parameters of the data calibration module remain unchanged, the calibration model is self-supervised trained using the first training sample data to obtain an intermediate model.

[0142] In operation S820, supervised training is performed on the intermediate model using the second training sample data while the network parameters of the self-attention module of the intermediate model remain unchanged to obtain a trained calibration model, wherein the data volume of the second training sample data is smaller than the data volume of the first training sample data.

[0143] It should be noted that the training method of the data calibration model in the embodiment of the present disclosure is similar to the training method for the target calibration model in the calibration method of the measurement data in the embodiment of the present disclosure, and will not be repeated here.

[0144] Fig. 9 The flowchart of a method for calibrating measurement data according to another embodiment of the present disclosure is schematically shown.

[0145] The calibration method for measurement data of this embodiment can be applied to a data calibration platform, which includes at least one calibration model. The calibration method for measurement data of this embodiment can include: Fig. 9 Operation S910 to operation S930 are shown.

[0146] In operation S910, in response to a request for calibration of target soil data, data to be calibrated in the request is acquired. The data to be calibrated includes measurement data for target attributes and measurement data for related attributes, wherein the related attributes represent soil attributes that have an impact on the target attributes.

[0147] In operation S920, in response to a selection operation for a target calibration model in at least one calibration model, the target calibration model is called. Figure 8 The method shown is trained.

[0148] In operation S930 , the data to be calibrated is input into the target calibration model, and target calibration data for target attributes is output.

[0149] According to the embodiments of the present disclosure, the use of the calibration model builds a sensor data calibration platform, which simplifies the use process of the calibration model. The user only needs to select the time range of the soil data that needs to be calibrated on the platform and select the calibration number corresponding to the calibration model to obtain the calibrated soil moisture data within the time range corresponding to the model.

[0150] Fig.10 A block diagram of a soil multi-parameter sensor time series data calibration device based on a coding mechanism according to an embodiment of the present disclosure is schematically shown.

[0151] like Fig.10 As shown, the device 1000 of this embodiment includes a first acquisition module 1010 and a first calibration module 1020 .

[0152] The first acquisition module 1010 is used to acquire target measurement data for the target soil measured within a target time period, wherein the target measurement data includes measurement data of target attributes of the target soil and measurement data of related attributes of the target soil, and the related attributes represent soil attributes that have an impact on the target attributes.

[0153] The first calibration module 1020 is used to input the target measurement data into the target calibration model, and output the target calibration data for the target attribute, wherein the target calibration model is obtained by performing self-supervisory training on the self-attention module of the calibration model using the first training sample data while the network parameters of the data calibration module of the calibration model remain unchanged, thereby obtaining an intermediate model; while the network parameters of the self-attention module of the intermediate model remain unchanged, the data calibration module of the intermediate model is supervised fine-tuned using the second training sample data, and the data volume of the second training sample data is smaller than the data volume of the first training sample data. It should be noted that according to the embodiments of the present disclosure, the calibration device for measurement data in the embodiments of the present disclosure corresponds to the calibration method for measurement data in the embodiments of the present disclosure, and the description of the calibration device for measurement data specifically refers to the calibration method for measurement data, which will not be repeated here.

[0154] Fig.11 A block diagram of a training device for a data calibration model according to an embodiment of the present disclosure is schematically shown.

[0155] like Fig.11 As shown, the training device 1100 of this embodiment includes a self-supervised training module 1110 and a supervised training module 1120 .

[0156] The self-supervised training module 1110 is used to perform self-supervised training on the calibration model using the first training sample data while keeping the network parameters of the data calibration module unchanged, so as to obtain an intermediate model.

[0157] The supervised training module 1120 is used to perform supervised training on the intermediate model using the second training sample data while keeping the network parameters of the self-attention module of the intermediate model unchanged, so as to obtain a trained calibration model, wherein the data volume of the second training sample data is smaller than the data volume of the first training sample data.

[0158] It should be noted that the training device of the data calibration model in the embodiment of the present disclosure corresponds to the training method of the data calibration model in the embodiment of the present disclosure. The description of the training device of the data calibration model specifically refers to the training method of the data calibration model, which will not be repeated here.

[0159] Fig.12 A block diagram of a device for calibrating measurement data according to another embodiment of the present disclosure is schematically shown.

[0160] like Fig.12 As shown, the calibration device 1200 of this embodiment includes a second acquisition module 1210 , a calling module 1220 and a second calibration module 1230 .

[0161] The second acquisition module 1210 is used to respond to a request for calibration of target soil data and acquire the data to be calibrated in the request for calibration, where the data to be calibrated includes measurement data for target attributes and measurement data for related attributes, where the related attributes represent soil attributes that have an impact on the target attributes.

[0162] The calling module 1220 is used to call the target calibration model in response to the selection operation of the target calibration model in the at least one calibration model, wherein the target calibration model is trained by using the above method.

[0163] The second calibration module 1230 is used to input the data to be calibrated into the target calibration model and output the target calibration data for the target attribute.

[0164] It should be noted that the calibration device for measuring data in the embodiment of the present disclosure corresponds to the calibration method for measuring data in the embodiment of the present disclosure. The description of the calibration device for measuring data specifically refers to the calibration method for measuring data, which will not be repeated here.

[0165] Fig.13 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Fig.13 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0166] like Fig.13As shown, the electronic device 1300 according to an embodiment of the present disclosure includes a processor 1301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1302 or a program loaded from a storage part 1308 to a random access memory (RAM) 1303. The processor 1301 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1301 may also include an onboard memory for caching purposes. The processor 1301 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0167] In RAM 1303, various programs and data required for the operation of electronic device 1300 are stored. Processor 1301, ROM 1302 and RAM 1303 are connected to each other through bus 1304. Processor 1301 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1302 and / or RAM 1303. It should be noted that the program can also be stored in one or more memories other than ROM 1302 and RAM 1303. Processor 1301 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0168] According to an embodiment of the present disclosure, the electronic device 1300 may further include an input / output (I / O) interface 1305, which is also connected to the bus 1304. The system 1300 may further include one or more of the following components connected to the input / output (I / O) interface 1305: an input portion 1306 including a keyboard, a mouse, etc.; an output portion 1307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 1308 including a hard disk, etc.; and a communication portion 1309 including a network interface card such as a LAN card, a modem, etc. The communication portion 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the input / output (I / O) interface 1305 as needed. A removable medium 1311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1310 as needed, so that a computer program read therefrom is installed into the storage portion 1308 as needed.

[0169] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1309, and / or installed from the removable medium 1311. When the computer program is executed by the processor 1301, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0170] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0171] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0172] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 1302 and / or the RAM 1303 described above and / or one or more memories other than the ROM 1302 and the RAM 1303 .

[0173] The embodiments of the present disclosure also include a computer program product, which includes a computer program, and the computer program contains program code for executing the method provided by the embodiments of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the method provided by the embodiments of the present disclosure.

[0174] When the computer program is executed by the processor 1301, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0175] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 1309, and / or installed from the removable medium 1311. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0176] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0177] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0178] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A soil multi-parameter sensor time series data calibration method based on an encoding mechanism, comprising: Acquire target measurement data for target soil measured within a target time period, wherein the target measurement data includes measurement data for a target attribute of the target soil and measurement data for a related attribute of the target soil, wherein the related attribute represents a soil attribute that has an impact on the target attribute; The target measurement data is input into a target calibration model, and target calibration data for the target attribute is output, wherein the target calibration model is obtained by performing self-supervisory training on a self-attention module of the calibration model using first training sample data while keeping the network parameters of the data calibration module of the calibration model unchanged, to obtain an intermediate model; and by performing supervised fine-tuning on the data calibration module of the intermediate model using second training sample data while keeping the network parameters of the self-attention module of the intermediate model unchanged, wherein the data volume of the second training sample data is smaller than the data volume of the first training sample data.

2. The method according to claim 1, wherein: The inputting the target measurement data into the target calibration model and outputting the target calibration data for the target attribute comprises: Inputting the target measurement data into the target calibration model, performing feature extraction on the target measurement data to obtain target time series features and target space features, wherein the target space features represent the correlation relationship between the relevant attributes and the target attributes; Data calibration is performed according to the target time series characteristics and the target space characteristics to obtain the target calibration data.

3. The method according to claim 2, wherein: The feature extraction of the target measurement data to obtain the target time series feature and the target space feature includes: Slicing the target measurement data according to a preset slice length to obtain at least one target slice sequence; Performing position coding processing on each of the target slice sequences to obtain a target coding sequence for each of the target slice sequences; and Feature extraction is performed on each of the target coding sequences to obtain target temporal features and target spatial features of each of the target coding sequences.

4. The method according to claim 1, wherein: The target attribute includes soil moisture content, and the related attributes include at least one of the following: soil temperature, soil water potential, soil electrical conductivity, and soil pH.

5. The method according to claim 1, wherein: The target measurement data is obtained by measuring using a soil sensor.

6. The method according to claim 1, wherein: The first training sample data includes a first training sample sequence; The self-attention module of the calibration model is self-supervised trained by using the first training sample data while the network parameters of the data calibration module of the calibration model remain unchanged, so as to obtain the intermediate model, including: Inputting the first training sample sequence into the self-attention module, performing mask processing on the first training sample sequence to obtain a masked sample sequence; Performing position encoding processing on the mask sample sequence to obtain an encoded mask sample sequence; Performing feature extraction on the encoded mask sample sequence, and outputting a first sample temporal feature and a first sample spatial feature; Decoding and reconstructing the first sample time series feature and the first sample space feature to obtain a reconstructed sample sequence; Determining first loss information for the self-attention module based on the mask sample sequence and the reconstructed sample sequence; and The first loss information is used to iteratively adjust the network parameters of the self-attention module until the first loss information satisfies a first iteration stop condition, and the network obtained when the first iteration stop condition is satisfied is used as the intermediate model.

7. The method according to claim 6, before performing mask processing on the first training sample sequence, further comprising: Slicing the first training sample sequence using a preset slice length to obtain at least one sample slice sequence; Mask processing is performed on each of the sample slice sequences to obtain a mask sample sequence of each sample slice sequence.

8. The method according to claim 1, wherein: The second training sample data includes a second training sample sequence and a sample label for the second training sample sequence; When the network parameters of the self-attention module of the intermediate model remain unchanged, using the second training sample data to perform supervised fine-tuning on the intermediate model includes: Inputting the second training sample sequence into the self-attention module of the intermediate model, and outputting a second sample temporal feature and a second sample spatial feature; Inputting the second sample time series feature and the second sample space feature into the data calibration module of the intermediate model, and outputting a sample calibration sequence; determining second loss information based on the sample calibration sequence and the sample label; The network parameters of the data calibration module are iteratively adjusted using the second loss information until the second loss information satisfies a second iteration stop condition, and the network obtained when the second iteration stop condition is satisfied is used as the target calibration model.

9. A method for training a data calibration model, wherein: The data calibration model includes a self-attention module and a data calibration module, and the method includes: When the network parameters of the data calibration module remain unchanged, the calibration model is trained by self-supervision using the first training sample data to obtain an intermediate model; When the network parameters of the self-attention module of the intermediate model remain unchanged, the intermediate model is supervised trained using second training sample data to obtain a trained calibration model, wherein the data volume of the second training sample data is smaller than the data volume of the first training sample data.

10. A method for calibrating measurement data, applied to a data calibration platform, the data calibration platform comprising at least one calibration model, the method comprising: In response to a request for calibration of target soil data, obtaining the data to be calibrated in the request for calibration, wherein the data to be calibrated includes measurement data for a target attribute and measurement data for a related attribute, wherein the related attribute represents a soil attribute that has an impact on the target attribute; In response to a selection operation for a target calibration model in at least one calibration model, calling the target calibration model, wherein the target calibration model is trained using the method of claim 9; The data to be calibrated is input into the target calibration model, and target calibration data for the target attribute is output.

Citation Information

Patent Citations

  • Learning method for sensor data calibration model

    CN106909972A

  • Calibration method for atmospheric online monitor and monitor

    CN111596006A

  • Remote calibration method and system for gas sensor

    CN111812181A

  • Model training method, electronic equipment and storage medium

    CN114782767A

  • Method and system for improving precision of roadside sensor based on self-supervised learning

    CN116561534A