Method for dynamically detecting data offset of Internet of Things equipment based on relational database

Through the method based on relational database, dynamically setting offset algorithm parameters and creating server or client, the problem of singularity and inflexibility of traditional detection methods is solved, flexible data offset detection and accurate data feedback are achieved, and maintenance costs are reduced.

CN120455311APending Publication Date: 2025-08-08DAQING ANRUIDA TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510514122.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The traditional data detection method has the problem that the detection data acquisition protocol is relatively single, the detection algorithm does not support dynamic editing, and the detection platform can only be used as a server or client, and is not flexible enough.

Method used

Using a relational database-based method, we obtain the basic attributes and protocol types of third-party IoT devices, dynamically set the offset algorithm parameters, obtain the original data by creating a server or client, build an offset data discrimination formula, judge whether offset data is generated, and store or update the offset data in the relational database.

Benefits of technology

It realizes the flexibility of the detection platform, supports dynamic editing of offset algorithms, reduces maintenance costs, and can calculate and feedback data offsets in real time and accurately, reducing the workload of third-party equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455311A_ABST
    Figure CN120455311A_ABST
Patent Text Reader

Abstract

The invention discloses a method for dynamically detecting data offset of Internet of Things equipment based on a relational database, belongs to detection of data offset, and particularly relates to detection of data offset of the Internet of Things equipment. The problems that according to a traditional data detection method, a detection data collection protocol is single, a detection algorithm does not support dynamic editing, and a detection platform can only serve as a server end or a client end and is not flexible enough are solved. The method comprises the steps of obtaining a calculation result of an offset algorithm according to dynamic parameters and original data; constructing an offset data discriminant according to the calculation result of the offset algorithm, the comparison relationship and the theoretical value; judging whether offset data is generated or not according to the offset data discriminant; the method for dynamically detecting the data offset of the equipment of the internet of things based on the relational database is suitable for accurately and efficiently calculating the data offset of the terminal equipment in real time and feeding back a calculation result so as to solve the problems of data offset and distortion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the detection of data offset, and in particular to the detection of data offset of Internet of Things devices. Background Art

[0002] With the expansion of industrial production scale and automation levels, the number of IoT devices, including sensors and connected servers, within industrial plants is increasing rapidly to maintain safe and stable operations. Simultaneously, IoT devices are collecting an increasing amount of production and security data on various parameters. With this increasing amount of data from these devices, maintaining this data, especially preserving its fidelity, is becoming increasingly important.

[0003] Data collected by terminal devices can be distorted for various reasons. For example, IoT terminal devices may be out of repair, leading to data collection errors. Alternatively, data collected by terminal devices may be contaminated by noise during transmission over the channel, causing data offset and distortion.

[0004] In order to solve the problem of data distortion, technicians in this field need to detect the data collected by the terminal device and calculate the data offset. Currently, the traditional data detection method has the following problems:

[0005] (1) The detection data collection protocol is relatively simple.

[0006] (2) The detection algorithm does not support dynamic editing and needs to be re-deployed after the algorithm is changed.

[0007] (3) The detection platform can only be used as a server or client, which is not flexible enough. Summary of the Invention

[0008] The present invention proposes a method for dynamically detecting data offsets of IoT devices based on a relational database, which solves the problems existing in traditional data detection methods, such as a relatively simple detection data acquisition protocol, a lack of support for dynamic editing of the detection algorithm, and a detection platform that can only serve as a server or client and is not flexible enough.

[0009] The method for dynamically detecting data offset of IoT devices based on a relational database according to the present invention comprises the following steps:

[0010] Step S1: Obtain the basic attributes and protocol type of the third-party IoT device to be detected;

[0011] The basic attributes include device name and device type; the device type includes server and client;

[0012] The protocol type includes http protocol or websocket protocol;

[0013] If the third-party IoT device to be tested is a server, you also need to obtain the server's IP address and publishing port;

[0014] If the third-party IoT device to be detected is a client, you also need to obtain the client's IP address and external access port;

[0015] If the third-party IoT device to be detected is a server and uses the HTTP protocol, you also need to obtain the polling period of the HTTP protocol;

[0016] Step S2: obtaining dynamic parameters and comparison relationships of the migration algorithm to support dynamic editing of the migration algorithm; including the following steps:

[0017] Get the dynamic parameters of the offset algorithm, which include the action field, its coefficient, and coefficient description, as well as the comparison field, its coefficient, and coefficient description;

