CN116304550A - Waveform curve matching method and device - Google Patents

Waveform curve matching method and device Download PDF

Info

Publication number
CN116304550A
CN116304550A CN202211652072.5A CN202211652072A CN116304550A CN 116304550 A CN116304550 A CN 116304550A CN 202211652072 A CN202211652072 A CN 202211652072A CN 116304550 A CN116304550 A CN 116304550A
Authority
CN
China
Prior art keywords
waveform
segment
values
segments
cost
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
CN202211652072.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.)
Sany Robot Technology Co Ltd
Original Assignee
Sany Robot 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 Sany Robot Technology Co Ltd filed Critical Sany Robot Technology Co Ltd
Priority to CN202211652072.5A priority Critical patent/CN116304550A/en
Publication of CN116304550A publication Critical patent/CN116304550A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

The application discloses a matching method and a device of a waveform curve, which are characterized in that a first waveform curve is divided into a plurality of first waveform fragments; splitting the second waveform curve into a plurality of second waveform segments; calculating the matching degree between the plurality of first waveform segments and the plurality of second waveform segments to obtain the matching degree of the first waveform curve and the second waveform curve; namely, the first waveform curve and the second waveform curve are both divided into waveform segments, and then each waveform segment is subjected to comparison so as to eliminate the matching of redundant waveform segments and missing segments, so that an accurate matching result can be found out, the matching accuracy is improved, and the accuracy of calculating the similarity of the first waveform curve and the second waveform curve is improved.

Description

