CN103544012B - Series phase difference comparing method - Google Patents

Series phase difference comparing method Download PDF

Info

Publication number
CN103544012B
CN103544012B CN201310508784.4A CN201310508784A CN103544012B CN 103544012 B CN103544012 B CN 103544012B CN 201310508784 A CN201310508784 A CN 201310508784A CN 103544012 B CN103544012 B CN 103544012B
Authority
CN
China
Prior art keywords
numbers
ordered series
unit period
sumsegy
erracc
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
CN201310508784.4A
Other languages
Chinese (zh)
Other versions
CN103544012A (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.)
Hangzhou Dbappsecurity Technology Co Ltd
Original Assignee
DBAPPSecurity 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 DBAPPSecurity Co Ltd filed Critical DBAPPSecurity Co Ltd
Priority to CN201310508784.4A priority Critical patent/CN103544012B/en
Publication of CN103544012A publication Critical patent/CN103544012A/en
Application granted granted Critical
Publication of CN103544012B publication Critical patent/CN103544012B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Detection And Correction Of Errors (AREA)
  • Complex Calculations (AREA)

Abstract

The invention relates to a series phase difference comparing method. The series phase difference comparing method includes acquiring two quantitative indexes by circular motion and calculation of a vernier in a unit period, judging and identifying the two quantitative indexes to finally acquire whether the direction of the phase difference between two series is identical with the predicted direction or not, and judging whether the phase difference is within the predicted phase difference range (forward or backward direction, unit period quantitative range of the phase difference ranges from 0 to N) or not so as to determine whether the phase relation between the two series is accordant with the predicted phase difference or not. According to the direction of the phase difference and the judgment about whether the phase difference is within the phase difference range or not, people can conclude that the two data are accordant with people's predicted incidence relation.

Description

