Analog quantity calibration method and device based on analog quantity module

By obtaining the analog quantity to be calibrated and the target calibration instructions in the analog quantity calibration method, matching the target analog quantity module, and performing input and output calibration processing, the problem of incompatibility of analog quantity calibration in the prior art is solved, efficient and adaptive calibration of different types and specifications of analog quantity is achieved, and the reliability of calibration results is improved.

CN120066001APending Publication Date: 2025-05-30SHENZHEN HUICHEN AUTOMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510274571.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the existing analog quantity calibration methods, each analog quantity module needs to configure different calibration procedures for different types and specifications of analog quantity, which increases the configuration cost and makes it difficult to efficiently calibrate different analog quantity adaptively.

Method used

By obtaining the analog quantity to be calibrated and the target calibration instructions, the target analog quantity module corresponding to the target calibration instruction is matched based on the predetermined mapping relationship between the calibration instruction and the analog quantity module. Then, based on the input calibration logic and data distribution characteristics of the target analog module, the calibration analog quantity is standardized to obtain the input calibration value. Then, by outputting calibration logic and data transmission characteristics of reference analog quantity, the output of the target analog quantity module is numerical compensation process to obtain the output calibration value.

Benefits of technology

Improves compatibility and applicability for calibration of analog quantities of different types and specifications, reduces the complexity of calibration calculations, ensures that the calibrated analog quantities of the final output are closer to the real result, and improves the reliability of the results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066001A_ABST
    Figure CN120066001A_ABST
Patent Text Reader

Abstract

The invention relates to an analog quantity calibration method and device based on an analog quantity module. The method comprises the following steps: acquiring a to-be-calibrated analog quantity and a target calibration instruction corresponding to the to-be-calibrated analog quantity; based on a predetermined mapping relation between the calibration instruction and an analog quantity module, performing matching to obtain a target analog quantity module corresponding to the target calibration instruction; based on the input calibration logic of the target analog quantity module, the analog quantity to be calibrated is normalized by combining the data distribution characteristics of the analog quantity to be calibrated, and an input calibration value corresponding to the analog quantity to be calibrated is obtained; and data processing is performed on the input calibration value based on the target analog quantity module to obtain the output of the target analog quantity module, numerical compensation processing is performed on the output of the target analog quantity module based on the output calibration logic of the target analog quantity module in combination with the data transmission characteristics of the reference analog quantity, and an output calibration value is obtained and serves as the calibrated analog quantity. By adopting the method, the analog quantity can be efficiently and adaptively calibrated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of industrial automation control, and particularly to an analog calibration method and device based on an analog module. Background Art

[0002] In the technical field of industrial automation control, analog calibration processing is involved through an analog module to ensure data reliability.

[0003] However, in related analog calibration methods, different calibration programs need to be configured for different types and specifications of analog quantities for each analog module, thus increasing the configuration cost and making it difficult to efficiently perform adaptive calibration on different analog quantities. Summary of the Invention

[0004] Based on this, in view of the above technical problems, it is necessary to provide an analog calibration method, device, computer device, and computer-readable storage medium based on an analog module, which are used to efficiently and adaptively perform calibration processing on analog quantities, so as to accurately obtain calibrated analog quantities.

[0005] In a first aspect, the present application provides an analog calibration method based on an analog module, including: Obtaining an analog quantity to be calibrated and a target calibration instruction corresponding to the analog quantity to be calibrated; Based on a pre-determined mapping relationship between the calibration instruction and the analog module, matching to obtain a target analog module corresponding to the target calibration instruction; Based on the input calibration logic of the target analog module and combining the data distribution characteristics of the analog quantity to be calibrated, normalizing the analog quantity to be calibrated to obtain an input calibration value corresponding to the analog quantity to be calibrated; Based on the data processing of the input calibration value by the target analog module to obtain the output of the target analog module, and based on the output calibration logic of the target analog module, combining the data transmission characteristics of the reference analog quantity to perform numerical compensation processing on the output of the target analog module to obtain an output calibration value corresponding to the output of the target analog module, and taking the output calibration value as the calibrated analog quantity.

[0006] In a second aspect, the present application further provides an analog calibration device based on an analog module, including: An obtaining module, configured to obtain an analog quantity to be calibrated and a target calibration instruction corresponding to the analog quantity to be calibrated; A matching module, configured to match to obtain a target analog module corresponding to the target calibration instruction based on a pre-determined mapping relationship between the calibration instruction and the analog module; An input calibration module, configured to perform normalization processing on the analog quantity to be calibrated based on the input calibration logic of the target analog quantity module and in combination with the data distribution characteristics of the analog quantity to be calibrated, so as to obtain an input calibration value corresponding to the analog quantity to be calibrated; An output calibration module, configured to obtain the output of the target analog quantity module based on the data processing of the input calibration value by the target analog quantity module, perform numerical compensation processing on the output of the target analog quantity module based on the output calibration logic of the target analog quantity module and in combination with the data transmission characteristics of the reference analog quantity, so as to obtain an output calibration value corresponding to the output of the target analog quantity module, and use the output calibration value as the calibrated analog quantity.

[0007] In a third aspect, the present application further provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the above steps are implemented.

[0008] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above steps are implemented.

[0009] For the above analog quantity calibration method, device, computer device and computer-readable storage medium based on an analog quantity module, first, obtain the analog quantity to be calibrated and a target calibration instruction, and based on the mapping relationship between the calibration instruction and the analog quantity module determined in advance, thereby based on an efficient analog quantity module management mechanism and scheduling mechanism, accurately match the target analog quantity module applicable to the analog quantity to be calibrated according to the target calibration instruction, improving the compatibility of calibrating different types of analog quantities; furthermore, perform normalization processing on the analog quantity to be calibrated based on the input calibration logic of the target analog quantity module and in combination with the data distribution characteristics of the analog quantity to be calibrated to obtain an input calibration value, thereby ensuring that the input data of the target analog quantity module meets the calibration requirements, improving the applicability of processing different specifications of analog quantities, and reducing the complexity of calibration calculation; furthermore, perform numerical compensation processing on the output of the target analog quantity module based on the output calibration logic of the target analog quantity module and in combination with the data transmission characteristics of the reference analog quantity to obtain an output calibration value, thereby ensuring that the output data of the target analog quantity module meets the calibration requirements, making the finally output calibrated analog quantity closer to the real result, and improving the result reliability; based on this, adaptively select the target analog quantity module corresponding to the analog quantity to be calibrated to perform effective and reusable calibration processing on the analog quantity to be calibrated, so as to ensure that the input data and output data of the target analog quantity module meet the calibration requirements, and thus accurately and efficiently obtain the calibrated analog quantity. Description of the Drawings

[0010] To more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings required for use in the description of the embodiments or the related art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0011] Figure 1 It is a schematic flowchart of an analog calibration method based on an analog module in an embodiment; Figure 2 It is a structural block diagram of an analog calibration device based on an analog module in an embodiment. Detailed implementation manners

[0012] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the following further details the present application in conjunction with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0013] In one embodiment, as Figure 1 shown, an analog calibration method based on an analog module is provided. In this embodiment, the application of this method to a server is taken as an example for illustration. It can be understood that this method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps S101 to step S104.

[0014] Step S101, obtain the analog quantity to be calibrated and the target calibration instruction corresponding to the analog quantity to be calibrated.

[0015] Among them, the analog quantity to be calibrated represents the original analog quantity data that needs to be calibrated, such as the voltage signal, current signal, temperature signal, etc. originally measured by a sensor.

[0016] Among them, the calibration instruction represents a specific instruction for guiding the analog calibration process. For example, the current calibration instruction for the current signal, the voltage calibration instruction for the voltage signal, etc.; the target calibration instruction represents a specific instruction for guiding the calibration process of the analog quantity to be calibrated.

[0017] Exemplarily, obtain the analog quantity to be calibrated collected by a collection device (such as a sensor), and then obtain the target calibration instruction based on the analog quantity to be calibrated. Among them, the target calibration instruction can be issued by an external user or system such as manual input, host computer control, network remote control, etc., or can be automatically triggered by internal software or hardware such as a system scheduling mechanism, logical control, and internal program call.

[0018] Step S102: Based on the mapping relationship between the pre-determined calibration instructions and the analog quantity modules, match to obtain the target analog quantity module corresponding to the target calibration instruction.

[0019] Among them, the analog quantity module refers to a hardware module or software module used to process analog quantities, which is used to receive, convert, process, and output analog quantity data. For example, a voltage analog quantity module corresponding to a voltage signal, a current analog quantity module corresponding to a current signal, a temperature analog quantity module corresponding to a temperature signal, etc.; the target analog quantity module refers to the analog quantity module selected for calibrating the analog quantity to be calibrated.

[0020] Exemplarily, since there may be significant differences in data acquisition methods, input / output characteristics, and working principles among different analog quantity modules, it is necessary to establish a set of standardized mapping rules, that is, to establish the mapping relationship between calibration instructions and analog quantity modules in advance to ensure that the target calibration instructions can be correctly applied to the corresponding target analog quantity modules; among them, the mapping relationship between calibration instructions and analog quantity modules can be established based on information such as the type of analog quantity module, data interface, protocol format, and hardware parameters, and stored in a database or configuration file; after receiving the calibration instruction, by comparing data such as the identification information of the analog quantity module and the identification information of the calibration instruction, locate the target analog quantity module corresponding to the calibration instruction in the database or configuration file.

[0021] Step S103: Based on the input calibration logic of the target analog quantity module, combine the data distribution characteristics of the analog quantity to be calibrated to perform normalization processing on the analog quantity to be calibrated, and obtain the input calibration value corresponding to the analog quantity to be calibrated.

[0022] Among them, the input calibration logic refers to the processing rules or algorithms inside the target analog quantity module for calibrating input data, which is used to perform standardization processing on the analog quantity to be calibrated to ensure that the input data meets the calibration requirements. For example, the normalization method is used to convert different voltage signals to a standard range, and the data of flow meters with different specifications are mapped to a unified standard unit, etc.

[0023] Among them, the data distribution characteristics of the analog quantity to be calibrated refer to the numerical distribution law and characteristics of the analog quantity to be calibrated within the original range, which are used to analyze the value range, linear or non-linear relationship, etc. of the analog quantity to be calibrated.

[0024] Among them, the input calibration value refers to the standardized data obtained after the analog quantity to be calibrated is normalized.

[0025] Exemplarily, since different analog quantities have different range limits, units, and noise characteristics, it is necessary to normalize the analog quantity to be calibrated by the target analog quantity module according to the data distribution characteristics of the analog quantity to be calibrated to obtain an input calibration value so that it meets the calibration requirements for the input data. Among them, the normalization process of the analog quantity to be calibrated may include linear normalization, non-linear transformation, noise removal, etc. For example, different ranges of analog quantities of the same type can be mapped to a standardized range so that subsequent calibration calculations can be applied to different specifications of analog quantities of this type. For analog quantities with obvious noise, filtering algorithms such as mean filtering, median filtering, or low-pass filtering can be used to reduce the influence of external interference on the calibration accuracy. For analog quantities with non-linear characteristics, methods such as interpolation and curve fitting can be used to perform non-linear correction on the analog quantity to improve the calibration accuracy.

