Specific embodiment
It handles user's transaction in assets data in real time in user account, refers to every user's transaction in assets number that user generates
According to being intended to carry out single treatment in user account in real time.The process of user's transaction in assets data is handled in user account
In, it needs to lock user account, prevents the processing for concurrently carrying out a plurality of user's transaction in assets data.
Since the bearing capacitys such as operation system, database are limited, and user's transaction in assets number is handled in user account
According to needing to lock user account in the process, so that the ability that user's transaction in assets data are handled in user account is lower,
Such as the processing per second that can accomplish 30 user's transaction in assets data in user account.However some user's assets are handed over
The easy more user account of data bulk, for example, it is per second can produce 10,000 user's transaction in assets data, it is this in user at present
The processing capacity that user's transaction in assets data are handled in account is not obviously able to satisfy its requirement.
In view of the above technical problems, this specification embodiment provides a kind of user's transaction in assets data processing technique scheme,
The mode quasi real time handled is introduced, by configuring the first process and the second process, user's transaction in assets is obtained by the first process
Data generate validated user transaction in assets data of the moment before current time, and are stored, and are obtained by the second process
The validated user transaction in assets data of storage carry out Classifying Sum, are target by every class validated user transaction in assets Data Integration
User's transaction in assets data, parallel processing is corresponding in the corresponding user account of every class validated user transaction in assets data
Target user's transaction in assets data.Due to being target user's transaction in assets number by every class validated user transaction in assets Data Integration
According to, greatly improve in user account handle user's transaction in assets data processing capacity.
Specifically, the technical solution that this specification embodiment provides is as follows:
Configure the first process and the second process;First process determines current time according to the preset period;First process
It obtains user's transaction in assets data and generates validated user transaction in assets data of the moment before current time, and to described effective
User's transaction in assets data store;Second process obtains stored validated user transaction in assets data;Second process root
According to preset Classifying Sum rule, Classifying Sum is carried out to the validated user transaction in assets data of acquisition;Second process is by every class
Validated user transaction in assets Data Integration is target user's transaction in assets data;Second process is in every class validated user transaction in assets
The corresponding target user's transaction in assets data of parallel processing in the corresponding user account of data.
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this
Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described
Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual,
Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
As shown in Figure 1, the implementation flow chart of the user's transaction in assets data processing method provided for this specification embodiment,
This method can specifically include following steps:
S101, the first process determine current time according to the preset period;
S102, the first process obtain user's transaction in assets data and generate validated user assets of the moment before current time
Transaction data, and the validated user transaction in assets data are stored;
For user's transaction in assets data that user generates, if handled it in user account, this part
User's transaction in assets data are properly termed as inactive users transaction in assets data;For user generate user's transaction in assets data,
If do not handled it in user account, this certain customers' transaction in assets data is known as validated user transaction in assets number
According to.This specification embodiment records the generation moment of user's transaction in assets data, and the first process, which can be determined periodically, to be worked as
The preceding moment obtains user's transaction in assets data and generates validated user transaction in assets data of the moment before current time, this has
Effectiveness family transaction in assets data, that is, untreated user transaction in assets data.
Such as within some period, the first process determines that current time is 10:00, obtains user's transaction in assets data and generates
Validated user transaction in assets data of the moment before 10:00, wherein generating the moment in 10:00 for user's transaction in assets data
Validated user transaction in assets data before, if the validated user transaction in assets data bulk be more than preset threshold, first into
Cheng Ze can be obtained in batches, can be with if validated user transaction in assets data bulk is less than preset threshold, if the first process
It is disposable to obtain.
In addition in this specification embodiment, are generated at current time the moment for acquired user's transaction in assets data
Validated user transaction in assets data before, the first process also need to store the validated user transaction in assets data of acquisition,
It can store into caching, this specification embodiment is not construed as limiting this.
Wherein the first process can have acquisition before storing to the validated user transaction in assets data of acquisition
Transaction in assets data in effectiveness family are marked, specifically: the first process marks the validated user transaction in assets data of acquisition
Note, to by label validated user transaction in assets data store, it is subsequent can to by label validated user assets
Transaction data carries out Classifying Sum.Here the validated user transaction in assets data of acquisition are marked, purpose in order to it is subsequent just
Whether in user account validated user transaction in assets data are handled in distinguishing.
The implementation that the above-mentioned validated user transaction in assets data to acquisition are marked, this specification embodiment is herein
Enumerate two kinds, it is notable that specific implementation can also be other implementations, and this specification embodiment does not make this
It limits.
One of which is achieved in that: judging whether acquired validated user transaction in assets data bulk is more than default threshold
Value;If acquired validated user transaction in assets data bulk is less than preset threshold, acquired validated user assets are handed over
Easy data are directly marked;If acquired validated user transaction in assets data bulk is more than preset threshold, to acquired
Validated user transaction in assets data are split, and batching concurrent is marked.
For example, validated user transaction in assets data bulk acquired in the first process is 10000, preset threshold 5000,
Validated user transaction in assets data bulk acquired in first process is more than preset threshold, can be to split with preset threshold 5000
Acquired validated user transaction in assets data are divided into two by standard, and batching concurrent is marked.
Another is achieved in that: being carried out according to user account dimension to acquired validated user transaction in assets data
Label.For acquired validated user transaction in assets data, such as 10000, wherein there is 9000 to belong to same user's account
Family is needed from user account dimension, in order to embody user account fairness to acquired validated user transaction in assets number
According to being marked.
Such as the validated user transaction in assets data of acquisition are marked, which is
10000, it is related to 5 user accounts, can be from user account dimension, parallel is corresponding to each user account
Validated user transaction in assets data are marked, such as 5 label threads of creation, respectively correspond 5 user accounts, this 5 marks
The validated user transaction in assets data for belonging to corresponding user account are marked in note thread parallel.
S103, the second process obtain stored validated user transaction in assets data;
S104, the second process carry out the validated user transaction in assets data of acquisition according to preset Classifying Sum rule
Classifying Sum;
Available the stored validated user transaction in assets data of the second process of this specification embodiment, according to preset
Classifying Sum rule carries out Classifying Sum to the validated user transaction in assets data of acquisition, wherein the second process specifically obtains institute
The validated user transaction in assets data by label of storage.
Second process carries out classification remittance to the validated user transaction in assets data of acquisition according to preset Classifying Sum rule
Always, this specification embodiment enumerates two kinds of implementations herein, and specific implementation is as follows, it is notable that specific real
Existing mode can also be other implementations, and this specification embodiment is not construed as limiting this.
One of which is achieved in that: the second process flows to dimension according to user account dimension and user's transaction in assets,
Classifying Sum is carried out to the validated user transaction in assets data of acquisition, user's transaction in assets here, which flows to dimension, can be user's money
Produce outflow dimension, user's assets flow into dimension.
For example, the validated user transaction in assets data bulk by label obtained is 10000, tieed up according to user account
Degree, user's transaction in assets flow to dimension, and carry out Classifying Sum to by the validated user transaction in assets data of label: A1 class is effective
User's transaction in assets data satisfaction belongs to same user account A, and user's transaction in assets flow direction is the outflow of user's assets, and A2 class has
Effectiveness family transaction in assets data satisfaction belongs to same user account A, and user's transaction in assets flow direction is that user's assets flow into, B1 class
Validated user transaction in assets data satisfaction belongs to same user account B, and user's transaction in assets flow direction is the outflow of user's assets, B2
Class validated user transaction in assets data satisfaction belongs to same user account B, and user's transaction in assets flow direction is that user's assets flow into,
And so on ....
Another is achieved in that: the second process flows to dimension and user according to user account dimension, user's assets
Transaction in assets data type dimension carries out Classifying Sum to the validated user transaction in assets data of acquisition.User's transaction in assets number
According to type dimension, the type of user's transaction in assets data is indicated, such as life kind transaction data, shopping class transaction data, transfer accounts
Class transaction data etc., if according to the above dimension Ganlei can will be divided by the validated user transaction in assets data of label.
Every class validated user transaction in assets Data Integration is target user's transaction in assets data by S105, the second process;
For in S104 pass through Classifying Sum after every class validated user transaction in assets data, mesh can be integrated into
Mark user's transaction in assets data can be integrated into corresponding target user for any type validated user transaction in assets data
Transaction in assets data.
For example, target user's transaction in assets data can be integrated into for A1 class validated user transaction in assets data
A1 can be integrated into target user's transaction in assets data B1 for B1 class validated user transaction in assets data.
Wherein during being integrated to every class validated user transaction in assets data, according to validated user transaction in assets
Each field is integrated respectively in data, such as user's transaction in assets number field, A1 class validated user transaction in assets number
According to user's transaction in assets including 1000 validated user transaction in assets data, to this 1000 validated user transaction in assets data
The corresponding field value of number field is integrated.
S106, the parallel processing in the corresponding user account of every class validated user transaction in assets data of the second process are respectively right
The target user's transaction in assets data answered.
For every class validated user transaction in assets data, it is integrated into target user's transaction in assets data, the second process
The corresponding target user's transaction in assets of parallel processing in the corresponding user account of every class validated user transaction in assets data
Data.
For example, processing target user provides in its corresponding user account A for A1 class validated user transaction in assets data
Transaction data A1 is produced, for A2 class validated user transaction in assets data, processing target user is provided in its corresponding user account A
Transaction data A2 is produced, for B1 class validated user transaction in assets data, processing target user is provided in its corresponding user account B
Transaction data B1 is produced, and so on ..., above-mentioned processing is parallel processing.
From the above, it is assumed that there are 10000 validated user transaction in assets data, need according to existing way in user
It is handled 10000 times in account, this specification embodiment carries out Classifying Sum to validated user transaction in assets data: A1 class is effective
Family transaction in assets data satisfaction belongs to same user account A, and user's assets flow direction is the outflow of user's assets, A2 class validated user
Transaction in assets data satisfaction belongs to same user account A, and user's assets flow direction is that user's assets flow into ..., effective to every class
User's transaction in assets data are integrated, and parallel processing is each in the corresponding user account of every class validated user transaction in assets data
Self-corresponding target user's transaction in assets data, practical number to be treated in user account greatly reduce, improve
The processing capacity of user's transaction in assets data is handled in user account.
By the description of the above-mentioned technical solution provided this specification embodiment, by configuring the first process and second
Process obtains user's transaction in assets data by the first process and generates validated user transaction in assets number of the moment before current time
According to, and stored, stored validated user transaction in assets data are obtained by the second process, Classifying Sum are carried out, by every class
Validated user transaction in assets Data Integration is target user's transaction in assets data, corresponding in every class validated user transaction in assets data
User account in the corresponding target user's transaction in assets data of parallel processing.Due to by every class validated user transaction in assets
Data Integration is target user's transaction in assets data, greatly improves the place that user's transaction in assets data are handled in user account
Reason ability.
Corresponding to above method embodiment, this specification embodiment also provides a kind of user's transaction in assets data processing dress
It sets, it is shown in Figure 2, the apparatus may include: configuration module 210, moment determining module 220, first obtain module 230, number
Module 250, Classifying Sum module 260, Data Integration module 270, data processing module are obtained according to memory module 240, first
280;
Configuration module 210, for configuring the first process and the second process;
Moment determining module 220 determines current time according to the preset period for the first process;
First obtain module 230, for the first process obtain user's transaction in assets data generate the moment current time it
Preceding validated user transaction in assets data;
Data memory module 240 stores the validated user transaction in assets data for the first process;
Second obtains module 250, and stored validated user transaction in assets data are obtained for the second process;
Classifying Sum module 260 provides the validated user of acquisition for the second process according to preset Classifying Sum rule
It produces transaction data and carries out Classifying Sum;
Data Integration module 270, being used for the second process for every class validated user transaction in assets Data Integration is target user
Transaction in assets data;
Data processing module 280, for the second process in the corresponding user account of every class validated user transaction in assets data
The middle corresponding target user's transaction in assets data of parallel processing.
In a kind of specific embodiment of this specification, the data memory module 240 includes:
Data markers submodule 241, for the validated user transaction in assets data to be marked;
Data sub-module stored 242, for being stored to the validated user transaction in assets data by label;
The second acquisition module 250 is specifically used for:
Second process obtains the stored validated user transaction in assets data by label.
In a kind of specific embodiment of this specification, the data markers submodule 241 is specifically used for:
Judge whether the validated user transaction in assets data bulk is more than preset threshold;
If the validated user transaction in assets data bulk is less than preset threshold, to the validated user transaction in assets number
According to being marked;
If the validated user transaction in assets data bulk is more than preset threshold, to the validated user transaction in assets data
It is split, batching concurrent is marked.
In a kind of specific embodiment of this specification, the data markers submodule 241 is specifically used for:
The validated user transaction in assets data are marked according to user account dimension.
In a kind of specific embodiment of this specification, the Classifying Sum module 260 is specifically used for:
Second process flows to dimension according to user account dimension and user's transaction in assets, to the validated user assets of acquisition
Transaction data carries out Classifying Sum.
In a kind of specific embodiment of this specification, the Classifying Sum module 260 is specifically used for:
Second process flows to dimension according to user account dimension, user's assets and user's transaction in assets data type is tieed up
Degree carries out Classifying Sum to the validated user transaction in assets data of acquisition.
The function of modules and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
By the description of the above-mentioned technical solution provided this specification embodiment, by configuring the first process and second
Process obtains user's transaction in assets data by the first process and generates validated user transaction in assets number of the moment before current time
According to, and stored, stored validated user transaction in assets data are obtained by the second process, Classifying Sum are carried out, by every class
Validated user transaction in assets Data Integration is target user's transaction in assets data, corresponding in every class validated user transaction in assets data
User account in the corresponding target user's transaction in assets data of parallel processing.Due to by every class validated user transaction in assets
Data Integration is target user's transaction in assets data, greatly improves the place that user's transaction in assets data are handled in user account
Reason ability.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in
On reservoir and the computer program that can run on a processor, wherein processor realizes user above-mentioned when executing described program
Transaction in assets data processing method, this method include at least:
Configure the first process and the second process;
First process determines current time according to the preset period;
First process obtains user's transaction in assets data and generates validated user transaction in assets of the moment before current time
Data, and the validated user transaction in assets data are stored;
Second process obtains stored validated user transaction in assets data;
Second process carries out classification remittance to the validated user transaction in assets data of acquisition according to preset Classifying Sum rule
Always;
Every class validated user transaction in assets Data Integration is target user's transaction in assets data by the second process;
The parallel processing in the corresponding user account of every class validated user transaction in assets data of second process is corresponding
Target user's transaction in assets data.
Fig. 3 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram,
The equipment may include: processor 310, memory 320, input/output interface 330, communication interface 340 and bus 350.Wherein
Processor 310, memory 320, input/output interface 330 and communication interface 340 between the realization of bus 350 by setting
Standby internal communication connection.
Processor 310 can use general CPU (Central Processing Unit, central processing unit), micro process
Device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one or
The modes such as multiple integrated circuits are realized, for executing relative program, to realize technical solution provided by this specification embodiment.
Memory 320 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 320 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 320, and execution is called by processor 310.
Input/output interface 330 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 340 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 350 includes an access, in various components (such as the processor 310, memory 320, input/output of equipment
Interface 330 and communication interface 340) between transmit information.
It should be noted that although above equipment illustrates only processor 310, memory 320, input/output interface
330, communication interface 340 and bus 350, but in the specific implementation process, which can also include realizing to operate normally
Necessary other assemblies.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising realizing in above equipment
Component necessary to this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
Realize that user's transaction in assets data processing method above-mentioned, this method include at least when sequence is executed by processor:
Configure the first process and the second process;
First process determines current time according to the preset period;
First process obtains user's transaction in assets data and generates validated user transaction in assets of the moment before current time
Data, and the validated user transaction in assets data are stored;
Second process obtains stored validated user transaction in assets data;
Second process carries out classification remittance to the validated user transaction in assets data of acquisition according to preset Classifying Sum rule
Always;
Every class validated user transaction in assets Data Integration is target user's transaction in assets data by the second process;
The parallel processing in the corresponding user account of every class validated user transaction in assets data of second process is corresponding
Target user's transaction in assets data.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description
Module may or may not be physically separated, can be each module when implementing this specification example scheme
Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or
Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor
Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.