A kind of poor method for distinguishing of ordered series of numbers phase contrast
Technical field
The present invention relates to a kind of computer software, more particularly, to it is a kind of by computer software to judging the phase of two numbers Potential difference method for distinguishing.
Background technology
So-called ordered series of numbers refers to that the columns for arranging in a certain order is referred to as ordered series of numbers(sequence of number).In ordered series of numbers Each number be all called the data item of this ordered series of numbers, abbreviation item.The number for making number one is referred to as the 1st of this ordered series of numbers(It is logical First term is also referred to as often), the number for coming n-th is referred to as this ordered series of numbers to come that deputy number is referred to as this ordered series of numbers the 2nd ... N-th.
So-called unit period is the interval between adjacent two data item in index series, orientates a unit period as. Each data item in ordered series of numbers, belongs to a corresponding unit period.
During so-called phase place is index series, the adjacent corresponding latter number of two unit periods is listd relative to previous number The pace of change listd and the scale of change direction.
So-called phase contrast is referred between two ordered series of numbers A, B, if each corresponding data of ordered series of numbers item of A, can be Before and after ordered series of numbers B in the range of several unit periods, the ordered series of numbers item of matching is found, the direction of this scope and minimum length are exactly Phase contrast.
In computer software fields, the activity of the various characteristics of some things and things is often specifically counted by one group Whether row are recorded, relevant or when will determine whether their degree of association when needing to judge between two things, are had When can by excavate its correspondence record two groups of ordered series of numbers between phase contrast be judged, the size and side including phase contrast To, but in prior art, judge the method for the phase contrast of two groups of ordered series of numbers and for complicated.
The content of the invention
The present invention mainly solves the existing phase contrast that two ordered series of numbers are judged by computer of prior art(Including phase place Poor direction and size)A kind of extremely complex technical problem, there is provided phase contrast that can quickly excavate two ordered series of numbers, so as to Reach and judge between two things that whether relevant the ordered series of numbers phase contrast of the degree of association that is or will determining whether them poor Method for distinguishing.
What the above-mentioned technical problem of the present invention was mainly addressed by following technical proposals:A kind of ordered series of numbers phase contrast ratio Poor method for distinguishing, it is characterised in that it comprises the steps:
A. by two ordered series of numbers input memory modules to be contrasted;
B., two ordered series of numbers variable module SeqX are set, and SeqY, ordered series of numbers variable module SeqX, SeqY are respectively equipped with some numbers According to position, and estimated phase contrast direction D is obtained, True represents positive, and False represents reverse, size N;
If C. D is forward direction, ordered series of numbers A, B are copied to into SeqX, SeqY respectively;If D is reverse, ordered series of numbers B, A are distinguished It is copied to SeqX, SeqY;
D. the corresponding unit period sequence number of the periodic regime specified is obtained, smallest sequence number is Min, maximum serial number Max, it is fixed One investigation ordered series of numbers segment length SegLen of justice, the length should be not less than N, it should no more than the one of the length of whole cycle scope Half;
E. the following 3 unit periods section vernier module of initialization definitions, and unit period scope is initialized, unit period section Vernier module includes two member variables(Stt, End), Stt represents start bit of the current period section in corresponding ordered series of numbers, End tables Show stop bits of the current period section in corresponding ordered series of numbers;
I defines unit period section vernier module SegCur, and the corresponding start bits of initialization SegCur are Min+N+1, Stop bits is Min+N+SegLen;
II defines unit period section vernier module HdrCur, and the corresponding start bits of initialization HdrCur are Min+1, are tied Shu Weiwei Min+N;
III defines unit period section vernier module TlrCur, and the corresponding start bits of initialization TlrCur are Min+1+ SegLen, stop bits are Min+N+SegLen;
F. two statistical variables are defined:Miss, ErrAcc, are initialized as 0;
G. from first to last ordered series of numbers is traveled through by unit period root module, above-mentioned unit week is counted in circulating every time The corresponding index of phase section, and according to Rule of judgment counting statistics variable, process is as follows:
The summation of the data item that I statistics SegCur is covered in SeqX, obtains SumSegX;
The summation of the data item that II statistics HdrCur is covered in SeqX, obtains SumHdrX;
The summation of the data item that III statistics TlrCur is covered in SeqX, obtains SumTlrX;
The summation of the data item that IV statistics SegCur is covered in SeqY, obtains SumSegY;
If V SumSegY≤SumSegX+SumHdrX, and SumSegY >=SegSegY-SumTlrX, keep Miss and ErrAcc are constant.Otherwise:Miss numerical value adds one, i.e. Miss=Miss+1;
If VI SumSegY≤SumSegX+SumHdrX is false, on variable ErrAcc add up SumSegY with The difference of SumSegX+SumHdrX, i.e. ErrAcc=ErrAcc+SumSegY-SumSegX-SumHdrX;
If VII SumSegY >=SegSegY-SumTlrX is false, on variable ErrAcc add up SumSegY with The absolute value of the difference of SegSegY-SumTlrX, i.e. ErrAcc=ErrAcc+SegSegY-SumTlrX- SumSegY;
If H. the end unit period sequence number of SegCur is overlapped with Max, end loop, into next step;Otherwise simultaneously The above-mentioned unit period section of movement, circulation every time, will unit period section vernier by positive in a three cycles mobile unit period Two member variables Stt, End be incremented by, continue traversal;
I., after loop ends, if Miss and ErrAcc is still 0, the result for finally judging represents two ordered series of numbers as true Between phase contrast direction it is identical with estimated direction, and in estimated phase range;Otherwise, the result for finally judging as Vacation, represents the difference of the phase place between two ordered series of numbers, does not fall within predetermined phase range.
Loopy moving and calculating of the present invention by unit period section vernier, obtain two quantizating index, by the two The judgement identification of quantizating index, finally knows whether the direction of the difference of phase place between two ordered series of numbers is identical with estimated direction, and Discriminate whether in estimated phase range(Positive or reverse, the unit period quantitative range of phase deviation is 0 to N)It is interior, So as to whether the phase relation confirmed between two ordered series of numbers meets expected phase contrast.Direction of the people according to this phase contrast, and Whether have judgement in estimated phase range, draw the two data be meet it is contemplated that incidence relation.
The beneficial effect brought of the present invention is to solve judge two ordered series of numbers by computer existing for prior art The extremely complex technical problem of phase contrast, realizes a kind of phase contrast that can quickly excavate two ordered series of numbers, sentences so as to reach The poor other side of ordered series of numbers phase contrast of the whether relevant or degree of association that them will be determined whether between two things that break Method.
Description of the drawings
Accompanying drawing 1 is the unit period hop count row corresponding data position sequence number schematic diagram of embodiments of the invention;
Accompanying drawing 2 is the fundamental diagram of the present invention.
Specific embodiment
Below by embodiment, and accompanying drawing is combined, technical scheme is described in further detail.
Embodiment:
As shown in Fig. 2 the present invention is a kind of poor method for distinguishing of ordered series of numbers phase contrast, it is characterised in that it includes following step Suddenly:
A. by two ordered series of numbers input memory modules to be contrasted;
B., two ordered series of numbers variable module SeqX are set, and SeqY, ordered series of numbers variable module SeqX, SeqY are respectively equipped with some numbers According to position, and estimated phase contrast direction D is obtained, True represents positive, and False represents reverse, size N;
If C. D is forward direction, ordered series of numbers A, B are copied to into SeqX, SeqY respectively;If D is reverse, ordered series of numbers B, A are distinguished It is copied to SeqX, SeqY;
D. the corresponding unit period sequence number of the periodic regime specified is obtained, smallest sequence number is Min, maximum serial number Max, it is fixed One investigation ordered series of numbers segment length SegLen of justice, the length should be not less than N, it should no more than the one of the length of whole cycle scope Half;
E. the following 3 unit periods section vernier module of initialization definitions, and unit period scope is initialized, unit period section Vernier module includes two member variables(Stt, End), Stt represents start bit of the current period section in corresponding ordered series of numbers, End tables Show stop bits of the current period section in corresponding ordered series of numbers;
I defines unit period section vernier module SegCur, and the corresponding start bits of initialization SegCur are Min+N+1, Stop bits is Min+N+SegLen;
II defines unit period section vernier module HdrCur, and the corresponding start bits of initialization HdrCur are Min+1, are tied Shu Weiwei Min+N;
III defines unit period section vernier module TlrCur, and the corresponding start bits of initialization TlrCur are Min+1+ SegLen, stop bits are Min+N+SegLen;
F. two statistical variables are defined:Miss, ErrAcc, are initialized as 0;
G. from first to last ordered series of numbers is traveled through by unit period root module, above-mentioned unit week is counted in circulating every time The corresponding index of phase section, and according to Rule of judgment counting statistics variable, process is as follows:
The summation of the data item that I statistics SegCur is covered in SeqX, obtains SumSegX;
The summation of the data item that II statistics HdrCur is covered in SeqX, obtains SumHdrX;
The summation of the data item that III statistics TlrCur is covered in SeqX, obtains SumTlrX;
The summation of the data item that IV statistics SegCur is covered in SeqY, obtains SumSegY;
If V SumSegY≤SumSegX+SumHdrX, and SumSegY >=SegSegY-SumTlrX, keep Miss and ErrAcc are constant.Otherwise:Miss numerical value adds one, i.e. Miss=Miss+1;
If VI SumSegY≤SumSegX+SumHdrX is false, on variable ErrAcc add up SumSegY with The difference of SumSegX+SumHdrX, i.e. ErrAcc=ErrAcc+SumSegY-SumSegX-SumHdrX;
If VII SumSegY >=SegSegY-SumTlrX is false, on variable ErrAcc add up SumSegY with The absolute value of the difference of SegSegY-SumTlrX, i.e. ErrAcc=ErrAcc+SegSegY-SumTlrX- SumSegY;
If H. the end unit period sequence number of SegCur is overlapped with Max, end loop, into next step;Otherwise simultaneously The above-mentioned unit period section of movement, circulation every time, will unit period section vernier by positive in a three cycles mobile unit period Two member variables Stt, End be incremented by, continue traversal;
I., after loop ends, if Miss and ErrAcc is still 0, the result for finally judging represents two ordered series of numbers as true Between phase contrast direction it is identical with estimated direction, and in estimated phase range;Otherwise, the result for finally judging as Vacation, represents the difference of the phase place between two ordered series of numbers, does not fall within predetermined phase range.
As shown in figure 1, two ordered series of numbers variable module SeqX, SeqY data bit respectively including 1 to 20, Min=1, Max= 20, N=4, SegLen=10, then, after initialization, HdrCur points to 2-5 data bit, and SegCur points to 6-15 data bit, TlrCur points to 12-15 data bit, carries out based on this going through time.
Finally, present invention achieves characteristic by excavating the phase contrast size of two ordered series of numbers, direction, so as to reach judgement It is whether relevant between two things, and determine whether the poor method for distinguishing of ordered series of numbers phase contrast of their degree of association.

