CN108447103A - A kind of segmentation line segment approximating method and device - Google Patents

A kind of segmentation line segment approximating method and device Download PDF

Info

Publication number
CN108447103A
CN108447103A CN201810270684.5A CN201810270684A CN108447103A CN 108447103 A CN108447103 A CN 108447103A CN 201810270684 A CN201810270684 A CN 201810270684A CN 108447103 A CN108447103 A CN 108447103A
Authority
CN
China
Prior art keywords
curve
point
target
destination node
line segment
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.)
Pending
Application number
CN201810270684.5A
Other languages
Chinese (zh)
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.)
Rundian Energy Science and Technology Co Ltd
Original Assignee
Rundian Energy Science and 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 Rundian Energy Science and Technology Co Ltd filed Critical Rundian Energy Science and Technology Co Ltd
Priority to CN201810270684.5A priority Critical patent/CN108447103A/en
Publication of CN108447103A publication Critical patent/CN108447103A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The embodiment of the invention discloses a kind of segmentation line segment approximating method and devices.Present invention method includes:It carries out curve fitting to discrete data point, obtains matched curve;Determine that the target segment between the first object point in the matched curve and the aim curve between the second target point and first object point and second target point, the matched curve include the aim curve;The destination node on the aim curve is determined according to the worst error of the aim curve and the target segment;Determine that there is successional at least two lines section according to the first object point, second target point and the destination node.A kind of segmentation line segment fitting device is additionally provided in the embodiment of the present application, for reducing computational complexity, raising practicability.

Description