[0018] If multiple action fields and their coefficients are involved, you also need to obtain the primary keys of the action fields at the same level to form an association relationship;

[0019] If multiple comparison fields and their coefficients are involved, you also need to obtain the primary keys of the comparison fields at the same level to form an association relationship;

[0020] Get the comparison relationship of the offset algorithm;

[0021] Step S3: Based on the basic attributes and protocol type of the third-party IoT device to be detected, create a server or client under the same protocol type, and obtain the corresponding raw data based on the role field;

[0022] Step S4: Obtain the calculation results of the offset algorithm based on the dynamic parameters and the original data; construct an offset data discriminant based on the calculation results of the offset algorithm, the comparison relationship, and the theoretical value; and determine whether offset data is generated based on the offset data discriminant.

[0023] If the offset data discriminant is true, then offset data is generated;

[0024] Otherwise, no offset data is generated.

[0025] Furthermore, a preferred embodiment is provided, wherein step S3: creating a server or client under the same protocol type according to the basic attributes and protocol type of the third-party IoT device to be detected, and obtaining corresponding raw data according to the role field; includes:

[0026] Step S3.1: If the third-party IoT device to be detected is a server of the HTTP protocol:

[0027] Create an HTTP client as a detection platform based on the server's IP address and publishing port;

[0028] If the creation of the http client fails, the service will be prompted to be offline;

[0029] If the http protocol client is created successfully, the detection platform sets the polling cycle according to the http protocol and obtains the original data in a periodic polling manner;

[0030] Step S3.2: If the third-party IoT device to be detected is an HTTP client:

[0031] Create an HTTP protocol server as a detection platform based on the client's IP address, external access port, and HTTP protocol polling cycle;

[0032] The HTTP protocol server is accessed by third-party IoT devices to be tested, and the detection platform passively obtains raw data through client polling.

[0033] Step S3.3: If the third-party IoT device to be detected is a websocket protocol server:

[0034] According to the server's IP address and publishing port, create a websocket protocol client as a detection platform;

[0035] If the creation of the websocket protocol client fails, the service will be prompted to be offline;

[0036] If the websocket protocol client is created successfully, the detection platform passively obtains the original data;

[0037] Step S3.4: If the third-party IoT device to be detected is a websocket protocol client:

[0038] Based on the client's IP address and external access port, create a websocket protocol server as a detection platform;

[0039] The websocket protocol server is accessed by third-party IoT devices to be tested, and the detection platform passively obtains raw data.

[0040] Furthermore, a preferred embodiment is provided, wherein the calculation result of the offset algorithm is:

[0041] The calculation result of the offset algorithm = Σ(original data corresponding to the action field×action field coefficient)±Σ(comparison field×comparison field coefficient).

[0042] Furthermore, a preferred embodiment is provided, wherein the method further comprises the following steps:

[0043] Step S6: If offset data is generated, determine whether the historical record of the offset data is stored in the relational database:

[0044] If a historical record of the offset data is stored, modifying the historical record of the offset data stored in the relational database according to the current value of the offset data;

[0045] If there is no historical record for storing the offset data, the current value of the offset data is added as a current record of the offset data in the relational database.

[0046] Furthermore, a preferred embodiment is provided, wherein step S6 includes:

[0047] Step S6.1: Obtain the unique sensor identifier of the third-party IoT device to be detected; combine the unique sensor identifier of the third-party IoT device to be detected, the dynamic parameters of the offset algorithm, and the comparison relationship as the unique identifier of the offset data;

[0048] Step S6.2: Based on the unique identifier of the offset data, determine whether the historical record of the generated offset data is stored in the relational database:

[0049] If a historical record of the offset data is stored, modifying the historical record of the offset data stored in the relational database according to the current value of the offset data;

[0050] If there is no historical record for storing the offset data, the current value of the offset data is added as a current record of the offset data in the relational database.

[0051] Furthermore, a preferred embodiment is provided, wherein the method further comprises the following steps:

[0052] Step S7: If offset data is generated, the offset data is pushed to the foreground for display.

[0053] The present invention also proposes a device for dynamically detecting data offset of IoT devices based on a relational database, the device comprising the following modules:

[0054] Module S1: Obtain the basic attributes and protocol type of the third-party IoT device to be detected;

[0055] The basic attributes include device name and device type; the device type includes server and client;

[0056] The protocol type includes http protocol or websocket protocol;

[0057] If the third-party IoT device to be tested is a server, you also need to obtain the server's IP address and publishing port;

