CN117215250B - Remote control method for magnetic control switch - Google Patents

Remote control method for magnetic control switch Download PDF

Info

Publication number
CN117215250B
CN117215250B CN202311465026.9A CN202311465026A CN117215250B CN 117215250 B CN117215250 B CN 117215250B CN 202311465026 A CN202311465026 A CN 202311465026A CN 117215250 B CN117215250 B CN 117215250B
Authority
CN
China
Prior art keywords
data
fitting
curve
line segment
points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311465026.9A
Other languages
Chinese (zh)
Other versions
CN117215250A (en
Inventor
牛节省
李启冉
刘嘉伟
李丰生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Deyuan Electric Power Technology Co ltd
Original Assignee
Shandong Deyuan Electric Power Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Deyuan Electric Power Technology Co ltd filed Critical Shandong Deyuan Electric Power Technology Co ltd
Priority to CN202311465026.9A priority Critical patent/CN117215250B/en
Publication of CN117215250A publication Critical patent/CN117215250A/en
Application granted granted Critical
Publication of CN117215250B publication Critical patent/CN117215250B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The invention relates to the technical field of data processing, in particular to a remote control method for a magnetic control switch, which comprises the following steps: acquiring magnetic control switch environment data, constructing a data curve, acquiring an initial fitting line segment of the data curve, acquiring the fitting rate of the initial fitting line segment according to the distance from a data point on the data curve to the initial fitting line segment, acquiring the segmentation advantage of the data point according to the local linear consistency of the data point on the data curve relative to the initial fitting line segment and the turning possibility of the data point, further screening the segmentation point to segment the data curve, continuously iterating and segmenting the new data curve obtained by segmentation to acquire compressed data, and performing remote control of the magnetic control switch according to the compressed data. The method reduces the influence of noise points, improves the segmentation accuracy, reduces the iteration times, further improves the compression rate and the compression efficiency of the data curve, saves the response time of remote control of the magnetic control switch, and improves the accuracy of remote control.

Description

Remote control method for magnetic control switch
Technical Field
The invention relates to the technical field of data processing, in particular to a remote control method for a magnetic control switch.
Background
The magnetic control switch is a line switch device controlled by magnetic field signals and is widely applied to a plurality of fields such as intelligent manufacturing, intelligent home furnishing, aerospace and the like. At present, a magnetic control switch is generally combined with the Internet of things, environmental data are detected through a sensor, the environmental state is identified, and remote control of the magnetic control switch is carried out according to the environmental state.
Because the collected environmental data is time sequence data, the data volume is very large, and the environmental data is required to be compressed in order to improve the timeliness and the accuracy of the remote control of the magnetic control switch. At present, time sequence data is usually compressed through a DP track compression algorithm, but the iteration times in the compression process of the DP track compression algorithm are more, the compression efficiency of environment data is slower, and the timeliness of remote control of a magnetic control switch is affected. Meanwhile, the DP track compression algorithm is easily affected by noise, so that the loss rate of compression of environment data is high, and the accuracy of remote control of the magnetic control switch is affected.
Disclosure of Invention
In order to solve the above problems, the present invention provides a remote control method for a magnetic switch, the method comprising the steps of:
collecting environmental data of multiple dimensions of a magnetic control switch, and constructing a data curve of each dimension;
connecting the endpoints of the data curves for the data curves of each dimension to obtain initial fitting line segments; obtaining the fitting rate of the initial fitting line segment according to the distance from each data point except the end point on the data curve to the initial fitting line segment;
when the fitting rate of the initial fitting line segment is smaller than a preset fitting threshold, screening the segmentation points to segment the data curve, wherein the method comprises the following steps: for each data point except for an endpoint on the data curve, acquiring a fitting straight line of a local area of the data point; obtaining the local linear consistency of the data points relative to the initial fitting line segment according to the fitting straight line and the initial fitting line segment of the local area of the data points; acquiring turning possibility of the data points according to fitting straight lines of local areas of adjacent data points before and after the data points; acquiring the segmentation advantage of the data point according to the local linear consistency and the turning possibility; screening a plurality of data points as segmentation points according to segmentation advantages, and dividing a data curve into a plurality of sections;
carrying out iterative segmentation on each section of curve, and obtaining compressed data according to the iterative segmentation result;
and carrying out remote control on the magnetic control switch according to the compressed data of each dimension.
Preferably, the obtaining the fitting rate of the initial fitting line segment according to the distance from each data point except the end point to the initial fitting line segment on the data curve includes the following specific steps:
obtaining error weights of all data points except the end points in the data curve according to the distances from the data points except the end points in the data curve to the initial fitting line segment; and obtaining the fitting rate of the initial fitting line segment according to the error weight of each data point except the end points on the data curve and the distance between each data point and the initial fitting line segment.
Preferably, the step of obtaining the error weight of each data point except the end point in the data curve according to the distance from each data point except the end point in the data curve to the initial fitting line segment includes the following specific steps:
wherein,error weight representing the ith data point in the data curve,/->N represents the number of data points in the data curve; />Representing the distance from the ith data point to the initial fitted line segment; />Representing the distance from the (i+1) th data point to the initial fitting line segment; />Representing the distance of the i-1 st data point from the initial fitted line segment.
Preferably, the local linear consistency of the obtained data points relative to the initial fitted line segment comprises the following specific steps:
wherein,representing the relation of the ith data point on the data curveIn the local linear consistency of the initial fitted line segments,n represents the number of data points in the data curve; />A slope of a fitted line representing a local region of the i-th data point; k represents the slope of the initial fitted line segment; />Representing a fitting value of the ith data point on the initial fitting line segment; />A data value representing an i-th data point; t represents a distance threshold.
Preferably, the method for acquiring the turning possibility of the data point according to the fitting straight line of the local area of the adjacent data point before and after the data point comprises the following specific steps:
wherein,representing the turn possibility of the ith data point on the data curve,/for the data curve>N represents the number of data points in the data curve; />A slope of a fitted straight line representing a local region of the i-1 st data point; />A slope of a fitted straight line representing a local region of the (i+1) th data point; />Representing the locality of the i-1 st data pointFitting errors of the fitting straight line of the region at the i-1 data points; />Representing the fitting error of the fitting straight line of the local area of the (i+1) th data point at the (i-1) th data point; />Representing hyperbolic tangent function, ">As a function of the maximum value.
Preferably, the step of acquiring the segment advantage of the data point according to the local linear consistency and the turning possibility comprises the following specific steps:
wherein,segment dominance representing the ith data point on the data curve,/->N represents the number of data points in the data curve; />Representing the local linear consistency of the ith data point on the data curve relative to the initial fitted line segment; />Indicating the likelihood of a turn over of the ith data point on the data curve.
Preferably, the screening the plurality of data points according to the segmentation advantage as the segmentation points includes the following specific steps:
the segmentation threshold value is preset, and the data point with the segmentation advantage larger than the segmentation threshold value is taken as a segmentation point.
Preferably, the iterative segmentation is performed on each section of curve, and compressed data is obtained according to the iterative segmentation result, which comprises the following specific steps:
regarding each section of curve as a new data curve respectively, for each new data curve, acquiring the fitting rate of an initial fitting line segment of the new data curve, and screening new segmentation points to segment the new data curve when the fitting rate of the initial fitting line segment of the new data curve is smaller than a preset fitting threshold;
repeatedly segmenting the new data curves until the fitting rate of the initial fitting line segment of each newly obtained data curve is larger than the fitting threshold value, and stopping iteration;
and taking the end points of the initial fitting line segments of all the latest data curves finally obtained as compressed data.
Preferably, the obtaining the fitting rate of the initial fitting line segment according to the error weight of each data point except the end point on the data curve and the distance between each data point and the initial fitting line segment includes the following specific steps:
wherein b represents the fitting rate of the initial fitting line segment;representing the error weight of the ith data point in the data curve,n represents the number of data points in the data curve; />Representing the distance from the ith data point to the initial fitted line segment; t represents a distance threshold; exp () represents an exponential function that bases on a natural constant.
Preferably, the fitting straight line of the local area of the acquired data point comprises the following specific steps:
and performing straight line fitting on all data points in the local area of each data point on the data curve to obtain a fitting straight line of the local area of each data point.
The technical scheme of the invention has the beneficial effects that: according to the invention, the local linear consistency of the data points relative to the initial fitting line segment is obtained by analyzing the local distribution rule of the data points on the data curve, the turning possibility of the data points is obtained according to the difference of the fitting straight lines of the local areas of the adjacent data points before and after the data points, and the segmentation advantages of the data points are obtained by combining the local linear consistency and the turning possibility, so that a plurality of data points most likely to be the turning points of data change are screened as segmentation points to segment the data curve, the influence of noise is reduced as much as possible, the data with different change rules are divided into different segments, the segmentation accuracy is improved, and the compression loss rate of each segment is ensured to be small. According to the invention, the data curve is segmented by screening a plurality of segmentation points, so that the segmentation iteration times are reduced, the compression rate and the compression efficiency of the data curve are further improved, the compression loss rate is reduced, the response time of remote control of the magnetic control switch is saved, and the accuracy of remote control is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of the steps of a remote control method for a magnetic switch according to the present invention;
FIG. 2 is a graph of temperature data;
FIG. 3 is a schematic diagram of the compression process of the data curve of the present invention with respect to temperature;
FIG. 3 (a) is a schematic diagram of the first iteration of the data curve for temperature according to the present invention;
FIG. 3 (b) is a schematic diagram of the present invention for the 2 nd iteration of the temperature data curve;
FIG. 4 is a schematic diagram of the compression process of the data curve of DP track compression algorithm versus temperature;
FIG. 4 (a) is a schematic diagram illustrating the first iteration of the DP trajectory compression algorithm on the temperature data curve;
FIG. 4 (b) is a schematic diagram showing the data curve of the DP track compression algorithm versus temperature for iteration 2;
FIG. 4 (c) is a schematic diagram showing the data curve of the DP track compression algorithm versus temperature for the 3 rd iteration;
fig. 4 (d) is a schematic diagram of the DP trace compression algorithm performing the 4 th iteration on the data curve of temperature.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description refers to the specific implementation, structure, characteristics and effects of a remote control method for a magnetic switch according to the invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of a remote control method for a magnetic control switch provided by the invention with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a remote control method for a magnetic switch according to an embodiment of the invention is shown, the method includes the following steps:
s001, collecting the environmental data of the magnetic control switch.
It should be noted that, the magnetic control switch usually detects environmental data through a sensor, and the control system recognizes an environmental state according to the environmental data, and remotely controls the magnetic control switch according to the environmental state. For example, in the field of metal forging, the state of a metal forging workpiece is identified by detecting the temperature, humidity, pressure and the like of a forging environment through a sensor, and a control system controls the flow of a forging process through a magnetic switch.
In this embodiment, the environmental data of the magnetic control switch is collected through different sensors, for example, the temperature, the humidity, the pressure and the like of each moment of the environment are collected, and the specific collected environmental data is determined by an implementation personnel according to the specific application scene of the magnetic control switch.
Thus, the acquisition of the environment data of the magnetic control switch is realized.
S002, drawing a data curve of each dimension according to the magnetic control switch environment data, obtaining initial fitting line segments of each data curve, and evaluating the fitting rate of the initial fitting line segments.
It should be noted that, the magnetic control switch environment data includes data of multiple dimensions, and because the data of each dimension is time-series, and the change of the environment data is gradual change, no abrupt change occurs, so that the data of each dimension has local similarity, for example, the temperature data rises gradually, and no abrupt change of temperature greatly occurs in a short time. Therefore, the embodiment independently analyzes the data of each dimension, compresses the data of each dimension according to the change condition of the data of each dimension, reduces the data quantity of each dimension, eliminates the influence of noise in the data of each dimension as much as possible, saves the response time of remote control of the magnetic control switch, and improves the accuracy of remote control.
In this embodiment, a data curve of each dimension is constructed with time as the horizontal axis and each dimension of the magnetically controlled switching environment data as the vertical axis.
It should be noted that the DP trajectory compression algorithm may be used to compress data points on the data curve, by fitting all data points to a plurality of line segments, and using the end points of the line segments to represent all data points, thereby achieving compression. In the DP track compression algorithm, a first data point and a last data point on a data curve are connected to construct an initial fitting line segment, the distance between each data point and the initial fitting line segment is judged by setting a distance threshold, and when the distance between the existing data point and the initial fitting line segment is larger than the distance threshold, the initial fitting line segment is considered to be incapable of well representing all the data points on the data curve. However, it may only exist that the distance from the data point which is noise to the fitting line exceeds the distance threshold, and the determination is directly performed according to the distance threshold, so in this embodiment, by analyzing the difference of the fitting errors of adjacent data points on the data curve, a smaller error weight is set for the data points which are possible to be noise, and a larger error weight is set for the data points which are less possible to be noise, when determining whether the initial fitting line segment can better represent all the data points on the data curve, the fitting errors of the data points which are less possible to be noise are focused, so as to reduce the influence of noise.
In this embodiment, for each dimension of the data curve, the first data point and the last data point in the data curve are respectively used as the end points of the data curve, and the end points of the data curve are connected to obtain an initial fitting line segment.
Obtaining error weight of each data point except the end point in the data curve according to the distance from each data point except the end point in the data curve to the initial fitting line segment:
wherein,error weight representing the ith data point in the data curve,/->N represents the number of data points in the data curve; />Representing the distance from the ith data point to the initial fitted line segment; />Representing the distance from the (i+1) th data point to the initial fitting line segment; />Representing the distance from the i-1 data point to the initial fitted line segment; />The sum of the differences between the distances from the ith data point to the initial fit line segment and the distances from the two adjacent data points to the ith data point is used for representing that the ith data point is compared with the adjacent data points when>The larger the data point is, the less the data point is in accordance with the change rule of the local data, the more the data point is likely to be noise, and the smaller the error weight of the data point is; when->The smaller the data point is, the more consistent the change rule of the local data is, the less likely the data point is to be noise, and the larger the error weight of the data point is.
Obtaining the fitting rate of the initial fitting line segment according to the error weight of each data point except the end point on the data curve:
wherein b represents the fitting rate of the initial fitting line segment;representing the error weight of the ith data point in the data curve,n represents the number of data points in the data curve; />Representing the distance from the ith data point to the initial fitted line segment; t represents a distance threshold value preset by an operator according to practical implementation, for example, in the field of metal forging, the requirements for temperature are very strict, the number of temperaturesAccording to the curve, T can be set to +.>The method comprises the steps of carrying out a first treatment on the surface of the exp () represents an exponential function based on natural constants, exp (-) being used as a pair +.>Performing negative correlation normalization when->The larger the fitting error of the ith data point is, the larger the fitting weight of the data point is, and the larger the fitting error of the data point is, the smaller the initial fitting line segment is according with the change rule of the data points, and the lower the fitting rate of the initial fitting line segment is.
So far, the fitting rate of the initial fitting line segment is obtained.
S003, obtaining segmentation advantages of the data points according to local linear consistency of the data points on the data curve relative to the initial fitting line segments and turning possibility of the data points, and screening the segmentation points according to the segmentation advantages.
Presetting a fitting thresholdIn this embodiment +.>=0.5, and the practitioner can set according to the specific implementation, and is not specifically limited. When the fitting rate of the initial fitting line segment is larger than the fitting threshold, the fitting rate of the initial fitting line segment to the data points on the data curve is higher, and the initial fitting line segment can be used for representing the data points on the data curve. When the fitting rate of the initial fitting line segment is smaller than or equal to the fitting threshold value, the error when the initial fitting line segment is used for representing all data points on the data curve is overlarge, and at the moment, the initial fitting line segment cannot be used for representing all data points on the data curve, so that the data curve needs to be segmented, and each segment of curve is compressed respectively.
In the DP track compression algorithm, when the distance between the data point and the initial fitted line is greater than the distance threshold, the data point with the largest distance from the data point to the initial fitted line is selected as the segmentation point, the data curve is divided into two segments, the initial fitted line of each segment of curve is obtained, whether the distance between the data point and the initial fitted line is greater than the distance threshold is determined again for the initial fitted line of each segment of curve, whether the data point and the initial fitted line are segmented again is determined according to the determination result, and the segmented compression of the data curve is realized by continuously iterating the above process. However, since the data point with the largest distance from the initial fitting line segment is directly selected as the segmentation point, the initial fitting line segment of the two sections of curves obtained by segmentation can not necessarily well represent the two sections of curves, multiple iterations are needed, meanwhile, since the data point with the largest distance from the initial fitting line segment may be a noise point, the noise point cannot reflect the regular characteristics of the data change, if the data curve is segmented by taking the noise point as the segmentation point, the data curve with the same original change rule may be segmented into two sections, and the compression efficiency is affected. Therefore, according to the local data distribution characteristics of each data point, the embodiment screens a plurality of data points most likely to be data change turning points to segment the data curve, improves the accuracy of segmentation, reduces the iteration times, improves the compression rate and the compression efficiency of the data curve, further reduces the response time of remote control of the magnetic control switch, and improves the accuracy of remote control.
In this embodiment, the local area size is set, which is not particularly limited, and the operator may set the local area size according to the specific implementation situation, for example, the local area size is 5, which indicates that 5 data points adjacent to each data point form the local area size of each data point.
And (3) performing straight line fitting on all data points in the local area of each data point on the data curve by using a least square method, and obtaining a fitting straight line of the local area of each data point.
Obtaining local linear consistency of each data point except for the end points on the data curve relative to the initial fitting line segment according to the fitting straight line and the initial fitting line segment of the local area of each data point on the data curve:
wherein,representing the local linear consistency of the ith data point relative to the initial fitting line segment on the data curve, which is used for reflecting the consistency of the distribution of the data points around the ith data point and the distribution of the initial fitting line segment,/the data points are distributed on the data curve>N represents the number of data points in the data curve; />A slope of a fitted line representing a local region of the i-th data point; k represents the slope of the initial fitted line segment; />Representing a fitting value of the ith data point on the initial fitting line segment; />A data value representing an i-th data point; t represents a distance threshold; />Slope of fitted line representing local area of ith data point +.>Difference from the slope K of the initial fitted line segment, +.>The distance between the fitted line representing the local area of the ith data point and the initial fitted line segment at the ith data point is represented as the slope of the fitted line of the local area of the ith data point +.>The smaller the difference from the slope K of the initial fitted line segment, while the local region of the ith data pointThe smaller the distance between the fitted line and the initial fitted line segment at the ith data point is, the more the distribution of the data points around the ith data point accords with the distribution of the initial fitted line segment, and the larger the local linear consistency of the ith data point relative to the initial fitted line segment is.
Acquiring turning possibility of each data point except the end point on the data curve:
wherein,representing the likelihood of a turn of an ith data point on the data curve; />A slope of a fitted straight line representing a local region of the i-1 st data point; />A slope of a fitted straight line representing a local region of the (i+1) th data point; />Representing the fitting error of the fitting straight line of the local area of the i-1 data point at the i-1 data point; />Representing the fitting error of the fitted straight line of the local area of the (i+1) th data point at the (i+1) th data point; />Representing the hyperbolic tangent function due to +.>The value is greater than or equal to 0, thus +.>For->The normalization is carried out so that the data of the data are obtained,as a maximum function>Is indicated at->And->Is selected to limitSize for preventing +.>Oversized, resulting in->Is approaching 1 constantly; when the difference of the slope of the fitting straight line of the local areas of two adjacent data points before and after the ith data point on the data curve is larger, and the fitting errors of the fitting straight line of the local areas of two adjacent data points before and after the ith data point are smaller, the data points before the ith data point may be a change trend, the data points after the ith data point may be another change trend, and the ith data point may be turning points.
The segmentation advantage of each data point is obtained according to the local linear consistency of each data point except the end point relative to the initial fitting line segment on the data curve and the turning possibility of each data point:
wherein,representing the segment dominance of the ith data point on the data curve; />Representing the local linear consistency of the ith data point on the data curve relative to the initial fitted line segment; />Representing the likelihood of a turn of an ith data point on the data curve; when the local linear consistency of the ith data point relative to the initial fitting line segment is smaller and the turning possibility of the ith data point is higher, if the ith data point is used as a segmentation point to segment the data curve, the data with different change rules can be divided into different segments, and the segmentation advantage of the ith data point is larger.
Thus, the segmentation advantage of each data point is obtained.
Presetting a segmentation thresholdIn this embodiment +.>=0.7, and the practitioner can set the implementation situation, and the implementation is not limited. When the segmentation dominance of the data point is greater than the segmentation threshold, the data point is treated as a segmentation point.
To this end, a plurality of segmentation points are obtained.
S004, carrying out iterative segmentation on the data curve, and obtaining compressed data according to a final segmentation result.
Dividing the data curve into a plurality of sections by utilizing a plurality of sections, respectively treating each section of the obtained curve as a new data curve, compressing each new data curve again by utilizing the method in the steps S002 to S003, and repeating the process until the fitting rate of the initial fitting line segment of each newly obtained data curve is larger than the fitting threshold valueThe iteration is stopped. And taking the end points of the initial fitting line segments of all the latest data curves finally obtained as the compressed data of the dimension.
For example, when the data curve of temperature is shown in fig. 2, the compression process of the data curve of temperature by the method of the present embodiment is shown in fig. 3, where (a) in fig. 3 shows a schematic diagram of performing the first iteration on the data curve of fig. 2 by the method of the present embodiment, and (b) in fig. 3 shows a schematic diagram of performing the 2 nd iteration on the data curve of fig. 2 by the method of the present embodiment, and the final result is achieved by performing the 2 nd iteration on the data curve of fig. 2. The compression process of the data curve of temperature by using the DP trace compression algorithm is shown in fig. 4, fig. 4 (a) shows a schematic diagram of performing the first iteration on the data curve of fig. 2 by using the DP trace compression algorithm, fig. 4 (b), (c) and (d) show schematic diagrams of performing the 2 nd, 3 rd and 4 th iterations on the data curve of fig. 2 by using the DP trace compression algorithm, and the DP trace compression algorithm achieves the final result by performing the 4 th iterations on the data curve of fig. 2. The method in the embodiment has the advantages of less iteration times, no interference of noise points, accurate fitting of each section of curve, higher accuracy of remote control of the magnetic control switch according to the compressed data in the embodiment and shorter response time.
And similarly, compressed data of each dimension is obtained.
S005, remotely controlling the magnetic control switch according to the compressed data.
The control system recognizes the state of the current environment according to the compressed data of each dimension, so as to remotely control the opening and closing of the magnetic control switch. For example, the change trend of the temperature is identified according to the compressed data of the temperature, and the time point when the temperature reaches the critical point is predicted, so that the magnetic control switch is controlled to be opened and closed at the critical time point.
Through the steps, the remote control of the magnetic control switch is realized.
According to the method, the local linear consistency of the data points relative to the initial fitting line segment is obtained through analyzing the local distribution rule of the data points on the data curve, turning possibility of the data points is obtained according to the difference of fitting lines of local areas of adjacent data points before and after the data points, segmentation advantages of the data points are obtained through combining the local linear consistency and the turning possibility, therefore, a plurality of data points most likely to be data change turning points are screened to serve as segmentation points to segment the data curve, the influence of noise is reduced as much as possible, data with different change rules are divided into different segments, segmentation accuracy is improved, segmentation iteration times are reduced through screening a plurality of segmentation points to segment the data curve, further compression rate and compression efficiency of the data curve are improved, response time of remote control of a magnetic control switch is saved, and accuracy of remote control is improved.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (6)

1. A remote control method for a magnetically controlled switch, the method comprising the steps of:
collecting environmental data of multiple dimensions of a magnetic control switch, and constructing a data curve of each dimension;
connecting the endpoints of the data curves for the data curves of each dimension to obtain initial fitting line segments; obtaining the fitting rate of the initial fitting line segment according to the distance from each data point except the end point on the data curve to the initial fitting line segment;
when the fitting rate of the initial fitting line segment is smaller than a preset fitting threshold, screening the segmentation points to segment the data curve, wherein the method comprises the following steps: for each data point except for an endpoint on the data curve, acquiring a fitting straight line of a local area of the data point; obtaining the local linear consistency of the data points relative to the initial fitting line segment according to the fitting straight line and the initial fitting line segment of the local area of the data points; acquiring turning possibility of the data points according to fitting straight lines of local areas of adjacent data points before and after the data points; acquiring the segmentation advantage of the data point according to the local linear consistency and the turning possibility; screening a plurality of data points as segmentation points according to segmentation advantages, and dividing a data curve into a plurality of sections;
carrying out iterative segmentation on each section of curve, and obtaining compressed data according to the iterative segmentation result;
remote control of the magnetic control switch is carried out according to the compressed data of each dimension;
the local linear consistency of the acquired data points relative to the initial fitting line segment comprises the following specific steps:
wherein,representing the +.>Local linear consistency of data points with respect to the initial fitted line segment,n represents the number of data points in the data curve; />Indicate->Slope of a fitted line for a local region of data points; k represents the slope of the initial fitted line segment; />Indicate->Fitting values of the data points on the initial fitting line segments; />Indicate->Data values for data points; />Representing a distance threshold;
the method for acquiring the turning possibility of the data point according to the fitting straight line of the local area of the adjacent data point before and after the data point comprises the following specific steps:
wherein,representing the +.>The likelihood of turning of a data point, +.>N represents the number of data points in the data curve; />Indicate->Slope of a fitted line for a local region of data points; />Indicate->Slope of a fitted line for a local region of data points; />Indicate->Fitting errors of the fitting straight line of the local area of the data points at the (i-1) th data point; />Indicate->Fitting errors of the fitting straight line of the local area of the data points at the (i-1) th data point; />Representing hyperbolic tangent function, ">Is a maximum function;
the method for acquiring the segment advantage of the data point according to the local linear consistency and the turning possibility comprises the following specific steps:
wherein,representing the +.>Segment advantage of data points, +.>N represents the number of data points in the data curve; />Representing the +.>Local linear consistency of data points relative to the initial fitted line segment; />Representing the +.>The likelihood of turning of the data points;
the method for screening a plurality of data points as segmentation points according to segmentation advantages comprises the following specific steps:
the segmentation threshold value is preset, and the data point with the segmentation advantage larger than the segmentation threshold value is taken as a segmentation point.
2. The method for remotely controlling a magnetic switch according to claim 1, wherein the step of obtaining the fitting rate of the initial fitting line segment according to the distance from each data point except the end point to the initial fitting line segment on the data curve comprises the following specific steps:
obtaining error weights of all data points except the end points in the data curve according to the distances from the data points except the end points in the data curve to the initial fitting line segment; and obtaining the fitting rate of the initial fitting line segment according to the error weight of each data point except the end points on the data curve and the distance between each data point and the initial fitting line segment.
3. The method for remotely controlling a magnetic switch according to claim 2, wherein the step of obtaining the error weight of each data point except the end point in the data curve according to the distance from each data point except the end point in the data curve to the initial fitting line segment comprises the following specific steps:
wherein,error weight representing the ith data point in the data curve,/->N represents the number of data points in the data curve; />Representing the distance from the ith data point to the initial fitted line segment; />Representing the distance from the (i+1) th data point to the initial fitting line segment; />Representing the distance of the i-1 st data point from the initial fitted line segment.
4. The remote control method for a magnetic control switch according to claim 1, wherein the iterative segmentation is performed on each curve segment, and compressed data is obtained according to the iterative segmentation result, comprising the following specific steps:
regarding each section of curve as a new data curve respectively, for each new data curve, acquiring the fitting rate of an initial fitting line segment of the new data curve, and screening new segmentation points to segment the new data curve when the fitting rate of the initial fitting line segment of the new data curve is smaller than a preset fitting threshold;
repeatedly segmenting the new data curves until the fitting rate of the initial fitting line segment of each newly obtained data curve is larger than the fitting threshold value, and stopping iteration;
and taking the end points of the initial fitting line segments of all the latest data curves finally obtained as compressed data.
5. The method for remotely controlling a magnetic switch according to claim 2, wherein the step of obtaining the fitting rate of the initial fitting line segment according to the error weight of each data point on the data curve except for the end point and the distance between each data point and the initial fitting line segment comprises the following specific steps:
wherein,representing the fitting rate of the initial fitting line segment; />Representing the error weight of the ith data point in the data curve,n represents the number of data points in the data curve; />Representing the distance from the ith data point to the initial fitted line segment; />Representing a distance threshold; exp () represents an exponential function that bases on a natural constant.
6. A remote control method for a magnetic switch according to claim 1, wherein the obtaining a fitted line of the local area of the data point comprises the following specific steps:
and performing straight line fitting on all data points in the local area of each data point on the data curve to obtain a fitting straight line of the local area of each data point.
CN202311465026.9A 2023-11-07 2023-11-07 Remote control method for magnetic control switch Active CN117215250B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311465026.9A CN117215250B (en) 2023-11-07 2023-11-07 Remote control method for magnetic control switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311465026.9A CN117215250B (en) 2023-11-07 2023-11-07 Remote control method for magnetic control switch

Publications (2)

Publication Number Publication Date
CN117215250A CN117215250A (en) 2023-12-12
CN117215250B true CN117215250B (en) 2024-01-30

Family

ID=89048517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311465026.9A Active CN117215250B (en) 2023-11-07 2023-11-07 Remote control method for magnetic control switch

Country Status (1)

Country Link
CN (1) CN117215250B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106374934A (en) * 2016-08-19 2017-02-01 中国地质大学(武汉) Controllable parallel trajectory data compression method
CN108132645A (en) * 2016-12-01 2018-06-08 华中科技大学 A kind of guarantee continuous curve-fitting methods of cutter path entirety G2
CN109857978A (en) * 2019-01-17 2019-06-07 上海上塔软件开发有限公司 A kind of online adaptive segmentation algorithm suitable for living electric apparatus power curve
CN110955648A (en) * 2019-12-18 2020-04-03 重庆大学 Non-equidistant time sequence monitoring data normalization mapping processing method
CN112836176A (en) * 2021-02-02 2021-05-25 苏州玖物互通智能科技有限公司 Curve fitting optimization method, storage medium, electronic device and system
CN113450596A (en) * 2021-05-31 2021-09-28 武汉理工大学 Space-time DP method based on ship track feature point extraction
CN116609720A (en) * 2023-07-19 2023-08-18 深圳市北汉科技有限公司 Data-driven-based intelligent error compensation method and system for desk-top multimeter

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106374934A (en) * 2016-08-19 2017-02-01 中国地质大学(武汉) Controllable parallel trajectory data compression method
CN108132645A (en) * 2016-12-01 2018-06-08 华中科技大学 A kind of guarantee continuous curve-fitting methods of cutter path entirety G2
CN109857978A (en) * 2019-01-17 2019-06-07 上海上塔软件开发有限公司 A kind of online adaptive segmentation algorithm suitable for living electric apparatus power curve
CN110955648A (en) * 2019-12-18 2020-04-03 重庆大学 Non-equidistant time sequence monitoring data normalization mapping processing method
CN112836176A (en) * 2021-02-02 2021-05-25 苏州玖物互通智能科技有限公司 Curve fitting optimization method, storage medium, electronic device and system
CN113450596A (en) * 2021-05-31 2021-09-28 武汉理工大学 Space-time DP method based on ship track feature point extraction
CN116609720A (en) * 2023-07-19 2023-08-18 深圳市北汉科技有限公司 Data-driven-based intelligent error compensation method and system for desk-top multimeter

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于改进DP算法的船舶轨迹自适应压缩方法;刘奕,等;《武汉理工大学学报》;第1-13页 *
截面数据分段点高精度识别方法;张冉;张旭;章海波;张学昌;;计算机集成制造系统(11);全文 *

Also Published As

Publication number Publication date
CN117215250A (en) 2023-12-12

Similar Documents

Publication Publication Date Title
CN110705181B (en) Rolling bearing residual life prediction method based on convolution length-time memory cyclic neural network
CN111047429A (en) Probability prediction method and device
CN117215250B (en) Remote control method for magnetic control switch
CN117131035B (en) Intelligent storage method and system for chemical dye production data
CN117235447A (en) Building energy data management method and system
CN108540136B (en) Compression method suitable for agricultural sensing data
CN116975503B (en) Soil erosion information management method and system
CN117540238A (en) Data security management method for industrial digital information acquisition device
CN110631064B (en) Voice recognition method and automatic control method of range hood applying voice recognition method
CN117376430B (en) Industrial data rapid transmission method and system based on DCS
CN116993537A (en) Power load abnormality detection method and system based on serial GRU (generic routing unit) self-encoder
CN112040408B (en) Multi-target accurate intelligent positioning and tracking method suitable for supervision places
CN103956992A (en) Self-adaptive signal processing method based on multi-step gradient decrease
CN112927705B (en) Frequency response calibration method and related product
CN112200037B (en) Weak signal detection method, terminal and computer readable storage medium
CN117011923B (en) Data security protection method and system for embedded tablet personal computer
CN117375626B (en) Intelligent heat supply abnormal data transmission method and system
CN113090405B (en) Self-learning method for position of actuator for automobile
CN117455725B (en) Building energy consumption management method and system based on BIM (building information modeling) building
CN117394866A (en) Intelligent flap valve system based on environment self-adaption
CN117421538B (en) Detail waterproof data regulation and optimization method
CN117633590B (en) Geothermal energy heat supply state monitoring method and system
CN116700247B (en) Intelligent cruising management method and system for household robot
CN117767960A (en) sensor data optimization acquisition and storage method
CN114595767A (en) Industrial equipment fault detection method with time series state variable

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant