CN109739880A - Method for computing data and device - Google Patents
Method for computing data and device Download PDFInfo
- Publication number
- CN109739880A CN109739880A CN201811562946.1A CN201811562946A CN109739880A CN 109739880 A CN109739880 A CN 109739880A CN 201811562946 A CN201811562946 A CN 201811562946A CN 109739880 A CN109739880 A CN 109739880A
- Authority
- CN
- China
- Prior art keywords
- data
- node
- time
- window
- time window
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000012216 screening Methods 0.000 claims abstract description 7
- 238000012545 processing Methods 0.000 claims description 24
- 230000001360 synchronised effect Effects 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000000926 separation method Methods 0.000 claims description 3
- 230000005055 memory storage Effects 0.000 claims description 2
- 238000013479 data entry Methods 0.000 abstract description 3
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 238000004590 computer program Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000001186 cumulative effect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 230000005291 magnetic effect Effects 0.000 description 2
- 230000001373 regressive effect Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- PCHJSUWPFVWCPO-UHFFFAOYSA-N gold Chemical compound [Au] PCHJSUWPFVWCPO-UHFFFAOYSA-N 0.000 description 1
- 239000010931 gold Substances 0.000 description 1
- 229910052737 gold Inorganic materials 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000012954 risk control Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This application provides a kind of method for computing data and devices, are related to computer field, can reduce required time when calculating the data in database.This method comprises: determining time window;Wherein, time window is for screening the data in data queue;Time window is that flow direction is moved along data queue with the time;If the first object data entry time window in data queue, first object data are added in the first data acquisition system by the first preset rules;First object data are the data calculated;If the first object data time departure window in data queue is deleted first object data by the first preset rules from the first data acquisition system;The first object data in the first data acquisition system are calculated according to the first computation rule.Required time when calculating for reducing data.
Description
Technical field
This application involves computer field more particularly to a kind of method for computing data and device.
Background technique
Currently in the systems such as financial payment, in order to which the operation to user carries out risk control, the payment to user is needed
Operation, payment amount, login behavior etc. carry out data and calculate the operational risk for determining user with data analysis.Current data
Calculation method specifically includes that determining data screening condition, inquires corresponding data from database according to screening conditions, to looking into
The data ask out are added up, and are calculated according to preset rules.
However, query process will take considerable time when the data for needing to inquire in database are more, and because need
Cumulative calculation is carried out to the data of inquiry, calculated time-consuming also higher.
Summary of the invention
The embodiment of the present application provides a kind of method for computing data and device, by carrying out real-time accumulated to data and caching,
When needing to calculate data, acquisition is data cached directly to be calculated, and carries out the time required for data calculate to reduce.
In order to achieve the above objectives, the application adopts the following technical scheme that
In a first aspect, this application provides a kind of method for computing data, this method comprises: determining first in source database
Data and the second data;Wherein, first data are the data stored before preset time node in the source database;Institute
Stating the second data is the data stored after preset time node in the source database;Before downtime node, by institute
The first data are stated to calculate to first object database;The downtime node is to stop the server for establishing the source database
It only runs to carry out the timing node of data calculating;All first data calculate to the first object database it
Afterwards, second data are calculated to the first object database.
Second aspect, this application provides a kind of data computing devices, which includes: processing module, for determining source
The first data and the second data in database;Wherein, first data be the source database in preset time node it
The data of preceding storage;Second data are the data stored after preset time node in the source database;The processing
Module is also used to before downtime node, and first data are calculated to first object database;The downtime
Node is to make the server for establishing the source database timing node out of service to carry out data calculating;The processing mould
Block is also used to calculate in all first data to the first object database, by second data calculate to
The first object database.
The third aspect, this application provides a kind of data computing device, which includes: processor and memory;Wherein,
For memory for storing one or more programs, which includes computer executed instructions, when the data calculate
When device is run, processor executes the computer executed instructions of memory storage, so that the data computing device executes
State method for computing data described in first aspect and its any one implementation.
Fourth aspect, this application provides a kind of computer readable storage medium, in the computer readable storage medium
It is stored with instruction, when described instruction is run on computers, so that the computer executes above-mentioned first aspect and its any
Method for computing data described in a kind of implementation.
5th aspect, this application provides a kind of computer program products comprising instruction, when the computer program produces
When product are run on computers, so that the computer executes data described in above-mentioned first aspect and its any one implementation
Calculation method.
Method for computing data provided by the embodiments of the present application determines the first data and the second data in source database;Its
In, the first data are the data stored before preset time node in source database;Second data are when presetting in source database
The data stored after intermediate node;Before downtime node, the first data are calculated to first object database;When shutdown
Intermediate node is to make the server for the establishing source database timing node out of service to carry out data calculating;In all the first data
It calculates to first object database, the second data is calculated to first object database.A kind of data provided by the present application
Calculation method and device can calculate the first data into first object database before downtime node.It therefore can
The duration that database server is shut down is reduced, influence of the database server shutdown to business is reduced.
Detailed description of the invention
Fig. 1 is a kind of flow chart of method for computing data provided by the embodiments of the present application;
Fig. 2 is a kind of structural schematic diagram one of data computing device provided by the embodiments of the present application;
Fig. 3 is a kind of structural schematic diagram two of data computing device provided by the embodiments of the present application;
Fig. 4 is a kind of structural schematic diagram three of data computing device provided by the embodiments of the present application;
Fig. 5 is a kind of schematic diagram of time window provided by the embodiments of the present application;
Fig. 6 is the schematic diagram of another time window provided by the embodiments of the present application.
Specific embodiment
Method for computing data provided by the present application and device are described in detail below in conjunction with attached drawing.
Term " first " and " second " in the description of the present application and attached drawing etc. be for distinguishing different objects, and
It is not intended to the particular order of description object.
In addition, the term " includes " being previously mentioned in the description of the present application and " having " and their any deformation, it is intended that
It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have
It is defined in listed step or unit, but optionally further comprising the step of other are not listed or unit, or optionally
It further include other step or units intrinsic for these process, methods, product or equipment.
It should be noted that in the embodiment of the present application, " illustrative " or " such as " etc. words make example, example for indicating
Card or explanation.Be described as in the embodiment of the present application " illustrative " or " such as " any embodiment or design scheme do not answer
It is interpreted than other embodiments or design scheme more preferably or more advantage.Specifically, " illustrative " or " example are used
Such as " word is intended to that related notion is presented in specific ways.
In the description of the present application, unless otherwise indicated, the meaning of " plurality " is refer to two or more.
The embodiment of the present application provides a kind of method for computing data.As shown in Figure 1, the method for computing data can be by appointing
Computer equipment of anticipating executes.The method includes S101-S104.
S101, time window is determined.
Wherein, the time window is for screening the data in data queue;The time window is flow direction with the time
It is moved along the data queue.
Specifically, the time window can be determined by the following two kinds scheme:
Scheme one: first time node and the second timing node are determined.Wherein, the first time node be with it is current when
The synchronous timing node of intermediate node;Second timing node is the when segmentum intercalaris with the fixed duration of the first time node separation
Point.Using the first time node as window head, the time window is determined using second timing node as window tail.As shown in figure 5,
For time window described in the program one.
Specifically, the time window is the time window of a fixed duration.To determine the time window, it is first determined the time
The length of window;The length determines (such as one week, one month or 1 year etc.) according to the demand that data calculate.Secondly, determining the
One timing node.The first time node is a timing node with the continuous synchronizing moving of current time node.It is last true
The first time node, is subtracted the length of the time window, the second timing node can be obtained by fixed second timing node.With
The first time node is window head, and second timing node is that window tail determines the time window.Because of first time node
For mobile timing node, and the fixed duration of first time node and the second timing node interval, so the second timing node
As first time node constantly moves.I.e. the time window is a fixed duration as current time is constantly along data team
Arrange the time window of sliding.
Illustratively, the length for determining the time window is one month.Current time be on 2 1st, 2,019 0 point 0 minute 0
Second;Using the timing node as first time node.It regard 0 point of January 1 in 2019 as the second timing node within 0 second 0 minute.Make this
Time window is slided along data queue (time flow direction) forward synchronous with current time.
Scheme two: determine that first time node and the second timing node, the first time node are and current time section
The synchronous timing node of point;Second timing node is the first preset time node;When the first time node is fixed
Intermediate node.The time window is determined using the first time node as window head, using second timing node as window tail.Such as Fig. 6
It is shown, it is time window described in the program two.
Specifically, the time window is the continually changing time window of time span.To determine the time window, it is first determined
First time node, the first time node are a timing nodes with the continuous synchronizing moving of current time node.Then
Determine the second timing node, which is a preassigned set time node.With the first time
Point is window head, and second timing node is that window tail determines the time window.The segmentum intercalaris in selected first time node and second
When point, first time node and the second timing node can be all chosen to be current time node.Wherein, the first time
Point is the timing node moved synchronously with current time node, and the second timing node is a changeless timing node.It should
Time window is one as current time changes, the continually changing time window of length of window.
Illustratively, current time be on 2 1st, 2,019 0 point 0 second 0 minute;It is saved the timing node as first time
Point.And by 2 1st, 2,019 0 point be determined as within 0 second 0 minute the second timing node (can also on 2 1st, 2,019 0 point 0 second 0 minute it
Preceding any time node is as the second timing node).When the first time node travels forward, the time window
Time span is constantly elongated.
In a kind of implementation of scheme two, when the distance of first time node and the second timing node is greater than second in advance
If when threshold value, the second preset time node is reduced the first time node and described as second timing node
Duration between two timing nodes;The second preset time node is set time node.Specifically, when first time node
When being greater than the second preset threshold (such as one month) with the distance of the second timing node, the second timing node is selected again.
Illustratively, second preset threshold is set as 1 month.First time node and the second timing node are
On 2 1st, 2019 0 point 0 second 0 minute.It is described after first time node follows current time node to travel forward one month
First time node becomes 0 minute and 0 second 0 point of on March 1st, 2019, second timing node be still on 2 1st, 2,019 0 point 0 minute 0
Second, the distance of first time node and the second timing node is greater than one month.Select current time node (i.e. 2019 again at this time
0 minute and 0 second 0 point of on March 1) it is the second timing node.Data are sky in time window at this time, are emptied in first data acquisition system
First object data, re-start accumulative.
If the first object data in S102, the data queue enter the time window, by the first object data
By the addition of the first preset rules in first data acquisition system.
Wherein, the first object data are the data calculated;First data acquisition system is the time
The set of first object data composition in window.First preset rules, for calculate and or statistics and or accumulative institute
State the rule of target data.
Specifically, determining first object data.The first object data are the data for needing to count and calculated.It presses
According to the first preset rules, calculate and or statistics and or add up existing first object data in the time window.Later when
When one data entry time window, according to the first preset rules calculate and or statistics and or add up the first object data to institute
It states in the first data acquisition system.Because the first time node is synchronous with current time node, when first object data into
When entering data queue, the first object data also enter the time window simultaneously.At this point, the first object data are pressed
According to the addition of the first preset rules in first data acquisition system.
Illustratively, first object data are the payment amount data of party A-subscriber.In order to determine consumption in party A-subscriber one month
First preset rules are set as counting the data total amount paid in the party A-subscriber one month, and total time of payment by situation
Number.Time window is determined according to above scheme one, and time window length is determined as one month.Obtain existing A in the time window
The payment amount and payment times of user sums to payment amount and payment times, determines that payment total amount is a, pays total time
Number is n.When party A-subscriber produces the payment that an amount of money is b again, the payment amount b entry time window of party A-subscriber, at this point, counting
The payment total amount for calculating the party A-subscriber is a+b, payment times n+1.
Illustratively, the first object data are the payment amount data of party A-subscriber.For the branch to party A-subscriber's in January, 19
It pays the amount of money and carries out limit (such as in January, 2019, consumption was no more than 10W), first preset rules are set as statistics party A-subscriber
The payment total amount in January, 2019.Time window is determined according to above scheme two, is current time section by first time node sets
Point, the second timing node are set as 0 minute and 0 second 0 point of on January 1st, 2019.Obtain the payment of existing party A-subscriber in the time window
The amount of money determines that payment total amount is a.When party A-subscriber produces the payment that an amount of money is b again, the payment amount b of party A-subscriber into
Angle of incidence window, at this point, being a+b in the payment total amount for calculating the party A-subscriber.Optionally, if payment total amount is greater than limit,
Corresponding warning information can be issued.
If the first object data in S103, the data queue leave the time window, by the first object data
It is deleted from first data acquisition system by the first preset rules.
Specifically, when the first object data enter the time of data queue earlier than second timing node, really
The fixed first object data leave the time window.At this time according to the first preset rules by the first object data from described
It is deleted in first data acquisition system, and the corresponding cumulative statistics data of the data is deleted.
Illustratively, time window is determined according to scheme one above-mentioned, and counts the data and A completed in the time window
The amount of money that user generates is the payment of b again after.With the movement of time window, what a party A-subscriber in time window generated
The payment data that one payment amount is c leaves the time window, at this point, being a+ in the payment total amount for calculating the party A-subscriber
B-c, payment times are n times.
S104, the first object data in first data acquisition system are counted according to the first default computation rule
It calculates.
Wherein, the described first default computation rule is that the purpose calculated according to data and method are predetermined.
Specifically, determining the first computation rule, and first object data are obtained from first data acquisition system.According to
One computation rule calculates first object data.
Illustratively, when calculating party A-subscriber one month consumption, it is thus necessary to determine that the payment after each user's payment
Amount of money average value.At this point, according to the data stored in the first data acquisition system it is found that the payment amount of active user is a+b-c, branch
Paying number is n times.Then payment amount average value are as follows: (a+b-c)/n.
Illustratively, when carrying out limit (amount is 100,000) calculating to 19 years payment amounts of party A-subscriber, it is thus necessary to determine that every
Secondary user pays complete whether to exceed limit later, and distance exceeds limit also how many amount.From first data acquisition system
It gets, the payment total amount of the party A-subscriber is a+b (being assumed to be 80,000 yuan) at this time.Calculate the limit amount of money and total gold
The difference of volume.Determine that user is also without departing from restriction amount at this time.And there are also 20,000 yuan apart from excess.
Method for computing data provided by the embodiments of the present application, determines time window;Wherein, the time window is used for data team
Data in column are screened;The time window is that flow direction is moved along the data queue with the time;If the data queue
In first object data enter the time window, by the first object data by the first preset rules add in the first data
In set;The first object data are the data calculated;If first object data in the data queue from
The time window is opened, the first object data are deleted from first data acquisition system by the first preset rules;According to
One computation rule calculates the first object data in first data acquisition system.Data provided by the present application calculate
Method is that flow direction is moved along the data queue with the time by determining time window.Target data in statistical time window is simultaneously
It is calculated.When target data entry time window adds up to it, when time window time departure window carries out regressive to it.Therefore
Method for computing data provided by the present application does not need to inquire target data from database, while full library data are reduced to the time
Data in window carry out the time required for data calculate to reduce.
In a kind of achievable mode of the application, the first object data are if desired changed to the second number of targets
According to then emptying first data acquisition system;At least one second target data in the time window is added to described first
In data acquisition system;If the second target data in the data queue enters the time window, second target data is pressed
Second preset rules are added in first data acquisition system;If the second target data in the data queue leaves described
Between window, second target data is deleted from first data acquisition system by the second preset rules;Rule are calculated according to second
Then second target data in first data acquisition system is calculated.It can flexible logarithm according to the implementation
It is counted according to the different target data in library.
Illustratively, the time window is to party A-subscriber when payment data counts within nearly one month.Need to change system
Meter target is the nearly one month payment data of party B-subscriber.Then empty the data in first data acquisition system.Count the time window
The payment data of interior party B-subscriber.The payment data of party B-subscriber in the time window is accumulated in first data acquisition system.And
It is d, payment times m according to the payment total amount for counting the party B-subscriber in first data acquisition system.Time window continues on number
According to queue using the time as flow move, when the into or out time window of the payment data for having party B-subscriber, then to the data into
Row adds up or regressive, while accordingly being calculated payment times.
In a kind of implementation of the application, determine according to the first default computation rule in first data acquisition system
The first calculated result for being calculated of the first object data;Obtain at least one first object in the data queue
Data;Computation rule is preset according to third and calculates at least one first object data in the data queue, determines the second meter
Calculate result;If the difference of first calculated result and second calculated result is greater than the first preset threshold, described the is determined
One calculated result is abnormal.Wherein, described that at least one of described data queue of computation rule calculating first is preset according to third
Target data determines that the second calculated result can be implemented as, is inquired from database according to elder generation in the prior art and obtain mesh
Data are marked, target data are added up, the method then calculated target data determines third result.According to third knot
Whether fruit verifies above-mentioned first result correct.For avoid because in database data volume it is excessive caused by verify speed it is excessively slow.It can be with
Partial target data (such as 30% or 50% target when data volume in database is excessive in setting inquiry database
Data).
The embodiment of the present application can carry out functional module or function list to data computing device according to above method example
The division of member, for example, each functional module of each function division or functional unit can be corresponded to, it can also be by two or two
Above function is integrated in a processing module.Above-mentioned integrated module both can take the form of hardware realization, can also be with
It is realized in the form of software function module or functional unit.Wherein, module or unit are drawn in the embodiment of the present application
It is schematical for dividing, and only a kind of logical function partition, there may be another division manner in actual implementation.
As shown in Fig. 2, this application provides a kind of data computing device, it is described for executing aforementioned data calculation method
Device includes:
Processing module 201, for determining time window;Wherein, the time window is used to carry out the data in data queue
Screening;The time window is that flow direction is moved along the data queue with the time.
The processing module, if the first object data being also used in the data queue enter the time window, by institute
First object data are stated to add in the first data acquisition system by the first preset rules;The first object data are to be counted
The data of calculation.
The processing module 201 will if the first object data being also used in the data queue leave the time window
The first object data are deleted from first data acquisition system by the first preset rules.
The processing module 201 is also used to according to the first computation rule to described first in first data acquisition system
Target data is calculated.
Optionally, the processing module 201, is also used to: determine first time node and the second timing node, described first
Timing node is the timing node synchronous with current time node;Second timing node is between the first time node
Every the timing node of fixed duration.The time window is determined using the first time node as window head, with segmentum intercalaris when described second
Point is window tail.
Optionally, the processing module 201, is also used to: determine first time node and the second timing node, described first
Timing node is the timing node synchronous with current time node;Second timing node is the first preset time node;Institute
Stating the first preset time node is set time node.The time window is determined using the first time node as window head, with institute
Stating the second timing node is window tail.
Optionally, the processing module 201, is also used to: the first object data being if desired changed to the second target
Data then empty first data acquisition system.At least one second target data in the time window is added to described
In one data acquisition system.If the second target data in the data queue enters the time window, by second target data
By the addition of the second preset rules in first data acquisition system.If the second target data in the data queue is left described
Time window is deleted second target data by the second preset rules from first data acquisition system.It is calculated according to second
Rule calculates second target data in first data acquisition system.
Optionally, as shown in figure 3, the data computing device further includes obtaining module 301.The processing module 201, also
The first object data in first data acquisition system are calculated according to the first default computation rule for determination
First calculated result.
Module 301 is obtained, for obtaining at least one first object data in the data queue.The processing module
201, it is also used to preset computation rule according to third and calculates at least one first object data in the data queue, determine
Two calculated results.
The processing module 201, if the difference for being also used to first calculated result and second calculated result is greater than
First preset threshold determines that first calculated result is abnormal.
Optionally, the processing module 201, is also used to: when the first time node and second timing node it
Between duration when being greater than the second preset threshold, the second preset time node is reduced described the as second timing node
Duration between one timing node and second timing node;The second preset time node is set time node.
Fig. 4 shows another possible structural schematic diagram of data computing device involved in above-described embodiment.It should
Data computing device includes: processor 402 and communication interface 403.Processor 402 is used for the movement to data computing device and carries out
Control management, for example, execute above-mentioned processing module 201 execute the step of, and/or for execute techniques described herein its
Its process.Communication interface 403 is used to support the communication of data computing device Yu other network entities, for example, executing above-mentioned processing
The step of module 201 executes.Data computing device can also include memory 401 and bus 404, and memory 401 is for storing
The program code and data of data computing device.
Wherein, memory 401 can be the memory etc. in data computing device, which may include that volatibility is deposited
Reservoir, such as random access memory;The memory also may include nonvolatile memory, such as read-only memory, quick flashing
Memory, hard disk or solid state hard disk;The memory can also include the combination of the memory of mentioned kind.
Above-mentioned processor 402 can be realization or execute to combine and various illustratively patrols described in present disclosure
Collect box, module and circuit.The processor can be central processing unit, general processor, digital signal processor, dedicated integrated
Circuit, field programmable gate array or other programmable logic device, transistor logic, hardware component or it is any
Combination.It, which may be implemented or executes, combines various illustrative logic blocks, module and electricity described in present disclosure
Road.The processor be also possible to realize computing function combination, such as comprising one or more microprocessors combine, DSP and
The combination etc. of microprocessor.
Bus 404 can be expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..Bus 404 can be divided into address bus, data/address bus, control bus etc..For convenient for table
Show, only indicated with a thick line in Fig. 4, it is not intended that an only bus or a type of bus.
Through the above description of the embodiments, it is apparent to those skilled in the art that, for description
It is convenienct and succinct, only the example of the division of the above functional modules, in practical application, can according to need and will be upper
It states function distribution to be completed by different functional modules, i.e., the internal structure of device is divided into different functional modules, to complete
All or part of function described above.The specific work process of the system, apparatus, and unit of foregoing description, before can referring to
The corresponding process in embodiment of the method is stated, details are not described herein.
The embodiment of the present application provides a kind of computer program product comprising instruction, when the computer program product is being counted
When being run on calculation machine, so that the computer executes method for computing data described in above method embodiment.
The embodiment of the present application also provides a kind of computer readable storage medium, and finger is stored in computer readable storage medium
It enables, when described instruction is run on computers, so that the computer executes method flow shown in above method embodiment
In method for computing data.
Wherein, computer readable storage medium, such as electricity, magnetic, optical, electromagnetic, infrared ray can be but not limited to or partly led
System, device or the device of body, or any above combination.The more specific example of computer readable storage medium is (non-poor
The list of act) it include: the electrical connection with one or more conducting wires, portable computer diskette, hard disk, random access memory
(Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), erasable type may be programmed read-only
It is memory (Erasable Programmable Read Only Memory, EPROM), register, hard disk, optical fiber, portable
Compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), light storage device, magnetic memory
The computer readable storage medium of part or above-mentioned any appropriate combination or any other form well known in the art.
A kind of illustrative storage medium is coupled to processor, to enable a processor to from the read information, and can be to
Information is written in the storage medium.Certainly, storage medium is also possible to the component part of processor.Pocessor and storage media can be with
In application-specific IC (Application Specific Integrated Circuit, ASIC).In the application
In embodiment, computer readable storage medium can be any tangible medium for including or store program, which can be referred to
Enable execution system, device or device use or in connection.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any
Change or replacement within the technical scope of the present application should all be covered within the scope of protection of this application.Therefore, this Shen
Protection scope please should be subject to the protection scope in claims.
Claims (11)
1. a kind of method for computing data, which is characterized in that the described method includes:
Determine time window;Wherein, the time window is for screening the data in data queue;The time window is with the time
It is moved for flow direction along the data queue;
If the first object data in the data queue enter the time window, the first object data are preset by first
Rule addition is in the first data acquisition system;The first object data are the data calculated;
If the first object data in the data queue leave the time window, the first object data are preset by first
Rule is deleted from first data acquisition system;
The first object data in first data acquisition system are calculated according to the first computation rule.
2. method for computing data according to claim 1, which is characterized in that the determining time window;Include:
Determine that first time node and the second timing node, the first time node are the time synchronous with current time node
Node;Second timing node is the timing node with the fixed duration of the first time node separation;
The time window is determined using the first time node as window head, using second timing node as window tail.
3. method for computing data according to claim 1, which is characterized in that the determining time window;Include:
Determine that first time node and the second timing node, the first time node are the time synchronous with current time node
Node;Second timing node is the first preset time node;The first preset time node is set time node;
The time window is determined using the first time node as window head, using second timing node as window tail.
4. method for computing data according to claim 1-3, which is characterized in that the method also includes:
If desired the first object data are changed to the second target data, then empty first data acquisition system;
At least one second target data in the time window is added in first data acquisition system;
If the second target data in the data queue enters the time window, second target data is preset by second
Rule addition is in first data acquisition system;
If the second target data in the data queue leaves the time window, second target data is preset by second
Rule is deleted from first data acquisition system;
Second target data in first data acquisition system is calculated according to the second computation rule.
5. method for computing data according to claim 1-3, which is characterized in that described pre-designed according to first
After calculation rule calculates the first object data in first data acquisition system;The method also includes:
What determination calculated the first object data in first data acquisition system according to the first default computation rule
First calculated result;
Obtain at least one first object data in the data queue;
Computation rule is preset according to third and calculates at least one first object data in the data queue, determines the second calculating
As a result;
If the difference of first calculated result and second calculated result is greater than the first preset threshold, first meter is determined
Calculate results abnormity.
6. method for computing data according to claim 3, which is characterized in that in the determining first time node and second
After timing node, the method also includes:
It is pre- by second when the duration between the first time node and second timing node is greater than the second preset threshold
If timing node reduces as second timing node between the first time node and second timing node
Duration;The second preset time node is set time node.
7. a kind of data computing device, which is characterized in that described device includes:
Processing module, for determining time window;Wherein, the time window is for screening the data in data queue;Institute
Time window is stated to move for flow direction along the data queue with the time;
The processing module, if the first object data being also used in the data queue enter the time window, by described the
One target data is added in the first data acquisition system by the first preset rules;The first object data are calculated
Data;
The processing module, if the first object data being also used in the data queue leave the time window, by described
One target data is deleted from first data acquisition system by the first preset rules;
The processing module is also used to according to the first computation rule to the first object data in first data acquisition system
It is calculated.
8. data computing device according to claim 7, which is characterized in that the processing module is also used to:
Determine that first time node and the second timing node, the first time node are the time synchronous with current time node
Node;Second timing node is the timing node with the fixed duration of the first time node separation;
The time window is determined using the first time node as window head, using second timing node as window tail.
9. data computing device according to claim 7, which is characterized in that the processing module is also used to:
Determine that first time node and the second timing node, the first time node are the time synchronous with current time node
Node;Second timing node is the first preset time node;The first preset time node is set time node;
The time window is determined using the first time node as window head, using second timing node as window tail.
10. a kind of data computing device, which is characterized in that the data computing device includes: processor, transceiver and storage
Device;Wherein, memory is for storing one or more programs, which includes computer executed instructions, when this
When data computing device is run, processor executes the computer executed instructions of memory storage, so that the data calculate dress
Set perform claim require it is one of any in 1 to 6 described in method for computing data.
11. a kind of computer readable storage medium, instruction is stored in the computer readable storage medium, which is characterized in that
When described instruction is run on computers, so that computer executes data described in any one of claims 1 to 6 such as and calculates
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811562946.1A CN109739880A (en) | 2018-12-20 | 2018-12-20 | Method for computing data and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811562946.1A CN109739880A (en) | 2018-12-20 | 2018-12-20 | Method for computing data and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109739880A true CN109739880A (en) | 2019-05-10 |
Family
ID=66360813
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811562946.1A Pending CN109739880A (en) | 2018-12-20 | 2018-12-20 | Method for computing data and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109739880A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112306465A (en) * | 2020-10-30 | 2021-02-02 | 北京字节跳动网络技术有限公司 | Counting method and device |
CN112380479A (en) * | 2020-11-24 | 2021-02-19 | 上海悦易网络信息技术有限公司 | Method and equipment for data statistics |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100280880A1 (en) * | 2009-05-04 | 2010-11-04 | Patrick Faith | Determining targeted incentives based on consumer transaction history |
CN102411594A (en) * | 2010-09-25 | 2012-04-11 | 中国移动通信集团湖南有限公司 | Method and device for obtaining information |
CN105653424A (en) * | 2015-12-28 | 2016-06-08 | 中国民航信息网络股份有限公司 | Reliability assessment method and apparatus for flight query system |
CN106888107A (en) * | 2016-06-08 | 2017-06-23 | 阿里巴巴集团控股有限公司 | A kind of sliding window business datum determines method and device |
US10127286B2 (en) * | 2014-11-21 | 2018-11-13 | Big Sky Sorcery, Llc | System and method for searching structured data files |
-
2018
- 2018-12-20 CN CN201811562946.1A patent/CN109739880A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100280880A1 (en) * | 2009-05-04 | 2010-11-04 | Patrick Faith | Determining targeted incentives based on consumer transaction history |
CN102411594A (en) * | 2010-09-25 | 2012-04-11 | 中国移动通信集团湖南有限公司 | Method and device for obtaining information |
US10127286B2 (en) * | 2014-11-21 | 2018-11-13 | Big Sky Sorcery, Llc | System and method for searching structured data files |
CN105653424A (en) * | 2015-12-28 | 2016-06-08 | 中国民航信息网络股份有限公司 | Reliability assessment method and apparatus for flight query system |
CN106888107A (en) * | 2016-06-08 | 2017-06-23 | 阿里巴巴集团控股有限公司 | A kind of sliding window business datum determines method and device |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112306465A (en) * | 2020-10-30 | 2021-02-02 | 北京字节跳动网络技术有限公司 | Counting method and device |
CN112306465B (en) * | 2020-10-30 | 2024-05-24 | 抖音视界有限公司 | Counting method and device |
CN112380479A (en) * | 2020-11-24 | 2021-02-19 | 上海悦易网络信息技术有限公司 | Method and equipment for data statistics |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108711047B (en) | Automatic repayment method, system and terminal equipment | |
CN110751828B (en) | Road congestion measuring method and device, computer equipment and storage medium | |
CN103414577B (en) | Accounting system and method for Hadoop platform | |
CN110223502B (en) | Intersection entrance road data channeling method and device | |
CN109739880A (en) | Method for computing data and device | |
CN108052279A (en) | A kind of method, apparatus, equipment and storage medium for promoting flash memory performance | |
CN108459905B (en) | Resource pool capacity planning method and server | |
CN109034493A (en) | A kind of account balance prediction technique and device | |
CN115269108A (en) | Data processing method, device and equipment | |
CN113837383A (en) | Model training method and device, electronic equipment and storage medium | |
CN110098966B (en) | Wireless network capacity analysis method and equipment | |
CN112435500A (en) | Method and device for counting remaining parking spaces of parking lot and terminal equipment | |
CN111754329A (en) | Loan interest settlement method, loan interest settlement device, electronic equipment and storage medium | |
CN110443517A (en) | It is a kind of to influence net Yue Che driver and go out the key index of vehicle enthusiasm to determine method | |
CN115953209A (en) | Data storage charging method and device and electronic equipment | |
CN113048997B (en) | Driving suggestion method, system, storage medium and server based on big data | |
CN109741047A (en) | Charging system on a kind of line | |
CN112926801B (en) | Load curve combined prediction method and device based on quantile regression | |
CN110555711A (en) | Data processing method, device, server and computer readable storage medium | |
CN104504600B (en) | The factor is carried out to historical data and returns the method and device surveyed | |
CN113496416A (en) | Price control method for travel consumption card | |
CN112116401A (en) | Pressure testing method, device, equipment and storage medium | |
CN109801044A (en) | It insures creation method, device and the storage medium of product | |
CN107831514B (en) | A kind of height above sea level treating method and apparatus | |
CN113784301B (en) | Method, device and system for distributing enterprise user charging flow |
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 |
Application publication date: 20190510 |
|
RJ01 | Rejection of invention patent application after publication |