CN109802691A - The filtering method and device of sequence data - Google Patents

The filtering method and device of sequence data Download PDF

Info

Publication number
CN109802691A
CN109802691A CN201910068045.5A CN201910068045A CN109802691A CN 109802691 A CN109802691 A CN 109802691A CN 201910068045 A CN201910068045 A CN 201910068045A CN 109802691 A CN109802691 A CN 109802691A
Authority
CN
China
Prior art keywords
data
sequence
filtering
buffer
filter order
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910068045.5A
Other languages
Chinese (zh)
Inventor
鄢贵海
卢文岩
周孝斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongke Yuanshu (beijing) Technology Co Ltd
Original Assignee
Zhongke Yuanshu (beijing) Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongke Yuanshu (beijing) Technology Co Ltd filed Critical Zhongke Yuanshu (beijing) Technology Co Ltd
Priority to CN201910068045.5A priority Critical patent/CN109802691A/en
Publication of CN109802691A publication Critical patent/CN109802691A/en
Pending legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

The present invention provides a kind of filtering method of sequence data and device, this method comprises: the first data of receiving data sequence, and first data are stored to the first buffer;In the case where storing the number of data of the data sequence to first buffer more than or equal to filter order, the data for the data sequence that quantity is the filter order are read from first buffer according to sliding window position, wherein, the size of the sliding window is equal to the filter order;Calculating is filtered according to the data for the data sequence that quantity of the filtering weighting coefficient to reading is the filter order, obtain the data filtering result of the data sequence comprising first data, wherein, the number of data point is determined according to the filter order in the filtering weighting coefficient.It can be improved the real-time being filtered to sequence data through the above scheme.

Description