[0026] Step S104: Based on the data processing of the input calibration value by the target analog quantity module, obtain the output of the target analog quantity module. Based on the output calibration logic of the target analog quantity module, combine the data transmission characteristics of the reference analog quantity to perform numerical compensation processing on the output of the target analog quantity module to obtain the output calibration value corresponding to the output of the target analog quantity module, and use the output calibration value as the calibrated analog quantity.

[0027] Among them, the output calibration logic represents the processing rules or algorithms used to calibrate the output data inside the target analog quantity module, which is used to perform numerical compensation processing on the output of the target analog quantity module to ensure that the output data meets the calibration requirements. For example, perform attenuation processing, gain compensation, offset correction, etc. on the output of the target analog quantity module.

[0028] Among them, the data transmission characteristics of the reference analog quantity represent the numerical change rules of the reference analog quantity during transmission due to system characteristics, physical environment, or device characteristics, which are used to analyze the gain, attenuation, or offset of the data. The reference analog quantity refers to the analog quantity used as a reference during the numerical compensation processing of the output of the target analog quantity module.

[0029] Among them, the output calibration value represents the final output data obtained after the output of the target analog quantity module has undergone numerical compensation processing, which is used as the calibrated analog quantity data.

[0030] Exemplarily, the target analog module processes the input calibration value to obtain the output of the target analog module. Among them, the process of data processing usually includes intermediate steps such as analog-to-digital conversion, error correction, and drift compensation. This intermediate step is different from the steps corresponding to the above-mentioned input calibration and the steps corresponding to the output calibration. Furthermore, according to the data transmission characteristics of the reference analog quantity, numerical compensation processing is performed on the output of the target analog module to obtain the output calibration value to ensure compliance with the calibration requirements for the output data; among them, according to the numerical change rule of the reference analog quantity caused by system characteristics, physical environment or device characteristics during the transmission process, the numerical compensation rule applicable to the output of the target analog module is obtained, and based on this numerical compensation rule, numerical compensation processing methods such as attenuation processing, gain compensation or offset correction are performed on the output of the target analog module to obtain the output calibration value. This output calibration value is used as the calibrated analog quantity to match the signal transmission situation caused by actual factors such as system characteristics, physical environment or device characteristics.

[0031] In the above analog quantity calibration method based on the analog module, first, the analog quantity to be calibrated and the target calibration instruction are obtained. Based on the mapping relationship between the pre-determined calibration instruction and the analog module, the target analog module applicable to the analog quantity to be calibrated is accurately matched according to the target calibration instruction based on an efficient analog module management mechanism and scheduling mechanism, improving the compatibility of calibrating different types of analog quantities; furthermore, based on the input calibration logic of the target analog module, the analog quantity to be calibrated is normalized according to the data distribution characteristics of the analog quantity to be calibrated to obtain the input calibration value, thereby ensuring that the input data of the target analog module meets the calibration requirements, improving the applicability of processing different specifications of analog quantities, and reducing the complexity of calibration calculation; furthermore, based on the output calibration logic of the target analog module, numerical compensation processing is performed on the output of the target analog module according to the data transmission characteristics of the reference analog quantity to obtain the output calibration value, thereby ensuring that the output data of the target analog module meets the calibration requirements, making the finally output calibrated analog quantity closer to the real result, and improving the result reliability; based on this, the target analog module corresponding to the analog quantity to be calibrated is adaptively selected to perform effective and reusable calibration processing on the analog quantity to be calibrated to ensure that the input data and output data of the target analog module meet the calibration requirements, so as to accurately and efficiently obtain the calibrated analog quantity.

[0032] In an exemplary embodiment, based on the mapping relationship between the pre-determined calibration instruction and the analog module, matching the target analog module corresponding to the target calibration instruction includes steps S201 to S203.

[0033] Step S201, obtain a linked list of strings, and the linked list of strings includes the string identifiers corresponding to each analog module.

[0034] Among them, the string linked list represents an ordered data structure that stores the string identifiers corresponding to all analog modules respectively, and is used for quickly indexing, managing, and retrieving different analog modules; the string identifier represents the unique identifier of each analog module and is used to distinguish different analog modules.

[0035] Exemplarily, unique string identifiers can be assigned to each analog module according to information such as the function description, configuration method, and data type of the data processed by the analog module. The string identifier can be used not only to distinguish different analog modules but also for subsequent instruction matching and module invocation. Among them, in order to ensure efficient storage and search of data, the string linked list can adopt an efficient data structure, such as a hash table or an ordered array, to improve the query speed and reduce the calculation cost.

[0036] Optionally, the string linked list can be replaced with other structured databases; the size of the string linked list depends on the memory size of the computer device that executes this method.

[0037] Step S202, based on the mapping relationship between the pre-determined calibration instruction and the string identifier of the analog module, match the target string identifier corresponding to the target calibration instruction in the string linked list.

[0038] Among them, the target string identifier represents the string identifier corresponding to the target analog module.

[0039] Exemplarily, a mapping relationship between the calibration instruction and the string identifier of the analog module is established in advance, and the target string identifier is matched in the string linked list according to the target calibration instruction. Among them, the calibration instruction can include the string identifier or information that matches the string identifier, so as to efficiently match the target string identifier corresponding to the target calibration instruction according to the content matching degree between the calibration instruction and the string identifier.

[0040] Step S203, call the target analog module corresponding to the target string identifier to generate a calibration task for the analog quantity to be calibrated based on the target analog module.

[0041] Among them, the calibration task for the analog quantity to be calibrated based on the target analog module means the calibration operation performed by the target analog module to calibrate the analog quantity to be calibrated.

[0042] Exemplarily, based on the target string identifier, a call request is sent to the target analog module corresponding to the target string identifier. After receiving the call request, the target analog module generates a calibration task for calibrating the analog quantity to be calibrated. During the call process, the module status of the target analog module can be detected to ensure that the target analog module is in an operable state. For example, it is checked whether the target analog module is in the running mode and whether there are any faults. If the module status of the target analog module is abnormal, abnormal handling is required, such as re-requesting calibration, recording error logs, or notifying the operator for manual intervention, etc.

[0043] In this embodiment, first, based on the mapping relationship between the pre-determined calibration instruction and the string identifier of the analog module, the target string identifier corresponding to the target calibration instruction is matched in the string linked list, thereby improving the query efficiency and management ability of the analog module according to the efficient analog module management mechanism. Furthermore, the target analog module corresponding to the target string identifier is called to generate a calibration task for the analog quantity to be calibrated based on the target analog module, thereby ensuring that the target calibration instruction acts precisely on the target analog module and accurately generating a calibration task applicable to the analog quantity to be calibrated according to the efficient analog module scheduling mechanism.

[0044] In an exemplary embodiment, based on the input calibration logic of the target analog module and combined with the data distribution characteristics of the analog quantity to be calibrated, the analog quantity to be calibrated is normalized to obtain the input calibration value corresponding to the analog quantity to be calibrated, including steps S301 to S302.

[0045] Step S301: Based on the numerical relationship between the current value of the analog quantity to be calibrated and the input numerical range, the first proportionality coefficient corresponding to the current value is obtained, and the first proportionality coefficient reflects the data distribution characteristics of the current value in the input numerical range.

[0046] Wherein, the current value of the analog quantity to be calibrated represents the current measured value of the analog quantity to be calibrated, and the input numerical range of the analog quantity to be calibrated represents the original measurement range to which the analog quantity to be calibrated belongs. For example, the input numerical range of the voltage signal can represent the range from 0 to 10V, and the measured current value of the voltage signal is 5V, that is, the current value 5V is within the input numerical range from 0 to 10V.

[0047] Wherein, the first proportionality coefficient represents the normalized proportional value of the current value of the analog quantity to be calibrated within its input numerical range, and is used to measure the relative position of the current value with respect to the input numerical range.

[0048] Exemplarily, first, obtain the upper and lower limit values of the input numerical range of the analog quantity to be calibrated, and analyze the distribution pattern of this input numerical range, where: if the distribution of multiple input data has a uniform distribution characteristic, a linear normalization method can be used to calculate the first proportionality coefficient respectively, that is, by calculating the relative proportion of the current value in the input numerical range, a normalized proportional value is obtained; if the distribution of multiple input data has a non-uniform characteristic, for example, the data is relatively dense in a certain specific range and sparse in another range, then a non-linear transformation needs to be adopted according to the data distribution situation to ensure that the first proportionality coefficient can accurately reflect the data density of the current value in the entire input numerical range. For example, a piecewise function can be used to process the non-uniformly distributed data, so that the numerical proportion in the low-density interval is appropriately adjusted to ensure that the data distribution characteristic can be reasonably retained; if the distribution of the input data shows characteristics of exponential growth or logarithmic scaling, a logarithmic transformation or exponential mapping method can be used to calculate the first proportionality coefficient to make it more accurately reflect the data distribution characteristic of the current value in the input numerical range.

[0049] Step S302, obtain the preset standard numerical range, and map the current value to the standard numerical range based on the first proportionality coefficient to obtain the input calibration value of the analog quantity to be calibrated in the standard numerical range. Each analog quantity module corresponds to the same standard numerical range.

[0050] Among them, the standard numerical range represents a unified data range to which each analog quantity is mapped after being normalized. For example, a range from 0 to 100 is set as the standard numerical range to standardize the measurement values of different acquisition devices to the same scale.

[0051] Exemplarily, in order to map the current value of the analog quantity to be calibrated to the preset standard numerical range, the first proportionality coefficient is used as an intermediate reference value, so that the analog quantity data in different input numerical ranges can be expressed on the same standard scale; among them, since the first proportionality coefficient has considered the data distribution characteristic of the input data, when mapping the current value of the analog quantity to be calibrated to the standard numerical range, the relative distribution characteristic of the original data can be effectively maintained, and data distortion will not be caused by a simple linear conversion. Furthermore, if multiple analog quantity data are densely distributed in a certain specific range within the input numerical range, its first proportionality coefficient can be non-linearly adjusted to ensure that this data density characteristic can still be retained in the mapping in the standard numerical range, thereby avoiding data distortion or information loss after data mapping.

[0052] In this embodiment, based on the first proportionality coefficient, the current value of the analog quantity to be calibrated is efficiently and accurately mapped to a standard numerical range. On the one hand, it ensures that the data distribution characteristics of the analog quantity to be calibrated are retained, enabling the data to maintain consistency and accuracy in subsequent processing stages. On the other hand, it ensures that analog quantity data with different input numerical ranges can be processed within the same calibration framework and is applicable to different types of analog quantity modules, improving the efficiency and generality of data processing.

[0053] In an exemplary embodiment, based on the numerical relationship between the current value of the analog quantity to be calibrated and the input numerical range, the first proportionality coefficient corresponding to the current value is obtained, including steps S401 to S402.

[0054] Step S401: Obtain the upper limit value and the lower limit value of the input numerical range of the analog quantity to be calibrated.

[0055] Among them, the upper limit value and the lower limit value of the input numerical range represent the boundary range of the input numerical range of the analog quantity to be calibrated and are used to determine the measurement range of the analog quantity to be calibrated, that is, the upper limit value is the maximum measurement value of the acquisition device corresponding to the analog quantity to be calibrated under normal working conditions, and the lower limit value is the minimum measurement value of the acquisition device corresponding to the analog quantity to be calibrated under normal working conditions.