Waveform curve matching method and device
Technical Field
The application relates to the technical field of waveform curve matching, in particular to a waveform curve matching method and device.
Background
Numerical control machine tools, which are the most common mechanical equipment in industrial machining processes, can provide high-precision, high-level machining services.
In the existing machining process of the machine tool, each machining process can generate a load curve or a power curve, a plurality of machining waveforms are arranged in the curve, the difference between each waveform can be large, whether the two machining processes are consistent or whether each machining process is consistent with the standard machining process is an important means for analyzing whether the machining process has quality problems or not. And abstracting the processing process into a time sequence waveform curve, and finding out an optimal matching relation to obtain an optimal similarity value. However, the two identical machining waveforms may also be quite different, e.g. some machining waveforms may have missing parts and some may have redundant parts. If matching is performed only by similarity, it is difficult to find an optimal matching result, resulting in inaccurate matching.
Disclosure of Invention
The present application has been made in order to solve the above technical problems. The embodiment of the application provides a waveform curve matching method and device, and solves the technical problems.
According to one aspect of the present application, there is provided a matching method of waveform curves for matching a first waveform curve and a second waveform curve, the matching method of waveform curves including: splitting the first waveform curve into a plurality of first waveform segments; splitting the second waveform curve into a plurality of second waveform segments; and calculating the matching degree between the plurality of first waveform segments and the plurality of second waveform segments to obtain the matching degree of the first waveform curve and the second waveform curve.
In an embodiment, the calculating the degree of matching between the plurality of first waveform segments and the plurality of second waveform segments comprises: calculating a first self-cost value of each first waveform segment; wherein the first self cost value characterizes a waveform characteristic value of the first waveform segment; calculating a second self-cost value of each second waveform segment; wherein the second self-cost value characterizes a waveform characteristic value of the second waveform segment; and calculating matching degrees between the plurality of first waveform segments and the plurality of second waveform segments according to the plurality of first self-cost values and the plurality of second self-cost values.
In an embodiment, the calculating the matching degree between the plurality of first waveform segments and the plurality of second waveform segments according to the plurality of first self-cost values and the plurality of second self-cost values includes: calculating a single combined cost value between a single first waveform segment and a single second waveform segment according to the plurality of first self cost values and the plurality of second self cost values; calculating a plurality of combined cost values between a single first waveform segment and a plurality of continuous second waveform segments or between a single second waveform segment and a plurality of continuous first waveform segments according to a plurality of first self cost values and a plurality of second self cost values; and calculating the matching degree between the plurality of first waveform segments and the plurality of second waveform segments according to the single combined cost value and the multi-combined cost value.
In an embodiment, the calculating a single combined cost value between a single one of the first waveform segment and a single one of the second waveform segment based on the plurality of first self-cost values and the plurality of second self-cost values comprises: calculating the sum of cost values of all the first self-cost values and all the second self-cost values; calculating the sum of the duration of all the first waveform segments and all the second waveform segments; obtaining at least one sub-segment corresponding to a segment with shorter duration in the single first waveform segment and the single second waveform segment according to a segment with longer duration in the single first waveform segment and the single second waveform segment; the time length of the sub-segment is equal to that of the segment with shorter time length; calculating the sum of the differences between each sub-segment and the segment with shorter duration; selecting the sub-segment with the smallest difference sum as an optimal sub-segment; calculating the similarity between the optimal sub-segment and the segment with shorter duration; and calculating to obtain a single combined cost value between the single first waveform segment and the single second waveform segment according to the cost value sum, the duration corresponding to the segment with shorter duration and the similarity.
In an embodiment, the calculating the similarity between the optimal sub-segment and the segment with shorter duration includes: calculating the minimum value and the maximum value of a plurality of moments in the optimal sub-segment and the segment with shorter duration; calculating the sum of a plurality of the minimum values and the sum of a plurality of the maximum values to obtain a minimum value sum and a maximum value sum; according to the minimum sum and the maximum sum, calculating the similarity between the optimal sub-segment and the segment with shorter duration; wherein the similarity is positively correlated with the minimum sum and inversely correlated with the maximum sum.
In an embodiment, the calculating the multi-combined cost value between the single first waveform segment and the plurality of continuous second waveform segments, or between the single second waveform segment and the plurality of continuous first waveform segments, according to the plurality of first self cost values and the plurality of second self cost values includes: calculating the sum of cost values of all the first self-cost values and all the second self-cost values; calculating the sum of the duration of all the first waveform segments and all the second waveform segments; obtaining at least one sub-segment corresponding to a segment with a shorter duration in the single first waveform segment and the plurality of continuous second waveform segments according to a segment with a longer duration in the single first waveform segment and the plurality of continuous second waveform segments, or obtaining at least one sub-segment corresponding to a segment with a shorter duration in the single second waveform segment and the plurality of continuous first waveform segments according to a segment with a longer duration in the single second waveform segment and the plurality of continuous first waveform segments; the time length of the sub-segment is equal to that of the segment with shorter time length; calculating the sum of the differences between each sub-segment and the segment with shorter duration; selecting the sub-segment with the smallest difference sum as an optimal sub-segment; calculating the similarity between the optimal sub-segment and the segment with shorter duration; and calculating to obtain the multi-combination cost value between the single first waveform segment and the plurality of continuous second waveform segments or between the single second waveform segment and the plurality of continuous first waveform segments according to the cost value sum, the duration corresponding to the segments with shorter duration and the similarity.
In an embodiment, the calculating the matching degree between the plurality of first waveform segments and the plurality of second waveform segments according to the single combined cost value and the multiple combined cost values includes: constructing a cost matrix by taking a plurality of first waveform fragments and a plurality of second waveform fragments as rows and columns respectively; an auxiliary row is arranged between the adjacent first waveform segments, an auxiliary column is arranged between the adjacent second waveform segments, the values corresponding to the first waveform segments and the second waveform segments in the cost matrix are real cross values, the values corresponding to the auxiliary row and the auxiliary column are auxiliary cross values, the real cross values are minimum values in left side values, upper left side values and upper side values of the real cross values, and the auxiliary cross values are minimum values in left side values, upper left side values and upper side values of the auxiliary cross values; and calculating the matching degree between the plurality of first waveform segments and the plurality of second waveform segments according to the cost matrix.
In an embodiment, the calculating the degree of matching between the plurality of first waveform segments and the plurality of second waveform segments according to the cost matrix includes: taking the lower right corner element of the cost matrix as the sum of the matched cost values between the plurality of first waveform fragments and the plurality of second waveform fragments; and searching an optimal path from a lower right corner element to an upper left corner element of the cost matrix to obtain a matching mode between the plurality of first waveform fragments and the plurality of second waveform fragments.
In an embodiment, the finding an optimal path from a lower right corner element to an upper left corner element of the cost matrix comprises: starting from the lower right corner element, determining the trend of the optimal path according to the numerical source of the current element; wherein the trend of the optimal path is consistent with the numerical source of the current element.
According to another aspect of the present application, there is provided a matching device for matching a first waveform profile and a second waveform profile, including: the first segmentation module is used for segmenting the first waveform curve into a plurality of first waveform segments; the second segmentation module is used for segmenting the second waveform curve into a plurality of second waveform segments; and the matching calculation module is used for calculating the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments so as to obtain the matching degree of the first waveform curve and the second waveform curve.
The method and the device for matching the waveform curve divide the first waveform curve into a plurality of first waveform fragments; splitting the second waveform curve into a plurality of second waveform segments; calculating the matching degree between the plurality of first waveform segments and the plurality of second waveform segments to obtain the matching degree of the first waveform curve and the second waveform curve; namely, the first waveform curve and the second waveform curve are both divided into waveform segments, and then each waveform segment is subjected to comparison so as to eliminate the matching of redundant waveform segments and missing segments, so that an accurate matching result can be found out, the matching accuracy is improved, and the accuracy of calculating the similarity of the first waveform curve and the second waveform curve is improved.
Drawings
The foregoing and other objects, features and advantages of the present application will become more apparent from the following more particular description of embodiments of the present application, as illustrated in the accompanying drawings. The accompanying drawings are included to provide a further understanding of embodiments of the application and are incorporated in and constitute a part of this specification, illustrate the application and not constitute a limitation to the application. In the drawings, like reference numerals generally refer to like parts or steps.
Fig. 1 is a flow chart of a matching method of waveform curves according to an exemplary embodiment of the present application.
Fig. 2 is a schematic structural view of a first waveform profile and a second waveform profile according to another exemplary embodiment of the present application.
Fig. 3 is a schematic structural view of a first waveform segment and a second waveform segment according to another exemplary embodiment of the present application.
Fig. 4 is a flowchart of a matching method of waveform curves according to another exemplary embodiment of the present application.
Fig. 5 is a flowchart of a matching method of waveform curves according to another exemplary embodiment of the present application.
Fig. 6 is a flowchart of a single-combination cost calculation method in a matching method of waveform curves according to an exemplary embodiment of the present application.
Fig. 7 is a flowchart of a multi-combination cost value calculation method in a matching method of waveform curves according to an exemplary embodiment of the present application.
Fig. 8 is a flowchart of a matching degree calculating method in a matching method of waveform curves according to an exemplary embodiment of the present application.
Fig. 9 is a schematic structural diagram of a cost matrix according to an exemplary embodiment of the present application.
Fig. 10 is a flowchart of a matching method of waveform curves according to another exemplary embodiment of the present application.
Fig. 11 is a schematic diagram of matching results of waveform curves according to an exemplary embodiment of the present application.
Fig. 12 is a schematic structural diagram of a waveform curve matching device according to an exemplary embodiment of the present application.
Fig. 13 is a schematic structural view of a waveform profile matching device according to another exemplary embodiment of the present application.
Fig. 14 is a block diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application and not all of the embodiments of the present application, and it should be understood that the present application is not limited by the example embodiments described herein.
Fig. 1 is a flow chart of a matching method of waveform curves according to an exemplary embodiment of the present application. The matching method of the waveform curve is used for matching the first waveform curve and the second waveform curve, as shown in fig. 1, and comprises the following steps:
step 100: the first waveform curve is sliced into a plurality of first waveform segments.
The first waveform profile is sliced to divide the first waveform profile into a plurality of first waveform segments, and the first waveform segments may be numbered (e.g., profile 1-1, profile 1-2, …). Specifically, the segmentation method may be an algorithm suitable for waveform curve segmentation, such as an edge detection algorithm, and the application is not limited to a specific segmentation method.
Step 200: the second waveform profile is sliced into a plurality of second waveform segments.
The second waveform profile is sliced to divide the second waveform profile into a plurality of second waveform segments, and the second waveform segments may be numbered (e.g., profile 2-1, profile 2-2, …). Specifically, the segmentation method may be an algorithm suitable for waveform curve segmentation, such as an edge detection algorithm, and the application is not limited to a specific segmentation method.
Fig. 2 is a schematic structural diagram of the first waveform curve and the second waveform curve, and fig. 3 is a schematic structural diagram of the first waveform segment and the second waveform segment obtained by slicing the first waveform curve and the second waveform curve. As shown in fig. 2 and 3, the plurality of first waveform segments and the plurality of second waveform segments are matched by dividing the first waveform curve and the second waveform curve into the plurality of first waveform segments and the plurality of second waveform segments, so as to improve the matching accuracy.
Step 300: and calculating the matching degree between the plurality of first waveform segments and the plurality of second waveform segments to obtain the matching degree of the first waveform curve and the second waveform curve.
By matching the first waveform segment and the second waveform segment, redundant waveform segments or missing waveform segments in the first waveform curve and the second waveform curve are eliminated, and the redundant or missing waveform segments are prevented from participating in matching, so that the matching accuracy and precision can be improved.
According to the matching method of the waveform curve, the first waveform curve is divided into a plurality of first waveform fragments; splitting the second waveform curve into a plurality of second waveform segments; calculating the matching degree between the plurality of first waveform segments and the plurality of second waveform segments to obtain the matching degree of the first waveform curve and the second waveform curve; namely, the first waveform curve and the second waveform curve are both divided into waveform segments, and then each waveform segment is subjected to comparison so as to eliminate the matching of redundant waveform segments and missing segments, so that an accurate matching result can be found out, the matching accuracy is improved, and the accuracy of calculating the similarity of the first waveform curve and the second waveform curve is improved.
Fig. 4 is a flowchart of a matching method of waveform curves according to another exemplary embodiment of the present application. As shown in fig. 4, the step 300 may include:
step 310: a first self-cost value of each first waveform segment is calculated.
Wherein the first self-cost value characterizes a waveform characteristic value of the first waveform segment. The first self-cost value represents a cost value when the corresponding first waveform segment is not matched, and in particular, the calculation of the first self-cost value may be related to a duration and a power value of the corresponding first waveform segment, for example, the first self-cost value may be equal to a sum of power values of respective time points in the corresponding first waveform segment. For example, the first waveform segment is curve 1-1 (6,48), then the duration of the first waveform segment
Figure BDA0004011097280000081
First self-value->
Figure BDA0004011097280000082
Step 320: and calculating the second self-cost value of each second waveform segment.
Wherein the second self-cost value characterizes a waveform characteristic value of the second waveform segment. The second self-cost value represents a cost value when the corresponding second waveform segment is not matched, and in particular, the calculation of the second self-cost value may be related to a duration and a power value of the corresponding second waveform segment, for example, the second self-cost value may be equal to a sum of power values of respective time points in the corresponding first waveform segment.
Step 330: and calculating the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments according to the plurality of first self-cost values and the plurality of second self-cost values.
After the first self-cost values and the second self-cost values are obtained, calculating to obtain the matching degree between the first waveform fragments and the second waveform fragments according to the first self-cost values and the second self-cost values, specifically, selecting a matching mode with the smallest total cost value after the first waveform fragments and the second waveform fragments are matched to obtain an optimal matching result.
Fig. 5 is a flowchart of a matching method of waveform curves according to another exemplary embodiment of the present application. As shown in fig. 5, the step 330 may include:
step 331: a single combined cost value between a single first waveform segment and a single second waveform segment is calculated based on the plurality of first self cost values and the plurality of second self cost values.
Because redundant or missing waveform segments may exist in the first waveform curve and the second waveform curve, an optimal matching mode can be obtained by calculating the single combined cost value between a single first waveform segment and a single second waveform segment, and the dislocation of the whole matching caused by the redundant or missing waveform segments is avoided. The single combined cost value of curves 1-i and 2-j is recorded as
Figure BDA0004011097280000091
Step 332: a plurality of combined cost values between a single first waveform segment and a plurality of consecutive second waveform segments, or a single second waveform segment and a plurality of consecutive first waveform segments, are calculated based on the plurality of first self cost values and the plurality of second self cost values.
Since there may be a large waveform segment being cut during the slicing processThe method is divided into a plurality of small waveform segments, so that a situation that one waveform segment corresponds to a plurality of waveform segments may exist, and in order to ensure the accuracy of matching, the method simultaneously considers a one-to-many matching mode, namely matching between a single first waveform segment and a plurality of continuous second waveform segments or between a single second waveform segment and a plurality of continuous first waveform segments. Trace 1-i and trace 2-j 1 Curve 2-j 2 The multi-combination cost value of (2) is
Figure BDA0004011097280000092
Curve 1-i 1 Curve 1-i 2 The combined cost value of the sum curve 2-j is +.>
Figure BDA0004011097280000093
Step 333: and calculating the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments according to the single combined cost value and the multi-combined cost value.
The single and multiple combined cost values are negative, meaning that when matched, a portion of the cost value of each fragment in the combination itself is eliminated. After the single combined cost value and the multiple combined cost values are obtained, an optimal matching mode between the plurality of first waveform segments and the plurality of second waveform segments is found according to the single combined cost value and the multiple combined cost values, and then matching similarity between the first waveform curve and the second waveform curve is calculated.
Fig. 6 is a flowchart of a single-combination cost calculation method in a matching method of waveform curves according to an exemplary embodiment of the present application. As shown in fig. 6, the step 331 may include:
step 3311: and calculating the sum of the cost values of all the first self-cost values and all the second self-cost values.
Calculating a sum cost of the first self-cost value of all the first waveform segments and the second self-cost value of the second waveform segments sum
Step 3312: the sum of the durations of all the first waveform segments and all the second waveform segments is calculated.
Calculating the sum time of the duration of all the first waveform segments in the first waveform curve and the second waveform segments in the second waveform curve sum
Step 3313: and obtaining at least one sub-segment corresponding to the segment with shorter duration in the single first waveform segment and the single second waveform segment according to the segment with longer duration in the single first waveform segment and the single second waveform segment.
Wherein the duration of the sub-segment is equal to the duration of the segment with shorter duration. Because the lengths of the matched single first waveform segment and the matched single second waveform segment may be different, in order to better match the single first waveform segment and the single second waveform segment, it is necessary to find which segment, in particular, the segment with the longer length is matched with the segment with the shorter length, so that the matching accuracy is improved by dividing the segment with the longer length into sub-segments corresponding to the segment with the shorter length.
Step 3314: the sum of the differences between each sub-segment and the segment of shorter duration is calculated.
Step 3315: and selecting the sub-segment with the smallest sum of the differences as an optimal sub-segment.
Specifically, index corresponding to the optimal matching interval of two waveform segments is calculated min I.e. it is determined that the shorter duration segment should correspond to that portion of the longer duration segment. For example, the two segments are each of a duration of
Figure BDA0004011097280000101
And
Figure BDA0004011097280000102
the segment corresponding to the smaller of the two values (i.e., the longer segment) is shifted from left to right in the segment corresponding to the larger value (i.e., the longer segment), each time for one sample time, and the sum cost of the differences in power values of the two segments within each small segment interval is calculated error The method comprises the steps of carrying out a first treatment on the surface of the After moving from left to right, a set (i.e. a plurality of) costs are generated error Find the cost error The minimum value is obtained, and the index corresponding to the minimum value is obtained min I.e. index is moved from left to right min The index is the optimal matching index reaching the optimal matching interval at the sampling time.
Step 3316: and calculating the similarity between the optimal sub-segment and the segment with shorter duration.
In an embodiment, the implementation manner of the step 3316 may be: calculating the minimum value and the maximum value of the optimal sub-segment and the segment with shorter duration at a plurality of moments, calculating the sum of a plurality of minimum values and the sum of a plurality of maximum values to obtain the sum of the minimum values and the sum of the maximum values, and calculating the similarity between the optimal sub-segment and the segment with shorter duration according to the sum of the minimum values and the sum of the maximum values; wherein the similarity is positively correlated with the minimum sum and inversely correlated with the maximum sum. Specifically, index is indexed according to the above-mentioned optimal match min Calculating the sum yval of the minimum values of the power values of the small segment (segment with shorter duration) and the large segment (optimal sub-segment) at each moment in the segment interval with shorter duration min And the sum of the maxima yval max The ratio of the two is the similarity of the two fragments, namely similarity i,i,j,j =yval min /yval max Therefore, the maximum value thereof is 1.
Step 3317: and calculating to obtain the single combined cost value between the single first waveform segment and the single second waveform segment according to the sum of the cost values, the sum of the time durations and the similarity corresponding to the segments with shorter time durations.
In particular, the method comprises the steps of,
Figure BDA0004011097280000111
Figure BDA0004011097280000112
wherein the negative sign represents the elimination of the cost value after combination, and the last two costs sum /time sum Represents the average self-cost value per unit time, +.>
Figure BDA0004011097280000113
Figure BDA0004011097280000114
The representation is that the combination eliminates the 2 times the corresponding long-duration cost of the shorter of the two waveform segments, multiplied by similarity i,i,j,j Representing how high the similarity of the two waveform segments is, the higher the similarity is, the larger the cost value eliminated after combination is.
Fig. 7 is a flowchart of a multi-combination cost value calculation method in a matching method of waveform curves according to an exemplary embodiment of the present application. As shown in fig. 7, the step 332 may include:
Step 3321: and calculating the sum of the cost values of all the first self-cost values and all the second self-cost values.
Step 3322: the sum of the durations of all the first waveform segments and all the second waveform segments is calculated.
Step 3323: obtaining at least one sub-segment corresponding to a segment with a shorter duration in the single first waveform segment and the plurality of continuous second waveform segments according to a segment with a longer duration in the single first waveform segment and the plurality of continuous second waveform segments, or obtaining at least one sub-segment corresponding to a segment with a shorter duration in the single second waveform segment and the plurality of continuous first waveform segments according to a segment with a longer duration in the single second waveform segment and the plurality of continuous first waveform segments.
Wherein the duration of the sub-segment is equal to the duration of the segment with shorter duration. Specifically, the principle of combining a single first waveform segment and a plurality of continuous second waveform segments is as follows: the sum of the durations of the plurality of consecutive second waveform segments is less than or equal to the duration of the single first waveform segment; the principle of combining a single second waveform segment with a plurality of consecutive first waveform segments is: the sum of the durations of the plurality of consecutive first waveform segments is less than or equal to the duration of the single second waveform segment. The continuous waveform segments are spliced end to end in sequence, and two adjacent segments are separated by one sampling time, so that the connection is called an integral waveform segment.
Step 3324: the sum of the differences between each sub-segment and the segment of shorter duration is calculated.
Step 3325: and selecting the sub-segment with the smallest sum of the differences as an optimal sub-segment.
Step 3326: and calculating the similarity between the optimal sub-segment and the segment with shorter duration.
The calculation manners of the steps 3321 to 3326 are the same as those of the steps 3311 to 3316, and are not repeated here.
Step 3327: and calculating to obtain multiple combined cost values between a single first waveform segment and a plurality of continuous second waveform segments or between a single second waveform segment and a plurality of continuous first waveform segments according to the sum of the cost values, the sum of the time lengths and the similarity corresponding to the segments with shorter time lengths.
By way of example, a single first waveform segment and a plurality of successive second waveform segments are described, e.g. calculated
Figure BDA0004011097280000121
I.e. the ith first waveform segment and the jth 1 To j 2 A second waveform segment. Only the second waveform segment j is needed 1 To j 2 The continuous segments are spliced end to end in sequence, and two adjacent segments are separated by one sampling time, so that the whole waveform segment is connected, the whole segment and the first waveform segment i are calculated according to the one-to-one combination logic, and the obtained combination cost value is the one-to-many cost value.
Fig. 8 is a flowchart of a matching degree calculating method in a matching method of waveform curves according to an exemplary embodiment of the present application. As shown in fig. 8, the step 333 may include:
step 3331: and constructing a cost matrix by taking the plurality of first waveform fragments and the plurality of second waveform fragments as rows and columns respectively.
The waveform segments of the first waveform curve and the second waveform curve are respectively used as the rows and columns of the cost matrix and are sequentially arranged according to the serial numbers, and the first rows and the first columns are empty rows and empty columns and are the mostThe last row and last column are also empty rows and columns, as well as empty rows or columns between the sequence numbers of adjacent segments. Specifically, as shown in fig. 9, an auxiliary row is set between adjacent first waveform segments, an auxiliary column is set between adjacent second waveform segments, values corresponding to the first waveform segments and the second waveform segments in the cost matrix are real cross values, values corresponding to the auxiliary row and the auxiliary column are auxiliary cross values, the real cross values are minimum values in left side values, left upper side values and upper side values of the real cross values, the auxiliary cross values are minimum values in left side values, left upper side values and upper side values of the auxiliary cross values, and no value exists at the intersections of the first waveform segments and the auxiliary column and at the intersections of the second waveform segments and the auxiliary row. As shown in FIG. 9, the first row is each waveform segment of the first waveform curve, placed in the corresponding real column position, and each segment is followed by a bracket, two numbers in the interior, the first representing the duration time of the segment col The second one represents the own cost value cost of the segment col Similarly, each waveform segment of the second waveform curve is sequentially put into practice in the first column of the cost matrix table, followed by the duration time of each segment row And self cost value cost row
In the cost matrix, the value at the real cross point is the real cross value (cost real ) The value at the auxiliary crossing point is an auxiliary crossing value (cost aux ). Each intersection value is commonly determined based on three intersection values of the left side, the upper left side and the upper side adjacent to the intersection value, after certain transformation, the intersection values in the three directions are respectively the left side value, the upper left side value and the upper side value of the current intersection value, and the minimum of the three values is taken as the size of the current intersection value. By planning iterative updating from the upper left corner to the lower right corner, other intersection values can be updated row by row or column by column except for the intersection value of the first auxiliary row and the first auxiliary column to be 0 until the updating of the intersection value of the last auxiliary row and the last auxiliary column (namely, the auxiliary intersection value of the lower right corner of the matrix) is completed.
Step 3332: and calculating the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments according to the cost matrix.
In one embodiment, the implementation of step 3332 may be: and taking the lower right corner element of the cost matrix as the sum of the cost values matched between the plurality of first waveform fragments and the plurality of second waveform fragments (corresponding to the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments), and searching an optimal path from the lower right corner element to the upper left corner element of the cost matrix to obtain a matching mode between the plurality of first waveform fragments and the plurality of second waveform fragments.
Specifically, the searching mode of the optimal path may be: starting from the lower right corner element, determining the trend of the optimal path according to the numerical source of the current element; the trend of the optimal path is consistent with the numerical source of the current element, namely the trend of the optimal path is consistent with the father node point of the current intersection point.
The direction in which the smallest of the left-side value, the upper-left value, and the upper-side value of the current intersection value is located is the parent node direction of the current intersection. If no adjacent intersection in a certain direction is present, for example, the first auxiliary row, the upper left and upper values of all intersection points of the row are set to infinity. In a special case, the intersection value of the first auxiliary row and the first auxiliary column is set to 0.
Specifically, the update rule of the real cross value and the auxiliary cross value is as follows:
auxiliary crossing value [ ]
Figure BDA0004011097280000141
i. j is the i-th auxiliary row and j-th auxiliary column), respectively) is:
the left value of the auxiliary crossing value is equal to the left crossing value
Figure BDA0004011097280000142
Adding the value of the j-1 th fragment (column fragment j-1) corresponding to the column to be crossed>
Figure BDA0004011097280000143
The upper side value of the auxiliary crossing value is equal to the upper side crossing value
Figure BDA0004011097280000144
Adding the value of the ith-1 fragment (abbreviated as row fragment i-1) corresponding to the row to be crossed
Figure BDA0004011097280000145
The upper left value of the auxiliary crossing value is equal to the upper left crossing value +.>
Figure BDA0004011097280000146
Plus the sum of the value of the column segment j-1 and the column segment i-1 corresponding thereto +.>
Figure BDA0004011097280000147
The minimum of these three values acts as the current auxiliary crossover value, formulated as:
Figure BDA0004011097280000148
the direction in which the minimum value is located (left/upper) is the direction in which the current auxiliary intersection points to its parent node, and the intersection point to which it points is its parent node.
With auxiliary crossing values of the 7 th auxiliary row and 5 th auxiliary column in fig. 9
Figure BDA0004011097280000149
For example, the left-hand cross value
Figure BDA00040110972800001410
The column segment to be spanned has a cost value of +.>
Figure BDA00040110972800001411
Its upper cross value->
Figure BDA00040110972800001412
The cost value of the line segment to be crossed is +.>
Figure BDA00040110972800001413
The upper left crossover value->
Figure BDA0004011097280000151
The corresponding column segment cost value is +.>
Figure BDA0004011097280000152
Column segment cost value is->
Figure BDA0004011097280000153
Therefore, the auxiliary crossing value
Figure BDA0004011097280000154
Figure BDA0004011097280000155
The minimum value is the upper-side value, so the parent node of the auxiliary crossing value is the upper side.
Real cross value [ ]
Figure BDA0004011097280000156
i. j is the ith implementation and the jth column), respectively) is:
the upper left value of the real cross value is equal to the auxiliary cross value of the upper left of the real cross value
Figure BDA0004011097280000157
Adding a cost value of one-to-one combination of row segment and column segment corresponding to the real cross value +.>
Figure BDA0004011097280000158
The parent node of the direction points to the upper left.
For left and upper values, there is the same computational logic, e.g., left value:
The row segment i corresponding to the real intersection is found, if there is no row-to-column combination ending with column segment j, the left value is set directly to infinity, i.e
Figure BDA0004011097280000159
If there is a row-to-multi-column combination, then traversing to calculate a pair of multi-combination cost values ending with column segment j in all ith rows
Figure BDA00040110972800001510
Where m is the number of column segments in the combination), plus an auxiliary crossing value +.>
Figure BDA00040110972800001511
And combining the sum of the self-cost values of all column segments preceding the inner column segment j
Figure BDA00040110972800001512
The results of each such combination are compared with the minimum value being the left-hand value, i.e +.>
Figure BDA00040110972800001513
Figure BDA00040110972800001514
n is the number of row-to-column combinations in all the ith row segments ending in column segment j. Meanwhile, a continuous pointing path of the combination is recorded and used as a basis for searching the father node, for example, the current optimal row-column combination is a pair of three combinations, namely a row to three columns, and then the continuous pointing path is left side-upper left side, and the final auxiliary intersection point pointed at the upper left side is the father node;
similarly, upper values and continuous directional paths can be obtained:
if there is no column-to-row combination ending with row segment i for column segment j corresponding to the real intersection, then the upper value is set directly to infinity, i.e
Figure BDA00040110972800001515
If there is a combination of one column and multiple rows, then traversing to calculate a pair of multiple combination cost values ending with row segment i in all j-th columns
Figure BDA0004011097280000161
Wherein m is the number of line segments in the combination), plus the auxiliary crossing value +.>
Figure BDA0004011097280000162
And combining the sum of the self cost values of all the line segments preceding the line segment i
Figure BDA0004011097280000163
The results of each such combination are compared with the minimum value being the upper value, i.e.>
Figure BDA0004011097280000164
Figure BDA0004011097280000165
n is the number of one column to multiple row combinations ending in row segment i in all j-th column segments. And simultaneously recording the continuous pointing path of the combination as the basis for searching the father node.
The smallest of these three values, as the current real crossing value, is formulated as:
Figure BDA0004011097280000166
the parent node is determined that if the minimum is the upper left side, the parent node is the upper left side auxiliary intersection; if left or up, its parent node is the auxiliary junction that ultimately points in the continuously pointing path of the direction.
Real cross values for the last row and the last column of the implementation in FIG. 9
Figure BDA0004011097280000167
For example, the auxiliary crossing value +.>
Figure BDA0004011097280000168
Cost value of one-to-one combination of row segment and column segment corresponding to real cross value
Figure BDA0004011097280000169
The upper value of which, depending on the length of the corresponding row segment and column segment, is +.>
Figure BDA00040110972800001610
The left-hand value of the value, according to the length of the corresponding row segment and column segment, there is a column-to-multi-row combination ending with column segment 15 due to the row segment 14 corresponding to the real intersection, and there are a total of two combinations (14,14,14,15), (14,14,13,15), i.e., n=2, therefore, the "r>
Figure BDA00040110972800001611
Figure BDA00040110972800001612
The corresponding values are brought in to a minimum value of-627 and the pair corresponding to the minimum value is combined (14,14,13,15), i.e. the row segment 14 corresponds to the column segment 13-15.
Therefore, the real cross value
Figure BDA00040110972800001613
The minimum value is the left value, so the parent node of the real crossing value points to the left side to the upper left, the parent node is the auxiliary crossing of the 14 th auxiliary row and the 13 th auxiliary column, and the value of the parent node is expressed as->
Figure BDA00040110972800001614
As can be seen from the above calculation process, the parent node of the auxiliary intersection point may be the auxiliary intersection point, or may be the real intersection point, and the parent nodes of the real intersection points are all auxiliary intersection points; there is no continuous pointing at the auxiliary crossing point, while there may be multiple levels of continuous pointing to the left or upper side of the real crossing point.
After the cost matrix is updated, the auxiliary crossing value of the lower right corner is the total cost value of all the fragments of the two curves after being optimally matched. Starting from the auxiliary intersection point at the lower right corner, sequentially searching parent nodes according to the pointing path until the auxiliary intersection point at the upper left corner of the cost matrix, and finding the segment matching relation of the first waveform curve and the second waveform curve according to the optimal matching route. The searching method of the optimal matching route comprises the following steps: starting from the auxiliary intersection at the lower right corner, its parent node is searched in turn according to its pointing path until the auxiliary intersection at the upper left corner of the matrix, as shown by the gray background path in fig. 9. If the parent node where there is a supplementary intersection in the optimal route is also a supplementary intersection, then the row segment or column segment skipped by the two supplementary intersections is not matched by any segment; if there are consecutive directions in the optimal route, this means that there is a one-to-many combination in the optimal match.
Fig. 10 is a flowchart of a matching method of waveform curves according to another exemplary embodiment of the present application. As shown in fig. 10, the matching method of the waveform curve includes the following steps:
step 801: and acquiring data of at least two continuous processing processes of the equipment to obtain at least two waveform curves.
Firstly, a waveform curve to be matched is obtained.
Step 802: and cutting the waveform curves to obtain waveform fragments of each waveform curve.
The waveform profile is split into a plurality of waveform segments in the manner described above.
Step 803: and carrying out matching calculation on the waveform curves of every two pairs.
Step 804: and calculating self cost values, time length values, single combined cost values and multiple combined cost values of the two groups of waveform fragments.
The self cost value, the duration value, the single combined cost value and the multiple combined cost values of the waveform fragments are obtained through calculation in the mode.
Step 805: and generating a cost matrix according to the two groups of waveform fragments, and initializing to 0.
Constructing a cost matrix according to two groups of waveform fragments which are required to be matched, and initializing the elements of the cost matrix to 0.
Step 806: the intersection value of the first auxiliary row and the first auxiliary column is initialized to 0.
Step 807: and updating each auxiliary crossing value and real crossing value from the upper left corner to the lower right corner of the cost matrix in turn.
And updating the auxiliary crossing value and the real crossing value from the upper left corner to the lower right corner of the cost matrix to obtain the auxiliary crossing value and the real crossing value of the cost matrix.
Step 808: and calculating to obtain the total cost value of the two groups of fragments after matching.
The total cost value after the two groups of fragments are matched is the auxiliary crossing value of the last row of auxiliary rows and the last column of auxiliary columns at the right lower corner of the cost matrix.
Step 809: and generating a corresponding expansion father node matrix according to the two groups of waveform fragments, and initializing the expansion father node matrix into a null array.
Step 810: each auxiliary crossing value and real crossing value is calculated from the left side value, the upper left side value and the upper side value.
The parent node of each auxiliary crossing value and real crossing value is calculated in the manner described above.
Step 811: the parent node is searched from the bottom right corner of the parent node matrix until the auxiliary intersection of the first auxiliary row and the first auxiliary column in the top left corner.
I.e. searching for the best matching path from the lower right corner to the upper left corner.
Step 812: and obtaining a matching relationship between the two groups of waveform fragments according to the searching path of the father node.
And determining the matching relation of the two groups of waveform fragments according to the optimal matching path.
Step 813: and calculating the matching similarity of the two waveform curves according to the matching relation.
As shown in fig. 11, a schematic diagram of a matching result is shown in fig. 11, and the matching result shown in fig. 11 is obtained by using the matching method of the above embodiment, and it can be seen from the figure that there is a single waveform segment matching a plurality of continuous waveform segments, such as the 10 th segment and the 11 th segment of the first waveform curve in fig. 11 match the 11 th segment of the second waveform curve, and the 8 th segment of the second waveform curve does not participate in the matching.
Fig. 12 is a schematic structural diagram of a waveform curve matching device according to an exemplary embodiment of the present application. The waveform profile matching device is used for matching the first waveform profile and the second waveform profile, as shown in fig. 12, and the waveform profile matching device 90 includes: a first dividing module 91, configured to divide the first waveform curve into a plurality of first waveform segments; a second slicing module 92, configured to slice the second waveform curve into a plurality of second waveform segments; and a matching calculation module 93, configured to calculate matching degrees between the plurality of first waveform segments and the plurality of second waveform segments, so as to obtain matching degrees of the first waveform curve and the second waveform curve.
According to the waveform curve matching device, the first waveform curve is segmented into a plurality of first waveform segments through the first segmentation module 91; the second slicing module 92 slices the second waveform profile into a plurality of second waveform segments; and the matching calculation module 93 calculates matching degrees between the plurality of first waveform segments and the plurality of second waveform segments to obtain matching degrees of the first waveform curve and the second waveform curve; namely, the first waveform curve and the second waveform curve are both divided into waveform segments, and then each waveform segment is subjected to comparison so as to eliminate the matching of redundant waveform segments and missing segments, so that an accurate matching result can be found out, the matching accuracy is improved, and the accuracy of calculating the similarity of the first waveform curve and the second waveform curve is improved.
Fig. 13 is a schematic structural view of a waveform profile matching device according to another exemplary embodiment of the present application. As shown in fig. 13, the matching calculation module 93 may include: a first calculating unit 931 for calculating a first self-cost value of each first waveform segment, wherein the first self-cost value characterizes waveform characteristic values of the first waveform segment; a second calculating unit 932, configured to calculate a second self-cost value of each second waveform segment, where the second self-cost value characterizes a waveform feature value of the second waveform segment; the third calculating unit 933 is configured to calculate matching degrees between the plurality of first waveform segments and the plurality of second waveform segments according to the plurality of first self-cost values and the plurality of second self-cost values.
In an embodiment, the third computing unit 933 may be further configured to: calculating a single combined cost value between a single first waveform segment and a single second waveform segment according to the plurality of first self cost values and the plurality of second self cost values; calculating a single first waveform segment and a plurality of continuous second waveform segments, or a plurality of combined cost values between the single second waveform segment and the plurality of continuous first waveform segments, according to the plurality of first self cost values and the plurality of second self cost values; and calculating the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments according to the single combined cost value and the multi-combined cost value.
In an embodiment, the first computing unit 931 may be further configured to: calculating the sum of cost values of all the first self-cost values and all the second self-cost values; calculating the sum of the time lengths of all the first waveform segments and all the second waveform segments; obtaining at least one sub-segment corresponding to a segment with shorter duration in the single first waveform segment and the single second waveform segment according to the segment with longer duration in the single first waveform segment and the single second waveform segment, wherein the duration of the sub-segment is equal to the duration of the segment with shorter duration; calculating the sum of the differences between each sub-segment and the segment with shorter duration; selecting the sub-segment with the smallest sum of the differences as an optimal sub-segment; calculating the similarity between the optimal sub-segment and the segment with shorter duration; calculating to obtain a single combined cost value between a single first waveform segment and a single second waveform segment according to the sum of the cost values, the sum of the time durations and the similarity corresponding to the segments with shorter time durations; and calculating to obtain the single combined cost value between the single first waveform segment and the single second waveform segment according to the sum of the cost values, the sum of the time durations and the similarity corresponding to the segments with shorter time durations.
In an embodiment, the first computing unit 931 may be further configured to: calculating the minimum value and the maximum value of the optimal sub-segment and the segment with shorter duration at a plurality of moments, calculating the sum of a plurality of minimum values and the sum of a plurality of maximum values to obtain the sum of the minimum values and the sum of the maximum values, and calculating the similarity between the optimal sub-segment and the segment with shorter duration according to the sum of the minimum values and the sum of the maximum values; wherein the similarity is positively correlated with the minimum sum and inversely correlated with the maximum sum.
In an embodiment, the second computing unit 932 may be further configured to: calculating the sum of cost values of all the first self-cost values and all the second self-cost values; calculating the sum of the time lengths of all the first waveform segments and all the second waveform segments; obtaining at least one sub-segment corresponding to a segment with a shorter duration in the single first waveform segment and the plurality of continuous second waveform segments according to the segment with the longer duration in the single first waveform segment and the plurality of continuous second waveform segments, or obtaining at least one sub-segment corresponding to a segment with a shorter duration in the single second waveform segment and the plurality of continuous first waveform segments according to the segment with the longer duration in the single second waveform segment and the plurality of continuous first waveform segments, wherein the duration of the sub-segment is equal to the duration of the segment with the shorter duration; calculating the sum of the differences between each sub-segment and the segment with shorter duration; selecting the sub-segment with the smallest sum of the differences as an optimal sub-segment; calculating the similarity between the optimal sub-segment and the segment with shorter duration; calculating to obtain a single combined cost value between a single first waveform segment and a single second waveform segment according to the sum of the cost values, the sum of the time durations and the similarity corresponding to the segments with shorter time durations; and calculating to obtain multiple combined cost values between a single first waveform segment and a plurality of continuous second waveform segments or between a single second waveform segment and a plurality of continuous first waveform segments according to the sum of the cost values, the sum of the time lengths and the similarity corresponding to the segments with shorter time lengths.
In an embodiment, the second computing unit 932 may be further configured to: calculating the minimum value and the maximum value of the optimal sub-segment and the segment with shorter duration at a plurality of moments, calculating the sum of a plurality of minimum values and the sum of a plurality of maximum values to obtain the sum of the minimum values and the sum of the maximum values, and calculating the similarity between the optimal sub-segment and the segment with shorter duration according to the sum of the minimum values and the sum of the maximum values; wherein the similarity is positively correlated with the minimum sum and inversely correlated with the maximum sum.
In an embodiment, the third computing unit 933 may be further configured to: constructing a cost matrix by taking a plurality of first waveform fragments and a plurality of second waveform fragments as rows and columns respectively; and calculating the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments according to the cost matrix.
In an embodiment, the third computing unit 933 may be further configured to: searching an optimal path with the minimum sum of the cost values from the lower right corner element to the upper left corner element of the cost matrix to obtain a matching mode between a plurality of first waveform fragments and a plurality of second waveform fragments, and calculating the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments according to the matching mode.
In an embodiment, the third computing unit 933 may be further configured to: starting from the lower right corner element, determining the trend of the optimal path according to the numerical source of the current element; the trend of the optimal path is consistent with the numerical source of the current element, namely the trend of the optimal path is consistent with the father node point of the current intersection point.
Next, an electronic apparatus according to an embodiment of the present application is described with reference to fig. 14. The electronic device may be either or both of the first device and the second device, or a stand-alone device independent thereof, which may communicate with the first device and the second device to receive the acquired input signals therefrom.
Fig. 14 illustrates a block diagram of an electronic device according to an embodiment of the present application.
As shown in fig. 14, the electronic device 10 includes one or more processors 11 and a memory 12.
The processor 11 may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.
Memory 12 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that can be executed by the processor 11 to implement the methods of the various embodiments of the present application described above and/or other desired functions. Various contents such as an input signal, a signal component, a noise component, and the like may also be stored in the computer-readable storage medium.
In one example, the electronic device 10 may further include: an input device 13 and an output device 14, which are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
When the electronic device is a stand-alone device, the input means 13 may be a communication network connector for receiving the acquired input signals from the first device and the second device.
In addition, the input device 13 may also include, for example, a keyboard, a mouse, and the like.
The output device 14 may output various information to the outside, including the determined distance information, direction information, and the like. The output means 14 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, etc.
Of course, only some of the components of the electronic device 10 relevant to the present application are shown in fig. 14 for simplicity, components such as buses, input/output interfaces, etc. being omitted. In addition, the electronic device 10 may include any other suitable components depending on the particular application.
The computer program product may write program code for performing the operations of embodiments of the present application in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the application to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (10)