[0058] If the third-party IoT device to be detected is a client, you also need to obtain the client's IP address and external access port;

[0059] If the third-party IoT device to be detected is a server and uses the HTTP protocol, you also need to obtain the polling period of the HTTP protocol;

[0060] Module S2: Obtaining the dynamic parameters and comparison relationships of the migration algorithm to support dynamic editing of the migration algorithm; including the following steps:

[0061] Get the dynamic parameters of the offset algorithm, which include the action field, its coefficient, and coefficient description, as well as the comparison field, its coefficient, and coefficient description;

[0062] If multiple action fields and their coefficients are involved, you also need to obtain the primary keys of the action fields at the same level to form an association relationship;

[0063] If multiple comparison fields and their coefficients are involved, you also need to obtain the primary keys of the comparison fields at the same level to form an association relationship;

[0064] Get the comparison relationship of the offset algorithm;

[0065] Module S3: Based on the basic attributes and protocol type of the third-party IoT device to be detected, create a server or client under the same protocol type, and obtain the corresponding raw data according to the function field;

[0066] Module S4: Obtain the calculation results of the migration algorithm based on the dynamic parameters and the original data; Construct a migration data discriminant based on the calculation results of the migration algorithm, the comparison relationship, and the theoretical value; Determine whether migration data is generated based on the migration data discriminant;

[0067] If the offset data discriminant is true, then offset data is generated;

[0068] Otherwise, no offset data is generated.

[0069] The present invention also proposes a computer device comprising: a processor and a memory, wherein the memory is used to store executable instructions of the processor, and the processor is configured to execute any one of the above-mentioned methods for dynamically detecting data offset of IoT devices based on a relational database by executing the executable instructions.

[0070] The present invention also proposes a computer storage medium, which stores a computer program. When the computer program is run, it executes any one of the above-mentioned methods for dynamically detecting data offsets of Internet of Things devices based on a relational database.

[0071] The present invention also proposes a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of any one of the above-mentioned methods for dynamically detecting data offsets of IoT devices based on a relational database.

[0072] The present invention has the following beneficial effects:

[0073] 1. The method for dynamically detecting data offsets of IoT devices based on a relational database described in the present invention can flexibly set the detection platform as a server or client according to the characteristics of the third-party service or device (i.e., the third-party IoT device to be detected), and then provide HTTP or WebSocket protocol access based on the support of the third-party service or device, thereby reducing the workload of the third-party service or device and its technical support.

[0074] 2. The method for dynamically detecting IoT device data offsets based on a relational database described in the present invention supports setting dynamic formulas in the data offset algorithm. The action fields and their coefficients, as well as the comparison fields and their coefficients, can be edited after the comparison relationship changes, reducing maintenance costs.

[0075] 3. The method of dynamically detecting data offsets of IoT devices based on a relational database described in the present invention stores offset data by setting the unique identifier of the sensor of the third-party service or device and the dynamic parameters (action field and its coefficient, comparison field and its coefficient) and the comparison relationship as the unique identifier of the data stored in the database; if the identifier does not exist in the database, a new addition operation is performed; otherwise, the data time is modified, thereby minimizing the data volume.

[0076] The method for dynamically detecting data offset of IoT devices based on a relational database described in the present invention is suitable for calculating the data offset of terminal devices in real time, accurately and efficiently and feeding back the calculation results to solve the problems of data offset and distortion. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0078] Figure 1 A schematic flow chart of a method for dynamically detecting data offsets of IoT devices based on a relational database in one embodiment of the present invention;

[0079] Figure 2A flowchart of determining whether offset data is generated when the third-party IoT device to be detected is a server of the http protocol in one embodiment of the present invention;

[0080] Figure 3 In one embodiment of the present invention, when the third-party IoT device to be detected is a client of the http protocol, a flowchart for determining whether offset data is generated is provided;

[0081] Figure 4 In one embodiment of the present invention, when the third-party IoT device to be detected is a server of the websocket protocol, a flowchart for determining whether offset data is generated is provided;

[0082] Figure 5 In one embodiment of the present invention, the present invention is a flowchart of determining whether offset data is generated when the third-party IoT device to be detected is a client of the websocket protocol. DETAILED DESCRIPTION