[0056] Exemplarily, first, confirm the specification parameters of the acquisition device corresponding to the analog quantity to be calibrated, and based on the specification parameters, determine the upper limit value and the lower limit value of the input numerical range of the analog quantity to be calibrated, where: the specification parameters of the acquisition device can be stored in an external database to obtain the specification parameters according to the call of the corresponding data interface; the specification parameters of the acquisition device can also be stored in an internal configuration file or database to read the specification parameters according to the corresponding read request. Furthermore, data integrity checks can be performed on the obtained upper limit value and lower limit value, for example, ensuring that the upper limit value is greater than the lower limit value and the interval range conforms to the expected measurement range of the analog quantity to be calibrated.

[0057] Step S402: Obtain the first difference between the current value and the lower limit value, and the second difference between the upper limit value and the lower limit value, and based on the numerical relationship between the first difference and the second difference, obtain the first proportionality coefficient corresponding to the current value.

[0058] Exemplarily, first, determine the numerical difference between the current value and the lower limit value, i.e., the first difference, which represents the offset of the current value of the analog quantity to be calibrated compared to the minimum value of the input numerical range; furthermore, determine the numerical difference between the upper limit value and the lower limit value, i.e., the second difference, which represents the span of the entire input numerical range; furthermore, through these two numerical differences, the relative proportion of the current value within the entire input numerical range can be calculated, i.e., the first proportionality coefficient. Among them, a normalization formula can be used for calculation, that is, the first proportionality coefficient is obtained according to the ratio of the first difference to the second difference, so that the value range of the first proportionality coefficient remains between 0 and 1, thereby providing a dimensionless standardized parameter; for example, if the input numerical range of a voltage signal is 0 to 10V and the current value is 5V, then the first difference is 5V, the second difference is 10V, and the calculated first proportionality coefficient is 0.5, indicating that the current value is at the 50% position of the entire input numerical range.

[0059] In this embodiment, based on the numerical differences among the current value, the upper limit value, and the lower limit value, the first proportionality coefficient that can reflect the relative position of the current value within the input numerical interval is effectively calculated. Thus, according to the first proportionality coefficients corresponding to different input data, different input data are calibrated according to a unified calculation framework, avoiding calibration incompatibility problems caused by different ranges.

[0060] In an exemplary embodiment, based on the output calibration logic of the target analog quantity module, combined with the data transmission characteristics of the reference analog quantity, numerical compensation processing is performed on the output of the target analog quantity module to obtain the output calibration value corresponding to the output of the target analog quantity module, including step S501 to step S502.

[0061] Step S501, obtain the second proportionality coefficient, which reflects the data transmission efficiency of the reference analog quantity output from the reference analog quantity module during the historical period, and the reference analog quantity module matches the target analog quantity module.

[0062] Among them, the second proportionality coefficient represents the numerical proportional relationship between the actual output and the expected output of the reference analog quantity module, and is used to measure the transmission efficiency of the output of the reference analog quantity module during the transmission process.

[0063] Among them, the reference analog quantity module refers to the analog quantity module that provides a reference for the standardized output. The reference analog quantity module can represent an analog quantity module with the same function or the same type as the target analog quantity module, and the reference analog quantity output by the reference analog quantity module has the same data transmission characteristics as the output of the target analog quantity module.

[0064] Exemplarily, in order to effectively compensate for the output error of the target analog module, first, in the historical data of the reference analog module that matches the target analog module, extract the data transmission characteristics of the reference analog quantity of the reference analog module, and calculate a second proportional coefficient that can reflect the data transmission efficiency of the reference analog quantity based on these data transmission characteristics; wherein, the second proportional coefficient can be calculated by comparing the actual output and the expected output of the reference analog quantity. For example, if the expected output of a certain current measurement module should be 20 mA, but the historical data indicates that there is always a 2% loss during transmission, then this loss situation needs to be recorded by the second proportional coefficient for correction during subsequent calibration. Furthermore, the methods for obtaining the second proportional coefficient may include methods such as historical data statistical analysis, real-time measurement comparison, and long-term trend evaluation, and data processing techniques such as moving average, weighted filtering, or curve fitting will also be combined to ensure that the second proportional coefficient can accurately reflect the long-term data transmission characteristics. Furthermore, the second proportional coefficient is not just the data analysis result based on a single time point, but the data statistical result based on multiple time periods, thereby ensuring the stability and adaptability of the calibration process.

[0065] Step S502: Based on the second proportional coefficient, perform numerical compensation processing on the output of the target analog module to obtain the output calibration value corresponding to the output of the target analog module.

[0066] Exemplarily, based on the second proportional coefficient, perform numerical compensation processing on the output of the target analog module so that the actual output of the target analog module approaches the expected output. For example: If the second proportional coefficient indicates that there is a fixed proportion of attenuation in the output of the target analog module during transmission, then the numerical compensation processing of the output of the target analog module can be expressed as restoring the original signal strength by increasing the corresponding gain coefficient to ensure that the actual output can match the expected output. Furthermore, if the second proportional coefficient indicates that there is a non-linear error in the output of the target analog module within certain specific output ranges, non-linear correction methods such as polynomial fitting or interpolation calculation can be combined to perform non-linear compensation on the output to improve the calibration accuracy.

[0067] In this embodiment, by obtaining the second proportional coefficient and the data transmission efficiency of the historical data reflected by the second proportional coefficient, reliable numerical compensation processing is provided for the output of the target analog module, so that the output of the target analog module can be adjusted to the state closest to the expected output, and the entire output calibration process has high stability and repeatability, thereby improving the efficiency and reliability of data processing.