1. A method for matching waveform curves, for matching a first waveform curve and a second waveform curve, the method comprising:
Splitting the first waveform curve into a plurality of first waveform segments;
splitting the second waveform curve into a plurality of second waveform segments; and
and calculating the matching degree between the plurality of first waveform segments and the plurality of second waveform segments to obtain the matching degree of the first waveform curve and the second waveform curve.
2. The method of matching waveform profiles according to claim 1, wherein the calculating the degree of matching between the plurality of first waveform segments and the plurality of second waveform segments comprises:
calculating a first self-cost value of each first waveform segment; wherein the first self cost value characterizes a waveform characteristic value of the first waveform segment;
calculating a second self-cost value of each second waveform segment; wherein the second self-cost value characterizes a waveform characteristic value of the second waveform segment; and
and calculating the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments according to the plurality of first self-cost values and the plurality of second self-cost values.
3. The method of matching waveform curves according to claim 2, wherein calculating the degree of matching between the plurality of first waveform segments and the plurality of second waveform segments from the plurality of first self-cost values and the plurality of second self-cost values comprises:
Calculating a single combined cost value between a single first waveform segment and a single second waveform segment according to the plurality of first self cost values and the plurality of second self cost values;
calculating a plurality of combined cost values between a single first waveform segment and a plurality of continuous second waveform segments or between a single second waveform segment and a plurality of continuous first waveform segments according to a plurality of first self cost values and a plurality of second self cost values; and
and calculating the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments according to the single combined cost value and the multi-combined cost value.
4. The method of matching waveform curves according to claim 3, wherein calculating a single combined cost value between a single one of the first waveform segments and a single one of the second waveform segments based on the plurality of first self-cost values and the plurality of second self-cost values comprises:
calculating the sum of cost values of all the first self-cost values and all the second self-cost values;
calculating the sum of the duration of all the first waveform segments and all the second waveform segments;
Obtaining at least one sub-segment corresponding to a segment with shorter duration in the single first waveform segment and the single second waveform segment according to a segment with longer duration in the single first waveform segment and the single second waveform segment; the time length of the sub-segment is equal to that of the segment with shorter time length;
calculating the sum of the differences between each sub-segment and the segment with shorter duration;
selecting the sub-segment with the smallest difference sum as an optimal sub-segment;
calculating the similarity between the optimal sub-segment and the segment with shorter duration; and
and calculating to obtain the single combined cost value between the single first waveform segment and the single second waveform segment according to the cost value sum, the duration corresponding to the segment with shorter duration and the similarity.
5. The method of matching waveform curves according to claim 4, wherein the calculating the similarity between the optimal sub-segment and the segment having the shorter duration comprises:
calculating the minimum value and the maximum value of a plurality of moments in the optimal sub-segment and the segment with shorter duration;
Calculating the sum of a plurality of the minimum values and the sum of a plurality of the maximum values to obtain a minimum value sum and a maximum value sum; and
calculating the similarity between the optimal sub-segment and the segment with shorter duration according to the minimum sum and the maximum sum; wherein the similarity is positively correlated with the minimum sum and inversely correlated with the maximum sum.
6. The method of matching waveform curves according to claim 3, wherein calculating a single first waveform segment and a plurality of consecutive second waveform segments, or a multi-combination cost value between a single second waveform segment and a plurality of consecutive first waveform segments, from a plurality of the first self cost values and a plurality of the second self cost values comprises:
calculating the sum of cost values of all the first self-cost values and all the second self-cost values;
calculating the sum of the duration of all the first waveform segments and all the second waveform segments;
obtaining at least one sub-segment corresponding to a segment with a shorter duration in the single first waveform segment and the plurality of continuous second waveform segments according to a segment with a longer duration in the single first waveform segment and the plurality of continuous second waveform segments, or obtaining at least one sub-segment corresponding to a segment with a shorter duration in the single second waveform segment and the plurality of continuous first waveform segments according to a segment with a longer duration in the single second waveform segment and the plurality of continuous first waveform segments; the time length of the sub-segment is equal to that of the segment with shorter time length;
Calculating the sum of the differences between each sub-segment and the segment with shorter duration;
selecting the sub-segment with the smallest difference sum as an optimal sub-segment;
calculating the similarity between the optimal sub-segment and the segment with shorter duration; and
and calculating to obtain the multi-combination cost value between the single first waveform segment and the plurality of continuous second waveform segments or between the single second waveform segment and the plurality of continuous first waveform segments according to the cost value sum, the duration corresponding to the segments with shorter duration and the similarity.
7. The method of matching waveform curves according to claim 3, wherein calculating the degree of matching between the plurality of first waveform segments and the plurality of second waveform segments from the single combined cost value and the multiple combined cost values comprises:
constructing a cost matrix by taking a plurality of first waveform fragments and a plurality of second waveform fragments as rows and columns respectively; an auxiliary row is arranged between the adjacent first waveform segments, an auxiliary column is arranged between the adjacent second waveform segments, the values corresponding to the first waveform segments and the second waveform segments in the cost matrix are real cross values, the values corresponding to the auxiliary row and the auxiliary column are auxiliary cross values, the real cross values are minimum values in left side values, upper left side values and upper side values of the real cross values, and the auxiliary cross values are minimum values in left side values, upper left side values and upper side values of the auxiliary cross values; and
And calculating the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments according to the cost matrix.
8. The method of matching waveform curves according to claim 7, wherein calculating the degree of matching between the plurality of first waveform segments and the plurality of second waveform segments according to the cost matrix comprises:
taking the lower right corner element of the cost matrix as the sum of the matched cost values between the plurality of first waveform fragments and the plurality of second waveform fragments; and
and searching an optimal path from a lower right corner element to an upper left corner element of the cost matrix to obtain a matching mode between the plurality of first waveform fragments and the plurality of second waveform fragments.
9. The method of matching a waveform profile according to claim 8, wherein said finding an optimal path from a lower right corner element to an upper left corner element of said cost matrix comprises:
starting from the lower right corner element, determining the trend of the optimal path according to the numerical source of the current element; wherein the trend of the optimal path is consistent with the numerical source of the current element.
10. A waveform profile matching apparatus for matching a first waveform profile and a second waveform profile, comprising:
The first segmentation module is used for segmenting the first waveform curve into a plurality of first waveform segments;
the second segmentation module is used for segmenting the second waveform curve into a plurality of second waveform segments; and
and the matching calculation module is used for calculating the matching degree between the plurality of first waveform fragments and the plurality of second waveform fragments so as to obtain the matching degree of the first waveform curve and the second waveform curve.
CN202211652072.5A 2022-12-21 2022-12-21 Waveform curve matching method and device Pending CN116304550A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211652072.5A CN116304550A (en) 2022-12-21 2022-12-21 Waveform curve matching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211652072.5A CN116304550A (en) 2022-12-21 2022-12-21 Waveform curve matching method and device

