CN103262072B - Process the method and device of data stream - Google Patents
Process the method and device of data stream Download PDFInfo
- Publication number
- CN103262072B CN103262072B CN201180004017.9A CN201180004017A CN103262072B CN 103262072 B CN103262072 B CN 103262072B CN 201180004017 A CN201180004017 A CN 201180004017A CN 103262072 B CN103262072 B CN 103262072B
- Authority
- CN
- China
- Prior art keywords
- data stream
- window
- attribute
- data
- condition
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 76
- 238000012545 processing Methods 0.000 claims abstract description 41
- 238000011282 treatment Methods 0.000 claims abstract description 12
- 238000001514 detection method Methods 0.000 claims description 12
- 230000010365 information processing Effects 0.000 abstract description 3
- 230000006870 function Effects 0.000 description 20
- 230000000717 retained effect Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 4
- 230000006854 communication Effects 0.000 description 2
- 238000012216 screening Methods 0.000 description 2
- 239000004984 smart glass Substances 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Abstract
The embodiment of the invention discloses a kind of method and device processing data stream, relate to field of information processing.The method comprise the steps that reception data stream group;Detect whether the window corresponding to described data stream has turned on;If the window corresponding to described data stream is not turned on, then judge whether the attribute specifying data stream meets the condition opening this window;If the attribute of described appointment data stream meets the condition opening this window, then open this window, and by the data of data stream described in this window treatments;If the attribute of described appointment data stream is unsatisfactory for opening the condition of this window, then receive next data stream group.The present invention is applicable to process data stream.
Description
Technical field
The present invention relates to field of information processing, particularly relate to a kind of method and device processing data stream.
Background technology
Along with the development of the information processing technology, data volume to be processed is needed drastically to increase, traditional static data
Processing equipment cannot meet demand, just creates data processing technique based on data stream, and data stream refers to
Data that are a string that there is timing, that the most dynamically generate, i.e. data stream is made up of volume of data, and this
A little data are continuous print in time.CEP (Complex Event Processing, Complex event processing) skill
Art is exactly a kind of data processing technique for processing data stream.CEP system can be by analytical data stream
Different pieces of information, obtain the relation between data, obtain higher further according to the relation between these data and data
The data of level and business procedure.
When using CEP system to carry out data process, generally requiring one window of definition, this window is according to screening
One section of continuous print data in a certain data stream are screened by condition, and process the data filtered out.
Such as: Esper is a kind of Data Stream Processing program engine.The window of Esper definition is according to screening conditions
Filter out one section of continuous print data in a certain data stream, and the data filtered out are preserved, meanwhile,
Computing that data in window are carried out specifying (be grouped, sue for peace, average).Attribute when data stream
When meeting outdated conditions, then delete the stale data preserved in window.Above-mentioned outdated conditions can be window
Time (data i.e. exceeding the appointment time are released window), the length of window (i.e. exceed appointment number
After, the event come at first is released window) etc..Such as: for the data stream of stock price, use
One Windows filter go out last minute in the price of all stocks, and last according to the price statistics filtered out
The price average of all stocks in one minute, calculated price average may be used for other data and processes, when
Time has exceeded last minute, deletes the time price early than the stock of one minute of window storage.
During stating invention in realization, inventor finds that in prior art, at least there are the following problems:
Defined in prior art, window function is relatively simple, it is impossible to data stream is had by realization as required
The processing procedure selected.
Summary of the invention
Embodiments of the invention provide a kind of method and device processing data stream, it is possible to as required to data
Stream carries out selectable processing procedure.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that
On the one hand, embodiments of the invention provide a kind of method processing data stream, including:
Receiving data stream group, described data stream group includes at least one data stream;
Detect whether the window corresponding to described data stream has turned on;
If the window corresponding to described data stream is not turned on, then judge whether the attribute specifying data stream meets
Opening the condition of this window, described appointment data stream is at least in all data streams of described data stream group
Individual;
If the attribute of described appointment data stream meets the condition opening this window, then open this window, and lead to
Cross the data of data stream described in this window treatments;
If the attribute of described appointment data stream is unsatisfactory for opening the condition of this window, then receive next data
Stream group.
On the other hand, embodiments of the invention provide a kind of device processing data stream, including:
Receiver module, is used for receiving data stream group, if specifying the attribute of data stream to be unsatisfactory for opening this window
Condition, then receive next data stream group, described data stream group includes at least one data stream;
Detection module, for detecting whether the window corresponding to described data stream has turned on;
First judge module, if being not turned on for the window corresponding to described data stream, then judges described finger
Whether the attribute of given data stream meets the condition opening this window, and described appointment data stream is described data stream group
All data streams at least one;
First starts module, if the attribute being used for described appointment data stream meets the condition opening this window,
Then open this window, and by the data of data stream described in this window treatments.
The method and device that the embodiment of the present invention provides, it is possible to according to the attribute of data stream, opening of definition window
Open and closedown condition, it is achieved the opening and closing function of window, it is achieved as required data stream is had choosing
The processing procedure selected.Compared with prior art, the embodiment of the present invention can be turned on and off window as required,
It is thus possible to realize the processing procedure increasingly complex to data stream.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, institute in embodiment being described below
The accompanying drawing used is needed to be briefly described, it should be apparent that, the accompanying drawing in describing below is only the present invention
Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work,
Other accompanying drawing can also be obtained according to these accompanying drawings.
The flow chart of the method for the process data stream that Fig. 1 provides for the embodiment of the present invention 1;
The flow chart of the method for the process data stream that Fig. 2 provides for the embodiment of the present invention 2;
The flow chart of the instantiation of the method for the process data stream that Fig. 3 provides for the embodiment of the present invention 2;
The flow chart of the instantiation of the method for the process data stream that Fig. 4 provides for the embodiment of the present invention 2;
The structural representation of the device of the process data stream that Fig. 5 provides for the embodiment of the present invention 3;
The structural representation of the device of the process data stream that Fig. 6 provides for the embodiment of the present invention 4.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clearly
Chu, be fully described by, it is clear that described embodiment be only a part of embodiment of the present invention rather than
Whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making creation
The all other embodiments obtained under property work premise, broadly fall into the scope of protection of the invention.
Advantage for making technical solution of the present invention is clearer, makees the present invention with embodiment below in conjunction with the accompanying drawings
Describe in detail.
Embodiment 1
The embodiment of the present invention provides a kind of method processing data stream, as it is shown in figure 1, the method includes:
Step 101, receives data stream group.
Wherein, described data stream group includes at least one data stream.
Step 102, detects whether the window corresponding to described data stream has turned on.
Step 103, if the window corresponding to described data stream is not turned on, then judges to specify the attribute of data stream
Whether meet the condition opening this window.
Wherein, at least one during described appointment data stream is all data streams of described data stream group.Optional
, this appointment data stream can be the above-mentioned data stream having corresponding window, it is also possible to is not above-mentioned to have corresponding window
The data stream of mouth.
Further, the attribute of described appointment data stream can be specifically the time genus of described appointment data stream
Property, price attribute, Speed attribute, position attribution or Speed attribute etc., the kind of the attribute of data stream does not limits
In these.In actual applications, it is intended that the attribute of data stream can have one or more, such as, it is intended that number
Time attribute can be included, it is also possible to include time attribute and price attribute according to the attribute of stream.
Further, the attribute of described appointment data stream can come from same data stream;Or, described finger
The attribute of given data stream is respectively from least two different data streams in described appointment data stream, such as,
If if specifying the attribute of data stream to include time attribute and price attribute, then time attribute and described price
Attribute can be respectively from two different data streams in described appointment data stream.
Step 104, if the attribute of described appointment data stream meets the condition opening this window, then opens this window
Mouthful, and by the data of data stream described in this window treatments.
Step 105, if the attribute of described appointment data stream is unsatisfactory for opening the condition of this window, then under receiving
One data stream group.
The method that the embodiment of the present invention provides, it is possible to according to the attribute of data stream, the unlatching of definition window and pass
Close condition, it is achieved the opening and closing function of window, make window be capable of as required and data stream is carried out
Selectively processing procedure.Compared with prior art, the embodiment of the present invention can be turned on and off as required
Window such that it is able to realize the processing procedure increasingly complex to data stream.
Embodiment 2
The embodiment of the present invention provides a kind of method processing data stream, as in figure 2 it is shown, the method includes:
Step 201, defines switchable window.
Concrete, in the present embodiment, data handling equipment defines according to the query language in CEP system to be had
The window of switching function.Wherein, through definition window can according to the attribute of notebook data stream, or other number
According to the attribute of stream, it is turned on and off window.
Wherein, not there are the situation of overlap between window.When a window is opened, be not turned off
In the case of, do not have the unlatching of next window.
Such as:
Use CQL (Continuous Query Language, continuous-query language) that a window is carried out fixed
Justice.Wherein, CQL is a kind of query language, and is well-known in the art, and does not repeats them here.Specifically
Definition statement as follows:
[start_window_condition_expression, end_window_condition_expression]
Wherein, in the conditional definition carrying out window, start_window_condition_expression refers to
Understand the condition that window is opened;End_window_condition_expression specifies the bar of close
Part.
After being i.e. defined window by statement defined above, window can be according to specified in definition statement
Condition be turned on and off.
The most such as:
As it is shown on figure 3, for using stream treatment technology that the pingpang handoff phenomenon in communication technology is filtered and carried
Taking, described pingpang handoff is:
In a communication process of mobile communication equipment, signal can occur more than 5 times between two base stations fixing
Switching, and often continuous print is spaced less than 7 seconds twice switching time, then be judged to pingpang handoff.Wherein, switching
Definition be: a user is switched to base station B by base station A, be pingpang handoff single switching, continuous print A-> B,
B-> A, A-> B, B-> A... switching is referred to as pingpang handoff (continuous more than 5 times switchings, i.e. a continuous print 6
Secondary, 7 times or remain a pingpang handoff more times).The end of pingpang handoff is: at last
Switch the most again in 7s in the time interval of individual switching.Meanwhile, other have similar data arranging mode
Data stream also can be considered pingpang handoff.
The data with ping-pong handover pattern are flow at row data by the window using data processing engine to generate
Reason, can be defined this window by CQL, and definition statement is as follows:
[time-previous (time) <=7second, time-previous (time) > 7second]
Wherein, the time in definition statement belongs to the attribute of data stream, represents that the time of data stream cuts, i.e. the time
Information, previous (time) is a function, it is possible to obtain in data stream the previous data of current data time
Between cut, i.e. the time property value of the previous data of current data.The implication of this definition statement is: judge current
Whether the time difference between data and previous data is within 7 seconds, if it is, window is opened;Work as window
After unlatching, for newly arrived data, then judge that the time difference between these data and previous data is not big
In 7 seconds, if it is, close.Through the window of this definition statement definition, one can be met by all
All switching records of secondary ping-pong handover pattern are put in same window, and are transported by follow-up counting
Calculate, it is thus achieved that the record number of pingpang handoff every time, lay the foundation for follow-up judgement, process.
Step 202, receives data stream group.
Wherein, described data stream group includes at least one data stream.
Concrete, in the present embodiment, the data handling equipment in CEP system receives one in the same time
Above data stream, and in step 201 to needing the stream data definition that processes window, through definition
Window can be turned on and off window according to the attribute of corresponding data stream.
Such as:
As it is shown on figure 3, data handling equipment is after receiving data stream group, determines in described data stream group and have
The data stream of pingpang handoff, generates the window for processing the data stream having ping-pong handover pattern, and uses window
The data stream having pingpang handoff is processed by mouth, and this window can be according to use in definition statement
Previous (time) function, the time of previous data obtaining current data cuts, thus obtains adjacent two numbers
According to time difference, therefore retain adjacent two data at window and (i.e. retain current data and it is adjacent
Previous data), the data that window is retained are stored in the memory element of data handling equipment.
Step 203, detects whether the window corresponding to described data stream has turned on.
Concrete, in the present embodiment, the window corresponding to data stream of the data handling equipment detection in CEP system
Whether mouth has been switched on, such as: data handling equipment can detect data stream institute by window management module
Whether corresponding window has been switched on.Wherein, by the window corresponding to window management module detection data stream
Whether the method and the step that have been switched on are well-known in the art, and do not repeat them here.
If the window corresponding to described data stream is not turned on, then perform step 204;If described data stream institute is right
The window answered has been switched on, then perform step 205.
Step 204, if the window corresponding to described data stream is not turned on, it is judged that the attribute of appointment data stream is
The condition of no satisfied this window of unlatching.
Wherein, at least one during described appointment data stream is all data streams of described data stream group.
If meeting the condition opening this window, then perform step 206;If being unsatisfactory for opening this window,
Then receive next data stream group.
Concrete, in the present embodiment, it is intended that the attribute of data stream refers to be used as judging that window switchs
The attribute of the data stream of whether condition, can be an attribute of data stream, it is also possible to data stream is many
Item attribute, data handling equipment is by sentencing according to the definition statement of these attributes and window through the window of definition
Whether the attribute of disconnected described appointment data stream meets the condition opening this window.The attribute specifying data stream is permissible
From same data stream, further, it is intended that the attribute of data stream can come from different data streams, specifically
, can be divided into following several situation:
One:
The attribute of appointment data stream is from same data stream, and specifies the attribute of data stream to only have one.
Such as:
The attribute specifying data stream is specially time attribute.
Being the window of data stream a for data stream a, window b, window b can be according to use in definition statement
Previous (time) function, time of previous data of the current data obtaining data stream a self cuts, thus
Obtain the time difference A between adjacent two data in data stream a, and according to definition statement:
[time-previous (time) <=7second, time-previous (time) > 7second] obtains: if A is not more than
7 seconds, then window b opens, and starts data stream a is carried out other data operation process.If A is more than 7 seconds,
Then it is not turned on window b, continues to next data stream group.Here, it is intended that data stream is data stream a.
Further, it is also possible to be, can be according to use in definition statement for data stream a, window b
Previous (time) function, obtains the previous of another one data stream b current data in same data stream group
The time of data cuts, and i.e. obtains the divisor attribute according to other data streams beyond stream a as specifying data stream (this
In to specify data stream be the attribute of data stream b), judge whether window b opens.
Its two:
The attribute of appointment data stream is from same data stream, and specifies the attribute of data stream to have at least two.
Such as:
The attribute of appointment data stream is from same data stream, and the attribute that data stream is specifically designated is target
Ground attribute and source place attribute.
Targetedly attribute target and source place attribute origin in the attribute of data stream a.Window b can be according to fixed
Previous (target) function used in justice statement, obtains the mesh of the previous data of current data in data stream a
Mark ground attribute target value, and according to definition statement [origin=privious (target),
Origin < > privious (target)] obtain: if the source place attribute origin value of current data is equal to previous number
According to target ground attribute target value, then window b unlatching, and starts to flow to the data that it is corresponding at row data
Reason.
Further, it is also possible to be, can be according to use in definition statement for data stream a, window b
Previous (target) function, obtains the target ground attribute target of the previous data of current data in data stream b
Value, and obtain according to definition statement [origin=privious (target), origin < > privious (target)]: if
The source place attribute origin value of current data is equal to the target ground attribute target value of previous data, then data stream
The window b of a opens, and starts the data that it is corresponding flow to the process of row data.I.e. obtain divisor according to stream a with
Multiple specific object values of other outer data streams, judge whether window b opens.
Its three:
Specify the attribute of data stream from different data streams, it is intended that the attribute of data stream has at least two, wherein,
And the attribute specifying data stream can come from having the data stream of window itself and other do not have the number of window
According to stream, it is also possible to all be from other data stream without window, do not limit at this.
Such as:
The attribute specifying data stream has time attribute and price attribute, and respectively from same data stream group
Different data stream.As shown in Figure 4, the price attribute in the attribute of data stream, i.e. price property value:
[A.price > 5, B.price > 8], i.e. in current data stream (can be data stream A, data stream B, or
It is other data stream) carry out window operation, as the price property value > 5 of data in data stream A, data
The window of stream W is window w;Afterwards, when in data stream B, when arriving the price property value > 8 of certain data,
This window w is closed in current stream.Can also be as the price property value > 5 of data in flowing at A, currently
Stream is opened window w;Afterwards, in flowing at B, when arriving the time property value > 8 of certain data, at current stream
Middle closedown this window w, i.e. for judging that attribute that window opens and the attribute judging close can differ
Sample.It is similar with aforementioned that window realizes flow process, does not do tired stating in this section.
In sum, data handling equipment can be passed through between the window defined is according to different data streams
Relation opens window, to meet more complicated business scenario.
Step 205, it is judged that specify whether the attribute of data stream meets the condition closing this window.
If the attribute specifying data stream meets the condition closing this window, then perform step 207;If specified
The attribute of data stream is unsatisfactory for closing the condition of this window, then perform step 208.
Concrete, in the present embodiment, it is intended that the attribute of data stream refers to be used as judging that window switchs
The attribute of the data stream of whether condition, can be an attribute of data stream, it is also possible to data stream is many
Item attribute, data handling equipment is by sentencing according to the definition statement of these attributes and window through the window of definition
Whether the attribute of disconnected described appointment data stream meets the condition opening this window.The attribute specifying data stream is permissible
From same data stream, further, it is intended that the attribute of data stream can come from different data streams, specifically
, can be divided into following several situation:
One:
The attribute of appointment data stream is from same data stream, and specifies the attribute of data stream to only have one.
Such as:
The attribute specifying data stream is specially time attribute.
Being the window of data stream a for data stream a, window b, window b can be according to use in definition statement
Previous (time) function, time of previous data of the current data obtaining data stream a self cuts, thus
Obtain the time difference A between adjacent two data in data stream a, and according to definition statement:
[time-previous (time) <=7second, time-previous (time) > 7second] obtains: the window of data stream a
When mouth b opens, if A was more than 7 seconds, then window b closes.In this example, it is intended that data stream is data stream a.
Further, it is also possible to be, can be according to use in definition statement for data stream a, window b
Previous (time) function, obtains the previous of another one data stream b current data in same data stream group
The time of data cuts, and i.e. obtains the divisor attribute according to other data streams beyond stream a as specifying data stream (this
In to specify data stream be the attribute of data stream b), judge whether the window b having turned on closes.
Its two:
The attribute of appointment data stream is from same data stream, and specifies the attribute of data stream to have at least two.
Such as:
The attribute of appointment data stream is from same data stream, and the attribute that data stream is specifically designated is target
Ground attribute and source place attribute.
Targetedly attribute target and source place attribute origin in the attribute of data stream a.Window b can be according to fixed
Previous (target) function used in justice statement, obtains the mesh of the previous data of current data in data stream a
Mark ground attribute target value, and according to definition statement [origin=privious (target),
Origin < > privious (target)] obtain: if after window b opens, before the origin value of current data is not equal to
The target value of one data, then close window b.
Further, it is also possible to be, can be according to use in definition statement for data stream a, window b
Previous (target) function, obtains the target ground attribute target of the previous data of current data in data stream b
Value, and obtain according to definition statement [origin=privious (target), origin < > privious (target)]: if
After window b opens, the origin value of current data is not equal to the target value of previous data, then close data stream a
Window b.I.e. obtain the divisor multiple specific object values according to other data streams beyond stream a, judge window b
Whether open.
Its three:
Specify the attribute of data stream from different data streams, it is intended that the attribute of data stream has at least two, wherein,
And the attribute specifying data stream can come from having the data stream of window itself and other do not have the number of window
According to stream, it is also possible to all be from other data stream without window, do not limit at this.
Its in instantiation such as step 204 is as described in three.
In sum, data handling equipment can be passed through between the window defined is according to different data streams
Relation opens window, to meet more complicated business scenario.
Thus, data handling equipment can be by the window through definition according to the pass between different data streams
The data specified are flow to row data and process, it is achieved more complicated Data Stream Processing by system.
Step 206, opens this window.
Data by data stream described in this window treatments.
Step 207, closes this window.
Wherein, if the window closed leaves untreated data, then these are processed.
Step 208, processes the data retained in window.
Concrete, in the present embodiment, the method processing the data retained in window includes: packet,
Sue for peace or average.The method processing the data retained in window is well-known in the art,
Do not repeat them here.
The method that the embodiment of the present invention provides, it is possible to according to the attribute of data stream, the unlatching of definition window and pass
Close condition, it is achieved the opening and closing function of window, make window be capable of as required and data stream is carried out
Selectively processing procedure.Opening of window can also be defined according to the attribute of the data stream in multiple data streams
Open and closedown condition, it is achieved the opening and closing function of window, between enabling window according to different data streams
Automated generalization data stream.Compared with prior art, the embodiment of the present invention can be as required to opening or closing
Close window such that it is able to realize the processing procedure increasingly complex to data stream.
Embodiment 3
The embodiment of the present invention provides a kind of device processing data stream, as it is shown in figure 5, this device includes: connect
Receive module 501, detection module the 502, first judge module 503, first starts module 504.
Receiver module 501, is used for receiving data stream group.
Wherein, if specifying the attribute of data stream to be unsatisfactory for opening the condition of this window, then next number is received
According to stream group, described data stream group includes at least one data stream.
Detection module 502, for detecting whether the window corresponding to described data stream has turned on.
First judge module 503, if being not turned on for the window corresponding to described data stream, then judges described
Whether the attribute specifying data stream meets the condition opening this window, and described appointment data stream is described data stream
At least one in all data streams of group.
First starts module 504, if the attribute being used for described appointment data stream meets the bar opening this window
Part, then open this window, and by the data of data stream described in this window treatments.
Wherein, if being unsatisfactory for opening this window, then receive next data stream group by receiver module 501.
The device that the embodiment of the present invention provides, it is possible to accept data stream by receiver module, and according to data stream
Attribute, whether opened by detection module detection window, and whether judge window by the first judge module
Meet the condition opened, then start module starting-window by first and realize as required data stream being carried out
Selectively processing procedure, thus realize the open function of window.Simultaneously can also be according to other data streams
Attribute, the unlocking condition of definition window, it is achieved the open function of window, enable window according to different pieces of information
Automated generalization data between stream.Compared with prior art, the embodiment of the present invention can be as required to unlatching
Window such that it is able to realize the processing procedure increasingly complex to data stream.
Embodiment 4
The embodiment of the present invention provides a kind of device processing data stream, and as shown in Figure 6, this device includes: connect
Receive module 501, detection module the 502, first judge module 503, first starts module 504, definition module 505,
Second judge module 506, closedown module 507, second start module 508, data processing module 509.
Definition module 505, is used for defining switchable window.
Receiver module 501, is used for receiving data stream group.
Wherein, described data stream group includes at least one data stream, the attribute of described appointment data stream from
Same data stream, or the attribute of described appointment data stream is respectively from least two in described appointment data stream
Individual different data stream.
Further, if specifying the attribute of data stream to be unsatisfactory for opening the condition of this window, then next is received
Individual data stream group, described data stream group includes at least one data stream.
Detection module 502, for detecting whether the window corresponding to described data stream has turned on.
First judge module 503, if being not turned on for the window corresponding to described data stream, then judges described
Whether the attribute specifying data stream meets the condition opening this window.
Wherein, at least one during described appointment data stream is all data streams of described data stream group.
Further, the attribute of described appointment data stream is respectively from least two in described appointment data stream
Different data stream, described first judge module, specifically for according in time attribute and price attribute extremely
One item missing judges whether to meet the condition opening this window.
Second judge module 506, if having been switched on for the window corresponding to described data stream, then judges to specify
Whether the attribute of data stream meets the condition closing this window.
Wherein, at least one during described appointment data stream is all data streams of described data stream group.
Further, the attribute of described appointment data stream is respectively from least two in described appointment data stream
Different data stream, described first judge module, specifically for according in time attribute and price attribute extremely
One item missing judges whether to meet the condition opening this window.
First starts module 504, if the attribute being used for described appointment data stream meets the bar opening this window
Part, then open this window, and by the data of data stream described in this window treatments.
Wherein, if being unsatisfactory for opening the condition of this window, then receive next data by receiver module 501
Stream group.
Close module 507, if for meeting the condition closing this window, then closing this window.
Wherein, if the window closed leaving untreated data, then by data processing module 509 to these
Process.
Second starts module 508, if for specifying the attribute of data stream to be unsatisfactory for closing the condition of this window,
The data of described data stream are then processed by data processing module 509.
Data processing module 509, for processing the data retained in window.
Concrete, in the present embodiment, the method processing the data retained in window may is that point
Group, summation or average.The method processing the data retained in window is for this area institute
Know, do not repeat them here.
The operational approach that the device of this process data stream is concrete describes in detail, the most in embodiment of the method
Repeat.
The device that the embodiment of the present invention provides, it is possible to accept data stream by receiver module, and according to data stream
Attribute, whether opened by detection module detection window, and whether judge window by the first judge module
Meet the condition opened, and judge that whether window meets the condition closed, then lead to by the second judge module
Cross the first startup module starting-window and realize as required data stream being carried out selectable processing procedure, or
Meet the window of closedown condition by closing module closedown, thus realize the opening and closing function of window.With
Time, additionally it is possible to according to the attribute of other data streams, the unlatching of definition window and the condition of closedown, it is achieved window
Open and close function, enable window according to the Automated generalization data between different data streams.With existing skill
Art is compared, and the embodiment of the present invention can be as required to being turned on and off window such that it is able to realize data
Flow increasingly complex processing procedure.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment device,
Can be by computer program and complete to instruct relevant hardware, described program can be stored in a calculating
In machine read/write memory medium, this program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each device.
Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory,
Or random store-memory body (Random Access Memory, RAM) etc. ROM).
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is not limited to
This, any those familiar with the art, in the technical scope that the invention discloses, can readily occur in
Change or replacement, all should contain within protection scope of the present invention.Therefore, protection scope of the present invention
Should be as the criterion with scope of the claims.
Claims (10)
1. the method processing data stream, it is characterised in that including:
Receiving data stream group, described data stream group includes at least one data stream;
Detect whether the window corresponding to described data stream has turned on;
If the window corresponding to described data stream is not turned on, then judge whether the attribute specifying data stream meets
Opening the condition of this window, described appointment data stream is at least in all data streams of described data stream group
Individual;
If the attribute of described appointment data stream meets the condition opening this window, then open this window, and lead to
Cross the data of data stream described in this window treatments;
If the attribute of described appointment data stream is unsatisfactory for opening the condition of this window, then receive next data
Stream group.
The method of process data stream the most according to claim 1, it is characterised in that described method is also wrapped
Include:
If the window corresponding to described data stream has been switched on, then judge whether the attribute specifying data stream meets
Close the condition of this window;
If meeting the condition closing this window, then close this window;
If being unsatisfactory for closing the condition of this window, then by the data of data stream described in this window treatments.
The method of process data stream the most according to claim 1 and 2, it is characterised in that described appointment number
According to the attribute flowed from same data stream.
The method of process data stream the most according to claim 1 and 2, it is characterised in that described appointment number
According to the attribute flowed respectively from least two different data streams in described appointment data stream.
The method of process data stream the most according to claim 2, it is characterised in that described appointment data
The attribute of stream includes at least one in the time attribute of described appointment data stream and price attribute;
The condition whether described attribute judging appointment data stream meets this window of unlatching is: according to time attribute
Judge whether to meet the condition of this window of unlatching with at least one in price attribute;
The condition whether described attribute judging appointment data stream meets the described window of closedown is: belong to according to the time
Property and price attribute at least one judge whether meet close this window condition.
6. the device processing data stream, it is characterised in that including:
Receiver module, is used for receiving data stream group, if specifying the attribute of data stream to be unsatisfactory for opening window
Condition, then receive next data stream group, and described data stream group includes at least one data stream;
Detection module, for detecting whether the window corresponding to described data stream has turned on;
First judge module, if being not turned on for the window corresponding to described data stream, then judges described finger
Whether the attribute of given data stream meets the condition opening this window, and described appointment data stream is described data stream group
All data streams at least one;
First starts module, if the attribute being used for described appointment data stream meets the condition opening this window,
Then open this window, and by the data of data stream described in this window treatments.
The device of process data stream the most according to claim 6, it is characterised in that described device also wraps
Include:
Second judge module, if having been switched on for the window corresponding to described data stream, then judges to specify number
The condition closing this window whether is met according to the attribute of stream;
Close module, if for meeting the condition closing this window, then closing this window;
Second starts module, if for being unsatisfactory for the condition closing this window, then by this window treatments institute
State the data of data stream.
8. according to the device of the process data stream described in claim 6 or 7, it is characterised in that described appointment number
According to the attribute flowed from same data stream.
9. according to the device of the process data stream described in claim 6 or 7, it is characterised in that described appointment number
According to the attribute flowed respectively from least two different data streams in described appointment data stream.
The device of process data stream the most according to claim 7, it is characterised in that described appointment data
The attribute of stream includes at least one in the time attribute of described appointment data stream and price attribute;
Described first judge module, specifically for judging according at least one in time attribute and price attribute
Whether meet the condition opening this window;
Described second judge module, specifically for judging according at least one in time attribute and price attribute
Whether meet the condition closing this window.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2011/083386 WO2013078682A1 (en) | 2011-12-02 | 2011-12-02 | Method and device for processing data stream |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103262072A CN103262072A (en) | 2013-08-21 |
CN103262072B true CN103262072B (en) | 2016-11-30 |
Family
ID=
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109345189A (en) * | 2018-08-24 | 2019-02-15 | 中兴飞流信息科技有限公司 | A kind of data managing method, relevant apparatus and computer readable storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109345189A (en) * | 2018-08-24 | 2019-02-15 | 中兴飞流信息科技有限公司 | A kind of data managing method, relevant apparatus and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10592516B2 (en) | Anomaly detection by multi-level tolerance relations | |
CN102857493A (en) | Content filtering method and device | |
CN109766902A (en) | To the method, apparatus and equipment of the vehicle cluster in same region | |
CN107547432B (en) | A kind of flow control methods and device | |
CN103414600A (en) | Approximate matching method, related device and communication system | |
CN105487381A (en) | Processing method and electronic device | |
CN109660517A (en) | Anomaly detection method, device and equipment | |
CN110427404A (en) | A kind of across chain data retrieval system of block chain | |
CN106325993A (en) | Freezing method of application program and terminal | |
CN107426136A (en) | A kind of recognition methods of network attack and device | |
CN103262072B (en) | Process the method and device of data stream | |
CN105930178A (en) | Configurable parameter dynamic loading method and system | |
CN105049452B (en) | Switching method, device and the intelligent terminal of resource downloading mode | |
CN107943571A (en) | Background application management-control method, device, storage medium and electronic equipment | |
CN109977117A (en) | The method and device that storage method, the data of status data are sent | |
CN102880450A (en) | Method and equipment for managing instant messaging window | |
CN109526027A (en) | A kind of cell capacity optimization method, device, equipment and computer storage medium | |
CN106375351B (en) | A kind of method and device of abnormal domain name detection | |
CN103490944A (en) | Mixed P2P flow monitoring system based on BP neural network | |
CN106982254B (en) | The method and apparatus of file download | |
CN106612303A (en) | Data processing method and data processing device | |
CN107704364A (en) | Background application management-control method, device, storage medium and electronic equipment | |
CN107943581A (en) | Using method for cleaning, device, storage medium and electronic equipment | |
CN107484151A (en) | A kind of SIM card networking control method | |
CN110460593A (en) | A kind of network address recognition methods, device and the medium of mobile flow gateway |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220217 Address after: 550025 Huawei cloud data center, jiaoxinggong Road, Qianzhong Avenue, Gui'an New District, Guiyang City, Guizhou Province Patentee after: Huawei Cloud Computing Technologies Co.,Ltd. Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd. |