[0083] In order to make the technical solutions and advantages of the present invention more clearly described, the specific embodiments of the present invention will be further described in detail and completely in conjunction with the accompanying drawings. The various embodiments described below are only part of the preferred embodiments of the present invention, rather than all implementation plans; the various embodiments described below are intended to explain the present invention and cannot be understood as limiting the present invention; the reasonable combination of the technical features defined in the various embodiments of the present invention, as well as all other implementation plans obtained by ordinary technicians in this field based on the embodiments of the present invention without making creative work, all fall within the scope of protection of the present invention.

[0084] In one embodiment, a method for dynamically detecting data drift of an IoT device based on a relational database is provided, the method comprising the following steps:

[0085] Step S1: Obtain the basic attributes and protocol type of the third-party IoT device to be detected;

[0086] The basic attributes include device name and device type; the device type includes server and client;

[0087] The protocol type includes http protocol or websocket protocol;

[0088] If the third-party IoT device to be tested is a server, you also need to obtain the server's IP address and publishing port;

[0089] If the third-party IoT device to be detected is a client, you also need to obtain the client's IP address and external access port;

[0090] If the third-party IoT device to be detected is a server and uses the HTTP protocol, you also need to obtain the polling period of the HTTP protocol;

[0091] Step S2: obtaining dynamic parameters and comparison relationships of the migration algorithm to support dynamic editing of the migration algorithm; including the following steps:

[0092] Get the dynamic parameters of the offset algorithm, which include the action field, its coefficient, and coefficient description, as well as the comparison field, its coefficient, and coefficient description;

[0093] If multiple action fields and their coefficients are involved, you also need to obtain the primary keys of the action fields at the same level to form an association relationship;

[0094] If multiple comparison fields and their coefficients are involved, you also need to obtain the primary keys of the comparison fields at the same level to form an association relationship;

[0095] Obtain comparative relationships and theoretical values of the offset algorithm;

[0096] Step S3: Based on the basic attributes and protocol type of the third-party IoT device to be detected, create a server or client under the same protocol type, and obtain the corresponding raw data based on the role field;

[0097] Step S4: Obtain the calculation results of the offset algorithm based on the dynamic parameters and the original data; construct an offset data discriminant based on the calculation results of the offset algorithm, the comparison relationship, and the theoretical value; and determine whether offset data is generated based on the offset data discriminant.

[0098] If the offset data discriminant is true, then offset data is generated;

[0099] Otherwise, no offset data is generated.

[0100] In this implementation, the function fields of the offset algorithm and its coefficients and coefficient descriptions;

[0101] The action field refers to the type and location of the data collected by the third-party IoT device to be detected that participates in the offset data discriminant operation, such as "the temperature of a certain engine" or "the pressure in a certain cabin".

[0102] The coefficient of the effect field, such as "1.1", "1.2", etc., is defined by yourself.

[0103] The coefficient description is a text description of the effect field and its coefficient, which can be defined by yourself.

[0104] "Same-level primary key" and "association relationship" refer to the collection of data on two interrelated physical quantities. For example, "the temperature of a certain engine" can include "the temperature of a certain engine casing" and "the temperature inside a certain engine."

[0105] In this embodiment, the detection platform collects raw data based on the function field:

[0106] If the action field is "the temperature of a certain engine", the collected original data is "the temperature of the engine is 60 degrees Celsius".

[0107] In this embodiment, the calculation result of the offset algorithm is:

[0108] The calculation result of the offset algorithm = Σ(original data corresponding to the action field×action field coefficient)±Σ(comparison field×comparison field coefficient).

[0109] In this embodiment, the comparison field and the theoretical value can be a custom constant, or obtained according to the protocol (http protocol or websocket protocol) of the third-party IoT device to be detected and provided by the third-party IoT device to be detected.

[0110] In this embodiment, the comparison relationship is, for example: >, <, >=, <=, !=.

[0111] In this embodiment, the offset data discriminant is, for example:

[0112] Calculation result > theoretical value, calculation result < theoretical value, calculation result > = theoretical value, calculation result < = theoretical value, calculation result ! = theoretical value.

[0113] In this embodiment, the data offset algorithm supports setting dynamic formulas; the action fields and their coefficients and the comparison fields and their coefficients can be edited after the comparison relationship changes to reduce maintenance costs.

[0114] In this embodiment, the action field and its coefficient and the comparison field and its coefficient can be set to multiple groups.

[0115] In addition, in one embodiment, the step S3: creating a server or client under the same protocol type according to the basic attributes and protocol type of the third-party IoT device to be detected, and obtaining corresponding raw data according to the role field; includes:

[0116] Step S3.1: If the third-party IoT device to be detected is a server of the HTTP protocol:

[0117] Create an HTTP client as a detection platform based on the server's IP address and publishing port;

[0118] If the creation of the http client fails, the service will be prompted to be offline;

[0119] If the http protocol client is created successfully, the detection platform sets the polling cycle according to the http protocol and obtains the original data in a periodic polling manner;

[0120] Step S3.2: If the third-party IoT device to be detected is an HTTP client:

[0121] Create an HTTP protocol server as a detection platform based on the client's IP address, external access port, and HTTP protocol polling cycle;

[0122] The HTTP protocol server is accessed by third-party IoT devices to be tested, and the detection platform passively obtains raw data through client polling.

[0123] Step S3.3: If the third-party IoT device to be detected is a websocket protocol server:

[0124] According to the server's IP address and publishing port, create a websocket protocol client as a detection platform;

[0125] If the creation of the websocket protocol client fails, the service will be prompted to be offline;

[0126] If the websocket protocol client is created successfully, the detection platform passively obtains the original data;

[0127] Step S3.4: If the third-party IoT device to be detected is a websocket protocol client:

[0128] Based on the client's IP address and external access port, create a websocket protocol server as a detection platform;

[0129] The websocket protocol server is accessed by third-party IoT devices to be tested, and the detection platform passively obtains raw data.

[0130] It should be noted that due to the plethora of IoT devices and services connected to industrial plants, the types of data captured by sensors and their associated metrics are relatively complex. Traditional offset detection methods utilize relatively simple access protocols, which lack flexible protocol integration. Furthermore, most detection platforms utilize HTTP servers, providing traditional HTTP interfaces for third-party access to data. This approach is relatively simple to implement but requires third-party support. Furthermore, the offset calculations in traditional offset detection methods are almost static. Changes to the original data, comparison data, their respective coefficients, or comparison relationships require repackaging and redeployment of the detection platform, increasing maintenance costs.

[0131] In this embodiment, according to the characteristics of the third-party service or device (i.e., the third-party IoT device to be tested), the detection platform can be flexibly set as a server or client, and then provide http or websocket protocol access according to the support of the third-party service or device, thereby reducing the workload of the third-party service or device and its technical support.

[0132] It should be noted that the advantages and disadvantages of using different protocols to access third-party services or devices are as follows:

[0133] (1) HTTP Server (i.e., the server of the HTTP protocol): It uses periodic polling to actively obtain raw data. The data is not real-time, and abnormalities will occur when the third-party service is offline.

[0134] (2) http Client (i.e., the client of the http protocol): passively obtains raw data through client polling, and the data is highly real-time;

[0135] (3) Websocket Server (i.e., the server of the Websocket protocol): The detection platform obtains raw data in a passive manner. The data is highly real-time, and anomalies will occur if the third-party service is offline.

[0136] (4) Websocket Client (i.e., the client of the Websocket protocol): The detection platform obtains the original data in a passive way, and the data is highly real-time.

[0137] In addition, in one embodiment, the calculation result of the offset algorithm is:

[0138] The calculation result of the offset algorithm = Σ(original data corresponding to the action field×action field coefficient)±Σ(comparison field×comparison field coefficient).

[0139] In addition, in one embodiment, the method further comprises the following steps:

[0140] Step S6: If offset data is generated, determine whether the historical record of the offset data is stored in the relational database:

[0141] If a historical record of the offset data is stored, modifying the historical record of the offset data stored in the relational database according to the current value of the offset data;

[0142] If there is no historical record for storing the offset data, the current value of the offset data is added as a current record of the offset data in the relational database.

[0143] In addition, in one embodiment, step S6 includes:

[0144] Step S6.1: Obtain the unique sensor identifier of the third-party IoT device to be detected; combine the unique sensor identifier of the third-party IoT device to be detected, the dynamic parameters of the offset algorithm, and the comparison relationship as the unique identifier of the offset data;

[0145] Step S6.2: Based on the unique identifier of the offset data, determine whether the historical record of the generated offset data is stored in the relational database:

[0146] If a historical record of the offset data is stored, modifying the historical record of the offset data stored in the relational database according to the current value of the offset data;

[0147] If there is no historical record for storing the offset data, the current value of the offset data is added as a current record of the offset data in the relational database.

[0148] In this embodiment, while the historical records of the offset data stored in the relational database are modified according to the current value of the offset data, the modification time (ie, the time when the offset data is generated) is recorded.

[0149] In this embodiment, when the current value of the offset data is added as the current record of the offset data, the adding time (ie, the time when the offset data is generated) is recorded.