Publications (1)

Publication Number Publication Date
CN116304550A true CN116304550A (en) 2023-06-23

Family

ID=86836591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211652072.5A Pending CN116304550A (en) 2022-12-21 2022-12-21 Waveform curve matching method and device

Country Status (1)

Country Link
CN (1) CN116304550A (en)

Similar Documents

Publication Publication Date Title
US11810648B2 (en) Systems and methods for adaptive local alignment for graph genomes
WO2015081754A1 (en) Genome compression and decompression
CN105893338B (en) Method and device for inputting formula and electronic equipment
WO2017214595A1 (en) Systems and methods for performing three-dimensional semantic parsing of indoor spaces
US20030187836A1 (en) Information search apparatus and method, and storage medium
CN105701120A (en) Method and apparatus for determining semantic matching degree
JPH0728949A (en) Equipment and method for handwriting recognition
CN111340054A (en) Data labeling method and device and data processing equipment
CN114782970B (en) Table extraction method, system and readable medium
US8788522B2 (en) Pair character string retrieval system
EP3633551A1 (en) Obstacle distribution simulation method, device and terminal based on a probability graph
CN114236552A (en) Repositioning method and system based on laser radar
JP2019032704A (en) Table data structuring system and table data structuring method
CN115146875A (en) Historical data based process parameter recommendation method, device, system and medium
EP3985637A2 (en) Method and apparatus for outputting vehicle flow direction, roadside device, and cloud control platform
CN113971728A (en) Image recognition method, model training method, device, equipment and medium
CN116304550A (en) Waveform curve matching method and device
US7805667B2 (en) System and method for identifying target node graphs from predetermined seed node subsets
CN113239149B (en) Entity processing method, device, electronic equipment and storage medium
CN111435537B (en) Model training method and device and pose optimization method and device based on mosaic
JP4883719B2 (en) Similar image retrieval method and apparatus
CN110334430B (en) Automatic labeling method, system, equipment and storage medium for cable bracket in drawing
JP6326940B2 (en) Method and apparatus for evaluating phrases in intermediate language, and machine translation method and apparatus
CN110309139B (en) High-dimensional neighbor pair searching method and system
KR101767625B1 (en) Apparatus and Method for Searching Minimum Segmentation of Japanese Sentence based on Dynamic programming

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