Claims (1)

1. the poor method for distinguishing of a kind of ordered series of numbers phase contrast, it is characterised in that it comprises the steps:
A. by two ordered series of numbers input memory modules to be contrasted;
B., two ordered series of numbers variable module SeqX are set, and SeqY, ordered series of numbers variable module SeqX, SeqY are respectively equipped with several data Position, and estimated phase contrast direction D is obtained, True represents positive, and False represents reverse, size N;
If C. D is forward direction, ordered series of numbers A, B are copied to into SeqX, SeqY respectively;If D is reverse, ordered series of numbers B, A are copied respectively To SeqX, SeqY;
D. the corresponding unit period sequence number of the periodic regime specified is obtained, smallest sequence number is Min, maximum serial number Max, defines one Individual investigation ordered series of numbers segment length SegLen, the length should be not less than N, it should the length of the no more than whole periodic regime specified The half of degree;
E. the following 3 unit periods section vernier module of initialization definitions, and the scope of unit period section vernier module is initialized, it is single Bit period section vernier module includes two member variables(Stt, End), Stt represents starting of the current period section in corresponding ordered series of numbers Position, End represent stop bits of the current period section in corresponding ordered series of numbers;
I defines unit period section vernier module SegCur, and the corresponding start bits of initialization SegCur are Min+N+1, are terminated Position is Min+N+SegLen;
II defines unit period section vernier module HdrCur, and the corresponding start bits of initialization HdrCur are Min+1, stop bits For Min+N;
III defines unit period section vernier module TlrCur, and the corresponding start bits of initialization TlrCur are Min+1+ SegLen, stop bits are Min+N+SegLen;
F. two statistical variables are defined:Miss, ErrAcc, are initialized as 0;
G. from first to last ordered series of numbers is traveled through by unit period root module, above-mentioned unit period section is counted in circulating every time Corresponding index, and according to Rule of judgment counting statistics variable, process is as follows:
The summation of the data item numerical value that I statistics SegCur is covered in SeqX, obtains SumSegX;
The summation of the data item numerical value that II statistics HdrCur is covered in SeqX, obtains SumHdrX;
The summation of the data item numerical value that III statistics TlrCur is covered in SeqX, obtains SumTlrX;
The summation of the data item numerical value that IV statistics SegCur is covered in SeqY, obtains SumSegY;
If V SumSegY≤SumSegX+SumHdrX, and SumSegY >=SegSegY-SumTlrX, keep Miss and ErrAcc is constant, otherwise:Miss numerical value adds one, i.e. Miss=Miss+1;
If VI SumSegY≤SumSegX+SumHdrX is false, add up on variable ErrAcc SumSegY and SumSegX+ The difference of SumHdrX, i.e. ErrAcc=ErrAcc+SumSegY-SumSegX-SumHdrX;
If VII SumSegY >=SegSegY-SumTlrX is false, add up on variable ErrAcc SumSegY and SegSegY- The absolute value of the difference of SumTlrX, i.e. ErrAcc=ErrAcc+SegSegY-SumTlrX-SumSegY;
If H. the end unit period sequence number of SegCur is overlapped with Max, end loop, into next step;It is otherwise simultaneously mobile Above-mentioned unit period section, every time circulation is by positive in a three cycles mobile unit period, will unit period section vernier two Individual member variable Stt, End are incremented by, and continue traversal;
I., after loop ends, if Miss and ErrAcc is still 0, the result for finally judging is represented between two ordered series of numbers as true Phase contrast direction it is identical with estimated direction, and in estimated phase range;Otherwise, the result for finally judging is vacation, The difference of the phase place between two ordered series of numbers is represented, is not fallen within predetermined phase range;
Described ordered series of numbers phase contrast is referred between two ordered series of numbers A, B, if each corresponding data of ordered series of numbers item of A, can Before and after ordered series of numbers B in the range of several unit periods, the ordered series of numbers item of matching is found, and the direction of this scope and minimum length are just It is ordered series of numbers phase contrast.
CN201310508784.4A 2013-10-24 2013-10-24 Series phase difference comparing method Active CN103544012B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310508784.4A CN103544012B (en) 2013-10-24 2013-10-24 Series phase difference comparing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310508784.4A CN103544012B (en) 2013-10-24 2013-10-24 Series phase difference comparing method