[0068] In an exemplary embodiment, before obtaining the second proportional coefficient, the method further includes steps S601 to S603.

[0069] Step S601: Send the reference analog quantity output by the reference analog quantity module within the historical period to the input detection module.

[0070] Step S602: Obtain the expected output value predicted by the reference analog quantity module when sending the reference analog quantity, and the true measured value detected by the input detection module when receiving the reference analog quantity.

[0071] The input detection module refers to a measuring device or system for receiving, measuring, and recording signals sent from the reference analog quantity module, such as a high-precision data acquisition card (DAQ), oscilloscope, current detection circuit, or high-precision ADC module.

[0072] The expected output value refers to the theoretical value that the reference analog quantity module should output under ideal conditions; the true measured value refers to the actual value actually received and measured by the input detection module.

[0073] Exemplarily, within the historical period, the reference analog quantity output by the reference analog quantity module is transmitted to the input detection module. The input detection module detects the received reference analog quantity to obtain the true measured value corresponding to the reference analog quantity, and then based on the historical data in the reference analog quantity module, determines the expected output value corresponding to the reference analog quantity. Among them, the expected output value is usually calculated based on the calculation formula corresponding to the data logic of the reference analog quantity module, while the true measured value is affected by factors such as the transmission medium, circuit characteristics, and ambient temperature change. The deviation between the two reflects the data transmission characteristics of the reference analog quantity. For example, the expected output value of the reference analog quantity module at a specific moment may be 5V, but the value actually measured by the input detection module may be 4.9V, indicating that there is a signal attenuation of about 0.2% on this data transmission path.

[0074] Optionally, to ensure the integrity and validity of the data, data synchronization or error checking can be performed during the transmission of the reference analog quantity to prevent inaccurate detection of the reference analog quantity received by the input detection module due to sudden interference or data loss during the transmission process.

[0075] Step S603: Obtain the second proportional coefficient based on the numerical relationship between the expected output value and the true measured value.

[0076] Exemplarily, the function of the second proportionality coefficient is to quantify the errors occurring during the data transmission process, so as to perform numerical compensation during subsequent calibration processes, thereby enabling the output of the target analog module to be closer to the true value; among them, the ratio of the true measurement value to the expected output value is used as the proportionality factor for data transmission, that is, the second proportionality coefficient. For example, if the expected output value is 10V during a certain measurement period, and the true measurement value actually measured by the input detection module is 9.8V, then the second proportionality coefficient is calculated as 0.98, which means that on this transmission path, the data transmission efficiency is approximately 98%, and there is a 2% signal attenuation.

[0077] Furthermore, the calculation of the second proportionality coefficient is usually not based on a single measurement data, but is statistically based on multiple historical measurement data to ensure that the calculation result can reflect the long-term trend and will not cause errors in the compensation calculation due to the fluctuations of a single measurement data set; furthermore, in order to further improve the calculation accuracy, methods such as weighted average and sliding window filtering can be used to reduce the influence of short-term signal fluctuations on the calculation of the second proportionality coefficient.

[0078] In this embodiment, according to the expected output value predicted by the reference analog module when sending the reference analog quantity and the true measurement value detected by the input detection module when receiving the reference analog quantity, a set of standardized reference data is provided. By comparing the changes in the reference data during the transmission process, the second proportionality coefficient can be obtained efficiently and accurately, so as to effectively quantify the errors in the data transmission process and improve the accuracy of error analysis.

[0079] In an exemplary embodiment, obtaining the analog quantity to be calibrated and the target calibration instruction corresponding to the analog quantity to be calibrated includes steps S701 to S702.

[0080] Step S701, obtaining the analog quantity to be detected from the acquisition module, and performing feature analysis on the analog quantity to be detected to obtain the analysis result corresponding to the analog quantity to be detected. The analysis result includes the signal source, current value, input numerical range, and historical calibration data of the analog quantity to be detected.

[0081] Among them, the acquisition module represents a hardware or software module used to obtain and transmit analog quantity data, and is used to obtain analog quantity data from the external physical environment and transmit it to the analog module for calibration processing.

[0082] Among them, the analysis result represents a set of data information obtained by extracting and analyzing the characteristic information of the analog quantity to be calibrated, and is used to describe the key attribute information of the analog quantity to be calibrated; the signal source represents the physical source of the analog quantity to be detected, and the historical calibration data represents the error correction information, compensation data, or calibration records generated by the analog quantity with the same signal source as the analog quantity to be calibrated during previous calibration processes.

[0083] Exemplarily, analog data provided by various sensors, measurement devices, or other input units and other acquisition modules is obtained. Before calibrating the analog quantity to be detected, it is necessary to first perform feature analysis on the analog quantity to be detected to obtain analysis results such as the signal source, current value, input value range, and historical calibration data corresponding to the analog quantity to be detected. Among them, by identifying the signal source of the analog quantity to be calibrated, the acquisition module corresponding to the analog quantity to be calibrated is determined, and then according to the specification parameters of the acquisition module, the input value range corresponding to the analog quantity to be calibrated is determined. Then, based on the historical analog data collected by the acquisition module in the historical period and the data generated by calibrating the historical analog data, the historical calibration data is integrated. Then, based on the current value, input value range, signal source, and historical calibration data, the analysis result of the analog quantity to be calibrated is combined.

[0084] Step S702, obtain a preset instruction document, and match the target calibration instruction corresponding to the analog quantity to be calibrated in the instruction document according to the analysis result. The instruction document includes calibration instructions corresponding to different analog quantities.

[0085] Among them, the instruction document represents a set of standardized calibration instructions stored in advance for different types of analog quantities, and is used to automatically match appropriate calibration instructions during the calibration process.