[0150] In this embodiment, multiple offset data may be generated for the same action field. If the offset data generated each time is recorded, it will result in the storage of too much data.

[0151] In this embodiment, in the storage of offset data, the unique identifier of the offset data is set according to the sensor unique identifier and dynamic parameters (action field and its coefficient, comparison field and its coefficient) and comparison relationship of the third-party service or device; if there is no such identifier in the database, a new addition operation is performed; otherwise, the data and recording time are modified to minimize the amount of data.

[0152] For example:

[0153] If the temperature of a certain engine collected by a certain sensor generates "offset data", and the database is judged to have no historical record of this "offset data" based on the "unique identifier of the offset data", the value of this "offset data" (assuming it is 5 degrees Celsius) will be stored in the database;

[0154] Next time, if the "temperature of a certain engine" collected by the same sensor still generates "offset data", based on the "unique identifier of the offset data", it is judged that the historical record of this "offset data" (i.e. 5 degrees Celsius) has been stored in the database, then the "value of the offset data" this time (assuming it is 8 degrees Celsius) is used to modify the historical record of the "offset data" and store "8 degrees Celsius" in the database.

[0155] In this embodiment, the data offset mode is set to dynamic editing mode; and when the offset data is written, the unique identifier of the terminal device and its detection algorithm parameters can be added or modified to ensure that the amount of valid data is limited and avoid storing too much data.

[0156] In addition, in one embodiment, the method further comprises the following steps:

[0157] Step S7: If offset data is generated, the offset data is pushed to the foreground for display.

[0158] In one embodiment, a device for dynamically detecting data offset of an IoT device based on a relational database is provided, the device comprising the following modules:

[0159] Module S1: Obtain the basic attributes and protocol type of the third-party IoT device to be detected;

[0160] The basic attributes include device name and device type; the device type includes server and client;

[0161] The protocol type includes http protocol or websocket protocol;

[0162] If the third-party IoT device to be tested is a server, you also need to obtain the server's IP address and publishing port;

[0163] If the third-party IoT device to be detected is a client, you also need to obtain the client's IP address and external access port;

[0164] If the third-party IoT device to be detected is a server and uses the HTTP protocol, you also need to obtain the polling period of the HTTP protocol;

[0165] Module S2: Obtaining the dynamic parameters and comparison relationships of the migration algorithm to support dynamic editing of the migration algorithm; including the following steps:

[0166] Get the dynamic parameters of the offset algorithm, which include the action field, its coefficient, and coefficient description, as well as the comparison field, its coefficient, and coefficient description;

[0167] If multiple action fields and their coefficients are involved, you also need to obtain the primary keys of the action fields at the same level to form an association relationship;

[0168] If multiple comparison fields and their coefficients are involved, you also need to obtain the primary keys of the comparison fields at the same level to form an association relationship;

[0169] Get the comparison relationship of the offset algorithm;

[0170] Module S3: Based on the basic attributes and protocol type of the third-party IoT device to be detected, create a server or client under the same protocol type, and obtain the corresponding raw data according to the function field;

[0171] Module S4: Obtain the calculation results of the migration algorithm based on the dynamic parameters and the original data; Construct a migration data discriminant based on the calculation results of the migration algorithm, the comparison relationship, and the theoretical value; Determine whether migration data is generated based on the migration data discriminant;

[0172] If the offset data discriminant is true, then offset data is generated;

[0173] Otherwise, no offset data is generated.

[0174] In one embodiment, a computer device is provided, comprising: a processor and a memory, wherein the memory is used to store executable instructions of the processor, and the processor is configured to execute any one of the above-mentioned methods for dynamically detecting data deviation of an IoT device based on a relational database by executing the executable instructions.

[0175] In one embodiment, a computer storage medium is provided, wherein a computer program is stored in the storage medium. When the computer program is run, any one of the above-mentioned methods for dynamically detecting data offset of an IoT device based on a relational database is executed.

[0176] In one embodiment, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the steps of any one of the above-mentioned methods for dynamically detecting data offset of IoT devices based on a relational database.

[0177] In addition, in one embodiment, a specific example is provided to discuss how to determine whether offset data is generated based on the offset data discriminant:

[0178] It is set up in a factory, and temperature measuring points are installed on the belt, donkey head, oil rod and counterweight iron of the oil pump.

[0179] The action fields are set to the temperatures of the four temperature measurement points mentioned above, and the action field coefficient is temporarily set to 1.