The filtering method and device of sequence data
Technical field
The present invention relates to sequence data processing technology field more particularly to the filtering methods and device of a kind of sequence data.
Background technique
When carrying out calculation processing to finance data, often relate to be analyzed and processed time series data.To the time Sequence data in the process of processing, often needs to be filtered, to reach redistributing for data weighting.Wherein, By the way that the order of filter is arranged, the filtering processing of different rank can be carried out to the time series data of input, is filtered by setting The weight coefficient of wave device can carry out the filtering processing of different situations to the time series data of input.Moreover, when large-scale Between in sequence data calculating process, the real-time of data processing is particularly important.However, existing data filtering processing scheme clock synchronization Between sequence data when being handled, the real-time of data processing is very low, it is difficult to meet user demand.
Summary of the invention
In view of this, the present invention provides the filtering method and device of a kind of sequence data, sequence data is carried out with improving The real-time of filtering processing.
To achieve the goals above, the present invention uses following scheme:
In an embodiment of the present invention, the filtering method of sequence data, comprising:
First data of receiving data sequence, and first data are stored to the first buffer;
It is greater than or equal to filter order in the number for storing the data of the data sequence to first buffer In the case of, the data sequence that quantity is the filter order is read from first buffer according to sliding window position The data of column, wherein the size of the sliding window is equal to the filter order;
It is filtered according to the data for the data sequence that quantity of the filtering weighting coefficient to reading is the filter order Wave calculates, and obtains the data filtering result of the data sequence comprising first data, wherein the filtering weighting coefficient The number of middle data point is determined according to the filter order.
In an embodiment of the present invention, the filter of sequence data, comprising:
Storage control unit, the first data of sequence for receiving data, and first data are stored to first and are delayed Rush device;
Control unit is read, for being greater than in the number for the data for storing the data sequence to first buffer Or in the case where being equal to filter order, reading quantity from first buffer according to sliding window position is the filtering The data of the data sequence of order, wherein the size of the sliding window is determined according to the filter order;
Computing unit is filtered, for being the data of the filter order according to quantity of the filtering weighting coefficient to reading The data of sequence are filtered calculating, obtain the data filtering result of the data sequence comprising first data, wherein The number of data point is equal to the filter order in the filtering weighting coefficient.
In an embodiment of the present invention, computer equipment, including memory, processor and storage are on a memory and can be The computer program run on processor, the processor realize the step of above-described embodiment the method when executing described program Suddenly.
In an embodiment of the present invention, computer readable storage medium is stored thereon with computer program, which is located The step of reason device realizes above-described embodiment the method when executing.
The filtering method of sequence data of the invention, the filter of sequence data, computer equipment and computer-readable Storage medium, by storing the data of the data sequence of serial transmission into buffer, then according to the sliding window of setting The data of data sequence in read buffers, and be filtered using data of the filtering weighting coefficient to the data sequence of reading It calculates, concurrently the data of data sequence can be filtered.Moreover, when new data is stored to buffer, it can The new data in buffer is selected by neatly moving sliding window, realization is filtered new data.In this way, logical Crossing this programme can be filtered for the sequence data of real-time reception, to improve the reality being filtered to sequence data Shi Xing.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.In the accompanying drawings:
Fig. 1 is the flow diagram of the filtering method of the sequence data of one embodiment of the invention;
Fig. 2 is the flow diagram of the filtering method of the sequence data of another embodiment of the present invention;
Fig. 3 is the method flow for carrying out logic calculation in one embodiment of the invention using multiple multipliers and multiple adders Schematic diagram;
Fig. 4 is the flow diagram of the filtering method of the sequence data of yet another embodiment of the invention;
Fig. 5 is the flow diagram of the filtering method of the sequence data of further embodiment of this invention;
Fig. 6 is the top level structure schematic diagram of one embodiment of the invention;
Fig. 7 is the timing diagram of one embodiment of the invention;
Fig. 8 is the flow diagram of control process in one embodiment of the invention;
Fig. 9 is the structural schematic diagram of the data buffer in one embodiment of the invention;
Figure 10 is the structural schematic diagram of the data path in one embodiment of the invention;
Figure 11 is the structural schematic diagram of the filter of the sequence data of one embodiment of the invention.
Specific embodiment
Understand in order to make the object, technical scheme and advantages of the embodiment of the invention clearer, with reference to the accompanying drawing to this hair Bright embodiment is described in further details.Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but simultaneously It is not as a limitation of the invention.
Fig. 1 is the flow diagram of the filtering method of the sequence data of one embodiment of the invention.As shown in Figure 1, some realities Apply the filtering method of the sequence data of example, it may include:
Step S110: the first data of receiving data sequence, and first data are stored to the first buffer;
Step S120: it is greater than or equal to filter in the number for storing the data of the data sequence to first buffer In the case where wave order, quantity is read from first buffer as the institute of the filter order according to sliding window position State the data of data sequence, wherein the size of the sliding window is determined according to the filter order;
Step S130: according to the number for the data sequence that quantity of the filtering weighting coefficient to reading is the filter order It is calculated according to being filtered, obtains the data filtering result of the data sequence comprising first data, wherein the filtering The number of data point is equal to the filter order in weight coefficient.
In above-mentioned steps S110, which can be various comprising the sequence of the data element arranged in certain sequence Column, for example, time series, spatial sequence etc..The data of the data sequence can be passed in real time by external equipment (such as sensor) It brings, each period can transmit a data.The data of the data sequence can come from same external equipment, can also come From different, similar equipment, or it can come from entirely different multiple equipment in the case where special requirement.First number " first " in is not limited to the first data in the data sequence, is also not limited to the received first data of this method, It is only used for distinguishing with subsequent second data, for showing the first data and the second data position in the data sequence Set (such as time location, spatial position etc.) difference.
In some cases, before receiving first data, one or more data sequences can be had received that Data, and can be stored to first buffer.Including first data, the data of the data sequence are general It is stored by the storage order of first buffer, in special circumstances, the data of the data sequence can not be first slow by this The storage order for rushing device is stored, but at this time, it may be necessary to the storage location of each data is recorded, convenient for subsequent by sliding window reading Access evidence.First data buffer can be the buffer of various sequential storages, for example, circular buffer, circular buffer Memory space can reuse, storage resource can be saved with this.
In above-mentioned steps S120, which is typically only used for storing the data of above-mentioned data sequence, special feelings Under condition, which can be used to store simultaneously other data, but need to mark each data of the data sequence at this time Storage location reads data by sliding window convenient for subsequent.What the filter order can refer to be filtered the data of data sequence The order of filter can refer to the quantity of data when filtering, can according to need and set, can be used for determining the big of sliding window It is small, for example, the size of sliding window is equal to the filter order.When the data of the data sequence stored in first buffer are greater than Or when being equal to filter order, it may be said that the data of bright data sequence are enough, are adapted for filtering.The sliding window can be used for For mark to the width for storing the data area being filtered to the data of first buffer, the width of the data area can root It is defined according to storage sequencing or sequence of positions.The sliding window can be slided according to the sliding step of setting, thus Different data storage location chooses the data of the width of certain data area.As long as the initial position in the sliding window meets energy It is enough to be filled by data completely, for example, determine the sliding according to the position of the data of oldest stored to first buffer The initial position of window, specifically, for example, first data that can cover data sequence in first buffer are secondary to storing Sequence is the data area between the data of the size of the sliding window.
In above-mentioned steps S130, which may include multiple data points, which can be with sliding Data in window correspond.The filtering weighting coefficient can be stored in advance in hard disk or caching, be read when needed It takes or calls, can be configured or adjust according to filtering requirements.It may include utilizing filtering weighting coefficient to slide that filtering, which calculates, Weight is arranged in the data of data sequence in dynamic window, for example, can be by the data point of filtering weighting coefficient and corresponding data The data point of sequence is multiplied, and then the result of multiplication adds up, the corresponding filter of the data of the position as the sliding window Wave result.The result of filtering can export in real time, or temporarily store and transfer out again when needed.
In the present embodiment, by storing the data of the data sequence of serial transmission into buffer, then according to setting Sliding window read buffers in data sequence data, and using filtering weighting coefficient to the number of the data sequence of reading It calculates, concurrently the data of data sequence can be filtered according to being filtered.Moreover, storing in new data to buffering When device, the new data in buffer can be selected by neatly moving sliding window, realization is filtered new data.Such as This one, can be filtered for the sequence data of real-time reception by this programme, sequence data is filtered to improve The real-time of wave processing.
Fig. 2 is the flow diagram of the filtering method of the sequence data of another embodiment of the present invention.As shown in Fig. 2, some The filtering method of the sequence data of embodiment, before above-mentioned steps S130, that is, according to filtering weighting coefficient to the quantity of reading For the data sequence of the filter order data be filtered calculating before, may also include that
Step S140: filtering weighting coefficient is obtained, and the filtering weighting coefficient that will acquire is stored to the second buffer;
Step S150: the filtering weighting coefficient is read from second buffer, for being described to the quantity of reading The data filtering of the data sequence of filter order calculates.
In above-mentioned steps S140, filtering weighting coefficient can be collected by reading from hard disk or caching.Utilize filter Wave weight coefficient can carry out weight distribution to the data in sequence.Multiple data points of filtering weighting coefficient can by store to Second buffer.Second buffer is preferably different from above-mentioned first buffer.Second buffer can be various types Sequential storage buffer, for example, circular buffer.
In above-mentioned steps S150, the filtering weighting coefficient can be read while reading sequence data or later, When being filtered calculating to the data of different sliding windows, the sequence for reading each data point of filtering weighting coefficient is both needed to unanimously. It specifically may include that the data point of filtering weighting coefficient is multiplied with the data point of corresponding data sequence that filtering, which calculates, then The result of multiplication is added up, the corresponding filter result of the data of the current location as the sliding window.
It in the present embodiment, is stored by the filtering weighting coefficient that will acquire to buffer, and when needed from the buffer The filtering weighting coefficient is read, can be improved the acquisition speed of filtering weighting coefficient, so that the speed that filtering calculates is improved, from And improve the real-time that filtering calculates.
In some embodiments, above-mentioned steps S130, that is, according to filtering weighting coefficient be the filtering to the quantity of reading The data of the data sequence of order are filtered the specific embodiment of calculating, it may include:
It is the filter order to the quantity of filtering weighting coefficient and reading using multiple multipliers and multiple adders The data of the data sequence carry out logic calculation, with the number to the data sequence that the quantity of reading is the filter order It is calculated according to being filtered.
Specifically, the data that can use multiple multipliers in parallel for data sequence increase weight, utilize multiple additions Device can add up the data of the data sequence after increase weight.
In the present embodiment, concurrently multiple sequence datas can be filtered using multiple multipliers and multiple adders It calculates, the speed that filtering calculates is improved, to improve the filtering real-time of sequence data.
Fig. 3 is the method flow for carrying out logic calculation in one embodiment of the invention using multiple multipliers and multiple adders Schematic diagram.As shown in figure 3, the specific embodiment of above-mentioned steps S130, that is, using multiple multipliers and multiple adders to filter Wave weight coefficient and the quantity of reading are that the data of the data sequence of the filter order carry out logic calculation, it may include:
Step S131: using multiple multiple data pair of multiplier parallel computation product, wherein the multiple data to by The quantity of each data point and reading in filtering weighting coefficient is that the data one of the data sequence of the filter order are a pair of It should be formed;
Step S132: accumulation calculating is carried out using product of multiple adders to the multiple data pair, is obtained comprising institute State the data filtering result of the data sequence of the first data.
It, can be successively from above-mentioned first buffer when using the product of multiple multiple data pair of multiplier parallel computation Sequence data is read in oldest stored position in sliding window, and filtering weighting coefficient is successively read from above-mentioned second buffer The weight coefficient data point of corresponding sequence data is separately input to different multipliers by data point, and the number of multiplier can To be equal to filter order.When adding up to product, it can use multiple adders and calculated, for example, first order adder Quantity can be filter order half, the quantity of second level adder can be the half of the quantity of first order adder, And so on, the quantity of the adder of afterbody can be one, and obtained filter result is a data.
For example, may include data point Y for filter order (size of sliding window) qfactor, filtering weighting coefficient Y (0), Y (1) ..., Y (qfactor-1), the data sequence X in sliding window may include data X (0), X (1), X (2), X (3) ..., X (qfactor-1), then can be concurrently to data point Y (0) and data X (0), data point Y using multiple adders (1) and data X (1), data point Y (2) and data X (2) ..., data point Y (qfactor-1) and data X (qfactor-1) do Multiplication calculates.Using multiple adders can to product Y (0) * X (0), Y (1) * X (1) ..., Y (qfactor-1) * X (qfactor-1) accumulation calculating is done.
In the present embodiment, by the product first with multiple multiple data pair of multiplier parallel computation, multiple add is recycled Musical instruments used in a Buddhist or Taoist mass carries out accumulation calculating to the product of the multiple data pair, can be improved the speed that filtering calculates.
Fig. 4 is the flow diagram of the filtering method of the sequence data of yet another embodiment of the invention.As shown in figure 4, Fig. 1 institute The filtering method of the sequence data shown, may also include that
Step S160: the second data of the data sequence are received, and second data are stored to described first and are delayed Rush device;
Step S170: the sliding window is moved into sliding step to the storage location of second data;
Step S180: again slow from described first according to the sliding window position after the movement sliding step Rush the data that device reads the data sequence that quantity is the filter order;
Step S190: being the data of the filter order to the quantity re-read according to the filtering weighting coefficient The data of sequence are filtered calculating, obtain the data filtering result of the data sequence comprising second data.
In above-mentioned steps S160, " second " in second data is used to mutually distinguish with the first data of preceding number, is used for Indicate that the two in the data sequence position (such as time location, spatial position etc.) is different.Moreover, second data and unlimited The data for being set to and then the first data of preceding number and generating or arriving, in other words, second data and the first data above-mentioned Between can be spaced the data of one or more above-mentioned data sequences.
In above-mentioned steps S170 and step S180, which be can be set as needed, for example, can be set to 1,2 etc..In the case where sliding step is 1, a mobile data subtract so that increasing a new data in sliding window every time Few oldest data.Pass through the storage location (positions of the data of newest storage) by sliding window to second data Mobile sliding step, can be filtered calculating to newest received sequence data more in real time.
In above-mentioned steps S190, the embodiment of the step is similar with the embodiment of above-mentioned steps S130, and difference exists Different in the position of sliding window, sequence data wherein included is different, that is, increases new sequence data, reduces old Sequence data.It may include that power is arranged for the data of the data sequence in sliding window using filtering weighting coefficient that filtering, which calculates, Weight.The data filtering result of the obtained data sequence comprising second data is the corresponding filtering of current sliding window mouth Calculated result.
Above-mentioned steps S160 to step S190 can constantly repeat, thus to the number of continuous, real-time reception sequence It is calculated according to being filtered, for example, corresponding filtering calculated result can be exported per a data are newly received.
In the present embodiment, it includes new received sequence data that sliding window is made by mobile sliding window, can be more Sequence data is filtered in real time.
Fig. 5 is the flow diagram of the filtering method of the sequence data of further embodiment of this invention.As shown in figure 5, Fig. 1 institute The filtering method of the sequence data shown, before above-mentioned steps S110, that is, the first data of receiving data sequence, and will be described First data are stored to before the first buffer, may also include that
Step S1100: successively receiving multiple third data of the data sequence, and by the multiple third data by connecing Receipts sequence successively stores the Coutinuous store position into first buffer, wherein finally stores to first buffer The third data next storage location for being abutted of storage location for storing first data.
In the present embodiment, can receive multiple third data before receiving the first data, multiple third data and First data can fill full sliding window.Those first data, third data etc. in order Coutinuous store to first buffering In device, required sequence data can be read in order to postpone to rush in device, sliding window easy to remove is simpler easily real in terms of code It is existing.
In order to make those skilled in the art be best understood from the present invention, will be illustrated below with a specific embodiment of the invention Implementation process.
Fig. 6 is the top level structure schematic diagram of one embodiment of the invention.As shown in fig. 6, in certain embodiments, this hair The top level structure of the filtering method institute use device tsfir of the sequence data of bright embodiment may include the first data buffer, Two data buffers, control logic, data path etc..First data buffer can be used for the data of temporary storage time sequence X, Second data buffer can be used for the data of the sequence Y of temporary filtering weighting coefficient.Control logic can be used for controlling should The data access of first data buffer and second data buffer.The data path can be according to the data of time series X Calculating is filtered with the data of sequence Y.
Fig. 7 is the timing diagram of one embodiment of the invention.As shown in Figure 7, wherein marking 1 position indicates reset signal Tsfir_rstn is effective, at this point, all internal logics and section ports signal restore to the state arranged in advance, all logics are quasi- The new calculating of standby ready waiting is opened.The position of mark 2 indicates enable signal tsfir_enable set, formal to open new calculate. The position of mark 3 indicates that rising edge clock arrives, the parameters tsfir_para such as filter order required for internal logic sampling calculates.Mark 4 position indicates that rising edge clock arrives, and internal logic samples two input time sequence (data of the sequence of weight coefficient The data tsfir_tsin0 of tsfir_tsin1 and time series) in first data element, each clock data is more later It is new primary.The position of mark 5 indicates first calculated result tsfir_tsout output, later in the continuous situation of input data Guarantee one result of each clock output.
Fig. 8 is the flow diagram of control process in one embodiment of the invention.Referring to Fig. 6 to Fig. 8, in some specific implementations In example, control process needed for the filtering method of sequence data can include:
Step S1: in system reset, internal logic and register restore to initial state, Waiting Time Sequence write-in buffering Device.
Step S2: when parameter is read, parameter tsfir_para needed for internal logic sampling/reading filtering processing, packet Include the filter order etc. of filter.
Step S3: in data buffer write-in, by the sequence of time series X and filtering weighting coefficient in sliding window The valid data of Y are respectively written into respective data buffer.
Step S4: filter calculate when, according to filter order by the data of the time series in two data buffers Data path is sent into be filtered in calculating.
Step S5: after calculating, filter result is exported.
Specifically, for example, being filtered in real time for time series X (X (0), X (1), X (2), X (3) ..., X (n-1)) Wave, filter weight are Y (Y (0), Y (1) ..., Y (qfactor-1)), wherein n indicates the data number of time series, Qfactor indicates filter order (i.e. sliding window size).In the form of sliding window, to time series in each sliding window X subsequence is filtered, and gained filter result Z (Z (0), Z (1), Z (2), Z (3) ..., Z (m-1)) is still time sequence Column, wherein the number of m expression window.Parameter may include the filter order qfactor of filter, the cunning of the sliding window of default Dynamic step-length can be 1, and calculation code for example may include:
The hardware configuration that Real-Time Filtering processing is carried out to time series, can support at any order time series Real-Time Filtering Reason, hardware configuration includes: data buffer, and the data buffer can be used for the data buffer storage of time series;Control logic, The control logic can be used for realizing the reading data of data buffer and the control of data path;Data path, the number It is realized according to access and output is calculated to the Real-Time Filtering of time series.
Fig. 9 is the structural schematic diagram of the data buffer in one embodiment of the invention.As shown in figure 9, sliding window is big It is small to be equal to filter order.Data element X [k] in sliding window and the data point Y [k] in filtering weighting coefficient one are a pair of It answers.When having in new time series data such as X [k+1] deposit buffer, sliding window can be to the positive direction of k coordinate mobile one A sliding step, such as the length of 1 data point.Then the data point Y [k] that can use in original filtering weighting coefficient is right The time series data in position after movement locating for neat sliding window, and it is filtered calculating.
The data buffer of one length of window caches the data element X [k] of time series X to be calculated, another window The data buffer caching filter coefficients weight Y data point Y [k] of mouth length, when the acquisition of filter weight Y data is finished and cached Between sequence X data buffer valid data length be more than or equal to filter order after, the data in two buffers can be sent Enter data path to be calculated, if thering are the valid data of new time series X to come in each rising edge clock, cache-time sequence The data buffer window of column X moves backward step-length unit (for example, 1 unit), stores having for the time series X newly to come in Data are imitated, the data for being already engaged in and calculating and being not required in the time series X for participating in calculating again are removed with window form, then more The data for the data buffer newly crossed are sent into data path and are calculated, and can reach the data for carrying out a time series X, calculate one The Real-Time Filtering of the data of a time series X calculates the effect of data.
Figure 10 is the structural schematic diagram of the data path in one embodiment of the invention.As shown in Figure 10, data path is by adding Musical instruments used in a Buddhist or Taoist mass and multiplier computation array composition, data x0, x1, x3 ... xpara-1 of the time series of input and the number of weight coefficient Strong point y0, y1, y3 ... ypara-1 from the data buffer of the storage time sequence data element X [k] of Fig. 9 and can be deposited respectively It stores up and is read in the data buffer of data point Y [k], and the data of time series X and sequence Y correspond.The data path can Time sequence X and sequence Y are filtered in the form of assembly line.By taking 16 rank filters as an example, pipeline processes mistake Journey can be as follows:
The assembly line first order includes 16 multipliers, for calculating time series X and sequence Y corresponding element under current window Product;
The assembly line second level includes 16 adders, for time series X under current window in the assembly line first order that adds up With the product of sequence Y corresponding element;
The assembly line third level includes 8 adders, the sum for generating in the assembly line second level of adding up;
The assembly line fourth stage includes 4 adders, the sum for generating in the assembly line third level of adding up;
Assembly line level V includes 2 adders, the sum for generating in the assembly line fourth stage that adds up;
The 6th grade of assembly line includes 1 adder, the sum for generating in the assembly line level V that adds up, obtain and conduct Final filter result.
In some embodiments, when output time series Z is put into former time series X, if holding input time sequence X It is isometric with the output time series Z after filtering processing, tsfir_para-1 data 0, can be set as before output time series Tsfir_para data start to export for first filtering processing result.
In the present embodiment, Real-Time Filtering processing is carried out to time series, a data can be handled in real time by carrying out a data, Weight reassignment can be carried out in real time to input time sequence data, output is calculated, can be improved real-time, reach filtering effect Fruit.
Based on inventive concept identical with the filtering method of sequence data shown in FIG. 1, the embodiment of the invention also provides A kind of filter of sequence data, as described in following example.The original solved the problems, such as due to the filter of the sequence data Reason is similar to the filtering method of sequence data, therefore the implementation of the filter of the sequence data may refer to the filter of sequence data The implementation of wave method, overlaps will not be repeated.
Figure 11 is the structural schematic diagram of the filter of the sequence data of one embodiment of the invention.As shown in figure 11, some The filter of the sequence data of embodiment, it may include: storage control unit 210 reads control unit 220 and filtering calculating list Member 230, above-mentioned each unit are linked in sequence.
Storage control unit 210, the first data of sequence for receiving data, and first data are stored to first Buffer;
Control unit 220 is read, for the number in the data for storing the data sequence to first buffer In the case where more than or equal to filter order, it is described for reading quantity from first buffer according to sliding window position The data of the data sequence of filter order, wherein the size of the sliding window is determined according to the filter order;
Computing unit 230 is filtered, for being described in the filter order according to quantity of the filtering weighting coefficient to reading The data of data sequence are filtered calculating, obtain comprising first data the data sequence data filtering as a result, Wherein, the number of data point is equal to the filter order in the filtering weighting coefficient.
In some embodiments, the filter of sequence data shown in Figure 11 may also include that weight coefficient storage unit With weight coefficient reading unit, the two is connected with each other weight coefficient reading unit and connect with filtering computing unit 230.
Weight coefficient storage unit, for obtaining filtering weighting coefficient, and the filtering weighting coefficient storage that will acquire To the second buffer;
Weight coefficient reading unit, for reading the filtering weighting coefficient from second buffer, for reading Quantity be the filter order the data sequence data filtering calculate.
In some embodiments, computing unit 230 is filtered, it may include: filtering computing module, for utilizing multiple multipliers It is carried out with the data for the data sequence that quantity of multiple adders to filtering weighting coefficient and reading is the filter order Logic calculation is filtered calculating with the data to the data sequence that the quantity of reading is the filter order.
In some embodiments, computing module is filtered, it may include:
Product computing module, for the product using multiple multiple data pair of multiplier parallel computation, wherein the multiple Data are to the number by the data sequence that the quantity of each data point and reading in filtering weighting coefficient is the filter order It is formed according to corresponding;
Additional calculation module is obtained for carrying out accumulation calculating using product of multiple adders to the multiple data pair To the data filtering result of the data sequence comprising first data.
In some embodiments, the filter of sequence data shown in Figure 11 may also include that Moving window control list Member.
Storage control unit 210 is also used to receive the second data of the data sequence, and second data is stored To first buffer;
Moving window control unit, for walking the sliding window to the mobile sliding of the storage location of second data It is long;
Control unit 220 is read, is also used to according to the sliding window position weight after the movement sliding step The data for the data sequence that quantity is the filter order are newly read from first buffer;
Computing unit 230 is filtered, is also used to according to the filtering weighting coefficient be the filtering to the quantity re-read The data of the data sequence of order are filtered calculating, obtain the data of the data sequence comprising second data Filter result.
In some embodiments, storage control unit 210 are also used to successively receive multiple third numbers of the data sequence According to, and the multiple third data are successively stored into the Coutinuous store position into first buffer by reception sequence, In, the next storage location abutted to the storage location of the third data of first buffer is finally stored for depositing Store up first data.
In some embodiments, first buffer is circular buffer.
The embodiment of the present invention also provides a kind of computer equipment, including memory, processor and storage are on a memory simultaneously The computer program that can be run on a processor, the processor realize above-described embodiment the method when executing described program Step.
The embodiment of the present invention also provides a kind of computer readable storage medium, is stored thereon with computer program, the program The step of above-described embodiment the method is realized when being executed by processor.
In conclusion the filter of the filtering method of the sequence data of the embodiment of the present invention, sequence data, computer are set Standby and computer readable storage medium, by storing the data of the data sequence of serial transmission into buffer, then basis The data of data sequence in the sliding window read buffers of setting, and using filtering weighting coefficient to the data sequence of reading Data be filtered calculating, concurrently the data of data sequence can be filtered.Moreover, new data store to When buffer, the new data in buffer can be selected by neatly moving sliding window, new data is filtered in realization Wave.In this way, can be filtered for the sequence data of real-time reception by this programme, thus improve to sequence data into The real-time of row filtering processing.
In the description of this specification, reference term " one embodiment ", " specific embodiment ", " some implementations Example ", " such as ", the description of " example ", " specific example " or " some examples " etc. mean it is described in conjunction with this embodiment or example Particular features, structures, materials, or characteristics are included at least one embodiment or example of the invention.In the present specification, Schematic expression of the above terms may not refer to the same embodiment or example.Moreover, the specific features of description, knot Structure, material or feature can be combined in any suitable manner in any one or more of the embodiments or examples.Each embodiment Involved in the step of sequence be used to schematically illustrate implementation of the invention, sequence of steps therein is not construed as limiting, can be as needed It appropriately adjusts.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Particular embodiments described above has carried out further in detail the purpose of the present invention, technical scheme and beneficial effects Describe in detail it is bright, it should be understood that the above is only a specific embodiment of the present invention, the guarantor being not intended to limit the present invention Range is protected, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should be included in this Within the protection scope of invention.

Claims (10)

1. a kind of filtering method of sequence data characterized by comprising
First data of receiving data sequence, and first data are stored to the first buffer;
Storing the case where number of data of the data sequence to first buffer is more than or equal to filter order Under, the data sequence that quantity is the filter order is read from first buffer according to sliding window position Data, wherein the size of the sliding window is equal to the filter order;
Meter is filtered according to the data for the data sequence that quantity of the filtering weighting coefficient to reading is the filter order It calculates, obtains the data filtering result of the data sequence comprising first data, wherein number in the filtering weighting coefficient The number at strong point is determined according to the filter order.
2. the filtering method of sequence data as described in claim 1, which is characterized in that according to filtering weighting coefficient to reading Quantity is that the data of the data sequence of the filter order are filtered before calculating, further includes:
Filtering weighting coefficient is obtained, and the filtering weighting coefficient that will acquire is stored to the second buffer;
The filtering weighting coefficient is read from second buffer, for being described in the filter order to the quantity of reading The data filtering of data sequence calculates.
3. the filtering method of sequence data as described in claim 1, which is characterized in that according to filtering weighting coefficient to reading Quantity is that the data of the data sequence of the filter order are filtered calculating, comprising:
It is described in the filter order to the quantity of filtering weighting coefficient and reading using multiple multipliers and multiple adders The data of data sequence carry out logic calculation, with the data to the data sequence that the quantity of reading is the filter order into Row filtering calculates.
4. the filtering method of sequence data as claimed in claim 3, which is characterized in that utilize multiple multipliers and multiple additions Device carries out logic calculation, packet to the data for the data sequence that the quantity of filtering weighting coefficient and reading is the filter order It includes:
Utilize the product of multiple multiple data pair of multiplier parallel computation, wherein the multiple data are to by filtering weighting coefficient In each data point and the quantity of reading be that the data of the data sequence of the filter order correspond to be formed;
Accumulation calculating is carried out using product of multiple adders to the multiple data pair, obtains the institute comprising first data State the data filtering result of data sequence.
5. the filtering method of sequence data as described in claim 1, which is characterized in that further include:
The second data of the data sequence are received, and second data are stored to first buffer;
The sliding window is moved into sliding step to the storage location of second data;
Quantity is read from first buffer again according to the sliding window position after the movement sliding step For the data of the data sequence of the filter order;
According to the filtering weighting coefficient to the quantity re-read be the filter order the data sequence data into Row filtering calculates, and obtains the data filtering result of the data sequence comprising second data.
6. the filtering method of sequence data as described in claim 1, which is characterized in that the first data of receiving data sequence, And first data are stored to before the first buffer, further includes:
Multiple third data of the data sequence are successively received, and the multiple third data are successively stored by reception sequence To the Coutinuous store position in first buffer, wherein finally store to the third data of first buffer Next storage location for being abutted of storage location for storing first data.
7. such as the filtering method of sequence data as claimed in any one of claims 1 to 6, which is characterized in that first buffer For circular buffer.
8. a kind of filter of sequence data characterized by comprising
Storage control unit, the first data of sequence for receiving data, and first data are stored to the first buffer;
Control unit is read, for being greater than or waiting in the number for the data for storing the data sequence to first buffer In the case where filter order, reading quantity from first buffer according to sliding window position is the filter order The data sequence data, wherein the size of the sliding window according to the filter order determine;
Computing unit is filtered, for being the data sequence of the filter order according to quantity of the filtering weighting coefficient to reading Data be filtered calculating, obtain comprising first data the data sequence data filtering result, wherein it is described The number of data point is equal to the filter order in filtering weighting coefficient.
9. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, which is characterized in that the processor realizes any one of claim 1 to 7 the method when executing described program Step.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The step of any one of claim 1 to 7 the method is realized when execution.
CN201910068045.5A 2019-01-24 2019-01-24 The filtering method and device of sequence data Pending CN109802691A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910068045.5A CN109802691A (en) 2019-01-24 2019-01-24 The filtering method and device of sequence data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910068045.5A CN109802691A (en) 2019-01-24 2019-01-24 The filtering method and device of sequence data

Publications (1)

Publication Number Publication Date
CN109802691A true CN109802691A (en) 2019-05-24

Family

ID=66560354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910068045.5A Pending CN109802691A (en) 2019-01-24 2019-01-24 The filtering method and device of sequence data

Country Status (1)

Country Link
CN (1) CN109802691A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1828724A (en) * 2005-02-28 2006-09-06 日立环球储存科技荷兰有限公司 Digital filter instruction and filter implementing the filter instruction
US20070069929A1 (en) * 2005-09-28 2007-03-29 Ess Technology, Inc. High speed sigma delta device
CN101640522A (en) * 2008-07-31 2010-02-03 中兴通讯股份有限公司 Data extracting method and data extracting device applicable to decimation filter
CN103997355A (en) * 2013-02-20 2014-08-20 中兴通讯股份有限公司 Interpolation filtering method and interpolation filter
CN106656103A (en) * 2015-11-03 2017-05-10 深圳市中兴微电子技术有限公司 FIR filter bank and filtering method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1828724A (en) * 2005-02-28 2006-09-06 日立环球储存科技荷兰有限公司 Digital filter instruction and filter implementing the filter instruction
US20070069929A1 (en) * 2005-09-28 2007-03-29 Ess Technology, Inc. High speed sigma delta device
CN101640522A (en) * 2008-07-31 2010-02-03 中兴通讯股份有限公司 Data extracting method and data extracting device applicable to decimation filter
CN103997355A (en) * 2013-02-20 2014-08-20 中兴通讯股份有限公司 Interpolation filtering method and interpolation filter
CN106656103A (en) * 2015-11-03 2017-05-10 深圳市中兴微电子技术有限公司 FIR filter bank and filtering method