[0086] Exemplarily, according to the analysis result of the analog quantity to be calibrated, the target calibration instruction corresponding to the analog quantity to be calibrated is matched in the instruction document. Among them, the matching process of the target calibration instruction can be realized based on multiple parameters such as the signal source, input value range, and historical calibration data. For example, if the analysis result shows that the current analog quantity to be calibrated is a current signal and the input value range is 4 mA to 20 mA, then the system needs to query in the instruction document the target calibration instruction applicable to calibrating and adjusting the analog quantity of this signal source in this input value range. Furthermore, the historical calibration data can be used as an auxiliary condition in the matching process. For example, if the historical analog data of a certain acquisition module used a specified calibration instruction in the past calibration process, then in a new calibration task, the same calibration instruction can be preferentially matched to improve the consistency of calibration.

[0087] In this embodiment, by performing feature analysis on the analog quantity to be detected to obtain the analysis result corresponding to the analog quantity to be detected, and then through the efficient management mechanism of the calibration instruction in the instruction document, the target calibration instruction in the instruction document is accurately matched in the dimension of feature information, ensuring the accuracy of the calibration instruction matching and avoiding the influence of incorrect calibration schemes on measurement data.

[0088] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed 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 executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0089] Based on the same inventive concept, an embodiment of the present application also provides an analog quantity calibration device based on an analog quantity module for implementing the analog quantity calibration method based on an analog quantity module described above. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the analog quantity calibration device based on an analog quantity module provided below can refer to the limitations on the analog quantity calibration method based on an analog quantity module in the above text, and will not be repeated here.

[0090] In an exemplary embodiment, as Figure 2 shown, an analog quantity calibration device based on an analog quantity module is provided, including: an acquisition module 201, a matching module 202, an input calibration module 203, and an output calibration module 204, where: The acquisition module 201 is configured to acquire an analog quantity to be calibrated and a target calibration instruction corresponding to the analog quantity to be calibrated; The matching module 202 is configured to match a target analog quantity module corresponding to the target calibration instruction based on a pre-determined mapping relationship between the calibration instruction and the analog quantity module; The input calibration module 203 is configured to perform normalization processing on the analog quantity to be calibrated based on the input calibration logic of the target analog quantity module and in combination with the data distribution characteristics of the analog quantity to be calibrated, to obtain an input calibration value corresponding to the analog quantity to be calibrated; The output calibration module 204 is configured to obtain the output of the target analog quantity module based on the data processing of the input calibration value by the target analog quantity module, perform numerical compensation processing on the output of the target analog quantity module based on the output calibration logic of the target analog quantity module and in combination with the data transmission characteristics of the reference analog quantity, to obtain an output calibration value corresponding to the output of the target analog quantity module, and use the output calibration value as the calibrated analog quantity.

[0091] In an exemplary embodiment, the matching module 202 is further configured to: obtain a string linked list, where the string linked list includes string identifiers respectively corresponding to each analog quantity module; based on a mapping relationship between a pre-determined calibration instruction and the string identifier of the analog quantity module, match the target string identifier corresponding to the target calibration instruction in the string linked list; and call the target analog quantity module corresponding to the target string identifier to generate a calibration task for the analog quantity to be calibrated based on the target analog quantity module.

[0092] In an exemplary embodiment, the input calibration module 203 is further configured to: based on a numerical relationship between the current value of the analog quantity to be calibrated and an input numerical range, obtain a first proportionality coefficient corresponding to the current value, where the first proportionality coefficient reflects the data distribution characteristics of the current value in the input numerical range; obtain a preset standard numerical range, and map the current value to the standard numerical range based on the first proportionality coefficient to obtain an input calibration value of the analog quantity to be calibrated in the standard numerical range, and each analog quantity module corresponds to the same standard numerical range.

[0093] In an exemplary embodiment, the input calibration module 203 is further configured to: obtain the upper limit value and the lower limit value of the input numerical range of the analog quantity to be calibrated; obtain a first difference between the current value and the lower limit value, and a second difference between the upper limit value and the lower limit value, and based on the numerical relationship between the first difference and the second difference, obtain the first proportionality coefficient corresponding to the current value.

[0094] In an exemplary embodiment, the output calibration module 204 is further configured to: obtain a second proportionality coefficient, where the second proportionality coefficient reflects the data transmission efficiency of the reference analog quantity output by the reference analog quantity module during a historical period, and the reference analog quantity module matches the target analog quantity module; and perform a numerical compensation process on the output of the target analog quantity module based on the second proportionality coefficient to obtain an output calibration value corresponding to the output of the target analog quantity module.

[0095] In an exemplary embodiment, the output calibration module 204 is further configured to: send the reference analog quantity output by the reference analog quantity module during a historical period to the input detection module; obtain an expected output value predicted by the reference analog quantity module when sending the reference analog quantity, and an actual measured value detected by the input detection module when receiving the reference analog quantity; and based on the numerical relationship between the expected output value and the actual measured value, obtain the second proportionality coefficient.

[0096] In an exemplary embodiment, the obtaining module 201 is further configured to: obtain the analog quantity to be detected from the acquisition module, perform feature analysis on the analog quantity to be detected to obtain an analysis result corresponding to the analog quantity to be detected, where the analysis result includes the signal source, the current value, the input numerical range, and the historical calibration data of the analog quantity to be detected; obtain a preset instruction document, and match, according to the analysis result, a target calibration instruction corresponding to the analog quantity to be calibrated in the instruction document, where the instruction document includes calibration instructions corresponding to different analog quantities respectively.

[0097] Each module in the above analog quantity calibration device based on the analog quantity module can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in the form of hardware or be independent of the processor, or can be stored in the memory in the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above respective modules.

