CN109508594B - Method and device for extracting graphic features - Google Patents

Method and device for extracting graphic features Download PDF

Info

Publication number
CN109508594B
CN109508594B CN201710840719.XA CN201710840719A CN109508594B CN 109508594 B CN109508594 B CN 109508594B CN 201710840719 A CN201710840719 A CN 201710840719A CN 109508594 B CN109508594 B CN 109508594B
Authority
CN
China
Prior art keywords
data
value
graph
amplitude
analyzed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710840719.XA
Other languages
Chinese (zh)
Other versions
CN109508594A (en
Inventor
芦志伟
侯军伟
谢斌
潘勇
王艳
胡承军
段胜男
王宁博
陈治军
努尔买买提
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Petrochina Co Ltd
Original Assignee
Petrochina 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 Petrochina Co Ltd filed Critical Petrochina Co Ltd
Priority to CN201710840719.XA priority Critical patent/CN109508594B/en
Publication of CN109508594A publication Critical patent/CN109508594A/en
Application granted granted Critical
Publication of CN109508594B publication Critical patent/CN109508594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction
    • G06F2218/10Feature extraction by analysing the shape of a waveform, e.g. extracting parameters relating to peaks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching
    • G06F2218/14Classification; Matching by matching peak patterns

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Generation (AREA)
  • Complex Calculations (AREA)

Abstract

The invention discloses a method and a device for extracting graphic features. Wherein, the method comprises the following steps: acquiring data information of a graph to be analyzed to obtain a plurality of data points and a data amplitude corresponding to each data point; determining a plurality of target extreme values and graphic characteristic values of the graph to be analyzed according to the data points and the data amplitude values; judging whether each curve section of the graph to be analyzed is a gentle curve section or not according to the graph characteristic value and the data points; when the curve section of the graph to be analyzed is judged to be a non-gentle curve section, extracting a plurality of characteristic points in the non-gentle curve section, and outputting a plurality of characteristic points of the non-gentle curve section; and when the curve section of the graph to be analyzed is judged to be the gentle curve section, extracting boundary points in the gentle curve section, and outputting the boundary points of the gentle curve section. The invention solves the technical problem of lower efficiency when a plurality of test patterns are analyzed in the related art.

Description

Method and device for extracting graphic features
Technical Field
The invention relates to the technical field of data processing, in particular to a method and a device for extracting graph features.
Background
In the related art, for an oil well test or a deep sea test, instruments such as an optical fiber are often used to test signals such as temperature, pressure, etc. of the ground or the sea bottom, wherein, during the oil well test, distributed tests are required for the temperature signal, the pressure signal, the vibration signal, etc. of the ground, in the related art, these signals such as temperature, distance, time, pressure, temperature, time, etc. may form a plurality of test signal patterns, and the data of each test signal pattern includes a plurality of test points and signal parameters where the test points are located. Currently, when analyzing the values of the test signals, the salient features (e.g., the maximum peaks) are generally analyzed manually, but as the test data is increased, the test signal pattern is enlarged, and the efficiency of analyzing the data manually is not suitable for analyzing the test signal data.
With the increase of the test requirements, useful information in data obtained by testing through an instrument needs to be known in time, and the graph is difficult and fuzzy to analyze manually at present, so that the data analysis efficiency is low, and effective data of a test signal cannot be effectively obtained.
In view of the above-mentioned technical problem of low efficiency in analyzing a plurality of test signals in the related art, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for extracting graph features, which at least solve the technical problem of low efficiency when a plurality of test graphs are analyzed in the related art.
According to an aspect of an embodiment of the present invention, there is provided a method for extracting a graphic feature, including: acquiring data information of a graph to be analyzed to obtain a plurality of data points and a data amplitude corresponding to each data point, wherein the graph to be analyzed comprises a plurality of curve segments; determining a plurality of target extreme values and graph characteristic values of the graph to be analyzed according to the data points and the data amplitude values, wherein the graph characteristic value is an average value of the number of the data points corresponding to the target extreme values of the graph to be analyzed; judging whether each curve section of the graph to be analyzed is a gentle curve section or not according to the graph characteristic value and the data points, wherein the gentle curve section is a curve section which is lower than the target data amplitude value in the graph to be analyzed; when the curve section of the graph to be analyzed is judged to be a non-gentle curve section, extracting a plurality of characteristic points in the non-gentle curve section, and outputting the plurality of characteristic points of the non-gentle curve section, wherein the characteristic points at least comprise one of the following characteristics: the maximum target extreme value of the graph to be analyzed, a plurality of target extreme values of the graph to be analyzed and boundary points corresponding to the target extreme values; and when the curve section of the graph to be analyzed is judged to be a gentle curve section, extracting boundary points in the gentle curve section, and outputting the boundary points of the gentle curve section.
Further, when it is determined that the curve segment of the graph to be analyzed is a non-gentle curve segment, extracting a plurality of feature points in the non-gentle curve segment includes: determining the maximum amplitude value in the non-gentle curve section through a first calculation formula; determining a first data value and a second data value by the graph characteristic value and a first adjustment coefficient, wherein the first adjustment coefficient is used for adjusting the graph characteristic value, the second data value is a multiple of the first data value, the first data value corresponds to a first data point in the non-flat curve segment, and the second data value corresponds to a second data point in the non-flat curve segment; comparing front and back amplitude values according to the maximum amplitude value in the non-gentle curve section to determine a first total amplitude value and a second total amplitude value, wherein the first total amplitude value is the sum of data amplitude values corresponding to a plurality of data points between the first data point and the data point after the data point corresponding to the maximum amplitude value in the non-gentle curve section, and the second total amplitude value is the sum of data amplitude values corresponding to a plurality of data points between the first data point and the second data point in the non-gentle curve section; judging whether the first total amplitude is lower than the second total amplitude or not; if the first total amplitude is lower than the second total amplitude, determining a data amplitude corresponding to each data point between the first data point and the second data point; determining the minimum data amplitude value in the data amplitude values corresponding to each data point between the first data point and the second data point; and taking the data point corresponding to the minimum data amplitude as the boundary point of the maximum amplitude in the non-gentle curve section.
Further, before the data point corresponding to the minimum data amplitude is taken as the boundary point in the non-gentle curve segment, the method includes: and if the second data point is judged to be the data point in the gentle curve segment, taking the second data point as the boundary point of the maximum amplitude value in the non-gentle curve segment.
Further, determining a plurality of target extrema and pattern property values of the pattern to be analyzed according to the data points and the data amplitudes comprises: determining a data difference value of each data point of the graph to be analyzed through a second calculation formula; judging whether the positive and negative signs corresponding to the two adjacent data difference values are the same; if the positive and negative signs corresponding to the two adjacent data difference values are judged to be different, determining that the data amplitude corresponding to the data point in the middle of the plurality of data points corresponding to the two adjacent data difference values is the target extreme value of the graph to be analyzed; counting the number of target extreme values of the graph to be analyzed; and determining the graph characteristic value of the graph to be analyzed according to the number of the target extreme values of the graph to be analyzed and the total number of the data points of the graph to be analyzed.
Further, determining whether each curve segment of the graph to be analyzed is a gentle curve segment according to the graph characteristic value and the plurality of data points comprises: calculating the absolute value of the difference value of the data amplitude corresponding to each two adjacent data points to obtain a plurality of amplitude absolute values; accumulating a plurality of amplitude absolute values to obtain a total amplitude absolute value; determining a flat coefficient according to the absolute value of the total amplitude and the total number of data points of the graph to be analyzed; determining a third data value according to the graph characteristic value and a second adjusting coefficient, wherein the second adjusting coefficient is used for adjusting the graph characteristic value, and the third data value corresponds to a third data point in the non-gentle curve section; counting a third total amplitude of data amplitudes corresponding to a plurality of data points before the third data point, wherein the third total amplitude is the sum of the data amplitudes corresponding to the plurality of data points before the third data point; determining a fourth data value according to the third total amplitude value and the third data value; judging whether the absolute value of the difference value between the data amplitude corresponding to the data points before each third data point and the fourth data value exceeds the flat coefficient or not; and if the absolute value of the difference value between the data amplitude corresponding to the data point and the fourth data value exceeds the gentle coefficient, determining that the curve section behind the data point corresponding to the data amplitude is a non-gentle curve section.
According to another aspect of the embodiments of the present invention, there is also provided a graphic feature extraction device including: the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring data information of a graph to be analyzed to obtain a plurality of data points and data amplitude values corresponding to each data point, and the graph to be analyzed comprises a plurality of curve segments; the determining unit is used for determining a plurality of target extreme values and graph characteristic values of the graph to be analyzed according to the data points and the data amplitude values, wherein the graph characteristic values are average values of the number of the data points corresponding to the target extreme values of the graph to be analyzed; the judging unit is used for judging whether each curve section of the graph to be analyzed is a gentle curve section according to the graph characteristic value and the data points, wherein the gentle curve section is a curve section which is lower than the target data amplitude value in the graph to be analyzed; the first extraction unit is used for extracting a plurality of characteristic points in the non-gentle curve section and outputting the plurality of characteristic points of the non-gentle curve section when the curve section of the graph to be analyzed is judged to be the non-gentle curve section, wherein the characteristic points at least comprise one of the following characteristics: the maximum target extreme value of the graph to be analyzed, a plurality of target extreme values of the graph to be analyzed and boundary points corresponding to the target extreme values; and the second extraction unit is used for extracting boundary points in the gentle curve section and outputting the boundary points of the gentle curve section when the curve section of the graph to be analyzed is judged to be the gentle curve section.
Further, the first extraction unit includes: the first determining module is used for determining the maximum amplitude value in the non-gentle curve section through a first calculation formula; a second determining module, configured to determine a first data value and a second data value through the graph characteristic value and a first adjustment coefficient, where the first adjustment coefficient is used to adjust the graph characteristic value, the second data value is a multiple of the first data value, the first data value corresponds to a first data point in the non-flat curve segment, and the second data value corresponds to a second data point in the non-flat curve segment; a third determining module, configured to perform front-to-back amplitude comparison according to a maximum amplitude in the non-gentle curve segment, and determine a first total amplitude and a second total amplitude, where the first total amplitude is a sum of data amplitudes corresponding to a plurality of data points between a data point corresponding to the maximum amplitude in the non-gentle curve segment and the first data point, and the second total amplitude is a sum of data amplitudes corresponding to a plurality of data points between the first data point and the second data point in the non-gentle curve segment; the first judging module is used for judging whether the first total amplitude is lower than the second total amplitude or not; a fourth determining module, configured to determine a data amplitude corresponding to each data point between the first data point and the second data point if it is determined that the first total amplitude is lower than the second total amplitude; a fifth determining module, configured to determine a minimum data amplitude value among data amplitude values corresponding to each data point between the first data point and the second data point; and the sixth determining module is used for taking the data point corresponding to the minimum data amplitude as the boundary point of the maximum amplitude in the non-gentle curve section.
Further, the apparatus further comprises: and a seventh determining module, configured to, before taking the data point corresponding to the minimum data amplitude as the boundary point in the non-gentle curve segment, if it is determined that the second data point is the data point in the gentle curve segment, take the second data point as the boundary point of the maximum amplitude in the non-gentle curve segment.
Further, the determining unit includes: an eighth determining module, configured to determine, according to a second calculation formula, a data difference value of each data point of the graph to be analyzed; the second judgment module is used for judging whether the positive and negative symbols corresponding to the two adjacent data difference values are the same; a ninth determining module, configured to determine, if it is determined that the positive and negative signs corresponding to the two adjacent data difference values are different, that a data amplitude corresponding to a data point in a middle of the multiple data points corresponding to the two adjacent data difference values is a target extreme value of the graph to be analyzed; the first statistic module is used for counting the number of target extreme values of the graph to be analyzed; and the tenth determining module is used for determining the graph characteristic value of the graph to be analyzed according to the number of the target extreme values of the graph to be analyzed and the total number of the data points of the graph to be analyzed.
Further, the determination unit includes: the calculation module is used for calculating the absolute value of the difference value of the data amplitude corresponding to each two adjacent data points to obtain a plurality of amplitude absolute values; the accumulation module is used for accumulating a plurality of amplitude absolute values to obtain a total amplitude absolute value; an eleventh determining module, configured to determine a flat coefficient according to the total absolute value of the amplitude and the total number of data points of the graph to be analyzed; a twelfth determining module, configured to determine a third data value according to the graph characteristic value and a second adjustment coefficient, where the second adjustment coefficient is used to adjust the graph characteristic value, and the third data value corresponds to a third data point in the non-gentle curve segment; a second statistical module, configured to count a third total amplitude of data amplitudes corresponding to a plurality of data points before the third data point, where the third total amplitude is a sum of the data amplitudes corresponding to the plurality of data points before the third data point; a thirteenth determining module, configured to determine a fourth data value according to the third total amplitude value and the third data value; a third judging module, configured to judge whether an absolute value of a difference between a data amplitude corresponding to a plurality of data points before each third data point and the fourth data value exceeds the flat coefficient; and a fourteenth determining module, configured to determine, if it is determined that the absolute value of the difference between the data amplitude corresponding to the data point and the fourth data value exceeds the flat coefficient, that the curve segment following the data point corresponding to the data amplitude is a non-flat curve segment.
In the embodiment of the invention, the data information of the graph to be analyzed can be obtained to obtain a plurality of data points and data amplitude values, so that a target extreme value and a graph characteristic value are determined according to the data points and the data amplitude values, then whether each curve segment in the graph to be analyzed is a gentle curve segment is judged by using the target extreme value and the graph characteristic value, a plurality of characteristic points are extracted and output when the curve segment of the graph to be analyzed is determined to be a non-gentle curve segment, and the boundary point of the gentle curve segment is extracted and the boundary point of the gentle curve segment is output when the curve segment of the graph to be analyzed is determined to be a gentle curve segment. By utilizing the embodiment of the application, the graph formed by the test signal is analyzed, the data points required by a user can be obtained by performing feature extraction on a plurality of data points in the analysis graph, and each feature point or boundary point of the graph to be analyzed is output, so that the user can know the outstanding data points of the graph to be analyzed, the analysis efficiency of the test signal is improved, the technical problem of lower efficiency when a plurality of test graphs are analyzed in the related art is solved, and the effect of effectively extracting the feature points of the data graph is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a graphical feature extraction method according to an embodiment of the invention;
FIG. 2 is a first schematic diagram of an alternative graph to be analyzed in an embodiment in accordance with the invention;
FIG. 3 is a second schematic diagram of an alternative graph to be analyzed in an embodiment in accordance with the invention;
FIG. 4 is a first diagram illustrating the process of a graph feature extraction method according to an embodiment of the present invention;
FIG. 5 is a second diagram illustrating the process of a graphical feature extraction method according to an embodiment of the present invention;
FIG. 6 is a third schematic diagram during a graphical feature extraction method according to an embodiment of the present invention;
FIG. 7 is a fourth schematic diagram during a graphical feature extraction method according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a graphic feature extraction apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For better explaining the present invention, some terms or nouns appearing in the embodiments of the present invention are explained below:
the bubbling method is compared from one end, the first cycle is to put the maximum number to the last position, and the second cycle is to put the second maximum number to the second last position. The whole process is like boiling water, the smaller value is like bubbles in water and the bubbles rise upwards one by one, and each time, the largest stone sinks to the water bottom. The data are sorted by circulating in this way. The basic concept is as follows: two adjacent numbers are compared in sequence, with the decimal place at the front and the decimal place at the back. That is, the 1 st and 2 nd numbers are compared, and the decimal place is enlarged before the decimal place and the decimal place is enlarged after the decimal place. And then comparing the 2 nd number with the 3 rd number, before the decimal number is amplified, after the decimal number is amplified, and the process is continued until the last two numbers are compared, before the decimal number is amplified, and after the decimal number is amplified. Repeating the above process, and still starting comparison from the first number (because the 1 st number is no longer less than the 2 nd number due to the exchange of the 2 nd number and the 3 rd number), before the decimal place, after the decimal place is enlarged, comparing until a pair of adjacent numbers before the maximum number, before the decimal place, after the decimal place is enlarged, finishing the second pass, and obtaining a new maximum number in the last but one number. And so on until the sorting is finally completed. Since the decimal place is always put forward and the great place is put backward in the sorting process, the bubble is equivalent to rising.
The peak refers to the maximum value of the amplitude of the wave in a wavelength range, and taking transverse wave as an example, the highest point of the protrusion is the peak, and the lowest point of the depression is the trough.
The trough is a minimum value of the transverse wave in the direction perpendicular to the propagation direction, and a maximum value of the transverse wave is called a peak. Since minima and maxima depend only on the coordinate direction orthogonal to the propagation direction, the two are called extrema in combination. Also low tide of periodic things.
In accordance with an embodiment of the present invention, there is provided a method embodiment of graphical feature extraction, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than here.
Fig. 1 is a flowchart of a graphic feature extraction method according to an embodiment of the present invention, as shown in fig. 1, the method including the steps of:
step S102, obtaining data information of a graph to be analyzed, and obtaining a plurality of data points and a data amplitude corresponding to each data point, wherein the graph to be analyzed comprises a plurality of curve segments.
Optionally, the embodiment of the invention can be applied to various testing environments, and the testing environment is not limited in the application, for example, oil well testing and deep sea testing. Wherein after detecting the signal by the detection instrument, a plurality of data patterns are formed, wherein the detection instrument may include at least one of: the data graph is not limited in the application, and the data graph may include at least one of the following: the distance-temperature data graph, the time-pressure data graph, the time-temperature data graph and the like, wherein each data graph is provided with a horizontal axis scale and a vertical axis scale, the horizontal axis scale corresponds to a plurality of data points, the vertical axis scale corresponds to a data amplitude, and each data point can correspond to a data amplitude.
For the above embodiment, when the detection signal is obtained by the detection instrument, a pattern to be analyzed corresponding to the data pattern is continuously formed. In the embodiment of the invention, after the detected data pattern is obtained, the data pattern needs to be analyzed to obtain useful data points and data amplitudes in the pattern, and the data points and the data amplitudes are used in production and life. The graph to be analyzed can be a distributed test graph, the number of data points in the graph to be analyzed is continuously increased along with the increase of the test duration, and at this time, according to the embodiment of the application, the feature points in the graph to be analyzed can be extracted, so that the test environment can be determined according to the feature points. Wherein, the characteristic points may include at least one of the following: a plurality of wave crests, wave troughs, gentle curve sections, non-gentle curve sections and the like can be obtained through extracting feature points in the application, a curve feature list is obtained, the curve feature list is output, and a user can visually know various data of a test environment through the curve feature list.
Optionally, a plurality of data points in the graph to be analyzed may form a plurality of curve segments, each curve may include a plurality of curve segments of peaks or valleys, and boundary points of each peak or valley may not be consistent.
Step S104, determining a plurality of target extreme values and graph characteristic values of the graph to be analyzed according to the data points and the data amplitude values, wherein the graph characteristic values are average values of the number of the data points corresponding to the target extreme values of the graph to be analyzed.
Optionally, the target extreme value may be a peak value or a valley value, the pattern to be analyzed may include a plurality of peaks, each peak has a peak, the data amplitude corresponding to the peak is determined as the target extreme value (i.e., peak-to-peak value) of the peak, similarly, the pattern to be analyzed may also include a plurality of valleys, each valley has a lowest point, and the data amplitude corresponding to the lowest point is determined as the target extreme value (i.e., valley-to-valley value) of the valley. After obtaining a plurality of peaks or troughs, the number of peaks and the number of troughs can be counted.
The peak can be taken as an example, the peak characteristic value of the graph to be analyzed is determined by extracting the characteristic points of the peak, and when the characteristic points of the trough are determined, the characteristic points of the trough can be obtained by utilizing a mode corresponding to the extraction mode of the peak characteristic points.
The pattern characteristic value may be determined by combining the number of data points of the pattern to be analyzed after determining the number of the target extreme values, and the pattern characteristic value may be an average value of the data points included in the calculated target extreme values, for example, when the pattern a to be analyzed includes 30 data points, and has 3 peaks and 2 troughs, it may be determined that the pattern characteristic value is 6.
And S106, judging whether each curve section of the graph to be analyzed is a gentle curve section or not according to the graph characteristic value and the data points, wherein the gentle curve section is a curve section which is lower than the target data amplitude value in the graph to be analyzed.
Through the steps, whether each curve segment of the graph to be analyzed is a gentle curve segment or a non-gentle curve segment can be determined, and the non-gentle curve segment can be determined that the target extreme value exceeds the target data amplitude value in the curve segment in the graph to be analyzed. Optionally, the target data amplitude may be set by a user according to a characteristic of the curve, and a specific value of the target data amplitude is not limited, for example, in the temperature-distance data graph, the target data amplitude may be set to 50 degrees celsius, that is, as the detection distance increases, a curve segment exceeding 50 degrees celsius may be determined as a non-flat curve segment.
Step S108, when the curve section of the graph to be analyzed is judged to be the non-gentle curve section, extracting a plurality of characteristic points in the non-gentle curve section, and outputting a plurality of characteristic points of the non-gentle curve section, wherein the characteristic points at least comprise one of the following characteristics: the maximum target extreme value of the graph to be analyzed, a plurality of target extreme values of the graph to be analyzed and boundary points corresponding to the target extreme values.
Alternatively, the characteristic points may be characteristic points in a non-gentle curve segment, for example, in the process of oil well testing, each characteristic point in the non-gentle curve segment may be analyzed with emphasis, and the non-gentle curve segment is a curve segment with large change in testing, and useful information may exist.
The maximum target extreme value of the graph to be analyzed may be a maximum data amplitude value or a minimum data amplitude value in the whole graph to be analyzed, each target extreme value may have a boundary point, and the boundary point may include a start point and an end point boundary point of the target extreme value.
And step S110, when the curve segment of the graph to be analyzed is judged to be the gentle curve segment, extracting boundary points in the gentle curve segment, and outputting the boundary points of the gentle curve segment.
Through the steps, the data information of the graph to be analyzed can be obtained, a plurality of data points and data amplitude values are obtained, a target extreme value and a graph characteristic value are determined according to the data points and the data amplitude values, then the target extreme value and the graph characteristic value are utilized, whether each curve segment in the graph to be analyzed is a gentle curve segment is judged, when the curve segment of the graph to be analyzed is determined to be a non-gentle curve segment, a plurality of characteristic points are extracted, the plurality of characteristic points are output, when the curve segment of the graph to be analyzed is determined to be a gentle curve segment, the boundary points of the gentle curve segment are extracted, and the boundary points of the gentle curve segment are output. By utilizing the embodiment of the application, the graph formed by the test signal is analyzed, the data points required by a user can be obtained by performing feature extraction on a plurality of data points in the analysis graph, and each feature point or boundary point of the graph to be analyzed is output, so that the user can know the outstanding data points of the graph to be analyzed, the analysis efficiency of the test signal is improved, the technical problem of lower efficiency when a plurality of test graphs are analyzed in the related art is solved, and the effect of effectively extracting the feature points of the data graph is achieved.
Optionally, when it is determined that the curve segment of the graph to be analyzed is a non-gentle curve segment, extracting a plurality of feature points in the non-gentle curve segment includes: determining the maximum amplitude value in the non-gentle curve section through a first calculation formula; determining a first data value and a second data value through the graph characteristic value and a first adjusting coefficient, wherein the first adjusting coefficient is used for adjusting the graph characteristic value, the second data value is a multiple of the first data value, the first data value corresponds to a first data point in a non-gentle curve segment, and the second data value corresponds to a second data point in the non-gentle curve segment; comparing front and rear amplitudes according to the maximum amplitude in the non-gentle curve section to determine a first total amplitude and a second total amplitude, wherein the first total amplitude is the sum of data amplitudes corresponding to a plurality of data points between the data point corresponding to the maximum amplitude in the non-gentle curve section and the first data point, and the second total amplitude is the sum of data amplitudes corresponding to a plurality of data points between the first data point and the second data point in the non-gentle curve section; judging whether the first total amplitude is lower than the second total amplitude; if the first total amplitude is lower than the second total amplitude, determining a data amplitude corresponding to each data point between the first data point and the second data point; determining the minimum data amplitude value in the data amplitude values corresponding to each data point between the first data point and the second data point; and taking the data point corresponding to the minimum data amplitude as the boundary point of the maximum amplitude in the non-gentle curve segment.
Optionally, the first calculation formula may be a bubbling method, by which the maximum amplitude in the non-gentle curve segment may be determined, and similarly, the maximum data amplitude of the whole graph to be analyzed may also be determined by the bubbling method. Each non-flat curve segment may include data points, each data point may correspond to a data amplitude, and the maximum amplitude in the curve segment to be analyzed may be quickly determined by the bubbling method.
The first adjustment coefficient may be set by a user according to smoothness of the non-gentle curve segment to be analyzed, and the first adjustment coefficient may be a discrimination coefficient, and may determine the graphic characteristic value as a preset numerical value. For example, the graphic characteristic value is 5.6, the first adjustment coefficient may be set to 1.4, and the graphic characteristic value is adjusted to an integer value of 7 by way of an additive calculation.
For the above embodiment, the first data value may be the adjusted graphic characteristic value, and the second data value may be twice the first data value, for example, the first data value is 7 and the second data value is 14. After the first data value and the second data value are obtained, the number of data points to be calculated can be determined. Each data value may correspond to a data point, e.g., a first data value of 7 is determined to correspond to a data point of X7 and a second data value is determined to correspond to a data point of X14.
In the above embodiment, the boundary point after the maximum amplitude value (i.e. the end boundary point of the maximum amplitude value) may be determined based on the maximum amplitude value, or the boundary point before the maximum amplitude value (i.e. the start point of the maximum amplitude value) may be determined. For example, the first calculated total amplitude value may be a plurality of data amplitude values included after the maximum amplitude value, for example, a sum of data amplitude values corresponding to 7 data points after the maximum amplitude value is a first total amplitude value, and a sum of data amplitude values corresponding to a plurality of data points included between a data point corresponding to the first data value and a data point corresponding to the second data value is a second total amplitude value. For example, if the data amplitudes corresponding to X1, X2, and X3 … X7 are 4, 8, 9, 6, 4, 7, and 2, the first total amplitude is 40, and for this example, the second total amplitude can be counted. And then determining whether the data point has an end point boundary point or not by judging the first total amplitude value and the second total amplitude value, if the first total amplitude value is lower than the second total amplitude value, determining the end point boundary point corresponding to the maximum amplitude value, and if the first total amplitude value is not lower than the second total amplitude value, calculating the sum of the amplitude values of subsequent data points, and further continuously determining whether the data point has the end point boundary point or not.
Optionally, before the data point corresponding to the minimum data amplitude is taken as the boundary point in the non-gentle curve segment, the method includes: and if the second data point is judged to be the data point in the gentle curve segment, taking the second data point as the boundary point of the maximum amplitude value in the non-gentle curve segment.
For the above embodiment, there may be another way of determining the boundary point of the maximum amplitude in the non-gentle curve section, in this way. The gentle curve section and the non-gentle curve section in the graph to be analyzed can be distinguished through judgment in advance, if the boundary point of the non-gentle curve section is judged, if the data point of the gentle curve section is touched, the data point can be determined to be judged completely, and the last data point can be determined as the boundary point of the maximum amplitude value in the non-gentle curve section.
Optionally, if the last data point is determined to be the end point of the whole graph to be analyzed when determining whether the data point of the non-gentle curve segment is the boundary point, the data point where the end point is located may be determined to be the boundary point of the maximum amplitude value in the non-gentle curve segment.
Through the embodiment, a plurality of characteristic points of the graph to be analyzed can be extracted, and the boundary point of the non-gentle curve segment can be determined. Optionally, after the non-smooth curve segment is analyzed, the non-smooth curve segment may be erased, so as to continue analyzing the next non-smooth curve segment. After the gentle curve segments are analyzed, the gentle curve segments can also be erased, and then each curve segment is continuously analyzed until all the curve segments are erased, the graph to be analyzed is analyzed, and each feature point and boundary point are extracted.
Optionally, determining a plurality of target extreme values and a pattern characteristic value of the pattern to be analyzed according to the data point and the data amplitude includes: determining a data difference value of each data point of the graph to be analyzed through a second calculation formula; judging whether the positive and negative signs corresponding to the two adjacent data difference values are the same; if the positive and negative signs corresponding to the two adjacent data difference values are judged to be different, determining the data amplitude corresponding to the data point in the middle of the plurality of data points corresponding to the two adjacent data difference values as a target extreme value of the graph to be analyzed; counting the number of target extreme values of the graph to be analyzed; and determining the graph characteristic value of the graph to be analyzed according to the number of the target extreme values of the graph to be analyzed and the total number of the data points of the graph to be analyzed.
The second calculation formula may be a subtraction of a previous value and a next value, and a difference value obtained by subtracting a data amplitude value corresponding to a previous data point from a data amplitude value corresponding to each data point may be calculated through the second calculation formula, so that a positive sign and a negative sign of the data difference value are compared, and whether the data difference value is a target extremum value or not may be determined. If the signs of two adjacent data differences are the same, it represents that the data amplitude is in one direction (for example, rising), if the signs are different, it represents that an inflection point occurs, that is, a target extreme value occurs, through continuous comparison, all the target extreme values of the whole graph to be analyzed can be finally determined, for example, there are data points X1, X2, X3, X4, whose corresponding data amplitudes are 4, 5, 6, 3 respectively, then through the second calculation formula, it can be determined that the difference between X1 and X2 is 1, the difference between X2 and X3 is 1, and the difference between X3 and X4 is-3, at this time, it can be determined that the sign of the difference between X1 and X2 is the same as that of the difference between X2 and X3, and the sign of the difference between X2 and X3 is different from that of the difference between X3 and X4, at this time, it can be determined that the data amplitude 6 corresponding to X3 is the target extreme value of the curve.
By the above embodiment, all the target extremum values of the whole graph to be analyzed and the data points corresponding to the target extremum values can be determined, in the embodiment of the application, taking the peak of the graph to be analyzed as an example, the target extremum value can be determined as the peak value of the peak, and the data points corresponding to the target extremum value are determined as the peak.
Optionally, determining whether each curve segment of the graph to be analyzed is a gentle curve segment according to the graph characteristic value and the plurality of data points includes: calculating the absolute value of the difference value of the data amplitude corresponding to each two adjacent data points to obtain a plurality of amplitude absolute values; accumulating the plurality of amplitude absolute values to obtain a total amplitude absolute value; determining a flat coefficient according to the absolute value of the total amplitude and the total number of data points of the graph to be analyzed; determining a third data value according to the graph characteristic value and a second adjusting coefficient, wherein the second adjusting coefficient is used for adjusting the graph characteristic value, and the third data value corresponds to a third data point in the non-gentle curve section; counting a third total amplitude of data amplitudes corresponding to a plurality of data points before a third data point, wherein the third total amplitude is the sum of the data amplitudes corresponding to the plurality of data points before the third data point; determining a fourth data value according to the third total amplitude value and the third data value; judging whether the absolute value of the difference value between the data amplitude corresponding to the data points before each third data point and the fourth data value exceeds a flat coefficient or not; and if the absolute value of the difference value between the data amplitude corresponding to the data point and the fourth data value exceeds the gentle coefficient, determining that the curve section behind the data point corresponding to the data amplitude is a non-gentle curve section.
Wherein the above-mentioned flattish coefficient can be determined by the absolute value of the amplitude, for example, X is defined0Has an amplitude of y0,X1Has an amplitude of y1,……XnHas an amplitude of yn. With X0And X1The difference between the amplitudes of two adjacent points is absolute value y1-y0|=|C0And so on, the absolute value of all the amplitude difference values (i.e. the above-mentioned total amplitude absolute value) is | C0|+|C1|+···+|Cn-1| then determining the flat coefficient A as Σ | Cn-1I/n is (| C)0|+|C1|+···+|Cn-1|))/n, with A defined as the flat coefficient.
With the above-described embodiment, it may be determined whether each curve segment of the graph to be analyzed is a gentle curve segment. The flat coefficient can be used for judging whether the curve section is a flat curve section, and the flat coefficient is obtained through the absolute value of the total amplitude and the total number of data points of the graph to be analyzed.
The second adjustment coefficient is also used to adjust the graphic characteristic value, and the graphic characteristic value can be adjusted to an appropriate value by the second adjustment coefficient, and in the embodiment of the present invention, the graphic characteristic value can also be adjusted to an integer, for example, the graphic characteristic value is 5.4, the second adjustment coefficient is set to-0.4, and the graphic characteristic value can be adjusted to 5 by adding.
When determining whether each curve segment of the graph to be analyzed is a non-gentle curve segment, a third total amplitude value may be used to determine, for example, the third data value is i, and the corresponding third data point is XiDetermining the third total amplitude value as X0To XiThe sum of the corresponding data amplitudes; in determining the fourth data value, the fourth data value may be a ratio of the third total amplitude value and the third data value. Then, the absolute value of the difference between the data amplitude corresponding to each data point and the fourth data value is determined, and whether the curve segment is a gentle curve segment is determined according to the comparison between the absolute value and the gentle coefficient, for example, in the step of determining whether the curve segment is a gentle curve segment
Figure GDA0002683015490000121
And is
Figure GDA0002683015490000122
And
Figure GDA0002683015490000123
then X can be determined1To XiIs a flat area.
Optionally, in the above embodiment, it is determined whether the curve segment of the graph to be analyzed is a non-smooth curve segment by determining whether an absolute value of a difference between the data amplitude corresponding to the data point and the fourth data value exceeds a smooth coefficient.
The following are specific examples according to embodiments of the present invention.
Fig. 2 is a first schematic diagram of an alternative graph to be analyzed according to an embodiment of the present invention, and as shown in fig. 2, a graph of temperature-distance data is obtained with distance or depth as a horizontal axis and temperature data as a vertical axis. In the data pattern, a plurality of curve segments are included, and obvious peaks and valleys exist, and the features can be extracted through the embodiment of the application.
Fig. 3 is a second schematic diagram of an optional pattern to be analyzed according to an embodiment of the present invention, as shown in fig. 3, the pattern to be analyzed has an X-axis (i.e., the horizontal axis) of distance or time, and an amplitude corresponding to each data point has a Y-axis (i.e., the vertical axis). The extracted feature points 1 are the starting point of the curve, 2 is the upper peak of the curve (i.e., the peak of the above-mentioned embodiment), 3 is the lower peak (i.e., the trough of the above-mentioned embodiment), and 4 is the end point of the curve.
Through the embodiment, the starting point, the end point and the peak point of each peak can be automatically identified according to the characteristics of the whole curve, and some small peaks are ignored according to the characteristics of the whole curve, so that large peaks meeting the requirements are found.
In the embodiment of the present application, the graph to be analyzed may be determined as a continuous curve segment. The basic characteristics of the curve can be determined in the following manner.
Fig. 4 is a first schematic diagram of a process of a pattern feature extraction method according to an embodiment of the present invention, in which a horizontal axis is a distance, a unit is meter, and an amplitude is a vertical axis, and when identifying a small peak, the determination may be performed by a front-back value minus sign determination method. First, it can be determined that the plurality of data points are each X0、X1、X2…Xn…XFinal (a Chinese character of 'gan'). Using the first point X of the data curve0Initially, record all the differences of the posterior value minus the anterior value, let Cn=Xn+1-Xn. Then C can be determined0=X1-X0、C1=X2-X1… up to CFinal-1=XFinal (a Chinese character of 'gan')-XFinal-1Then for two adjacent CnMaking a judgment, if the signs are the same, namely Cn-1>0 and Cn>0 or Cn-1<0 and Cn<0, no operation is performed. But when C isn-1>0 and Cn<0 or when Cn-1<0 and Cn>At 0, it is recorded as Y, called the knee. Mixing X0Is recorded as Y0The first Y encountered is then recorded as Y1 (i.e., the peak of the above example), and so on, and discrimination continues down until X is foundn-Xn-1<0 and Xn+1-Xn>0, defined as Y2(i.e., the valleys of the above-described embodiments)。
If C0>0,Y0、Y1、Y2Form a small peak, Y2、Y3、Y4Form a small peak, per Yn-1、Yn、Yn+1The inner points form a small peak, less than 3 are not defined as small peaks, e.g. to YFinal (a Chinese character of 'gan')And then less than 3.
On the contrary, also if C is the same0<0, then Y1、Y2、Y3Form a peak and so on.
By the above embodiment, all inflection points of the whole graph to be analyzed, including a plurality of peaks and valleys, can be determined. A start point and an end point may also be determined.
Alternatively, the pattern characteristic value may be determined by first defining the number of inflection points (i.e., the number of target extrema of the pattern to be analyzed in the above-mentioned embodiment) r as the number of small peaks, and defining the number of all-curve data points (i.e., the number of data points of the pattern to be analyzed in the above-mentioned embodiment) s as the number of all curves Xn, and then determining the pattern characteristic value as i as s/r, where i represents the number of data points included in each small peak on average, and i is defined as the pattern characteristic value.
Alternatively, the gentle curve segment and the non-gentle curve segment of the graph to be analyzed may be determined in the following manner.
First, X is defined0Is equal to y0,X1Has an amplitude of y1…XnHas an amplitude of ynFrom X0To X1The difference between the amplitudes of two adjacent points is absolute value y1-y0|=|C0Calculating from all points in the curve | CnThe average value of | is (| C)0|+|C1|+···+|Cn-1| C), the average of the sum of the amplitude differences of all data points is |)nI/n, let A be Σ | CnAnd | n, defining A as a flat coefficient.
FIG. 5 is a diagram illustrating a second process of the graph feature extraction method according to the embodiment of the present invention, and then determining a flat characteristic value of the curve, first using a small peak characteristic value i and a constant systemNumber d1In which d is defined1Is an adjustment factor (i.e. the second adjustment coefficient of the above-mentioned embodiment), which is set according to different requirements of different curves. Re-assigning i as an integer, i ═ i + d1From X0Starting with the calculation of the average value by Xi.
Wherein the content of the first and second substances,
Figure GDA0002683015490000131
if it is
Figure GDA0002683015490000132
And is
Figure GDA0002683015490000133
And … and
Figure GDA0002683015490000134
then define X1To XiMarking as a gentle region;
if there are one or more of them
Figure GDA0002683015490000135
The last point is marked as a non-flat area (if the row of data is the first decision, X0Heading, then all marked as non-gentle areas) ((iii)
Then from X2Starting until Xi+1And (4) continuously repeating the judgment of the third step, and repeating the third step and the like until the judgment of the last data point is finished.
In the context of FIG. 5, X may be determined1To XiIs a gentle region (i.e., the gentle curve segment), XiFollowed by a non-flat region (i.e., the non-flat curve segment described above).
Fig. 6 is a third schematic diagram in the process of the graphic feature extraction method according to the embodiment of the present invention, wherein the content shown in fig. 6 is applied to the embodiments shown in fig. 4 and 5. After analyzing all data points of the graph to be analyzed, all data points are marked and divided into 2 kinds of labels of a gentle curve section and a non-gentle curve section, as shown in fig. 6, wherein 0 is the non-gentle curve section and 1 is the gentle curve section. Then, in order to avoid that all data points are used for multiple times when the peak value is judged, the used gentle curve section in the curve is defined as an invalid curve section, and as shown in fig. 6, all the gentle areas are marked as 2 invalid curve sections by one layer.
Optionally, the peak of the graph to be analyzed and the boundary point of the peak may be determined in the following manner.
Wherein, in determining the peak value peak point of the peak value of the graph to be analyzed, a bubbling method can be used for finding out the point with the highest amplitude value in the whole curve.
The confirmation of the boundary point of the peak can be determined by a front-back group value comparison method.
FIG. 7 is a fourth schematic diagram of the process of the graphic feature extraction method according to the embodiment of the invention, as shown in FIG. 7, to extract the feature from the highest point XnTo the right, for example, a small peak characteristic value i, and a discrimination factor d are used2(i.e., the first adjustment factor of the above-described embodiment), d2Is a discrimination factor and is set according to different requirements of different curves. Re-assigning i as an integer, i ═ i + d2From Xn+1To Xn+iThe sum of the data amplitude values corresponding to the i data points is KFront sideFrom Xn+i+1To Xn+2iThe sum of the data amplitudes corresponding to the constituent data points of (1) is KRear endIf K isFront side>KRear endThe right discrimination is continued, so that n is equal to n +1,
the discrimination is stopped when one of the following 3 conditions is met:
1. if KFront side<KRear endStopping the discrimination and determining the peak end point boundary point as the minimum point from n to n +2 i.
2. If a dead zone (i.e. the above-mentioned dead curve segment) is encountered, the first point in the dead zone is immediately determined as the end point boundary point of the peak
3. If X is over, the judgment is stopped immediately, and the X is determined as the end point boundary point of the peak
When a plurality of conditions (e.g., 2 or 3) among the above-mentioned 3 conditions occur simultaneously, they are selected to be furtherNear its peak maximum XnAs the endpoint boundary point.
By analogy, the starting point can be found, and only K is requiredFront sideAnd KRear endAnd (5) reversing and carrying out forward operation.
As shown in fig. 7, after determining the highest point of the peak, the start point of the peak, and the end point of the peak, the peak may be listed as invalid values from the start point to the end point, and then the above embodiment is repeated until the predetermined number of peaks or the entire curve is identified as invalid values.
Optionally, after the feature extraction of the peak is completed, the feature extraction of the trough may be performed in reverse, the above embodiments are methods for identifying the peak, if it is necessary to identify the trough, only the highest point of the obtained curve needs to be changed to the lowest point of the obtained curve, the method for the boundary point of the peak is reversed to be larger than or smaller than the size, and so on.
Through the embodiment, the remarkable characteristics of each peak, each trough, each peak starting point, each peak ending point, each gentle curve section and the like of the distributed test curve can be intelligently identified, so that the computer or equipment such as a high-speed integrated circuit board and the like can provide a characteristic list for the curve through the method.
The output curve feature list may include feature data of each peak or each valley of the graph to be analyzed, a start point and an end point of the peak, a start point or an end point of the valley, a gentle curve segment, and the like.
Fig. 8 is a schematic diagram of a graphic feature extraction apparatus according to an embodiment of the present invention, as shown in fig. 8, the apparatus including: the acquiring unit 81 is configured to acquire data information of a graph to be analyzed, and obtain a plurality of data points and a data amplitude corresponding to each data point, where the graph to be analyzed includes a plurality of curve segments; the determining unit 83 is configured to determine a plurality of target extreme values and a graph characteristic value of the graph to be analyzed according to the data points and the data amplitude, where the graph characteristic value is an average value of the number of data points corresponding to the target extreme values of the graph to be analyzed; the judging unit 85 is configured to judge whether each curve segment of the graph to be analyzed is a gentle curve segment according to the graph characteristic value and the multiple data points, where the gentle curve segment is a curve segment lower than the target data amplitude value in the graph to be analyzed; a first extracting unit 87, configured to, when it is determined that the curve segment of the graph to be analyzed is a non-gentle curve segment, extract a plurality of feature points in the non-gentle curve segment, and output a plurality of feature points of the non-gentle curve segment, where the feature points include at least one of the following features: the analysis method comprises the following steps of (1) obtaining a maximum target extreme value of a graph to be analyzed, a plurality of target extreme values of the graph to be analyzed and boundary points corresponding to the target extreme values; and a second extracting unit 89, configured to, when it is determined that the curve segment of the graph to be analyzed is the gentle curve segment, extract boundary points in the gentle curve segment, and output the boundary points of the gentle curve segment.
Through the embodiment, the data information of the graph to be analyzed can be acquired through the acquisition unit 81, a plurality of data points and data amplitudes are obtained, so that the determination unit 83 determines a target extreme value and a graph characteristic value according to the data points and the data amplitudes, then the target extreme value and the graph characteristic value are utilized, whether each curve segment in the graph to be analyzed is a gentle curve segment or not is determined through the determination unit 85, when the curve segment of the graph to be analyzed is determined to be a non-gentle curve segment, a plurality of characteristic points are extracted through the first extraction unit 87, and the plurality of characteristic points are output, when the curve segment of the graph to be analyzed is determined to be a gentle curve segment, the boundary points of the gentle curve segment are extracted through the second extraction unit 89, and the boundary points of the gentle curve segment are output. By utilizing the embodiment of the application, the graph formed by the test signal is analyzed, the data points required by a user can be obtained by performing feature extraction on a plurality of data points in the analysis graph, and each feature point or boundary point of the graph to be analyzed is output, so that the user can know the outstanding data points of the graph to be analyzed, the analysis efficiency of the test signal is improved, the technical problem of lower efficiency when a plurality of test graphs are analyzed in the related art is solved, and the effect of effectively extracting the feature points of the data graph is achieved.
Optionally, the first extracting unit 87 includes: the first determining module is used for determining the maximum amplitude value in the non-gentle curve section through a first calculation formula; the second determining module is used for determining a first data value and a second data value through the graph characteristic value and a first adjusting coefficient, wherein the first adjusting coefficient is used for adjusting the graph characteristic value, the second data value is a multiple of the first data value, the first data value corresponds to a first data point in a non-gentle curve segment, and the second data value corresponds to a second data point in the non-gentle curve segment; the third determining module is used for comparing front and back amplitudes according to the maximum amplitude in the non-gentle curve section to determine a first total amplitude and a second total amplitude, wherein the first total amplitude is the sum of data amplitudes corresponding to a plurality of data points between the data point corresponding to the maximum amplitude in the non-gentle curve section and the first data point, and the second total amplitude is the sum of data amplitudes corresponding to a plurality of data points between the first data point and the second data point in the non-gentle curve section; the first judging module is used for judging whether the first total amplitude is lower than the second total amplitude or not; the fourth determining module is used for determining the data amplitude corresponding to each data point between the first data point and the second data point if the first total amplitude is judged to be lower than the second total amplitude; the fifth determining module is used for determining the minimum data amplitude value in the data amplitude values corresponding to each data point from the first data point to the second data point; and the sixth determining module is used for taking the data point corresponding to the minimum data amplitude as the boundary point of the maximum amplitude in the non-gentle curve segment.
In another alternative embodiment, the apparatus further comprises: and the seventh determining module is used for taking the second data point as the boundary point of the maximum amplitude value in the non-gentle curve segment if the second data point is judged to be the data point in the gentle curve segment before the data point corresponding to the minimum data amplitude value is taken as the boundary point in the non-gentle curve segment.
Wherein the determination unit includes: the eighth determining module is used for determining the data difference value of each data point of the graph to be analyzed through the second calculation formula; the second judgment module is used for judging whether the positive and negative symbols corresponding to the two adjacent data difference values are the same; a ninth determining module, configured to determine, if it is determined that the positive and negative signs corresponding to the two adjacent data difference values are different, that a data amplitude corresponding to a data point in the middle of the multiple data points corresponding to the two adjacent data difference values is a target extreme value of the graph to be analyzed; the first statistic module is used for counting the number of target extreme values of the graph to be analyzed; and the tenth determining module is used for determining the graph characteristic value of the graph to be analyzed according to the number of the target extreme values of the graph to be analyzed and the total number of the data points of the graph to be analyzed.
Optionally, the determining unit includes: the calculation module is used for calculating the absolute value of the difference value of the data amplitude corresponding to each two adjacent data points to obtain a plurality of amplitude absolute values; the accumulation module is used for accumulating a plurality of amplitude absolute values to obtain a total amplitude absolute value; the eleventh determining module is used for determining a flat coefficient according to the absolute value of the total amplitude and the total number of data points of the graph to be analyzed; a twelfth determining module, configured to determine a third data value according to the graph characteristic value and a second adjustment coefficient, where the second adjustment coefficient is used to adjust the graph characteristic value, and the third data value corresponds to a third data point in the non-gentle curve segment; the second counting module is used for counting a third total amplitude of data amplitudes corresponding to a plurality of data points before a third data point, wherein the third total amplitude is the sum of the data amplitudes corresponding to the plurality of data points before the third data point; a thirteenth determining module for determining a fourth data value according to the third total amplitude value and the third data value; the third judgment module is used for judging whether the absolute value of the difference value between the data amplitude corresponding to the data points before each third data point and the fourth data value exceeds a flat coefficient or not; and the fourteenth determining module is configured to determine that the curve segment after the data point corresponding to the data amplitude is a non-gentle curve segment if it is determined that the absolute value of the difference between the data amplitude corresponding to the data point and the fourth data value exceeds the gentle coefficient.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (8)

1. A method for extracting a graphic feature, comprising:
acquiring data information of a graph to be analyzed to obtain a plurality of data points and a data amplitude corresponding to each data point, wherein the graph to be analyzed comprises a plurality of curve segments;
determining a plurality of target extreme values and graph characteristic values of the graph to be analyzed according to the data points and the data amplitude values, wherein the graph characteristic value is an average value of the number of the data points corresponding to the target extreme values of the graph to be analyzed;
judging whether each curve section of the graph to be analyzed is a gentle curve section or not according to the graph characteristic value and the data points, wherein the gentle curve section is a curve section which is lower than the target data amplitude value in the graph to be analyzed;
when the curve section of the graph to be analyzed is judged to be a non-gentle curve section, extracting a plurality of characteristic points in the non-gentle curve section, and outputting the plurality of characteristic points of the non-gentle curve section, wherein the characteristic points at least comprise one of the following characteristics: the maximum target extreme value of the graph to be analyzed, a plurality of target extreme values of the graph to be analyzed and boundary points corresponding to the target extreme values;
when the curve section of the graph to be analyzed is judged to be a gentle curve section, extracting boundary points in the gentle curve section and outputting the boundary points of the gentle curve section,
determining whether each curve segment of the graph to be analyzed is a gentle curve segment according to the graph characteristic value and the plurality of data points comprises: calculating the absolute value of the difference value of the data amplitude corresponding to each two adjacent data points to obtain a plurality of amplitude absolute values; accumulating a plurality of amplitude absolute values to obtain a total amplitude absolute value; determining a flat coefficient according to the absolute value of the total amplitude and the total number of data points of the graph to be analyzed; determining a third data value according to the graph characteristic value and a second adjusting coefficient, wherein the second adjusting coefficient is used for adjusting the graph characteristic value, and the third data value corresponds to a third data point in the non-gentle curve section; counting a third total amplitude of data amplitudes corresponding to a plurality of data points before the third data point, wherein the third total amplitude is the sum of the data amplitudes corresponding to the plurality of data points before the third data point; determining a fourth data value according to the third total amplitude value and the third data value; judging whether the absolute value of the difference value between the data amplitude corresponding to the data points before each third data point and the fourth data value exceeds the flat coefficient or not; and if the absolute value of the difference value between the data amplitude corresponding to the data point and the fourth data value exceeds the gentle coefficient, determining that the curve section behind the data point corresponding to the data amplitude is a non-gentle curve section.
2. The method of claim 1, wherein extracting a plurality of feature points in a non-flat curve segment of the graph to be analyzed when the curve segment is determined to be the non-flat curve segment comprises:
determining the maximum amplitude value in the non-gentle curve section through a first calculation formula;
determining a first data value and a second data value by the graph characteristic value and a first adjustment coefficient, wherein the first adjustment coefficient is used for adjusting the graph characteristic value, the second data value is a multiple of the first data value, the first data value corresponds to a first data point in the non-flat curve segment, and the second data value corresponds to a second data point in the non-flat curve segment;
comparing front and back amplitude values according to the maximum amplitude value in the non-gentle curve section to determine a first total amplitude value and a second total amplitude value, wherein the first total amplitude value is the sum of data amplitude values corresponding to a plurality of data points between the first data point and the data point after the data point corresponding to the maximum amplitude value in the non-gentle curve section, and the second total amplitude value is the sum of data amplitude values corresponding to a plurality of data points between the first data point and the second data point in the non-gentle curve section;
judging whether the first total amplitude is lower than the second total amplitude or not;
if the first total amplitude is lower than the second total amplitude, determining a data amplitude corresponding to each data point between the first data point and the second data point;
determining the minimum data amplitude value in the data amplitude values corresponding to each data point between the first data point and the second data point;
and taking the data point corresponding to the minimum data amplitude as the boundary point of the maximum amplitude in the non-gentle curve section.
3. The method of claim 2, wherein prior to taking the data point corresponding to the minimum data magnitude as the boundary point in the non-flat curve segment, comprising:
and if the second data point is judged to be the data point in the gentle curve segment, taking the second data point as the boundary point of the maximum amplitude value in the non-gentle curve segment.
4. The method of claim 1, wherein determining a plurality of target extrema and pattern property values for the pattern to be analyzed based on the data points and the data magnitudes comprises:
determining a data difference value of each data point of the graph to be analyzed through a second calculation formula;
judging whether the positive and negative signs corresponding to the two adjacent data difference values are the same;
if the positive and negative signs corresponding to the two adjacent data difference values are judged to be different, determining that the data amplitude corresponding to the data point in the middle of the plurality of data points corresponding to the two adjacent data difference values is the target extreme value of the graph to be analyzed;
counting the number of target extreme values of the graph to be analyzed;
and determining the graph characteristic value of the graph to be analyzed according to the number of the target extreme values of the graph to be analyzed and the total number of the data points of the graph to be analyzed.
5. A graphic feature extraction device characterized by comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring data information of a graph to be analyzed to obtain a plurality of data points and data amplitude values corresponding to each data point, and the graph to be analyzed comprises a plurality of curve segments;
the determining unit is used for determining a plurality of target extreme values and graph characteristic values of the graph to be analyzed according to the data points and the data amplitude values, wherein the graph characteristic values are average values of the number of the data points corresponding to the target extreme values of the graph to be analyzed;
the judging unit is used for judging whether each curve section of the graph to be analyzed is a gentle curve section according to the graph characteristic value and the data points, wherein the gentle curve section is a curve section which is lower than the target data amplitude value in the graph to be analyzed;
the first extraction unit is used for extracting a plurality of characteristic points in the non-gentle curve section and outputting the plurality of characteristic points of the non-gentle curve section when the curve section of the graph to be analyzed is judged to be the non-gentle curve section, wherein the characteristic points at least comprise one of the following characteristics: the maximum target extreme value of the graph to be analyzed, a plurality of target extreme values of the graph to be analyzed and boundary points corresponding to the target extreme values;
a second extraction unit configured to extract boundary points in a gentle curve segment and output the boundary points of the gentle curve segment when it is determined that the curve segment of the graph to be analyzed is the gentle curve segment,
the determination unit includes: the calculation module is used for calculating the absolute value of the difference value of the data amplitude corresponding to each two adjacent data points to obtain a plurality of amplitude absolute values; the accumulation module is used for accumulating a plurality of amplitude absolute values to obtain a total amplitude absolute value; an eleventh determining module, configured to determine a flat coefficient according to the total absolute value of the amplitude and the total number of data points of the graph to be analyzed; a twelfth determining module, configured to determine a third data value according to the graph characteristic value and a second adjustment coefficient, where the second adjustment coefficient is used to adjust the graph characteristic value, and the third data value corresponds to a third data point in the non-gentle curve segment; a second statistical module, configured to count a third total amplitude of data amplitudes corresponding to a plurality of data points before the third data point, where the third total amplitude is a sum of the data amplitudes corresponding to the plurality of data points before the third data point; a thirteenth determining module, configured to determine a fourth data value according to the third total amplitude value and the third data value; a third judging module, configured to judge whether an absolute value of a difference between a data amplitude corresponding to a plurality of data points before each third data point and the fourth data value exceeds the flat coefficient; and a fourteenth determining module, configured to determine, if it is determined that the absolute value of the difference between the data amplitude corresponding to the data point and the fourth data value exceeds the flat coefficient, that the curve segment following the data point corresponding to the data amplitude is a non-flat curve segment.
6. The apparatus of claim 5, wherein the first extraction unit comprises:
the first determining module is used for determining the maximum amplitude value in the non-gentle curve section through a first calculation formula;
a second determining module, configured to determine a first data value and a second data value through the graph characteristic value and a first adjustment coefficient, where the first adjustment coefficient is used to adjust the graph characteristic value, the second data value is a multiple of the first data value, the first data value corresponds to a first data point in the non-flat curve segment, and the second data value corresponds to a second data point in the non-flat curve segment;
a third determining module, configured to perform front-to-back amplitude comparison according to a maximum amplitude in the non-gentle curve segment, and determine a first total amplitude and a second total amplitude, where the first total amplitude is a sum of data amplitudes corresponding to a plurality of data points between a data point corresponding to the maximum amplitude in the non-gentle curve segment and the first data point, and the second total amplitude is a sum of data amplitudes corresponding to a plurality of data points between the first data point and the second data point in the non-gentle curve segment;
the first judging module is used for judging whether the first total amplitude is lower than the second total amplitude or not;
a fourth determining module, configured to determine a data amplitude corresponding to each data point between the first data point and the second data point if it is determined that the first total amplitude is lower than the second total amplitude;
a fifth determining module, configured to determine a minimum data amplitude value among data amplitude values corresponding to each data point between the first data point and the second data point;
and the sixth determining module is used for taking the data point corresponding to the minimum data amplitude as the boundary point of the maximum amplitude in the non-gentle curve section.
7. The apparatus of claim 6, wherein the apparatus comprises:
and a seventh determining module, configured to, before taking the data point corresponding to the minimum data amplitude as the boundary point in the non-gentle curve segment, if it is determined that the second data point is the data point in the gentle curve segment, take the second data point as the boundary point of the maximum amplitude in the non-gentle curve segment.
8. The apparatus of claim 5, wherein the determining unit comprises:
an eighth determining module, configured to determine, according to a second calculation formula, a data difference value of each data point of the graph to be analyzed;
the second judgment module is used for judging whether the positive and negative symbols corresponding to the two adjacent data difference values are the same;
a ninth determining module, configured to determine, if it is determined that the positive and negative signs corresponding to the two adjacent data difference values are different, that a data amplitude corresponding to a data point in a middle of the multiple data points corresponding to the two adjacent data difference values is a target extreme value of the graph to be analyzed;
the first statistic module is used for counting the number of target extreme values of the graph to be analyzed;
and the tenth determining module is used for determining the graph characteristic value of the graph to be analyzed according to the number of the target extreme values of the graph to be analyzed and the total number of the data points of the graph to be analyzed.
CN201710840719.XA 2017-09-15 2017-09-15 Method and device for extracting graphic features Active CN109508594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710840719.XA CN109508594B (en) 2017-09-15 2017-09-15 Method and device for extracting graphic features

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710840719.XA CN109508594B (en) 2017-09-15 2017-09-15 Method and device for extracting graphic features

Publications (2)

Publication Number Publication Date
CN109508594A CN109508594A (en) 2019-03-22
CN109508594B true CN109508594B (en) 2021-01-01

Family

ID=65745255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710840719.XA Active CN109508594B (en) 2017-09-15 2017-09-15 Method and device for extracting graphic features

Country Status (1)

Country Link
CN (1) CN109508594B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763500A (en) * 2008-12-24 2010-06-30 中国科学院半导体研究所 Method applied to palm shape extraction and feature positioning in high-freedom degree palm image
CN105488313A (en) * 2014-09-15 2016-04-13 博雅网络游戏开发(深圳)有限公司 Curve trend identification method and device
CN106645434A (en) * 2016-11-17 2017-05-10 中国船舶重工集团公司第七0研究所 Recognition method of strong pulse signal based on slope and amplitude difference value threshold
CN106772572A (en) * 2016-11-18 2017-05-31 中国石油集团川庆钻探工程有限公司地球物理勘探公司 A kind of pick-up method of micro-seismic monitoring first arrival
CN106845108A (en) * 2017-01-19 2017-06-13 中国测绘科学研究院 A kind of line simplifying method for taking spatial relation constraint into account

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4686505B2 (en) * 2007-06-19 2011-05-25 株式会社東芝 Time-series data classification apparatus, time-series data classification method, and time-series data processing apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763500A (en) * 2008-12-24 2010-06-30 中国科学院半导体研究所 Method applied to palm shape extraction and feature positioning in high-freedom degree palm image
CN105488313A (en) * 2014-09-15 2016-04-13 博雅网络游戏开发(深圳)有限公司 Curve trend identification method and device
CN106645434A (en) * 2016-11-17 2017-05-10 中国船舶重工集团公司第七0研究所 Recognition method of strong pulse signal based on slope and amplitude difference value threshold
CN106772572A (en) * 2016-11-18 2017-05-31 中国石油集团川庆钻探工程有限公司地球物理勘探公司 A kind of pick-up method of micro-seismic monitoring first arrival
CN106845108A (en) * 2017-01-19 2017-06-13 中国测绘科学研究院 A kind of line simplifying method for taking spatial relation constraint into account

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
疲劳裂纹扩展的金属磁记忆信号特征;金宝 等;《材料工程》;20141130(第11期);102-106 *

Also Published As

Publication number Publication date
CN109508594A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
CN101517612B (en) Image reading device and image reading method
EP2851874A1 (en) Paper identifying method and related device
CN104504101B (en) A kind of determination method and device of similar video
CN108460776B (en) Brake pad size detection method and device based on machine vision
JP2008271268A5 (en)
TWI408610B (en) Methods and systems for gesture recognition, and computer program products thereof
CN104751153B (en) A kind of method and device of identification scene word
CN107240086B (en) A kind of fabric defects detection method based on integral nomography
Priya et al. Edge strength extraction using orthogonal vectors for shot boundary detection
WO2016086877A1 (en) Text detection method and device
CN104657979B (en) A kind of features of ultrasound pattern detection method and system
US8396297B2 (en) Supervised edge detection using fractal signatures
CN101833668A (en) Detection method for similar units based on profile zone image
JP2010056689A5 (en)
CN104915944A (en) Method and device for determining black margin position information of video
CN108288274B (en) Mold detection method and device and electronic equipment
CN114119466A (en) Method, device and equipment for detecting surface defects of aluminum foil and computer storage medium
CN109508594B (en) Method and device for extracting graphic features
CN109461136B (en) Method for detecting fiber distribution condition in mixed fiber product
CN104461009B (en) The measuring method and smart machine of object
CN109376770B (en) Grid area identification method and device applied to negative film inspection machine
CN101600115A (en) A kind of method of eliminating periodic characteristic block of image stabilization system
Anoual et al. Features extraction for text detection and localization
CN111076667A (en) Dynamic and rapid measuring method for scratches on metal surface
CN105814608B (en) Image processing apparatus and special pattern detection method

Legal Events

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