CN109299931A - A kind of data statistical approach, system and terminal device - Google Patents
A kind of data statistical approach, system and terminal device Download PDFInfo
- Publication number
- CN109299931A CN109299931A CN201811066834.7A CN201811066834A CN109299931A CN 109299931 A CN109299931 A CN 109299931A CN 201811066834 A CN201811066834 A CN 201811066834A CN 109299931 A CN109299931 A CN 109299931A
- Authority
- CN
- China
- Prior art keywords
- transaction
- data
- statistical
- statistical data
- transaction data
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/08—Payment architectures
- G06Q20/20—Point-of-sale [POS] network systems
- G06Q20/201—Price look-up processing, e.g. updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/08—Payment architectures
- G06Q20/20—Point-of-sale [POS] network systems
- G06Q20/208—Input by product or record sensing, e.g. weighing or scanner processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/08—Payment architectures
- G06Q20/20—Point-of-sale [POS] network systems
- G06Q20/202—Interconnection or interaction of plural electronic cash registers [ECR] or to host computer, e.g. network details, transfer of information from host to ECR or from ECR to ECR
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides a kind of data statistical approach, system and terminal devices, wherein method includes: creation and initializes statistical data, sets the initial value of the statistical data, and the statistical data is stored in default storage region;When being operated each time to transaction data, the transaction data is counted according to transactional operation type, and executes the update to the statistical data;When criticizing clearing, the statistical data is read from the default storage region.The present invention passes through when trading each time, transaction data is counted according to transactional operation type, and the data obtained after calculating according to statistics are updated statistical data, to guarantee that statistical data is capable of the accounting sum of real-time characterization current balance situation, to directly read statistical data, not need to traverse all transaction data again again when carrying out criticizing clearing, it solves the problems, such as time-consuming caused by traversal transaction data, reduces the time of reading data and processing.
Description
Technical field
The invention belongs to data statistics technical field more particularly to a kind of data statistical approach, system and terminal device.
Background technique
POS (point of sale, point-of-sale terminal) equipment, which has, supports the function such as consumption, pre-authorization, inquiry into balance and account transfer
Can, it uses safely, quickly, reliably, is often to use a kind of payment devices in daily payment.In the applied field of POS terminal
(BroadPos payment application is used) in scape, needs to carry out primary batch of clearing daily, and batch clearing need to count all friendships on the same day
Easy data obtain the data item such as the total stroke count of daylight trading, transaction total amount, tip total amount, and are printed on receipt.
Currently, every transaction data can store Indexdb database.When criticizing clearing, detailed process includes:
1. reading transaction data all in Indexdb database.
2. traversing transaction data, the data item such as the total stroke count of statistics transaction, transaction total amount, tip total amount.
3. printing statistical result.
Test discovery reads Indexdb database when the transaction data of Indexdb database purchase is 1000
Transaction data, it is about 4 seconds time-consuming, it traverses 1000 transaction data and is calculated by pen, it is about 2 seconds time-consuming, it is equivalent to user's needs
Wait just start to print within about 6 seconds.If transaction data is more than 1000, the time can seriously affect user experience more long.
To sum up, the transaction data criticized and needed in ergodic data library when clearing exists in the prior art, so as to cause taking long time
The problem of.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of data statistical approach, system and terminal device, it is existing to solve
Transaction data in ergodic data library is needed in batch clearing in technology, the problem of so as to cause taking long time.
The first aspect of the embodiment of the present invention provides a kind of data statistical approach, comprising:
Statistical data is created and initialized, the initial value of the statistical data is set, the statistical data is stored in pre-
If storage region.
When being operated each time to transaction data, the transaction data is counted according to transactional operation type,
And update of the execution to the statistical data.
When criticizing clearing, the statistical data is read from the default storage region.
The second aspect of the embodiment of the present invention provides a kind of data statistics system, comprising:
Statistical data creation module sets the initial value of the statistical data, incites somebody to action for creating and initializing statistical data
The statistical data is stored in default storage region.
Statistical data update module, for when being operated each time to transaction data, according to transactional operation type pair
The transaction data is counted, and executes the update to the statistical data.
Statistical data read module, for reading the statistical data from the default storage region when criticizing clearing.
The third aspect of the embodiment of the present invention provides a kind of terminal device, including memory, processor and is stored in
In the memory and the computer program that can run on the processor, when the processor executes the computer program
The step of realizing data statistical approach as described above.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage
Media storage has computer program, and the computer program realizes the step of data statistical approach as described above when being executed by processor
Suddenly.
Existing beneficial effect is the embodiment of the present invention compared with prior art: by when trading each time, according to friendship
Type easy to operate counts transaction data, and the data obtained after calculating according to statistics are updated statistical data, with
Guarantee that statistical data is capable of the accounting sum of real-time characterization current balance situation, to directly read when carrying out criticizing clearing
Statistical data is taken, does not need to traverse all transaction data again again, solves consumption caused by traversal transaction data
Shi Wenti reduces the time of reading data and processing.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some
Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is a kind of structural schematic diagram for payment application system framework that one embodiment of the present of invention provides;
Fig. 2 is a kind of implementation process schematic diagram for data statistical approach that one embodiment of the present of invention provides;
Fig. 3 is the flow diagram for the data handling procedure that one embodiment of the present of invention provides;
Fig. 4 is the implementation process schematic diagram of step S102 in Fig. 2 of one embodiment of the present of invention offer;
Fig. 5 is a kind of structural schematic diagram for data statistics system that one embodiment of the present of invention provides;
Fig. 6 is the structural schematic diagram for the terminal device that one embodiment of the present of invention provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific
The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, in case unnecessary details interferes description of the invention.
Description and claims of this specification and term " includes " and other any deformations in above-mentioned attached drawing are
Refer to " including but not limited to ", it is intended that cover and non-exclusive include.Such as the process, method comprising a series of steps or units
Or system, product or equipment are not limited to listed step or unit, but optionally further comprising the step of not listing
Or unit, or optionally further comprising other step or units intrinsic for these process, methods, product or equipment.In addition, art
Language " first ", " second " and " third " etc. is for distinguishing different objects, not for description particular order.
The application is realized based on a kind of payment application system framework, as shown in Figure 1, the payment application system framework includes branch
Pay application layer, middle layer and class libraries.
Application layer, including application program (such as BroadPos payment application) are paid, is mainly used for realizing addition consumption, remove
Pin transaction, modification transaction data delete the operation flows such as transaction, receipt printing.BroadPos payment application is based on VUE to be a kind of
The bank card of exploitation pays application.VUE is WEB (World Wide Web, WWW) application development framework.
Middle layer is similar to software operation layer, information exchange is carried out with payment application layer and class libraries respectively, for executing sheet
The step of a kind of data statistical approach described in application, comprising: every transaction data of application layer generation will be paid, insertion is handed over
Easy database, counts transaction data and updates statistical data.
Class libraries is the WEB application class libraries that Android operation system provides, for providing the operation interface to hardware device, example
As operation interface is locally stored in Indexdb database manipulation interface and localStorag.
For user when carrying out transactional operation on paying application layer, payment application layer generates the transactional operation type of every transaction
And transaction data, middle layer obtain transactional operation type and transaction data by payment application layer and are counted, middle layer is logical
It crosses class libraries and transaction data is stored in transaction data base and the default storage region that statistical data deposit is local.Illustratively,
Transaction data is stored in transaction data base by Indexdb database manipulation interface by middle layer, is locally deposited by localStorag
Store up the operation interface default storage region that statistical data deposit is local.
By taking a concrete application scene as an example, in the scene using POS terminal, BroadPos payment application runs on branch
Dispensing apparatus (POS terminal), can be used for the scene of the cash registers such as supermarket, food and drink.Cashier starts BroadPos payment application, works as visitor
When the purchase and consumption of family, cashier operates BroadPos payment application and does addition consumption operation.When client returns, cashier's operation
Revocation transactional operation is done in BroadPos payment application.When amount of money input error or client portion are returned goods, cashier's operation
Transaction data operation is made an amendment in BroadPos payment application.When repeat business needs to delete duplicate transaction, cashier's operation
Deletion transactional operation is done in BroadPos payment application.At the end of daily, cashier does batch clearing, counts the total pen of transaction on the same day
Number, the transaction statistical data such as total amount and tip total amount, and print statistical data.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Embodiment 1:
Fig. 2 shows a kind of implementation flow chart of data statistical approach provided by one embodiment of the invention, for the ease of
Illustrate, only parts related to embodiments of the present invention are shown, and details are as follows:
As shown in Fig. 2, a kind of data statistical approach provided by the embodiment of the present invention, comprising:
Step S101 creates and initializes statistical data, sets the initial value of the statistical data, by the statistical data
It is stored in default storage region.
In the present embodiment, statistical data is to carry out the data obtained after statistics calculating to transaction data, comprising: total pen of trading
Number, transaction total amount and tip total amount etc..Illustratively, the initial value of statistical data is set as zero.
Step S102, when being operated each time to transaction data, according to transactional operation type to the transaction data
It is counted, and executes the update to the statistical data.
In the present embodiment, the transactional operation type operated to transaction data is generally comprised: addition consumption, revocation are handed over
Easily, modify transaction data and delete transaction etc..Statistics calculating is carried out to transaction data according to different transactional operation types, and will
The statistical data is updated to the data obtained after statistics calculates.
Step S103 reads the statistical data from the default storage region when criticizing clearing.
Batch clearing refer to and summarize, calculate to all income and expenses in a certain period.In the application using POS terminal
In scene, when batch clearing, POS terminal need to by when the debit total amount of batch transaction journal, the total stroke count of debit, credit total amount and
Send the center POS on the total stroke count of credit, and with the reconciliation of the center POS.
In one embodiment, after step s 103, after reading statistical data, the statistical data is printed.
In the present embodiment, by being counted according to transactional operation type to transaction data, and press when trading each time
The data obtained after calculating according to statistics are updated statistical data, to guarantee that statistical data being capable of real-time characterization current balance feelings
The accounting sum of condition, to directly read statistical data when carrying out criticizing clearing, not need to traverse again again one time
All transaction data solve the problems, such as time-consuming caused by traversal transaction data, reduce the time of reading data and processing.
In one embodiment of the invention, the data statistical approach further include:
Step a creates and initializes transaction data base, sets the original state of the transaction data base.
In one embodiment, the original state that transaction data base is set in step a includes: to set the basic ginseng of database
Number, such as data format, memory capacity etc., and empty database.
Step b updates the transaction data base when operating each time to transaction data accordingly.
In one embodiment, it includes: when the transactional operation type is addition that transaction data base, which is updated, in step b
When consumption, newly-increased transaction data is stored in transaction data base;When the transactional operation type is revocation transaction, from number of deals
According to deleting corresponding transaction data in library;It, will be right in transaction data base when the transactional operation type is modification transaction data
The transaction data answered makes corresponding modification;When the transactional operation type is to delete transaction, deletes and correspond to from transaction data base
Transaction data.
Step c executes the update to the statistical data after the transaction data base is updated successfully.
In one embodiment, step c includes: to judge whether transaction data base is updated successfully, and is executed if being updated successfully
The step of statistical data is updated in step S102, if update it is unsuccessful if do not execute in step S102 to statistical data into
The step of row updates.
In the present embodiment, the transaction data base for store transaction data is created, transaction data is carried out each time
When operation, new transaction data can be generated, transaction data base is updated accordingly according to new transaction data, transaction data
Not only historied transaction data had been stored in library, but also has been continuously added new transaction data, realized the continuous renewal of transaction data base.
In one embodiment of the invention, the data statistical approach further include:
The statistical data is reset to the initial value, by the transaction data after batch clearing are completed by step d
Library resets to the original state.
In the present embodiment, when cashier execute batch clearing when, terminal device execute the step of include: reading statistical data,
Statistical data is printed, resetting statistical data is initial value, and resetting transaction data base is original state.
In order to make it easy to understand, being illustrated by taking a concrete application scene as an example to above embodiments below.
As shown in figure 3, including: to the treatment process of transaction data base and statistical data
It first determines whether in Indexdb database with the presence or absence of transaction data base.If it does not exist, then it creates and initializes transaction
Database, and set the original state of transaction data base.If it exists, then empty current transaction data base, with restore it for
Original state.
Then, judge to whether there is statistical data in default storage region.If it does not exist, then it creates and initializes statistical number
According to setting the initial value of statistical data.If it exists, then resetting statistical data is initial value.
As shown in figure 4, in one embodiment of the invention, the step S102 in embodiment corresponding to Fig. 2 includes:
Step S201 increases the statistical data when the transactional operation type is addition consumption on current basal
Add transaction data.
In one embodiment, step S201 includes: the friendship that will be newly-increased when the transactional operation type is addition consumption
Easy data are stored in transaction data base, and judge whether to be stored in successfully.If being stored in successfully, statistical data is increased on current basal
Add transaction data.If deposit failure, does not update statistical data.
Step S202 subtracts the statistical data when the transactional operation type is revocation transaction on current basal
Remove transaction data.
In one embodiment, step S202 includes: when the transactional operation type is traded for revocation, from transaction data
Corresponding transaction data is deleted in library, and judges whether to delete successfully.If deleting successfully, by the statistical data in current base
Transaction data is subtracted on plinth.If deleting failure, statistical data is not updated.
Step S203 reads former transaction data and New Transaction number when the transactional operation type is modification transaction data
According to, and the difference that the New Transaction data subtract the former transaction data is calculated, the statistical data is increased on current basal
The difference.
In one embodiment, step S203 includes: and will trade when the transactional operation type is modifies transaction data
Corresponding transaction data makes corresponding modification in database, and judges whether successfully modified.If successfully modified, by the statistical number
According to increasing the difference on current basal.If modification failure, does not update statistical data.
Step S204 subtracts the statistical data when the transactional operation type is to delete transaction on current basal
Remove transaction data.
In one embodiment, step S204 includes: when the transactional operation type is deletes transaction, from transaction data
Corresponding transaction data is deleted in library, and judges whether to delete successfully.If deleting successfully, by the statistical data in current base
Transaction data is subtracted on plinth.If deleting failure, statistical data is not updated.
In one embodiment of the invention, the statistical data includes that the total stroke count of transaction, transaction total amount and tip are total
The amount of money.
When original state, there is no transaction data in transaction data base.The total stroke count of transaction, transaction total amount in statistical data
Value with tip total amount these three data fields is zero.
In one embodiment of the invention, the step S102 in embodiment corresponding to Fig. 2 includes:
1) when the transactional operation type for having a transaction is addition consumption, the total stroke count of transaction is added 1, by the friendship
Easy total amount adds this consumer sale amount of money, and the tip total amount is added to this consumer sale tip.
2) when the transactional operation type for having a transaction is revocation transaction, the total stroke count of transaction is added 1, by the friendship
Easy total amount subtracts this revocation transaction amount, and the tip total amount is subtracted to this revocation transaction tip.
3) when the transactional operation type for having a transaction is modification transaction data, the total stroke count of transaction is constant, by institute
Transaction total amount is stated plus transaction amount difference, the tip total amount is added into tip amount difference, wherein transaction amount is poor
Value=New Transaction the amount of money-original transaction amount, tip amount difference=New Transaction tip amount-original transaction tip amount.
4) when the transactional operation type for having a transaction is to delete transaction, the total stroke count of transaction is added 1, by the friendship
Easy total amount subtracts this deletion transaction amount, and the tip total amount is subtracted to this deletion transaction tip.
In order to make it easy to understand, being illustrated by taking a concrete application scene as an example to the present embodiment.
When the transactional operation type for having a transaction is addition consumption, newly-increased transaction data is stored in transaction data
Library, and judge whether to be stored in successfully.If being stored in successfully, the total stroke count of transaction is added 1, by the transaction total amount plus this
The tip total amount is added this consumer sale tip by the secondary consumer sale amount of money.If deposit failure, does not update system
It counts.
When the transactional operation type for having a transaction is revocation transaction, corresponding number of deals is deleted from transaction data base
According to, and judge whether to delete successfully.If deleting successfully, the total stroke count of transaction is added 1, the transaction total amount is subtracted this
The tip total amount is subtracted this revocation transaction tip by secondary revocation transaction amount.If deleting failure, do not update
Statistical data.
When the transactional operation type for having a transaction is modification transaction data, by number of deals corresponding in transaction data base
According to making corresponding modification, and judge whether successfully modified.If successfully modified, the total stroke count of transaction is constant, and the transaction is total
The amount of money adds transaction amount difference, and the tip total amount is added tip amount difference, wherein transaction amount difference=new friendship
The easy amount of money-original transaction amount, tip amount difference=New Transaction tip amount-original transaction tip amount.If modification failure, no
Update statistical data.
When the transactional operation type for having a transaction is to delete transaction, corresponding number of deals is deleted from transaction data base
According to, and judge whether to delete successfully.If deleting successfully, the total stroke count of transaction is added 1, the transaction total amount is subtracted this
The tip total amount is subtracted this deletion transaction tip by secondary deletion transaction amount.If deleting failure, system is not updated
It counts.
In one embodiment, when carrying out inquiry operation to transaction data base, the statistical data is not changed.
In the embodiment of the present invention, by when each transaction data is updated to transaction data base, to every transaction into
Row statistics, statistical data update at any time.The intensive operations existing statistics magnanimity transaction data are realized, every friendship is distributed to
Increasing when easy data enter transaction data base deletes, changes in operation, eliminates the intensive operations link of data statistics, can be direct
Obtain statistical data.
This programme individually stores statistical data to default storage region, increases in every transaction, deletes, when changing, carry out the friendship
The statistics of easy data, and update statistical data.In this way when execution batch clearing, it is only necessary to read statistics from default storage region
Data simultaneously print, and do not need to read transaction data base, also do not need traversal transaction data.Can solve read transaction data base,
Traverse caused time-consuming problem when transaction data.Reduce when criticizing clearing, is delayed as caused by reading data, statistics.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
Embodiment 2:
As shown in figure 5, the data statistics system 100 that one embodiment of the present of invention provides, for executing corresponding to Fig. 2
Method and step in embodiment comprising:
Statistical data creation module 110 sets the initial of the statistical data for creating and initializing statistical data
Value, is stored in default storage region for the statistical data.
Statistical data update module 120, for when being operated each time to transaction data, according to transactional operation type
The transaction data is counted, and executes the update to the statistical data.
Statistical data read module 130, for reading the statistical number from the default storage region when criticizing clearing
According to.
In one embodiment of the invention, the data statistics system 100 further include:
Database creation module sets the initial shape of the transaction data base for creating and initializing transaction data base
State.
Database update module, for being carried out to the transaction data base when being operated each time to transaction data
It is corresponding to update.
Condition judgment module is updated, for executing to the statistical data after the transaction data base is updated successfully
It updates.
In one embodiment of the invention, the data statistics system 100 further include:
Module is reset, for the statistical data being reset to the initial value, by the friendship after batch clearing are completed
Easy database resets to the original state.
In one embodiment of the invention, statistical data update module 120 includes:
First operating unit is used for when the transactional operation type is addition consumption, by the statistical data current
On the basis of increase the transaction data.
Second operating unit is used for when the transactional operation type is revocation transaction, by the statistical data current
On the basis of subtract the transaction data.
Third operating unit, for when the transactional operation type is modification transaction data, read former transaction data and
New Transaction data, and the difference that the New Transaction data subtract the former transaction data is calculated, by the statistical data in current base
Increase the difference on plinth.
4th operating unit is used for when the transactional operation type is to delete transaction, by the statistical data current
On the basis of subtract the transaction data.
In one embodiment of the invention, the first operating unit is also used to when the transactional operation type for having a transaction
When being consumed for addition, the total stroke count of transaction is added 1, the transaction total amount is added to this consumer sale amount of money, by institute
State the consumer sale tip that tip total amount adds this.
Second operating unit is also used to when the transactional operation type for having a transaction is traded for revocation, by the transaction
Total stroke count adds 1, and the transaction total amount is subtracted to this revocation transaction amount, the tip total amount is subtracted removing for this
Pin transaction tip.
Third operating unit is also used to the friendship when the transactional operation type for having a transaction is modifies transaction data
The total stroke count of Yi is constant, and the transaction total amount is added transaction amount difference, and the tip total amount is poor plus tip amount
Value, wherein the transaction amount difference=New Transaction amount of money-original transaction amount, tip amount difference=New Transaction tip amount-original are handed over
Easy tip amount.
4th operating unit is also used to when the transactional operation type for having a transaction is deletes transaction, by the transaction
Total stroke count adds 1, and the transaction total amount is subtracted to this deletion transaction amount, the tip total amount is subtracted deleting for this
Except transaction tip.
In one embodiment, data statistics system 100 further includes other function module/unit, for realizing embodiment 1
In each embodiment method and step.
It is apparent to those skilled in the art that for convenience and simplicity of description, only with above-mentioned each function
The division progress of module can according to need and for example, in practical application by above-mentioned function distribution by different function moulds
Block is completed, i.e., the internal structure of the described data statistics system 100 is divided into different functional modules, described above complete to complete
Portion or partial function.Each functional module in embodiment can integrate in one processing unit, be also possible to each unit
It physically exists alone, can also be integrated in one unit with two or more units, above-mentioned integrated module can both adopt
With formal implementation of hardware, can also realize in the form of software functional units.In addition, the specific name of each functional module
It is only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Module in above-mentioned data statistics system 100
Specific work process, can be with the corresponding process in reference implementation example 1, and details are not described herein.
Embodiment 3:
Fig. 6 is the schematic diagram for the terminal device that one embodiment of the invention provides.As shown in fig. 6, the terminal of the embodiment is set
Standby 6 include: processor 60, memory 61 and are stored in the meter that can be run in the memory 61 and on the processor 60
Calculation machine program 62.The processor 60 is realized in each embodiment as described in example 1 above when executing the computer program 62
The step of, such as step S101 to S103 shown in Fig. 2.Alternatively, reality when the processor 60 executes the computer program 62
The function of each module/unit in each system embodiment now as described in example 2 above, such as module 110 to 130 shown in Fig. 5
Function.
The terminal device 6 refers to the terminal with data-handling capacity, including but not limited to POS terminal, computer, work
Stand, server, the smart phone that more even has excellent performance, palm PC, tablet computer, personal digital assistant (PDA),
Smart television (Smart TV) etc..Operating system is generally fitted on terminal device, including but not limited to: Windows operation
System, LINUX operating system, Android (Android) operating system, Symbian operating system, Windows mobile operation system
System and iOS operating system etc..The specific example of terminal device 6 is enumerated in detail above, and those skilled in the art can anticipate
Know, terminal device is not limited to above-mentioned enumerate example.
The terminal device may include, but be not limited only to, processor 60, memory 61.Those skilled in the art can manage
Solution, Fig. 6 is only the example of terminal device 6, does not constitute the restriction to terminal device 6, may include more or more than illustrating
Few component perhaps combines certain components or different components, such as the terminal device 6 can also include input and output
Equipment, network access equipment, bus etc..
Alleged processor 60 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 61 can be the internal storage unit of the terminal device 6, such as the hard disk or interior of terminal device 6
It deposits.The memory 61 is also possible to the External memory equipment of the terminal device 6, such as be equipped on the terminal device 6
Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge
Deposit card (Flash Card) etc..Further, the memory 61 can also both include the storage inside list of the terminal device 6
Member also includes External memory equipment.The memory 61 is for storing needed for the computer program and the terminal device 6
Other programs and data.The memory 61 can be also used for temporarily storing the data that has exported or will export.
Embodiment 4:
The embodiment of the invention also provides a kind of computer readable storage medium, computer-readable recording medium storage has meter
Calculation machine program is realized the step in each embodiment as described in example 1 above, such as is schemed when computer program is executed by processor
Step S101 shown in 2 to step S103.Alternatively, realizing when the computer program is executed by processor such as institute in embodiment 2
The function of each module/unit in each system embodiment stated, such as the function of module 110 to 130 shown in fig. 5.
The computer program can be stored in a computer readable storage medium, and the computer program is by processor
When execution, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code,
The computer program code can be source code form, object identification code form, executable file or certain intermediate forms etc..Institute
State computer-readable medium may include: can carry the computer program code any entity or device, recording medium,
USB flash disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), arbitrary access
Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, embodiment 1 to 4 can in any combination, group
The new embodiment formed after conjunction is also within the scope of protection of this application.There is no the portion for being described in detail or recording in some embodiment
Point, it may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed terminal device and method can pass through it
Its mode is realized.For example, system described above/terminal device embodiment is only schematical, for example, the module
Or the division of unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple lists
Member or component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point,
Shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device or unit
INDIRECT COUPLING or communication connection, can be electrical property, mechanical or other forms.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of data statistical approach characterized by comprising
Statistical data is created and initialized, the initial value of the statistical data is set, the statistical data is stored in default deposit
Storage area domain;
When being operated each time to transaction data, the transaction data is counted according to transactional operation type, and holds
Update of the row to the statistical data;
When criticizing clearing, the statistical data is read from the default storage region.
2. data statistical approach as described in claim 1, which is characterized in that further include:
Transaction data base is created and initialized, the original state of the transaction data base is set;
When being operated each time to transaction data, the transaction data base is updated accordingly;
After the transaction data base is updated successfully, the update to the statistical data is executed.
3. data statistical approach as claimed in claim 2, which is characterized in that further include:
After batch clearing are completed, the statistical data is reset into the initial value, the transaction data base is reset into institute
State original state.
4. data statistical approach as described in claim 1, which is characterized in that it is described according to transactional operation type to the transaction
Data are counted, and execute the update to the statistical data, comprising:
When the transactional operation type is addition consumption, the statistical data is increased into the number of deals on current basal
According to;
When the transactional operation type is revocation transaction, the statistical data is subtracted into the number of deals on current basal
According to;
When the transactional operation type is modification transaction data, former transaction data and New Transaction data are read, and described in calculating
New Transaction data subtract the difference of the former transaction data, and the statistical data is increased the difference on current basal;
When the transactional operation type is to delete transaction, the statistical data is subtracted into the number of deals on current basal
According to.
5. data statistical approach as claimed in claim 4, which is characterized in that the statistical data includes trade total stroke count, friendship
Easy total amount and tip total amount.
6. data statistical approach as claimed in claim 5, which is characterized in that it is described according to transactional operation type to the transaction
Data are counted, and execute the update to the statistical data, comprising:
When the transactional operation type for having a transaction is addition consumption, the total stroke count of transaction is added 1, by the total gold of the transaction
Volume adds this consumer sale amount of money, and the tip total amount is added to this consumer sale tip;
When the transactional operation type for having a transaction is revocation transaction, the total stroke count of transaction is added 1, by the total gold of the transaction
Volume subtracts this revocation transaction amount, and the tip total amount is subtracted to this revocation transaction tip;
When the transactional operation type for having a transaction is modification transaction data, the total stroke count of transaction is constant, by the transaction
Total amount adds transaction amount difference, and the tip total amount is added tip amount difference, wherein transaction amount difference=new
Transaction amount-original transaction amount, tip amount difference=New Transaction tip amount-original transaction tip amount;
When the transactional operation type for having a transaction is to delete transaction, the total stroke count of transaction is added 1, by the total gold of the transaction
Volume subtracts this deletion transaction amount, and the tip total amount is subtracted to this deletion transaction tip.
7. a kind of data statistics system characterized by comprising
Statistical data creation module sets the initial value of the statistical data for creating and initialize statistical data, will be described
Statistical data is stored in default storage region;
Statistical data update module, for when being operated each time to transaction data, according to transactional operation type to described
Transaction data is counted, and executes the update to the statistical data;
Statistical data read module, for reading the statistical data from the default storage region when criticizing clearing.
8. data statistics system as claimed in claim 7, which is characterized in that further include:
Database creation module sets the original state of the transaction data base for creating and initializing transaction data base;
Database update module, for being carried out to the transaction data base corresponding when being operated each time to transaction data
Update;
Condition judgment module is updated, for executing the update to the statistical data after the transaction data base is updated successfully.
9. a kind of terminal device, which is characterized in that in the memory and can be in institute including memory, processor and storage
The computer program run on processor is stated, the processor realizes such as claim 1 to 6 times when executing the computer program
The step of one data statistical approach.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer journey
Sequence realizes the step of the data statistical approach as described in any one of claim 1 to 6 when the computer program is executed by processor
Suddenly.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811066834.7A CN109299931A (en) | 2018-09-13 | 2018-09-13 | A kind of data statistical approach, system and terminal device |
PCT/CN2019/102279 WO2020052429A1 (en) | 2018-09-13 | 2019-08-23 | Method for compiling data statistics, system and terminal device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811066834.7A CN109299931A (en) | 2018-09-13 | 2018-09-13 | A kind of data statistical approach, system and terminal device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109299931A true CN109299931A (en) | 2019-02-01 |
Family
ID=65166945
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811066834.7A Pending CN109299931A (en) | 2018-09-13 | 2018-09-13 | A kind of data statistical approach, system and terminal device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109299931A (en) |
WO (1) | WO2020052429A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020052429A1 (en) * | 2018-09-13 | 2020-03-19 | 百富计算机技术(深圳)有限公司 | Method for compiling data statistics, system and terminal device |
CN112084219A (en) * | 2020-09-16 | 2020-12-15 | 京东数字科技控股股份有限公司 | Method, apparatus, electronic device, and medium for processing data |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103049556A (en) * | 2012-12-28 | 2013-04-17 | 中国科学院深圳先进技术研究院 | Fast statistical query method for mass medical data |
US20140074853A1 (en) * | 2011-02-21 | 2014-03-13 | Amadeus S.A.S. | Method and system for providing statistical from a data warehouse |
US20150235327A1 (en) * | 2010-02-11 | 2015-08-20 | Alibaba Group Holding Limited | Method and system for e-commerce transaction data accounting |
US20160323169A1 (en) * | 2015-04-30 | 2016-11-03 | Alibaba Group Holding Limited | Method and system of monitoring a service object |
CN106202081A (en) * | 2015-04-30 | 2016-12-07 | 阿里巴巴集团控股有限公司 | Real-time data processing method and device |
CN107833051A (en) * | 2017-10-19 | 2018-03-23 | 中国银行股份有限公司 | A kind of data statistical approach and system |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7181461B2 (en) * | 2002-08-19 | 2007-02-20 | International Business Machines Corporation | System and method for real time statistics collection for use in the automatic management of a database system |
CN101557316B (en) * | 2009-05-14 | 2011-07-27 | 阿里巴巴集团控股有限公司 | Method and system for updating statistical data |
CN103164318B (en) * | 2011-12-13 | 2016-07-20 | 中国银联股份有限公司 | The automatic health examination method and apparatus of on-line system |
CN109299931A (en) * | 2018-09-13 | 2019-02-01 | 百富计算机技术(深圳)有限公司 | A kind of data statistical approach, system and terminal device |
-
2018
- 2018-09-13 CN CN201811066834.7A patent/CN109299931A/en active Pending
-
2019
- 2019-08-23 WO PCT/CN2019/102279 patent/WO2020052429A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150235327A1 (en) * | 2010-02-11 | 2015-08-20 | Alibaba Group Holding Limited | Method and system for e-commerce transaction data accounting |
US20140074853A1 (en) * | 2011-02-21 | 2014-03-13 | Amadeus S.A.S. | Method and system for providing statistical from a data warehouse |
CN103049556A (en) * | 2012-12-28 | 2013-04-17 | 中国科学院深圳先进技术研究院 | Fast statistical query method for mass medical data |
US20160323169A1 (en) * | 2015-04-30 | 2016-11-03 | Alibaba Group Holding Limited | Method and system of monitoring a service object |
CN106202081A (en) * | 2015-04-30 | 2016-12-07 | 阿里巴巴集团控股有限公司 | Real-time data processing method and device |
CN107833051A (en) * | 2017-10-19 | 2018-03-23 | 中国银行股份有限公司 | A kind of data statistical approach and system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020052429A1 (en) * | 2018-09-13 | 2020-03-19 | 百富计算机技术(深圳)有限公司 | Method for compiling data statistics, system and terminal device |
CN112084219A (en) * | 2020-09-16 | 2020-12-15 | 京东数字科技控股股份有限公司 | Method, apparatus, electronic device, and medium for processing data |
Also Published As
Publication number | Publication date |
---|---|
WO2020052429A1 (en) | 2020-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107944002A (en) | Reward voucher checks and writes off method, apparatus and electronic equipment | |
CN107967594A (en) | Reconciliation settlement method and reconciliation settlement system | |
CN109146488A (en) | Assets match method, assets match system, equipment and storage medium | |
WO2021139522A1 (en) | Data processing method and apparatus | |
CN108985840A (en) | A kind of block chain electric business price protection is supported and debt-credit payment system and method | |
CN109325728A (en) | A kind of debt data processing method and terminal device based on user data resource | |
CN106297087A (en) | A kind of O2O commercial podium device | |
CN109493075A (en) | For determining the method and apparatus of virtual resource object | |
CN109299931A (en) | A kind of data statistical approach, system and terminal device | |
CN103745402B (en) | A kind of electronic money management method with the term of validity | |
JP2007047906A (en) | Discount rate arithmetic unit based on rental quantity | |
CN110189116A (en) | Commodity settlement method, device and server | |
CN112967047B (en) | Settlement method, device, apparatus, storage medium, and program product | |
JP2001143007A (en) | Electronic settlement system using ic card | |
CN110275769A (en) | Business data processing method and its equipment, storage medium, application server | |
KR101673666B1 (en) | Method of providing pay service for foreign customer and server performing the same | |
CN113837648A (en) | Enterprise relevance analysis method and device and associated enterprise recommendation method and device | |
JP2018045446A (en) | Settlement system, method and program | |
CN104715364A (en) | Consumption capital gain method and system | |
JP2002083240A (en) | Point exchange method and system | |
CN109146668A (en) | A kind of campus banking management system based on Internet of Things | |
CN109785006A (en) | Total mark of consumption interconnects the method and consumption system for exchanging consumption in sales promotion platform | |
CN116308335B (en) | Prepaid gold processing method and apparatus, electronic device, and storage medium | |
CN109284963A (en) | Method for processing business, device, equipment and its storage medium based on card certificate | |
KR102085083B1 (en) | Method for providing charge saving uby using crypto-currency and server thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190201 |