[0098] In an exemplary embodiment, a computer device is provided, including a memory and a processor, where a computer program is stored in the memory, and when the processor executes the computer program, the steps in any of the above embodiments are implemented.

[0099] In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by the processor, the steps in any of the above embodiments are implemented.

[0100] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0101] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0102] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. An analog quantity calibration method based on an analog quantity module, characterized in that: The method comprises: Obtaining an analog quantity to be calibrated and a target calibration instruction corresponding to the analog quantity to be calibrated; Based on a predetermined mapping relationship between a calibration instruction and an analog module, a target analog module corresponding to the target calibration instruction is matched; Based on the input calibration logic of the target analog quantity module, the analog quantity to be calibrated is normalized in combination with the data distribution characteristics of the analog quantity to be calibrated to obtain an input calibration value corresponding to the analog quantity to be calibrated; The output of the target analog quantity module is obtained based on data processing of the input calibration value by the target analog quantity module, and the output of the target analog quantity module is numerically compensated based on the output calibration logic of the target analog quantity module and combined with the data transmission characteristics of the reference analog quantity to obtain an output calibration value corresponding to the output of the target analog quantity module, and the output calibration value is used as the calibrated analog quantity.

2. The method according to claim 1, characterized in that The matching of obtaining a target analog module corresponding to the target calibration instruction based on a predetermined mapping relationship between the calibration instruction and the analog module includes: Obtain a string linked list, wherein the string linked list includes string identifiers corresponding to each analog quantity module; Based on a predetermined mapping relationship between a calibration instruction and a string identifier of an analog module, a target string identifier corresponding to the target calibration instruction is obtained by matching in the string linked list; The target analog quantity module corresponding to the target character string identifier is called to generate a calibration task of the analog quantity to be calibrated based on the target analog quantity module.

3. The method according to claim 1, characterized in that The input calibration logic based on the target analog quantity module normalizes the analog quantity to be calibrated in combination with the data distribution characteristics of the analog quantity to be calibrated to obtain the input calibration value corresponding to the analog quantity to be calibrated, including: Based on the numerical relationship between the current value of the analog quantity to be calibrated and the input numerical interval, a first proportionality coefficient corresponding to the current value is obtained, wherein the first proportionality coefficient reflects the data distribution characteristics of the current value in the input numerical interval; A preset standard numerical interval is obtained, and the current value is mapped to the standard numerical interval based on the first proportional coefficient to obtain an input calibration value of the analog quantity to be calibrated in the standard numerical interval, wherein each analog quantity module corresponds to the same standard numerical interval.

4. The method according to claim 3, characterized in that The obtaining, based on the numerical relationship between the current value of the analog quantity to be calibrated and the input numerical value interval, a first proportionality coefficient corresponding to the current value includes: Obtaining an upper limit value and a lower limit value of an input numerical range of the analog quantity to be calibrated; A first difference between the current value and the lower limit value and a second difference between the upper limit value and the lower limit value are obtained, and a first proportionality coefficient corresponding to the current value is obtained based on a numerical relationship between the first difference and the second difference.

5. The method according to claim 1, characterized in that The output calibration logic based on the target analog module and the data transmission characteristics of the reference analog quantity are combined to perform numerical compensation processing on the output of the target analog module to obtain an output calibration value corresponding to the output of the target analog module, including: Obtaining a second proportionality coefficient, the second proportionality coefficient reflecting the data transmission efficiency of the reference analog quantity output from the reference analog quantity module in the historical period, the reference analog quantity module matching the target analog quantity module; Based on the second proportional coefficient, numerical compensation processing is performed on the output of the target analog module to obtain an output calibration value corresponding to the output of the target analog module.

6. The method according to claim 5, characterized in that Before obtaining the second proportionality coefficient, the method further includes: Sending the reference analog quantity output by the reference analog quantity module within the historical period to the input detection module; Acquire the expected output value predicted by the reference analog quantity module when sending the reference analog quantity and the real measurement value detected by the input detection module when receiving the reference analog quantity; The second proportionality coefficient is obtained based on the numerical relationship between the expected output value and the actual measurement value.

7. The method according to claim 1, characterized in that The step of obtaining the analog quantity to be calibrated and the target calibration instruction corresponding to the analog quantity to be calibrated includes: Acquire the analog quantity to be detected from the acquisition module, perform feature analysis on the analog quantity to be detected to obtain an analysis result corresponding to the analog quantity to be detected, wherein the analysis result includes a signal source, a current value, an input value range, and historical calibration data of the analog quantity to be detected; A preset instruction document is obtained, and a target calibration instruction corresponding to the analog quantity to be calibrated is obtained by matching the instruction document according to the parsing result, wherein the instruction document includes calibration instructions corresponding to different analog quantities.

8. An analog quantity calibration device based on an analog quantity module, characterized in that: The device comprises: An acquisition module, used for acquiring an analog quantity to be calibrated and a target calibration instruction corresponding to the analog quantity to be calibrated; A matching module, used for matching a target analog module corresponding to the target calibration instruction based on a predetermined mapping relationship between the calibration instruction and the analog module; An input calibration module, used to perform normalization processing on the analog quantity to be calibrated based on the input calibration logic of the target analog quantity module and in combination with the data distribution characteristics of the analog quantity to be calibrated, so as to obtain an input calibration value corresponding to the analog quantity to be calibrated; An output calibration module is used to obtain the output of the target analog quantity module based on data processing of the input calibration value by the target analog quantity module, and to perform numerical compensation processing on the output of the target analog quantity module based on the output calibration logic of the target analog quantity module and in combination with the data transmission characteristics of the reference analog quantity, so as to obtain an output calibration value corresponding to the output of the target analog quantity module, and use the output calibration value as the calibrated analog quantity.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.