CN112835961A - Method and system for quickly aligning periodically acquired data - Google Patents
Method and system for quickly aligning periodically acquired data Download PDFInfo
- Publication number
- CN112835961A CN112835961A CN202110223664.4A CN202110223664A CN112835961A CN 112835961 A CN112835961 A CN 112835961A CN 202110223664 A CN202110223664 A CN 202110223664A CN 112835961 A CN112835961 A CN 112835961A
- Authority
- CN
- China
- Prior art keywords
- index value
- alignment
- data sequence
- average error
- upper limit
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2458—Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
- G06F16/2474—Sequence data queries, e.g. querying versioned data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Probability & Statistics with Applications (AREA)
- Fuzzy Systems (AREA)
- Position Fixing By Use Of Radio Waves (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a method and a system for quickly aligning periodically acquired data, which comprise the following steps: determining a first alignment index value of a first data sequence and a second alignment index value of a second data sequence by a rate of change threshold; aligning the two data sequences by using the first alignment index value and the second alignment index value as assumed data alignment points, and calculating an average error after the two data sequences are aligned; setting a lower limit adjustment index value and an upper limit adjustment index value of the second alignment index value according to a preset fluctuation range, and respectively calculating corresponding error values when the lower limit adjustment index value and the upper limit adjustment index value are respectively used as assumed data alignment points; the fluctuation range of the index value is reduced by comparing the average errors of the three items; and iteratively executing the process, gradually reducing the fluctuation range of the index value, finally determining the actual index value, and aligning the first data sequence and the second data sequence according to the actual index value. The invention improves the data comparison and analysis efficiency and ensures the validity of the analysis result.
Description
Technical Field
The invention relates to the technical field of data arrangement, in particular to a method and a system for quickly aligning periodically acquired data.
Background
In order to understand the influence of different input, interference and other conditions on the output accuracy, stability and other indexes of the tested system, a data acquisition device is generally used for acquiring multiple groups of output data of the tested system under different conditions based on a periodic sampling method, and quantitative evaluation of the tested system is realized by comparing and analyzing the multiple groups of data. However, in order to ensure the independence and the integrity of the tested system, the data acquisition device and the tested system are two independent systems, and direct data interaction does not exist between the two systems. Meanwhile, in order to ensure generality, the tested system is allowed to output arbitrary test data. Therefore, the data acquisition device acquires a plurality of groups of data, and the data alignment is firstly needed, and then the comparative analysis is carried out to ensure the validity of the analysis result.
How to realize accurate, stable and fast alignment of multiple groups of data is the basis and key for improving data analysis efficiency and ensuring data analysis accuracy. Therefore, a rapid alignment method for periodically acquired data is provided.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method and a system for quickly aligning periodically collected data, so as to solve the above-mentioned technical problems.
In a first aspect, the present invention provides a method for quickly aligning periodically collected data, including:
traversing the first data sequence to calculate the change rate corresponding to each data value in the first data sequence, and determining a first alignment index value of the first data sequence by comparing the change rate of the first data sequence with a preset change rate threshold;
traversing the second data sequence to calculate the change rate corresponding to each data value in the second data sequence, and determining a second alignment index value of the second data sequence by comparing the change rate of the second data sequence with a preset change rate threshold;
aligning the first data sequence and the second data sequence by taking the first alignment index value and the second alignment index value as assumed data alignment points, and calculating the average error of the first data sequence and the second data sequence;
setting a lower limit adjustment index value and an upper limit adjustment index value of the second alignment index value according to a preset fluctuation range, and respectively calculating a lower limit adjustment index value and an upper limit adjustment index value to replace the second alignment index value as a lower limit average error and an upper limit average error corresponding to the data alignment point;
comparing the average error, the lower-limit average error and the upper-limit average error, reducing the fluctuation range of the index value according to the comparison result, determining an actual index value by iteratively executing the process of reducing the fluctuation range of the index value, and aligning the first data sequence and the second data sequence according to the actual index value.
Further, the traversing the first data sequence to calculate a change rate corresponding to each data value in the first data sequence, and determining a first alignment index value of the first data sequence by comparing the change rate of the first data sequence with a preset change rate threshold, includes:
screening out a data value corresponding to the change rate which is greater than the change rate threshold value for the first time from the change rate of the first data sequence as a first alignment point;
outputting an index value of the first alignment point in the first data sequence as a first alignment index value.
Further, the aligning the first data sequence and the second data sequence according to the first alignment index value and the second alignment index value, and calculating an average error of the first data sequence and the second data sequence includes:
intercepting data of the first data sequence from the first alignment index value to form a first alignment sequence, and updating the index value of the first alignment sequence;
intercepting data of the second data sequence from the second alignment index value to form a second alignment sequence, and updating the index value of the second alignment sequence;
and calculating the difference value of the corresponding numerical values belonging to the same index value in the first alignment sequence and the second alignment sequence, and outputting the average value of all the difference values as the average error corresponding to the first alignment index value and the second alignment index value.
Further, the setting a second alignment fluctuation index value according to the fluctuation range, and calculating an average error corresponding to the alignment point by using the second alignment fluctuation index value, includes:
setting a lower limit adjusting step distance and an upper limit adjusting step distance according to the fluctuation range;
taking the difference between the second alignment fluctuation index value and the lower limit adjustment step distance as a lower limit adjustment index value;
taking the sum of the second alignment fluctuation index value and the upper limit adjustment step distance as an upper limit adjustment index value;
aligning the first data sequence and the second data sequence according to the first alignment index value and the lower limit adjustment index value, and calculating the lower limit adjustment average error of the first data sequence and the second data sequence;
and aligning the first data sequence and the second data sequence according to the first alignment index value and the upper limit adjustment index value, and calculating the upper limit adjustment average error of the first data sequence and the second data sequence.
Further, the comparing the average error, the lower average error and the upper average error, reducing the fluctuation range of the index value according to the comparison result, and determining the actual index value by iteratively executing the process of reducing the fluctuation range of the index value, includes:
if the lower limit adjustment average error is smaller than the average error and the average error is smaller than the upper limit adjustment average error, taking the lower limit adjustment index value as a lower limit index value and taking the second alignment index value as an upper limit index value; if the average error of the lower limit adjustment is larger than the average error and the average error is larger than the average error of the upper limit adjustment, taking the second alignment index value as a lower limit index value and taking the upper limit adjustment index value as an upper limit index value; if the average error of the lower limit adjustment is larger than the average error and the average error is smaller than the average error of the upper limit adjustment, taking the index value of the lower limit adjustment as the index value of the lower limit and taking the index value of the upper limit adjustment as the index value of the upper limit;
if the difference between the upper limit index value and the lower limit index value is equal to 2, outputting the second alignment index value as the actual alignment index value of the second data sequence;
if the difference between the upper limit value and the lower limit value of the fluctuation range is equal to 3, outputting the second alignment index value as the actual alignment index value of the second data sequence;
and if the difference between the upper limit value and the lower limit value of the fluctuation range is more than 3, updating the second alignment index value to be a rounded value obtained by adding one half of the difference between the upper limit index value and the lower limit index value to the original second alignment index value, and determining the actual index value by iteratively updating the second alignment index value and executing the process of reducing the fluctuation range of the index value.
In a second aspect, the present invention provides a system for rapidly aligning periodically collected data, including:
the first indexing unit is configured to traverse the first data sequence to calculate a change rate corresponding to each data value in the first data sequence, and determine a first alignment index value of the first data sequence by comparing the change rate of the first data sequence with a preset change rate threshold;
the second indexing unit is configured to traverse the second data sequence to calculate a change rate corresponding to each data value in the second data sequence, and determine a second alignment index value of the second data sequence by comparing the change rate of the second data sequence with a preset change rate threshold;
an error calculation unit configured to align the first data sequence and the second data sequence with the first alignment index value and the second alignment index value as assumed data alignment points, and calculate an average error of the first data sequence and the second data sequence;
a fluctuation adjusting unit configured to set a lower limit adjustment index value and an upper limit adjustment index value of the second alignment index value according to a preset fluctuation range, and calculate a lower limit adjustment index value and an upper limit adjustment index value to replace the second alignment index value as a lower limit average error and an upper limit average error corresponding to the data alignment point respectively
And the alignment execution unit is configured to compare the average error, the lower-limit average error and the upper-limit average error, narrow the fluctuation range of the index value according to the comparison result, determine the actual index value by iteratively executing the process of narrowing the fluctuation range of the index value, and align the first data sequence and the second data sequence according to the actual index value.
Further, the first index unit includes:
the alignment screening module is configured to screen out a data value corresponding to a change rate which is greater than a change rate threshold value for the first time from the change rate of the first data sequence as a first alignment point;
and the index output module is configured to output the index value of the first alignment point in the first data sequence as a first alignment index value.
Further, the error calculation unit includes:
the first interception module is configured to intercept data of the first data sequence from the first alignment index value to form a first alignment sequence, and update the index value of the first alignment sequence;
the second interception module is configured to intercept data of the second data sequence from the second alignment index value to form a second alignment sequence, and update the index value of the second alignment sequence;
and the error calculation module is configured to calculate difference values of corresponding numerical values belonging to the same index value in the first alignment sequence and the second alignment sequence, and output an average value of all the difference values as an average error corresponding to the first alignment index value and the second alignment index value.
Further, the fluctuation adjusting unit includes:
the step setting module is configured for setting a lower limit adjustment step and an upper limit adjustment step according to the fluctuation range;
a lower limit setting module configured to use a difference between the second alignment fluctuation index value and the lower limit adjustment step distance as a lower limit adjustment index value;
an upper limit setting module configured to take a sum of the second alignment fluctuation index value and the upper limit adjustment step distance as an upper limit adjustment index value;
the lower limit error module is configured to align the first data sequence and the second data sequence according to the first alignment index value and the lower limit adjustment index value, and calculate a lower limit adjustment average error of the first data sequence and the second data sequence;
and the upper limit error module is configured to align the first data sequence and the second data sequence according to the first alignment index value and the upper limit adjustment index value, and calculate an upper limit adjustment average error of the first data sequence and the second data sequence.
Further, the alignment execution unit includes:
the error comparison module is used for taking the lower limit adjustment index value as a lower limit index value and taking the second alignment index value as an upper limit index value if the lower limit adjustment average error is smaller than the average error and the average error is smaller than the upper limit adjustment average error; if the average error of the lower limit adjustment is larger than the average error and the average error is larger than the average error of the upper limit adjustment, taking the second alignment index value as a lower limit index value and taking the upper limit adjustment index value as an upper limit index value; if the average error of the lower limit adjustment is larger than the average error and the average error is smaller than the average error of the upper limit adjustment, taking the index value of the lower limit adjustment as the index value of the lower limit and taking the index value of the upper limit adjustment as the index value of the upper limit;
a first judgment module configured to output the second alignment index value as an actual alignment index value of the second data sequence if a difference between the upper limit index value and the lower limit index value is equal to 2;
the first judgment module is configured to output the second alignment index value as an actual alignment index value of the second data sequence if the difference between the upper limit value and the lower limit value of the fluctuation range is equal to 3;
and the index adjusting module is configured to update the second alignment index value to an integer value which is obtained by adding one half of the difference between the upper limit index value and the lower limit index value to the original second alignment index value if the difference between the upper limit value and the lower limit value of the fluctuation range is larger than 3, and determine the actual index value by iteratively updating the second alignment index value and executing the process of reducing the fluctuation range of the index value.
In a third aspect, a terminal is provided, including:
a processor, a memory, wherein,
the memory is used for storing a computer program which,
the processor is used for calling and running the computer program from the memory so as to make the terminal execute the method of the terminal.
In a fourth aspect, a computer storage medium is provided having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the above aspects.
The beneficial effect of the invention is that,
the method and the system for rapidly aligning the periodically acquired data can realize rapid alignment of data sequences acquired in different periods, thereby realizing rapid comparison of data in different periods, improving the efficiency of data comparison and analysis and ensuring the effectiveness of analysis results.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention.
FIG. 2 is another schematic flow diagram of a method of one embodiment of the invention.
FIG. 3 is a schematic block diagram of a system of one embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all 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.
FIG. 1 is a schematic flow diagram of a method of one embodiment of the invention. The implementation subject in fig. 1 may be a system for fast alignment of periodically acquired data.
As shown in fig. 1, the method includes:
and 150, comparing the average error, the lower-limit average error and the upper-limit average error, reducing the fluctuation range of the index value according to the comparison result, determining an actual index value by iteratively executing the process of reducing the fluctuation range of the index value, and aligning the first data sequence and the second data sequence according to the actual index value.
Assume that the data acquisition device has acquired two sets of periodic data sequences: data Sequence 1(Data Sequence 1, DS1)And Data Sequence 2(Data Sequence 2, DS2)Data alignment of DS1 and DS2 is performed by finding some data index value of DS1 and DS2, respectively, so that the two sets of data starting from the index value have the highest degree of coincidence. Suppose thatIs a data alignment point of DS1 and DS2, whereinAndindex values of the two groups of data respectively. When fixedAnd letIn a small range of fluctuation, i.e.WhereinIs the assumed DS2 data alignment point index value,Can be used forAnd constructing an approximate data pair starting point. When the range of phi is sufficiently small, the range of phi,is the minimum point of the two sets of data errors in the range and is also the only extreme point in the range. For the cutting process driven by the numerical control system, the feed speed is low, and the test track selected in the test process is generalAre non-periodic or have a longer period. Thus, a range Φ can be determined within which to find the data alignment points.
Specifically, as shown in fig. 2, the method for rapidly aligning periodically acquired data includes:
step 1: data initialization
(1) Setting the data rate of change threshold Δ v of DS1DS1DS2 data rate of change threshold Δ vDS2Threshold value of rate of change Δ vDS1Rate of change threshold Δ vDS2。
(3) Setting a maximum perturbation step sizeWherein the sum of the maximum perturbation steps cannot exceed the fluctuation range phi
And then proceeds to Step 2.
Step 2: coarse positioning based on speed threshold
(1) From the DS1 start point, traverse data calculationRate of change of pointUp toAt this time in order toIs an alignment point of DS1, and is fixed by using the i value as an index valueTo determine the value, i.e.Wherein i is an integer greater than 0.
(2) From the DS2 start point, traverse data calculationRate of change of pointUp toAt this time, inIs the starting point of the assumed data pair on DS2, i.e.Where j is an integer greater than 0.
Then go to Step3
Step 3: is calculated toIs the average error E when assuming that the data is aligned with the pointM
To be provided withTo assume data alignment points, the specific alignment method is to intercept data of the first data sequence from the first alignment index value to form a first alignment sequence, and intercept data of the second data sequence from the second alignment index value to form a second alignment sequence, for example, to intercept data from DS1Is intercepted from DS2Where n is the last bit of DS1M is the number of bits of the last bit of DS 2.
At this time can be rightAndthe index value of (a) is updated, and the values of i and j are both updated to 1. And then selecting a plurality of numerical value groups, wherein two numerical values in the numerical value groups belong to DS1 and DS2, and the index values of the two numerical values in the same numerical value group are the same. Calculating the difference of each value group, and then averaging all the differences to obtain the average error E by randomly selecting a plurality of corresponding data pointsM. And then proceeds to Step 4.
Step 4: range update according to phiIs calculated toAdjusting error E for lower bound of hypothesized data alignment pointsL,ELThe calculation method of (2) refers to Step 3. Wherein the lower limit adjusts the index valueAnd then proceeds to Step 5.
Step 5: range update according to phiIs calculated toAdjusting error E for upper bound of assumed data alignment pointsRThe upper limit adjustment error is calculated in Step 3. Wherein the upper limit adjusts the index valueAnd then proceeds to Step 6.
Step 6: judgment EM、ELAnd ERIn relation to (2)
If EL<EMAnd ER>EMThen the lower limit adjustment index value is used as the lower limit index value and the second alignment index value is used as the upper limit index value, i.e.And updating phi;
if EL>EMAnd ER<EMThen the second alignment index value is used as the lower limit index value and the upper limit adjustment index value is used as the upper limit index value, i.e.And updating phi;
if EL≥EMAnd ER≥EMThen the lower limit adjustment index value is used as the lower limit index value and the upper limit adjustment index value is used as the upper limit index value, i.e.And updating phi;
and then proceeds to Step 7.
Step 7: determining the range and error of the interval
If it isThe second alignment index value is output as the actual alignment index value of the second data sequence, i.e. takenThe data alignment is completed.
If it isThe second alignment index value is output as the actual alignment index value of the second data sequence, i.e. takenThe data alignment is completed.
As shown in fig. 3, the system 300 includes:
the first indexing unit 310 is configured to traverse the first data sequence to calculate a change rate corresponding to each data value in the first data sequence, and determine a first alignment index value of the first data sequence by comparing the change rate of the first data sequence with a preset change rate threshold;
the second indexing unit 320 is configured to traverse the second data sequence to calculate a change rate corresponding to each data value in the second data sequence, and determine a second alignment index value of the second data sequence by comparing the change rate of the second data sequence with a preset change rate threshold;
an error calculation unit 330, configured to align the first data sequence and the second data sequence according to the first alignment index value and the second alignment index value, and calculate an average error of the first data sequence and the second data sequence;
a fluctuation adjusting unit 340 configured to set a lower limit adjustment index value and an upper limit adjustment index value of the second alignment index value according to a preset fluctuation range, and calculate a lower limit adjustment index value and an upper limit adjustment index value to replace the second alignment index value as a lower limit average error and an upper limit average error corresponding to the data alignment point, respectively;
and an alignment performing unit 350 configured to determine an actual index value by comparing the average error with the fluctuating average error, and align the first data sequence and the second data sequence according to the actual index value.
Optionally, as an embodiment of the present invention, the first indexing unit includes:
the alignment screening module is configured to screen out data values corresponding to the change rates larger than the change rate threshold value from all the change rates of the first data sequence as first alignment points;
and the index output module is configured to output the index value of the first alignment point in the first data sequence as a first alignment index value.
Optionally, as an embodiment of the present invention, the error calculating unit includes:
the first interception module is configured to intercept data of the first data sequence from the first alignment index value to form a first alignment sequence, and update the index value of the first alignment sequence;
the second interception module is configured to intercept data of the second data sequence from the second alignment index value to form a second alignment sequence, and update the index value of the second alignment sequence;
and the error calculation module is configured to calculate difference values of corresponding numerical values belonging to the same index value in the first alignment sequence and the second alignment sequence, and output an average value of all the difference values as an average error corresponding to the first alignment index value and the second alignment index value.
Optionally, as an embodiment of the present invention, the fluctuation adjusting unit includes:
the step setting module is configured for setting a lower limit adjustment step and an upper limit adjustment step according to the fluctuation range;
a lower limit setting module configured to use a difference between the second alignment fluctuation index value and the lower limit adjustment step distance as a lower limit adjustment index value;
an upper limit setting module configured to take a sum of the second alignment fluctuation index value and the upper limit adjustment step distance as an upper limit adjustment index value;
the lower limit error module is configured to align the first data sequence and the second data sequence according to the first alignment index value and the lower limit adjustment index value, and calculate a lower limit adjustment average error of the first data sequence and the second data sequence;
and the upper limit error module is configured to align the first data sequence and the second data sequence according to the first alignment index value and the upper limit adjustment index value, and calculate an upper limit adjustment average error of the first data sequence and the second data sequence.
Optionally, as an embodiment of the present invention, the alignment performing unit includes:
the error comparison module is used for taking the lower limit adjustment index value as a lower limit index value and taking the second alignment index value as an upper limit index value if the lower limit adjustment average error is smaller than the average error and the average error is smaller than the upper limit adjustment average error; if the average error of the lower limit adjustment is larger than the average error and the average error is larger than the average error of the upper limit adjustment, taking the second alignment index value as a lower limit index value and taking the upper limit adjustment index value as an upper limit index value; if the average error of the lower limit adjustment is larger than the average error and the average error is smaller than the average error of the upper limit adjustment, taking the index value of the lower limit adjustment as the index value of the lower limit and taking the index value of the upper limit adjustment as the index value of the upper limit;
a first judgment module configured to output the second alignment index value as an actual alignment index value of the second data sequence if a difference between the upper limit index value and the lower limit index value is equal to 2;
the first judgment module is configured to output the second alignment index value as an actual alignment index value of the second data sequence if the difference between the upper limit value and the lower limit value of the fluctuation range is equal to 3;
and the index adjusting module is configured to update the second alignment index value to a rounding value which is obtained by adding one half of the difference between the upper limit index value and the lower limit index value to the original second alignment index value if the difference between the upper limit value and the lower limit value of the fluctuation range is larger than 3, recalculate the average error by using the updated second alignment index value, and determine the actual index value according to the average error.
Each functional unit 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.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A method for rapidly aligning periodically acquired data is characterized by comprising the following steps:
traversing the first data sequence to calculate the change rate corresponding to each data value in the first data sequence, and determining a first alignment index value of the first data sequence by comparing the change rate of the first data sequence with a preset change rate threshold;
traversing the second data sequence to calculate the change rate corresponding to each data value in the second data sequence, and determining a second alignment index value of the second data sequence by comparing the change rate of the second data sequence with a preset change rate threshold;
aligning the first data sequence and the second data sequence by taking the first alignment index value and the second alignment index value as assumed data alignment points, and calculating the average error of the first data sequence and the second data sequence;
setting a lower limit adjustment index value and an upper limit adjustment index value of the second alignment index value according to a preset fluctuation range, and respectively calculating a lower limit adjustment index value and an upper limit adjustment index value to replace the second alignment index value as a lower limit average error and an upper limit average error corresponding to the data alignment point;
comparing the average error, the lower-limit average error and the upper-limit average error, reducing the fluctuation range of the index value according to the comparison result, determining an actual index value by iteratively executing the process of reducing the fluctuation range of the index value, and aligning the first data sequence and the second data sequence according to the actual index value.
2. The method of claim 1, wherein traversing the first data sequence to calculate a rate of change for each data value in the first data sequence and determining the first alignment index value for the first data sequence by comparing the rate of change for the first data sequence to a predetermined rate threshold comprises:
screening out a data value corresponding to the change rate which is greater than the change rate threshold value for the first time from the change rate of the first data sequence as a first alignment point;
outputting an index value of the first alignment point in the first data sequence as a first alignment index value.
3. The method of claim 1, wherein aligning the first data sequence and the second data sequence according to the first alignment index value and the second alignment index value and calculating an average error of the first data sequence and the second data sequence comprises:
intercepting data of the first data sequence from the first alignment index value to form a first alignment sequence, and updating the index value of the first alignment sequence;
intercepting data of the second data sequence from the second alignment index value to form a second alignment sequence, and updating the index value of the second alignment sequence;
and calculating the difference value of the corresponding numerical values belonging to the same index value in the first alignment sequence and the second alignment sequence, and outputting the average value of all the difference values as the average error corresponding to the first alignment index value and the second alignment index value.
4. The method of claim 1, wherein setting a second alignment fluctuation index value according to the fluctuation range and calculating an average error corresponding to the alignment point with the second alignment fluctuation index value comprises:
setting a lower limit adjusting step distance and an upper limit adjusting step distance according to the fluctuation range;
taking the difference between the second alignment fluctuation index value and the lower limit adjustment step distance as a lower limit adjustment index value;
taking the sum of the second alignment fluctuation index value and the upper limit adjustment step distance as an upper limit adjustment index value;
aligning the first data sequence and the second data sequence according to the first alignment index value and the lower limit adjustment index value, and calculating the lower limit adjustment average error of the first data sequence and the second data sequence;
and aligning the first data sequence and the second data sequence according to the first alignment index value and the upper limit adjustment index value, and calculating the upper limit adjustment average error of the first data sequence and the second data sequence.
5. The method of claim 4, wherein the comparing the average error, the lower average error and the upper average error, and the determining the actual index value by iteratively performing the process of reducing the fluctuation range of the index value according to the comparison result comprises:
if the lower limit adjustment average error is smaller than the average error and the average error is smaller than the upper limit adjustment average error, taking the lower limit adjustment index value as a lower limit index value and taking the second alignment index value as an upper limit index value; if the average error of the lower limit adjustment is larger than the average error and the average error is larger than the average error of the upper limit adjustment, taking the second alignment index value as a lower limit index value and taking the upper limit adjustment index value as an upper limit index value; if the average error of the lower limit adjustment is larger than the average error and the average error is smaller than the average error of the upper limit adjustment, taking the index value of the lower limit adjustment as the index value of the lower limit and taking the index value of the upper limit adjustment as the index value of the upper limit;
if the difference between the upper limit index value and the lower limit index value is equal to 2, outputting the second alignment index value as the actual alignment index value of the second data sequence;
if the difference between the upper limit value and the lower limit value of the fluctuation range is equal to 3, outputting the second alignment index value as the actual alignment index value of the second data sequence;
and if the difference between the upper limit value and the lower limit value of the fluctuation range is more than 3, updating the second alignment index value to be a rounded value obtained by adding one half of the difference between the upper limit index value and the lower limit index value to the original second alignment index value, and determining the actual index value by iteratively updating the second alignment index value and executing the process of reducing the fluctuation range of the index value.
6. A system for rapid alignment of periodically acquired data, comprising:
the first indexing unit is configured to traverse the first data sequence to calculate a change rate corresponding to each data value in the first data sequence, and determine a first alignment index value of the first data sequence by comparing the change rate of the first data sequence with a preset change rate threshold;
the second indexing unit is configured to traverse the second data sequence to calculate a change rate corresponding to each data value in the second data sequence, and determine a second alignment index value of the second data sequence by comparing the change rate of the second data sequence with a preset change rate threshold;
an error calculation unit configured to align the first data sequence and the second data sequence with the first alignment index value and the second alignment index value as assumed data alignment points, and calculate an average error of the first data sequence and the second data sequence;
a fluctuation adjusting unit configured to set a lower limit adjustment index value and an upper limit adjustment index value of the second alignment index value according to a preset fluctuation range, and calculate a lower limit adjustment index value and an upper limit adjustment index value to replace the second alignment index value as a lower limit average error and an upper limit average error corresponding to the data alignment point respectively
And the alignment execution unit is configured to compare the average error, the lower-limit average error and the upper-limit average error, narrow the fluctuation range of the index value according to the comparison result, determine the actual index value by iteratively executing the process of narrowing the fluctuation range of the index value, and align the first data sequence and the second data sequence according to the actual index value.
7. The system of claim 6, wherein the first indexing unit comprises:
the alignment screening module is configured to screen out a data value corresponding to a change rate which is greater than a change rate threshold value for the first time from the change rate of the first data sequence as a first alignment point;
and the index output module is configured to output the index value of the first alignment point in the first data sequence as a first alignment index value.
8. The system of claim 6, wherein the error calculation unit comprises:
the first interception module is configured to intercept data of the first data sequence from the first alignment index value to form a first alignment sequence, and update the index value of the first alignment sequence;
the second interception module is configured to intercept data of the second data sequence from the second alignment index value to form a second alignment sequence, and update the index value of the second alignment sequence;
and the error calculation module is configured to calculate difference values of corresponding numerical values belonging to the same index value in the first alignment sequence and the second alignment sequence, and output an average value of all the difference values as an average error corresponding to the first alignment index value and the second alignment index value.
9. The system of claim 6, wherein the surge adjustment unit comprises:
the step setting module is configured for setting a lower limit adjustment step and an upper limit adjustment step according to the fluctuation range;
a lower limit setting module configured to use a difference between the second alignment fluctuation index value and the lower limit adjustment step distance as a lower limit adjustment index value;
an upper limit setting module configured to take a sum of the second alignment fluctuation index value and the upper limit adjustment step distance as an upper limit adjustment index value;
the lower limit error module is configured to align the first data sequence and the second data sequence according to the first alignment index value and the lower limit adjustment index value, and calculate a lower limit adjustment average error of the first data sequence and the second data sequence;
and the upper limit error module is configured to align the first data sequence and the second data sequence according to the first alignment index value and the upper limit adjustment index value, and calculate an upper limit adjustment average error of the first data sequence and the second data sequence.
10. The system of claim 9, wherein the alignment execution unit comprises:
the error comparison module is used for taking the lower limit adjustment index value as a lower limit index value and taking the second alignment index value as an upper limit index value if the lower limit adjustment average error is smaller than the average error and the average error is smaller than the upper limit adjustment average error; if the average error of the lower limit adjustment is larger than the average error and the average error is larger than the average error of the upper limit adjustment, taking the second alignment index value as a lower limit index value and taking the upper limit adjustment index value as an upper limit index value; if the average error of the lower limit adjustment is larger than the average error and the average error is smaller than the average error of the upper limit adjustment, taking the index value of the lower limit adjustment as the index value of the lower limit and taking the index value of the upper limit adjustment as the index value of the upper limit;
a first judgment module configured to output the second alignment index value as an actual alignment index value of the second data sequence if a difference between the upper limit index value and the lower limit index value is equal to 2;
the first judgment module is configured to output the second alignment index value as an actual alignment index value of the second data sequence if the difference between the upper limit value and the lower limit value of the fluctuation range is equal to 3;
and the index adjusting module is configured to update the second alignment index value to an integer value which is obtained by adding one half of the difference between the upper limit index value and the lower limit index value to the original second alignment index value if the difference between the upper limit value and the lower limit value of the fluctuation range is larger than 3, and determine the actual index value by iteratively updating the second alignment index value and executing the process of reducing the fluctuation range of the index value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110223664.4A CN112835961B (en) | 2021-03-01 | 2021-03-01 | Method and system for quickly aligning periodically acquired data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110223664.4A CN112835961B (en) | 2021-03-01 | 2021-03-01 | Method and system for quickly aligning periodically acquired data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112835961A true CN112835961A (en) | 2021-05-25 |
CN112835961B CN112835961B (en) | 2022-05-31 |
Family
ID=75934127
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110223664.4A Active CN112835961B (en) | 2021-03-01 | 2021-03-01 | Method and system for quickly aligning periodically acquired data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112835961B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130309660A1 (en) * | 2010-09-23 | 2013-11-21 | Real Time Genomics, Inc. | Methods of characterizing, determining similarity, predicting correlation between and representing sequences and systems and indicators therefor |
CN105740451A (en) * | 2016-02-03 | 2016-07-06 | 贵州大学 | Reference test based multimedia indexing method |
CN107111690A (en) * | 2014-12-23 | 2017-08-29 | 皇家飞利浦有限公司 | System, method and device for sequence alignment |
CN110197133A (en) * | 2019-05-13 | 2019-09-03 | 中国铁路总公司 | It will test the method and apparatus that waveform is aligned |
-
2021
- 2021-03-01 CN CN202110223664.4A patent/CN112835961B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130309660A1 (en) * | 2010-09-23 | 2013-11-21 | Real Time Genomics, Inc. | Methods of characterizing, determining similarity, predicting correlation between and representing sequences and systems and indicators therefor |
CN107111690A (en) * | 2014-12-23 | 2017-08-29 | 皇家飞利浦有限公司 | System, method and device for sequence alignment |
CN105740451A (en) * | 2016-02-03 | 2016-07-06 | 贵州大学 | Reference test based multimedia indexing method |
CN110197133A (en) * | 2019-05-13 | 2019-09-03 | 中国铁路总公司 | It will test the method and apparatus that waveform is aligned |
Non-Patent Citations (1)
Title |
---|
沈秉文等: "基于众包的知识库索引对齐算法", 《计算机学报》 * |
Also Published As
Publication number | Publication date |
---|---|
CN112835961B (en) | 2022-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109558295A (en) | A kind of performance indicator method for detecting abnormality and device | |
WO2021072874A1 (en) | Dual array-based location query method and apparatus, computer device, and storage medium | |
WO2012009071A1 (en) | High-dimensional stratified sampling | |
CN103322931A (en) | System and method for measuring gap and offset of point cloud | |
CN111512283B (en) | Radix estimation in a database | |
US20160292233A1 (en) | Discarding data points in a time series | |
US20230066703A1 (en) | Method for estimating structural vibration in real time | |
CN112835961B (en) | Method and system for quickly aligning periodically acquired data | |
CN106407233A (en) | A data processing method and apparatus | |
CN117237678A (en) | Method, device, equipment and storage medium for detecting abnormal electricity utilization behavior | |
CN107291767B (en) | Optimization processing method and device for task execution time | |
CN102523286A (en) | Method and device for obtaining credit degree of service | |
CN104502967A (en) | Method and device for quickly obtaining surface element information of seismic exploration and observation system | |
Borwein et al. | Computational investigations of the Prouhet-Tarry-Escott problem | |
CN111913945A (en) | Data management method and device and storage medium | |
CN115809228A (en) | Data comparison method and device, storage medium and electronic equipment | |
Zhao et al. | PSAEC: an improved algorithm for short read error correction using partial suffix arrays | |
CN114138330A (en) | Code clone detection optimization method and device based on knowledge graph and electronic equipment | |
Clarkson et al. | Self-improving algorithms for convex hulls | |
CN110895529B (en) | Processing method of structured query language and related device | |
WO2016206191A1 (en) | Data processing method and device | |
CN102902838A (en) | Trend-based target setting method and system for process control | |
CN109032892A (en) | A kind of method for drafting of performance chart, device, equipment and medium | |
CN106910141B (en) | Complex active power distribution network decomposition scheme optimization method and device | |
CN109344369B (en) | Certificate making method based on original value verification and terminal equipment |
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 |