A kind of segmentation line segment approximating method and device
Technical field
The present invention relates to computer realm more particularly to a kind of segmentation line segment approximating methods and device.
Background technology
In fields such as industrial production, scientific researches, it is often necessary to which being established according to discrete steady state measurement data can reflection quantity The continuous mathematical model of functional relation between amount, preferably to instruct industrial production.For example, the flue gas of station boiler is oxygen-containing There are certain functional relations, the functional relation can be indicated, be passed through with continuous mathematical model between amount and the thermal efficiency The mathematical model can optimize the operation and control of boiler.
Since the functional relation between amount and amount is usually nonlinear, generally use curve matching, such as multinomial Fitting, Gauss curve fitting, Fourier's fitting etc..But the functional form of curve matching is complex, in some cases, for Requirement to model simplicity needs to establish multistage straight line model.When segments is enough, multistage straight line model can also have Degree of precision meets the needs of practical application scene.
Current sectional straight line fitting method can be divided into two classes:One kind according to the situation of change of discrete data point slope from Dynamic to be segmented, straight segments number is influenced by the distribution situation of data point, thus not easy to control;Another kind of is to be segmented data point Carry out fitting a straight line respectively afterwards, although segments can control, how data point, which is segmented then to rely on, manually determines, affects The accuracy and practicability of such method.
Invention content
An embodiment of the present invention provides a kind of segmentation line segment approximating method and devices to improve for reducing computational complexity Practicability.
In a first aspect, the embodiment of the present application provides a kind of segmentation line segment approximating method, including:
It carries out curve fitting to discrete data point, obtains matched curve;
Determine the first object point in the matched curve and the aim curve between the second target point and first mesh Target segment between punctuate and second target point, the matched curve include the aim curve;
The destination node on the aim curve is determined according to the worst error of the aim curve and the target segment;
Determine there is successional at least two according to the first object point, second target point and the destination node Line segment.
In one possible implementation, when the first object point be the matched curve the first end point, Second target point is the second endpoint of the matched curve, when the aim curve is the matched curve, the basis The worst error of the aim curve and first line segment determines destination node, including:
It determines in the matched curve, the worst error point of the matched curve and the target segment is first mesh Mark node.
In alternatively possible realization method, the target between the first end point and the second endpoint of the matched curve The quantity of node is n, and the first object point and second target point are:The first end point in the matched curve, institute State in n first object node between the second endpoint and the first end point and second endpoint any two are adjacent Target point, the aim curve and described between first object point and the second target point in the determination matched curve Target segment between one target point and second target point, including:
It determines the target segment and aim curve between any two described adjacent target points, obtains (n+1) target segment And (n+1) objective curve;
Determine the worst error value between every target segment and corresponding aim curve;
According to the worst error value judge whether need the aim curve increase the second destination node, described second Destination node is the worst error point of the aim curve and the target segment.
In one possible implementation, described to be judged whether according to the worst error value it needs to be determined that the target Destination node on curve, including:
Judge whether the worst error value is more than threshold value;
If the worst error value is more than the threshold value, increase by second destination node on the aim curve.
In one possible implementation, the method further includes:
If the worst error value is less than or equal to the threshold value, it is determined that institute need not be increased on the aim curve State the second destination node.
In one possible implementation, the quantity of the worst error value is that (n+1) is a, described according to the maximum Error amount judges whether the second destination node it needs to be determined that in the target segment, including:
Judge whether the n is less than preset value;
If the n is less than the preset value, it is determined that the maximum target maximum in (n+1) a worst error value is missed Difference;
Determine that the corresponding worst error point of target worst error value is second destination node.
In one possible implementation, described to be judged whether according to the worst error value it needs to be determined that the target The second destination node on line segment, including:
If the n reaches the preset value, it is determined that the destination node need not be increased on the aim curve.
In one possible implementation, it is described judge whether the n meets preset value before, the method is also wrapped It includes:
Receive the preset value of input.
In one possible implementation, described according to the first object point, second target point and the mesh It marks node and determines that there is successional at least two lines section.
The first object point is connected, any two adjacent points obtain having company in the second target point and the destination node At least two lines section of continuous property.
Second aspect, the embodiment of the present application provide a kind of segmentation line segment fitting device, including:
Curve fitting module obtains matched curve for carrying out curve fitting to discrete data point;
First determining module, for the aim curve and described first between upper first object point and the second target point Target segment between target point and second target point, the matched curve include the aim curve;
Second determining module, the aim curve determined according to first determining module and the target segment are most Big error determines the destination node on the aim curve;
Third determining module is determined according to the first object point, second target point and second determining module The destination node determine have successional at least two lines section.
In the embodiment of the present application, which carries out curve fitting according to discrete data point, obtains matched curve, determine described in First object point in matched curve and the aim curve between the second target point and first object point and second mesh Target segment between punctuate, the matched curve include the aim curve;Then, according to the aim curve and the mesh The worst error of graticule section determines the destination node on the aim curve;For example, the first object point is the matched curve First end point (such as starting point), the second target point are the second endpoint (such as terminal) of the matched curve;Alternatively, the first object point and Second target point is destination node between first end point and the second endpoint in matched curve, in the embodiment of the present application, according to quasi- The position that the worst error between curve and target segment automatically determines destination node is closed, according to the first object point, described Second target point and the destination node determine there is successional at least two lines section, ensure that the company of be fitted segmented linear Continuous property, and computational complexity is low, it is highly practical.
Description of the drawings
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those skilled in the art, other drawings may also be obtained based on these drawings.
Fig. 1 is a kind of step flow diagram of one embodiment of segmentation line segment approximating method in the embodiment of the present application;
Fig. 2 is the schematic diagram of matched curve in the embodiment of the present application;
Fig. 3 is the schematic diagram of target segment in the embodiment of the present application;
Fig. 4 is the schematic diagram of segmentation line segment fitting in the embodiment of the present application;
Fig. 5 is the schematic diagram of piecewise fitting line segment in the embodiment of the present application;
Fig. 6 is the schematic diagram of piecewise fitting line segment in the embodiment of the present application;
Fig. 7 is the schematic diagram of piecewise fitting line segment in the embodiment of the present application;
Fig. 8 is a kind of structural schematic diagram of one embodiment of segmentation line segment fitting device in the embodiment of the present application;
Fig. 9 is a kind of structural schematic diagram of another embodiment of segmentation line segment fitting device in the embodiment of the present application;
Figure 10 is a kind of structural schematic diagram of another embodiment of segmentation line segment fitting device in the embodiment of the present application.
Specific implementation mode
An embodiment of the present invention provides a kind of segmentation line segment approximating method and devices to improve for reducing computational complexity Practicability.
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The every other embodiment that member is obtained, should all belong to the scope of protection of the invention.
Term " first " in description and claims of this specification and above-mentioned attached drawing, " second ", " third ", " the The (if present)s such as four " are for distinguishing similar object, without being used to describe specific sequence or precedence.It should manage The data that solution uses in this way can be interchanged in the appropriate case, so that the embodiments described herein can be in addition to illustrating herein Or the sequence other than the content of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that Cover it is non-exclusive include, for example, containing the process of series of steps or unit, method, system, product or equipment need not limit In those of clearly listing step or unit, but may include not listing clearly or for these processes, method, production The intrinsic other steps of product or equipment or unit.
A kind of sectional straight line fitting method is provided in the embodiment of the present application, this method is applied to a kind of sectional straight line fitting Device, for example, the device can be computer, in the embodiment of the present application, which carries out curve fitting according to discrete data point, Matched curve is obtained, the method for matched curve has fitting of a polynomial, Gauss curve fitting, Fourier's fitting etc., specific curve matching It is not limited in method the embodiment of the present application, then, which determines first object point and the second target in the matched curve The target segment between aim curve and first object point and second target point between point, the matched curve Including the aim curve;It is determined on the aim curve according to the worst error of the aim curve and the target segment Destination node;In one example, which is the first end point (such as starting point) of the matched curve, and the second target point is The second endpoint (such as terminal) of the matched curve;In another example, the first object point and the second target point are that fitting is bent Destination node on line between first end point and the second endpoint, it should be noted that in the embodiment of the present application, target point includes end Point and node, endpoint refer to starting point or terminal in the matched curve, and node refers to the point between two endpoints.The continuous phase At least two lines section even approaches the matched curve, in the embodiment of the present application, according between matched curve and target segment most Big error automatically determines the position of destination node, determines a plurality of line segment being continuously connected by node, ensure that and be fitted segmentation The continuity of line segment, and computational complexity is low, it is highly practical.
Refering to Figure 1, in the embodiment of the present application, a kind of one embodiment of segmentation line segment approximating method is provided:
Step 101 carries out curve fitting to discrete data point, obtains matched curve.
Shown in Fig. 2, Fig. 2 is the schematic diagram of matched curve in the embodiment of the present application.Using fitting of a polynomial, Gauss The method of fitting or Fourier's fitting carries out curve fitting to multiple discrete data points, matched curve is obtained, for curve matching Specific method the embodiment of the present application in do not limit.
Step 102 determines the first object point in the matched curve and the aim curve between the second target point and institute The target segment between first object point and second target point is stated, the matched curve includes the aim curve.
In one example, the first object point is the first end point (such as starting point) of the matched curve, described Second target point is the second endpoint (such as terminal) of the matched curve, and the aim curve is the matched curve.
It please refers to shown in Fig. 2, connects the starting point (such as A points) and terminal (such as B points) of matched curve, obtain target segment AB.
Step 103 is determined according to the worst error of the aim curve and the target segment on the aim curve Destination node.
First mesh on the aim curve is determined according to the worst error of the aim curve and the target segment Mark node.
It please refers to shown in Fig. 3, Fig. 3 is the schematic diagram of target segment in the embodiment of the present application.Connection source (such as A points) and end Point (such as B points), obtains target segment AB.
Specifically, the error between each point on digital simulation curve (being denoted as " a ") and target segment (being denoted as " b ") Value determines that the first object node in matched curve, the first object node are that matched curve and the maximum of target segment miss Almost.
For example, the point (x, y) in matched curve, the point (x ', y ') in target segment, x take all over matched curve On any one point, x ' takes any one point in the target segment, as x=x ', Δ Y=︱ y-y ' ︱, in matched curve In multiple points, when Δ y is maximum value, corresponding point is first aim node, such as in figure 3, the first aim section Point is point P, i.e., in matched curve, point P is the worst error point of matched curve and target segment.
Step 104 determines there is continuity according to the first object point, second target point and the destination node At least two lines section.
Connect the first end point, first aim node and second endpoint, obtain two have it is successional extremely Few two lines section.
On the basis of above-mentioned example, step 102 is repeated, when the first end point and the second endpoint of the matched curve Between destination node quantity be n, in this example, the first object point and second target point are:The fitting The first end point on curve, n first object between second endpoint and the first end point and second endpoint Any two adjacent target points in node.
It determines the target segment and aim curve between any two described adjacent target points, obtains (n+1) target segment And (n+1) objective curve.
For example, when n is 1, the first object point is first end point, and second target point is first aim section Point, and/or, the first object point is first aim node, and second target point is the second endpoint.Target segment includes First object line segment and the second target segment, line segment of the first object line segment between first end point and first aim node, Line segment of second target segment between first aim node and the second endpoint.
Aim curve includes the first curve and the second curve, and curve between first end point and first aim node is the One curve, the curve between first aim node and the second endpoint are the second curve.
For example, please referring to shown in Fig. 4, matched curve is divided into two sections by first aim node, i.e. A points (first end point) The first curve between P points (first aim node), between P points (first aim node) and B points (the second endpoint) Second curve connects A points and P points, obtains first object line segment (i.e. AP), connects P points and B points, obtains the second target segment (i.e. BP)。
Step 103 is repeated, the target is determined according to the worst error of the aim curve and the target segment Destination node on curve.
Determine the worst error value between every target segment and corresponding aim curve;Sentenced according to the worst error value It is disconnected whether to need to increase by the second destination node in the aim curve, second destination node be the aim curve with it is described Worst error point between target segment.
After so increasing to which destination node (or which destination node), it is not further added by new destination node, specifically , at least following two realization methods:
After increasing a destination node every time, the worst error between every target segment and corresponding aim curve is determined Value;Judge whether to need to increase destination node, second destination node in the aim curve according to the worst error value For the worst error point of the aim curve and the target segment.
In one possible implementation, judge whether the worst error value is more than threshold value;If the worst error Value is more than the threshold value, then increases by second destination node on the aim curve.The threshold value can be different according to Precision prescribed is next predetermined, and the threshold value is smaller, then matched curve and the degree of fitting of a plurality of line segment are higher, and precision is higher.
For example, when n is 1, judge whether the worst error between the first line segment and the first curve is more than threshold value, the second line Whether the worst error between section and the second curve is more than threshold value.
If the worst error between the first line segment and the first curve is more than threshold value, it is determined that the second target on the first curve Node, worst error point of second destination node between the first line segment and the first curve.
When there are one error amounts for each point all meetings on each point and the first curve on the first line segment, wherein work as worst error When value is more than the threshold value, then continue to add the destination node on the first curve, the method for adding new destination node is for example above-mentioned true The method for determining first aim node is identical, that is, determines between the first line segment AP and the first curve (curve between point A and point P) Worst error point, as shown in figure 4, the second destination node be the first curve on point M.
If the worst error between the first line segment and the first curve is not more than threshold value, it is determined that be not provided on the first curve Other destination nodes;In this example, i.e., when the error between each point on each point and the first curve on the first line segment is (i.e. two When x is identical on bar line, the value of Δ Y) no more than the threshold value, then show that the first curve is mutually approached with the first line segment, just not It needs to increase new destination node on the first curve.And/or similarly, if the error between second line segment and the second curve is big In threshold value, it is determined that the second destination node on the second curve, second destination node is between second line segment and the second curve Worst error point.As shown in figure 4, the second destination node on the second curve is point N.If between second line segment and the second curve Error be not more than threshold value, it is determined that other destination nodes are not provided on the second curve.Then show the second curve with Two line segments mutually approach, and there is no need to increase new destination node on the second curve.
It should be noted that according to the method for such determining destination node, please refer to shown in Fig. 5, Fig. 5 is piecewise fitting line The schematic diagram of section.If worst error between the first line segment and the first curve is more than threshold value, and second line segment and the second curve it Between worst error be more than threshold value, need to continue to add new destination node, in Figure 5, tie point A and point M obtain line segment AM;Tie point M and point P, obtains line segment MP;Tie point P and point N, obtains line segment PN;Tie point M and point B, obtains line segment NB;So Afterwards, the matched curve between point A and point M and the worst error between line segment AM are calculated separately, the fitting between point M and point P is bent Worst error between line and line segment MP;The worst error between matched curve and line segment PN between point P and point N;Point N and point Whether the worst error between the matched curve between B and line segment NB further determines whether more than threshold value according to error Increase new target point, until the worst error between each line segment and method of subsection simulation curve is less than or equal to threshold value.
In such realization method, whether it is more than according to the worst error between the matched curve after segmentation and segmentation line segment Threshold value determines whether to stop to increase new destination node, and such mode can determine the line segment of segmentation according to fitting precision Quantity, according to different precision setting threshold values, so that it is determined that destination node can meet production in required precision, adapt to field Scape is extensive.
In another implementation, the quantity of the destination node is that user determines as needed, i.e. the device can be with The quantity of destination node input by user is received, the quantity of the destination node is preset value, such as the preset value is 6 or 12 Etc., the quantity of specific destination node does not limit.
Such as quantity of destination node input by user is 3, that is, preset value is 3.
After increasing a destination node in matched curve, judge whether the quantity of current target node reaches default Value;
The quantity of current target node is 1, determines the destination node between the first end point and second endpoint Quantity n be 1, then n be not up to preset value, determine target segment and mesh between any two adjacent target points in sets of target points Mark song line obtains (n+1) target segment and (n+1) objective curve;It please refers to Fig. 4 to be understood, determines that the first curve is (bent Line AP) the corresponding point of worst error value between the first line segment (line segment AP) is M, determine the second curve (curve BP) and second It is N that worst error between line segment (line segment BP), which is worth corresponding point, and then determine in the two worst error values maximum is Target worst error value;It determines that the corresponding worst error point of target worst error value is M points, is then added on first curve Second destination node (i.e. M points).
If the destination node quantity N between the first end point of matched curve and the second endpoint is 3, it is determined that the target New destination node need not be increased on curve.
In an application scenarios, if the preset value illustrates for 3, as shown in figure 3, when first mesh is determined After marking node, judge that the quantity of destination node is 1, the quantity of destination node then continues growing new target less than preset value (3) Node, as shown in figure 4, increase destination node M and destination node N, at this point, the quantity of destination node has had reached preset value, It then will not then increase new destination node, show the quantity of line segment meet demand.It should be noted that in this example, The quantity of destination node illustrated example merely for convenience of description, does not cause the limited explanation to the application.
Repeat step 104, beginning and end is determined according to destination node between have successional at least two Line segment.
It please refers to shown in Fig. 5, when the quantity of destination node is n, n is the positive integer more than or equal to 1, will be fitted Starting point, n destination node and terminal on curve are sequentially connected, and the matching line segment that (n+1) item is continuously connected is obtained.
When N is 3, the matching line segment between point A and point B is line segment AM, line segment MP, line segment PN and line segment NB.
Line segment equation between i-th and (i+1) a node is:
(X in formulai, Yi)、(Xi+1, Yi+1) be respectively i-th and (i+1) a node coordinate;M is line segment segments, is being divided During section line segment approaches, m is continuously increased since 1, until reaching desired segments, m=n+1.
For example, in this example, the 1st node is point A, and the 2nd node is point M etc., the node in the embodiment of the present application Include the destination node (such as point M, P, N) and endpoint for segmentation (such as point A and point B), it is to be understood that the i-th and (i+ 1) a node is continuous two adjacent nodes.
In the embodiment of the present application, suitable curve-fitting method is first selected to carry out curve fitting discrete data point;Again with Certain segmentation line segment approximation Strategy, goes to approach matched curve, establishes segmented line segment model with multistage line segment.Segmentation line segment approaches Strategy is:A line segment is determined using the beginning and end of matched curve as two start nodes, and finds the line segment and fitting The worst error point of curve obtains two sections of line segments, then find the maximum of two sections of line segments and matched curve as new addition node Error dot is as new addition node, and so addition is gone down, until the segments and prediction effect of line segment are met the requirements.With it is existing There is technology to compare, line segment segments is controllable, and segmented node is automatically determined by algorithm;Each segmentation line segment side is determined by node Journey, it is ensured that be fitted the continuity of segmentation line segment;Algorithm is simple, and computational complexity is low, highly practical.
On the basis of above-mentioned Fig. 1 corresponding embodiments, a kind of segmentation line segment approximating method is additionally provided in the application Another embodiment.
Before in step 103, the information of input is received, information is the quantity of destination node.The quantity of destination node is used Family can fitting precision as needed be determined, for example, the quantity of the destination node be above-described embodiment in preset value For the positive integer more than or equal to 1, for example, the preset value is 3,5,6,7 etc., specifically, the quantity of the destination node is simultaneously It does not limit.
Determine that N number of destination node in matched curve, N number of destination node are the error dot of matched curve and target segment, And the corresponding error amount of each destination node in N number of destination node is all higher than other mistakes between matched curve and target segment Not good enough error amount.
Understand the method in the application with reference to an application scenarios.
In an application scenarios, the steady state data collection { x from fired power generating unit production process is consideredj,yj, j=1~86, xjIt is different from each other, and be ranked sequentially by ascending.Wherein, variable x represents the porthole aperture of unit, and variable y represents unit Load, it is clear that there is certain Nonlinear Mapping relationship therebetween.
Suitable curve-fitting method is selected to carry out curve fitting discrete data point.Through attempting to find, using following 6 These discrete data points of rank Gaussian function fitting can get preferable fitting effect:
A in formulak、bk、ckFor 3 parameters of Gaussian function, specific value see the table below shown in 1:
Table 1
k 1 2 3 4 5 6
a 407 122.1 21.9 14.78 8.239 532.6
b 92.98 89.11 86.27 87.28 85.13 84.45
c 3.154 2.343 0.6496 0.5716 0.3745 8.012
6 rank Gaussian curves of above-mentioned gained carry out Sectionalized linear approach.Using the beginning and end of matched curve as segmentation Two start nodes of straight line, and using segmented linear and the worst error of matched curve point as new addition node (i.e. the first mesh Mark node), constantly addition in this way goes down and (determines the second destination node, third destination node etc.), until obtaining Until required line segment segments (for example, the quantity for receiving destination node input by user is N).5 sections of line segments are divided to approach quasi- The coordinate of (N 4) each node is as follows when closing curve:
(82.9000,513.1585), (85.5980,545.6292), (86.2382,560.5017), (88.0216, 572.1505), (89.4849,597.0497), (92.0000,615.3637).
It please refers to shown in Fig. 6, Fig. 6 is segmentation line segment fitting result chart.
Divide the coordinate that 12 sections of line segments approach each node when matched curve as follows:
(82.9000,513.1585), (83.8146,530.0865), (84.5920,536.8151), (85.0950, 545.4208), (85.5980,545.6292), (86.2382,560.5017), (86.7869,562.1093), (87.3357, 569.2868), (88.0216,572.1505), (88.9362,589.3398), (89.4849,597.0497), (91.3598, 614.3122), (92.0000,615.3637).
It please refers to shown in Fig. 7, Fig. 7 is segmentation line segment fitting result chart.
It can be seen from the drawings that when line segment number is 12, the fitting result of line segment is segmented very close to 6 rank Gausses Curve.
Above example illustrates the validity of this method.In practice, respective algorithms are made into software, pass through friendship Mutual mode can very easily complete sectional straight line fitting process.This method has that algorithm is simple, segmented line hop count is controllable, can Outstanding advantages of automatically determining segmented node, therefore this method has extremely strong practical value.
It please refers to shown in Fig. 8, a kind of segmentation line segment fitting device 800 is provided in the embodiment of the present application, which includes:
Curve fitting module 801 obtains matched curve for carrying out curve fitting to discrete data point;
First determining module 802, the first object in the matched curve for determining the determination of curve fitting module 801 The target segment between aim curve and first object point and second target point between point and the second target point, The matched curve includes the aim curve;
Second determining module 803, the aim curve for being determined according to the first determining module 802 and the target segment Worst error determines the destination node on the aim curve;
Third determining module 804, for according to the first object point, second target point and the second determining module 803 destination nodes determined determine there is successional at least two lines section;
In one possible implementation, when the first object point be the matched curve the first end point, When second target point is the second endpoint of the matched curve,
Second determining module 803 is additionally operable to determine in the matched curve, the matched curve and the target segment Worst error point be first aim node.
In the mode that one may be implemented, the target section between the first end point and the second endpoint of the matched curve The quantity of point is n, and the first object point and second target point are:The first end point, described in the matched curve Any two adjacent mesh in n first object node between second endpoint and the first end point and second endpoint Punctuate;
Second determining module 803 is additionally operable to determine the worst error between every target segment and corresponding aim curve Value;Judge whether to need to increase the second destination node, second target in the aim curve according to the worst error value Node is the worst error point of the aim curve and the target segment.
In the mode that one may be implemented, the second determining module 803 is additionally operable to judge whether the worst error value is big In threshold value;If the worst error value is more than the threshold value, increase by second destination node on the aim curve.
In the mode that one may be implemented, the second determining module 803, when the worst error value is less than or equal to institute When stating threshold value, second destination node need not be increased by determining on the aim curve.
In the mode that one may be implemented, the quantity of the worst error value is that (n+1) is a;
Second determining module 803 is additionally operable to judge whether the n is less than preset value;If the n is less than the preset value, Maximum target worst error value in (n+1) a worst error value described in then determining;Determine that target worst error value is corresponding Worst error point is second destination node.
In the mode that one may be implemented, the second determining module 803 is additionally operable to when the n reaches the preset value, The destination node need not be increased by determining on the aim curve.
On the basis of Fig. 8 corresponding embodiments, please refers to shown in Fig. 9, a kind of segmentation is provided in the embodiment of the present application Line segment is fitted device 900, which includes:Receiving module;
Receiving module 805, the preset value for receiving input.
In a kind of mode that may be implemented, third determining module 804 is additionally operable to connect the first object point, and second The adjacent point of any two in target point and the destination node obtains having successional at least two lines section.
It please refers to Fig.1 shown in 0, a kind of segmentation line segment fitting device 1000 is provided in the embodiment of the present application, which can Think electronic equipment, such as computer.Figure 10 is the structural schematic diagram of segmentation line segment fitting device 1000 of the embodiment of the present invention.Device 1000 may include input equipment 1010, output equipment 1020, processor 1030 and memory 1040.It is defeated in the embodiment of the present invention It can be display equipment to go out equipment.
Memory 1040 may include read-only memory and random access memory, and to processor 1030 provide instruction and Data.The a part of of memory 440 can also include nonvolatile RAM (full name in English:Non-Volatile Random Access Memory, english abbreviation:NVRAM).
Memory 1040 stores following element, executable modules or data structures either their subset or Their superset:
Operational order:Including various operational orders, for realizing various operations.
Operating system:Including various system programs, for realizing various basic businesses and the hardware based task of processing.
Processor 1030 is for making device execution be held as device in above method embodiment is practical in the embodiment of the present application Capable method and step.
The operation of 1030 control device 1000 of processor, processor 1030 can also be known as central processing unit, and (English is complete Claim:Central Processing Unit, english abbreviation:CPU).Memory 1040 may include read-only memory and deposit at random Access to memory, and provide instruction and data to processor 1030.The a part of of memory 1040 can also include NVRAM.Specifically Application in, the various components of device 1000 are coupled by bus system 1050, and wherein bus system 1050 is except including Can also include power bus, controlling bus and status signal bus in addition etc. except data/address bus.But illustrate in order to clear See, various buses are all designated as bus system 450 in figure.
The method that the embodiments of the present invention disclose can be applied in processor 1030, or real by processor 1030 It is existing.Processor 1030 may be a kind of IC chip, the processing capacity with signal.During realization, the above method Each step can be completed by the instruction of the integrated logic circuit of the hardware in processor 1030 or software form.Above-mentioned Processor 1030 can be general processor, digital signal processor (full name in English:Digital Signal Processing, English abbreviation:DSP), application-specific integrated circuit (full name in English:Application Specific Integrated Circuit, English abbreviation:ASIC), ready-made programmable gate array (full name in English:Field-Programmable Gate Array, English Abbreviation:FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.It can be real Now or execute the embodiment of the present invention in disclosed each method, step and logic diagram.General processor can be microprocessor Device or the processor can also be any conventional processor etc..The step of method in conjunction with disclosed in the embodiment of the present invention, can Execute completion to be embodied directly in hardware decoding processor, or in decoding processor hardware and software module combination execute It completes.Software module can be located at random access memory, flash memory, read-only memory, programmable read only memory or electrically-erasable In the storage medium of this fields such as programmable storage, register maturation.The storage medium is located at memory 1040, processor 1030 read the information in memory 1040, in conjunction with the step of its hardware completion above method.
The associated description of Figure 10 the associated description of corresponding embodiment of the method and effect can be understood refering to fig. 1, this Place, which is not done, excessively to be repeated.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the division of unit, Only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can be with In conjunction with or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING of device or unit or Communication connection can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, and be shown as unit Component may or may not be physical unit, you can be located at a place, or may be distributed over multiple networks On unit.Some or all of unit therein can be selected according to the actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
It, can if integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product To be stored in a computer read/write memory medium.Based on this understanding, technical scheme of the present invention substantially or Say that all or part of the part that contributes to existing technology or the technical solution can embody in the form of software products Out, which is stored in a storage medium, including some instructions are used so that a computer equipment (can be personal computer, server or the network equipment etc.) executes all or part of each embodiment method of the present invention Step.And storage medium above-mentioned includes:It is USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random Access various Jie that can store program code such as memory (RAM, Random Access Memory), magnetic disc or CD Matter.
More than, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to aforementioned reality Applying example, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each Technical solution recorded in embodiment is modified or equivalent replacement of some of the technical features;And these are changed Or it replaces, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of segmentation line segment approximating method, which is characterized in that including:
It carries out curve fitting to discrete data point, obtains matched curve;
Determine the first object point in the matched curve and the aim curve between the second target point and first object point With the target segment between second target point, the matched curve includes the aim curve;
The destination node on the aim curve is determined according to the worst error of the aim curve and the target segment;
Determine that there are successional at least two lines according to the first object point, second target point and the destination node Section.
2. segmentation line segment approximating method according to claim 1, which is characterized in that when the first object point is described quasi- The first end point of curve is closed, when second target point is the second endpoint of the matched curve, the aim curve is When the matched curve, the worst error according to the aim curve and first line segment determines destination node, including:
It determines in the matched curve, the worst error point of the matched curve and the target segment is first aim section Point.
3. segmentation line segment approximating method according to claim 1, which is characterized in that the destination node includes first object Node and the second destination node, when the destination node between the first end point and the second endpoint of the matched curve quantity be n, The first object point and second target point are:The first end point in the matched curve, second endpoint and institute Any two adjacent points in n first object node between first end point and second endpoint are stated, described in the determination First object point in matched curve and the aim curve between the second target point and first object point and second mesh Target segment between punctuate, including:
It determines the target segment and aim curve between any two described adjacent target points, obtains (n+1) target segment and (n+ 1) objective curve;
Determine the worst error value between every target segment and corresponding aim curve;
Judge whether to need to increase the second destination node, second target in the aim curve according to the worst error value Node is the worst error point of the aim curve and the target segment.
4. segmentation line segment approximating method according to claim 3, which is characterized in that described to be sentenced according to the worst error value It is disconnected whether it needs to be determined that destination node on the aim curve, including:
Judge whether the worst error value is more than threshold value;
If the worst error value is more than the threshold value, increase by second destination node on the aim curve.
5. segmentation line segment approximating method according to claim 4, which is characterized in that the method further includes:
If the worst error value is less than or equal to the threshold value, it is determined that described the need not be increased on the aim curve Two destination nodes.
6. segmentation line segment approximating method according to claim 3, which is characterized in that the quantity of the worst error value is (n + 1) a, described that the second destination node it needs to be determined that in the target segment is judged whether according to the worst error value, packet It includes:
Judge whether the n reaches preset value;
If the n is not up to the preset value, it is determined that the maximum target worst error in (n+1) a worst error value Value;
Determine that the corresponding worst error point of target worst error value is second destination node.
7. segmentation line segment approximating method according to claim 6, which is characterized in that the method further includes:
If the n reaches the preset value, it is determined that second destination node need not be increased on the aim curve.
8. the segmentation line segment approximating method described according to claim 6 or 7, which is characterized in that described to judge whether the n meets Before preset value, the method further includes:
Receive the preset value of input.
9. being segmented line segment approximating method according to claim 1-8 any one of them, which is characterized in that described according to described first Target point, second target point and the destination node, which determine, has successional at least two lines section;
The first object point is connected, any two adjacent points are obtained with continuity in the second target point and the destination node At least two lines section.
10. a kind of segmentation line segment is fitted device, which is characterized in that including:
Curve fitting module obtains matched curve for carrying out curve fitting to discrete data point;
First determining module is used for the aim curve between upper first object point and the second target point and the first object Target segment between point and second target point, the matched curve includes the aim curve;
Second determining module, the aim curve determined according to first determining module are missed with the maximum of the target segment Difference determines the destination node on the aim curve;
Third determining module, the institute determined according to the first object point, second target point and second determining module It states destination node and determines that there is successional at least two lines section.
CN201810270684.5A 2018-03-29 2018-03-29 A kind of segmentation line segment approximating method and device Pending CN108447103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810270684.5A CN108447103A (en) 2018-03-29 2018-03-29 A kind of segmentation line segment approximating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810270684.5A CN108447103A (en) 2018-03-29 2018-03-29 A kind of segmentation line segment approximating method and device

Publications (1)

Publication Number Publication Date
CN108447103A true CN108447103A (en) 2018-08-24

Family

ID=63197683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810270684.5A Pending CN108447103A (en) 2018-03-29 2018-03-29 A kind of segmentation line segment approximating method and device

Country Status (1)

Country Link
CN (1) CN108447103A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377863A (en) * 2019-07-29 2019-10-25 秒针信息技术有限公司 A kind of the expansion approximating method and expansion fitting device of browsing stock assessment point
CN112699566A (en) * 2021-01-08 2021-04-23 深圳市佳士科技股份有限公司 Analysis method and device based on static external characteristic curve of welding machine
CN113239030A (en) * 2021-05-20 2021-08-10 国网山东省电力公司潍坊供电公司 Smart power grid monitoring data storage method based on discrete data curve fitting
CN114567396A (en) * 2022-02-28 2022-05-31 哲库科技(北京)有限公司 Wireless communication method, fitting method of nonlinear function, terminal and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW464830B (en) * 1999-11-26 2001-11-21 Inventec Besta Co Ltd Approaching process method of digitized vector font
CN107094055A (en) * 2017-06-15 2017-08-25 北京华睿集成科技有限公司 Frequency response calibration method and its calibration system and frequency response self calibration instrument

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW464830B (en) * 1999-11-26 2001-11-21 Inventec Besta Co Ltd Approaching process method of digitized vector font
CN107094055A (en) * 2017-06-15 2017-08-25 北京华睿集成科技有限公司 Frequency response calibration method and its calibration system and frequency response self calibration instrument

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
嵇存: "基于Shapelet的时间序列分类方法研究", 《中国博士学位论文全文数据库 基础学科辑》 *
田野等: "改进的基于重要点的时间序列数据分段方法", 《微型电脑应用》 *
闫白等: "基于比色测温的非线性校正方法研究", 《电子质量》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377863A (en) * 2019-07-29 2019-10-25 秒针信息技术有限公司 A kind of the expansion approximating method and expansion fitting device of browsing stock assessment point
CN110377863B (en) * 2019-07-29 2021-12-28 秒针信息技术有限公司 Expansion fitting method and device for browsing resource evaluation points
CN112699566A (en) * 2021-01-08 2021-04-23 深圳市佳士科技股份有限公司 Analysis method and device based on static external characteristic curve of welding machine
CN112699566B (en) * 2021-01-08 2023-06-02 深圳市佳士科技股份有限公司 Analysis method and device based on static external characteristic curve of welding machine
CN113239030A (en) * 2021-05-20 2021-08-10 国网山东省电力公司潍坊供电公司 Smart power grid monitoring data storage method based on discrete data curve fitting
CN113239030B (en) * 2021-05-20 2023-08-29 国网山东省电力公司潍坊供电公司 Intelligent power grid monitoring data storage method based on discrete data curve fitting
CN114567396A (en) * 2022-02-28 2022-05-31 哲库科技(北京)有限公司 Wireless communication method, fitting method of nonlinear function, terminal and equipment

Similar Documents

Publication Publication Date Title
CN108447103A (en) A kind of segmentation line segment approximating method and device
CN111080304B (en) Credible relationship identification method, device and equipment
CN105122745A (en) Efficient longest prefix matching techniques for network devices
CN109145080B (en) Text fingerprint obtaining method and device
CN107766031A (en) Segmented divider, segmented division operation method and electronic equipment
CN109977415A (en) A kind of text error correction method and device
CN104504205A (en) Parallelizing two-dimensional division method of symmetrical FIR (Finite Impulse Response) algorithm and hardware structure of parallelizing two-dimensional division method
CN108509440A (en) A kind of data processing method and device
CN111178513B (en) Convolution implementation method and device of neural network and terminal equipment
CN109597745A (en) Method for processing abnormal data and device
CN109495305B (en) Reliability evaluation method and device for multi-distribution multi-commodity multi-state flow network
CN105843859B (en) The method, apparatus and equipment of data processing
Panahian Fard et al. Analyses for L p [a, b]-norm approximation capability of flexible approximate identity neural networks
CN110430140A (en) Path processing method, device, equipment and storage medium
CN101308452A (en) Method to compare and sort binary data
CN107220025A (en) The method for handling the device and processing multiply-add operation of multiply-add operation
CN111027688A (en) Neural network calculator generation method and device based on FPGA
CN105184372A (en) Knowledge network construction method and apparatus
CN109756381A (en) Data center's Fault Locating Method, device, electronic equipment and medium
US10761847B2 (en) Linear feedback shift register for a reconfigurable logic unit
CN114548854A (en) Warehouse goods picking path determining method and device and storage medium
CN108768735B (en) Bipartite graph sampling method and device for test bed topological structure
CN105183699A (en) Multipath solving method and device
CN114510217A (en) Method, device and equipment for processing data
CN109783569A (en) A kind of account book recording method, device and terminal device based on block chain

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180824

RJ01 Rejection of invention patent application after publication