[0180] The comparison field is set to a constant of 20 degrees Celsius, and the comparison field coefficient is temporarily set to 1.

[0181] The theoretical value is temporarily set to 4, and the comparison relationship is set to <=.

[0182] The original data (temperature values) collected from four temperature measurement points are obtained and set as T (belt), T (donkey head), T (oil rod) and T (counterweight iron).

[0183] Then, the discriminant of offset data is as follows:

[0184] 1×T (belt) + 1×T (donkey head) + 1×T (oil rod) + 1×T (counterweight iron) - (20+20+20+20) <= 4.

[0185] If the offset data discriminant is established, it is determined that offset data is generated, otherwise no offset data is generated.

[0186] This embodiment provides a computer device or system, the hardware device of this part is a general model and is not shown in the form of a diagram. The system includes a processor and a memory, wherein the processor and the memory can be connected through a bus or other means. The memory is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, and corresponding program instructions / modules. The processor executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory, so as to realize the data space entity resolution data quality enhancement method in the above method embodiment.

[0187] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, an intranet, a mobile communication network, and combinations thereof.

[0188] One or more modules are stored in the memory. When the processor executes, the method steps in the embodiment are executed. In this way, the purpose of the invention can be achieved through the method, device and process of the present invention. The specific details of the above-mentioned computer equipment can be understood by referring to the corresponding descriptions and effects in the embodiment, and will not be repeated here.

[0189] Those skilled in the art will appreciate that all or part of the processes in the above-described embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes of the above-described embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The storage medium can also include a combination of the above-mentioned types of memory.

[0190] The above further describes the technical solution provided by the present invention in detail through several specific embodiments in order to highlight the advantages and benefits of the technical solution provided by the present invention. However, the several specific embodiments described above are not intended to limit the present invention. Any reasonable changes and improvements to the present invention, reasonable combinations of implementation methods and equivalent replacements based on the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for dynamically detecting data offset of IoT devices based on a relational database, characterized in that: The method comprises the following steps: Step S1: Obtain the basic attributes and protocol type of the third-party IoT device to be detected; The basic attributes include device name and device type; the device type includes server and client; The protocol type includes http protocol or websocket protocol; If the third-party IoT device to be tested is a server, you also need to obtain the server's IP address and publishing port; If the third-party IoT device to be detected is a client, you also need to obtain the client's IP address and external access port; If the third-party IoT device to be detected is a server and uses the HTTP protocol, you also need to obtain the polling period of the HTTP protocol; Step S2: obtaining dynamic parameters and comparison relationships of the migration algorithm to support dynamic editing of the migration algorithm; including the following steps: Get the dynamic parameters of the offset algorithm, which include the action field, its coefficient, and coefficient description, as well as the comparison field, its coefficient, and coefficient description; If multiple action fields and their coefficients are involved, you also need to obtain the primary keys of the action fields at the same level to form an association relationship; If multiple comparison fields and their coefficients are involved, you also need to obtain the primary keys of the comparison fields at the same level to form an association relationship; Get the comparison relationship of the offset algorithm; Step S3: Based on the basic attributes and protocol type of the third-party IoT device to be detected, create a server or client under the same protocol type, and obtain the corresponding raw data based on the role field; Step S4: Obtain the calculation results of the offset algorithm based on the dynamic parameters and the original data; construct an offset data discriminant based on the calculation results of the offset algorithm, the comparison relationship, and the theoretical value; and determine whether offset data is generated based on the offset data discriminant. If the offset data discriminant is true, then offset data is generated; Otherwise, no offset data is generated.

2. The method for dynamically detecting data deviation of IoT devices based on a relational database according to claim 1, characterized in that: Step S3: creating a server or client under the same protocol type according to the basic attributes and protocol type of the third-party IoT device to be detected, and obtaining corresponding raw data according to the role field; including: Step S3.1: If the third-party IoT device to be detected is a server of the HTTP protocol: Create an HTTP client as a detection platform based on the server's IP address and publishing port; If the creation of the http client fails, the service will be prompted to be offline; If the http protocol client is created successfully, the detection platform sets the polling cycle according to the http protocol and obtains the original data in a periodic polling manner; Step S3.2: If the third-party IoT device to be detected is an HTTP client: Create an HTTP protocol server as a detection platform based on the client's IP address, external access port, and HTTP protocol polling cycle; The HTTP protocol server is accessed by third-party IoT devices to be tested, and the detection platform passively obtains raw data through client polling. Step S3.3: If the third-party IoT device to be detected is a websocket protocol server: According to the server's IP address and publishing port, create a websocket protocol client as a detection platform; If the creation of the websocket protocol client fails, the service will be prompted to be offline; If the websocket protocol client is created successfully, the detection platform passively obtains the original data; Step S3.4: If the third-party IoT device to be detected is a websocket protocol client: Based on the client's IP address and external access port, create a websocket protocol server as a detection platform; The websocket protocol server is accessed by third-party IoT devices to be tested, and the detection platform passively obtains raw data.