Publications (2)

Publication Number Publication Date
CN103544012A CN103544012A (en) 2014-01-29
CN103544012B true CN103544012B (en) 2017-04-26

Family

ID=49967493

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310508784.4A Active CN103544012B (en) 2013-10-24 2013-10-24 Series phase difference comparing method

Country Status (1)

Country Link
CN (1) CN103544012B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1960194A (en) * 2006-10-31 2007-05-09 华为技术有限公司 Sorting device
CN102945184A (en) * 2012-11-15 2013-02-27 江苏凌创电气自动化股份有限公司 Realization method for configuration control on window data
US8402440B2 (en) * 2008-07-07 2013-03-19 Nec Laboratories America, Inc. Program verification through symbolic enumeration of control path programs
CN103019646A (en) * 2013-01-09 2013-04-03 西安电子科技大学 Parallel sorting circuit and parallel sorting method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1960194A (en) * 2006-10-31 2007-05-09 华为技术有限公司 Sorting device
US8402440B2 (en) * 2008-07-07 2013-03-19 Nec Laboratories America, Inc. Program verification through symbolic enumeration of control path programs
CN102945184A (en) * 2012-11-15 2013-02-27 江苏凌创电气自动化股份有限公司 Realization method for configuration control on window data
CN103019646A (en) * 2013-01-09 2013-04-03 西安电子科技大学 Parallel sorting circuit and parallel sorting method