Similar Documents

Publication Publication Date Title
US20110283059A1 (en) Techniques for accelerating computations using field programmable gate array processors
CN111310904A (en) Apparatus and method for performing convolutional neural network training
Athalye et al. Generic hardware architectures for sampling and resampling in particle filters
JP2002152014A (en) Hardware accelerator for coefficient adaptation on the basis of normal least mean square algorithm
CN109271133A (en) A kind of data processing method and system
CN109194307A (en) Data processing method and system
CN102222316A (en) Double-buffer ping-bang parallel-structure image processing optimization method based on DMA (direct memory access)
US20070052557A1 (en) Shared memory and shared multiplier programmable digital-filter implementation
CN106557436A (en) The memory compression function enabled method of terminal and device
CN102200964A (en) Parallel-processing-based fast Fourier transform (FFT) device and method thereof
TW201404186A (en) Low delay real-to-complex conversion in overlapping filter banks for partially complex processing
CN108521824A (en) Image processing apparatus, method and interlock circuit
WO2024041400A1 (en) Model training task scheduling method and apparatus, and electronic device
US9189457B2 (en) Method for distributing computing load in a data processing system
CN109802691A (en) The filtering method and device of sequence data
CN109347458A (en) A kind of adaptive filter method
CN108828659A (en) Seismic wave field continuation method and device
CN109800191B (en) Method and apparatus for calculating covariance of sequence data
CN103493039A (en) Data processing method and related device
CN105893326B (en) The device and method for realizing 65536 point FFT based on FPGA
Dokter et al. Scheduling games for concurrent systems
CN113875228B (en) Video frame inserting method and device and computer readable storage medium
CN109635929A (en) Convolution implementation method and acoustic convolver based on FPGA
Zheng et al. Local weight mean comparison scheme and architecture for high-speed particle filters
Dattorro Using digital signal processor chips in a stereo audio time compressor/expander

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190524