3. The method for dynamically detecting data deviation of IoT devices based on a relational database according to claim 1, characterized in that: The calculation result of the offset algorithm is: The calculation result of the offset algorithm = Σ(original data corresponding to the action field×action field coefficient)±Σ(comparison field×comparison field coefficient).

4. The method for dynamically detecting data deviation of IoT devices based on a relational database according to claim 1, characterized in that: The method further comprises the following steps: Step S6: If offset data is generated, determine whether the historical record of the offset data is stored in the relational database: If a historical record of the offset data is stored, modifying the historical record of the offset data stored in the relational database according to the current value of the offset data; If there is no historical record for storing the offset data, the current value of the offset data is added as a current record of the offset data in the relational database.

5. The method for dynamically detecting data deviation of IoT devices based on a relational database according to claim 4, characterized in that: The step S6 comprises: Step S6.1: Obtain the unique sensor identifier of the third-party IoT device to be detected; combine the unique sensor identifier of the third-party IoT device to be detected, the dynamic parameters of the offset algorithm, and the comparison relationship as the unique identifier of the offset data; Step S6.2: Based on the unique identifier of the offset data, determine whether the historical record of the generated offset data is stored in the relational database: If a historical record of the offset data is stored, modifying the historical record of the offset data stored in the relational database according to the current value of the offset data; If there is no historical record for storing the offset data, the current value of the offset data is added as a current record of the offset data in the relational database.

6. The method for dynamically detecting data deviation of IoT devices based on a relational database according to claim 1, characterized in that: The method further comprises the following steps: Step S7: If offset data is generated, the offset data is pushed to the foreground for display.

7. A device for dynamically detecting data deviation of IoT devices based on a relational database, characterized in that: The device comprises the following modules: Module S1: Obtain the basic attributes and protocol type of the third-party IoT device to be detected; The basic attributes include device name and device type; the device type includes server and client; The protocol type includes http protocol or websocket protocol; If the third-party IoT device to be tested is a server, you also need to obtain the server's IP address and publishing port; If the third-party IoT device to be detected is a client, you also need to obtain the client's IP address and external access port; If the third-party IoT device to be detected is a server and uses the HTTP protocol, you also need to obtain the polling period of the HTTP protocol; Module S2: Obtaining the dynamic parameters and comparison relationships of the migration algorithm to support dynamic editing of the migration algorithm; including the following steps: Get the dynamic parameters of the offset algorithm, which include the action field, its coefficient, and coefficient description, as well as the comparison field, its coefficient, and coefficient description; If multiple action fields and their coefficients are involved, you also need to obtain the primary keys of the action fields at the same level to form an association relationship; If multiple comparison fields and their coefficients are involved, you also need to obtain the primary keys of the comparison fields at the same level to form an association relationship; Get the comparison relationship of the offset algorithm; Module S3: Based on the basic attributes and protocol type of the third-party IoT device to be detected, create a server or client under the same protocol type, and obtain the corresponding raw data according to the function field; Module S4: Obtain the calculation results of the migration algorithm based on the dynamic parameters and the original data; Construct a migration data discriminant based on the calculation results of the migration algorithm, the comparison relationship, and the theoretical value; Determine whether migration data is generated based on the migration data discriminant; If the offset data discriminant is true, then offset data is generated; Otherwise, no offset data is generated.

8. A computer device comprising: A processor and a memory, characterized in that the memory is used to store executable instructions of the processor, and the processor is configured to execute the method for dynamically detecting data deviation of an Internet of Things device based on a relational database as described in any one of claims 1 to 6 by executing the executable instructions.

9. A computer storage medium, characterized in that The storage medium stores a computer program, and when the computer program is run, the method for dynamically detecting data offset of an Internet of Things device based on a relational database according to any one of claims 1 to 6 is executed.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the method for dynamically detecting data offset of an IoT device based on a relational database as described in any one of claims 1 to 6 are implemented.