Also Published As

Publication number Publication date
CN103544012A (en) 2014-01-29

Similar Documents

Publication Publication Date Title
CN100456281C (en) Data division apparatus, data division method
US8170894B2 (en) Method of identifying innovations possessing business disrupting properties
CN105843733B (en) A kind of method for testing performance and device of big data platform
CN104598632B (en) Focus incident detection method and device
US20180246962A1 (en) Playlist list determining method and device, electronic apparatus, and storage medium
CN103559420A (en) Building method and device of anomaly detection training set
CN104204969B (en) Parameter setting apparatus
CN110348769B (en) Method, device and system for evaluating a marine ranch
WO2017000828A1 (en) Rule-based data object verification method, apparatus, system and electronic device
CN106294824B (en) Manufacture complex events detecting methods and system of the Internet of Things towards uncertain data stream
CN108875815A (en) Feature Engineering variable determines method and device
CN106156852A (en) A kind of Gauss overlap kernel impulse response estimation method
CN105159987A (en) Data storage and query method and apparatus
CN109145981A (en) Deep learning automation model training method and equipment
CN102244520A (en) Blind recognition method of convolutional coding parameters
CN107153702A (en) A kind of data processing method and device
CN111967616B (en) Automatic time series regression method and device
CN103544012B (en) Series phase difference comparing method
US20160283862A1 (en) Multi-distance similarity analysis with tri-point arbitration
CN104778202B (en) The analysis method and system of event evolutionary process based on keyword
CN111190896B (en) Data processing method, device, storage medium and computer equipment
WO2016040919A4 (en) Read cycles for identifying rfid tags
CN104636119A (en) Method and apparatus for processing shuffle instructions
CN106055674B (en) A kind of top-k under distributed environment based on metric space dominates querying method
CN104077361A (en) Big data sequencing method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Zhejiang Zhongcai Building No. 68 Binjiang District road Hangzhou City, Zhejiang Province, the 310051 and 15 layer

Patentee after: Hangzhou Annan information technology Limited by Share Ltd

Address before: Zhejiang Zhongcai Building No. 68 Binjiang District road Hangzhou City, Zhejiang Province, the 310051 and 15 Floor

Patentee before: Dbappsecurity Co.,ltd.