CN108460129A - A kind of order bulk statistics method, computer equipment and storage medium based on server-side - Google Patents

A kind of order bulk statistics method, computer equipment and storage medium based on server-side Download PDF

Info

Publication number
CN108460129A
CN108460129A CN201810172315.2A CN201810172315A CN108460129A CN 108460129 A CN108460129 A CN 108460129A CN 201810172315 A CN201810172315 A CN 201810172315A CN 108460129 A CN108460129 A CN 108460129A
Authority
CN
China
Prior art keywords
statistics
day
order
time
start time
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.)
Granted
Application number
CN201810172315.2A
Other languages
Chinese (zh)
Other versions
CN108460129B (en
Inventor
郝梦茹
陈少杰
张文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ant Home Qingdao Network Technology Co ltd
Guangzhou Zhongtian Technology Consulting Co ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810172315.2A priority Critical patent/CN108460129B/en
Publication of CN108460129A publication Critical patent/CN108460129A/en
Application granted granted Critical
Publication of CN108460129B publication Critical patent/CN108460129B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Probability & Statistics with Applications (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a kind of order bulk statistics method, computer equipment and storage medium based on server-side, this method are applied in server-side, including:The statistics date of the first stroke order is obtained using function getFirstOrderByType (type);The statistics date based on the first stroke order obtains first day statistics start time;Add one day time to obtain first day statistics finish time first day statistics start time;Based on the statistics finish time of first day statistics start time and first day, first day quantity on order of statistics, and be written in order statistical form using function addStaticData (data);Using last statistics finish time as statistics start time next time, the quantity on order of every day is counted successively according to preset time interval call function historyDataRun () by timed task system, and be written in order statistical form, it is completed until current all orders count.Server-side, which needs not rely on big data technology, can complete order bulk statistics, enrich the realization method of order bulk statistics.

Description

A kind of order bulk statistics method, computer equipment and storage based on server-side Medium
Technical field
The invention belongs to Internet technical field more particularly to a kind of order bulk statistics method based on server-side, meters Calculate machine equipment and storage medium.
Background technology
At present internet be broadcast live platform for user's amount of supplementing with money, daily order flowing water have reached it is relatively large, lead to It needs big data technology to be supported to be counted in the case of often, service is then forwarded to by the data after big data stroke analysis End uses.
As it can be seen that in the prior art, server-side must be strongly dependent upon big data technology, the realization method list of order bulk statistics One.
Invention content
The embodiment of the present application is by providing a kind of order bulk statistics method, computer equipment and storage based on server-side Medium, solve in the prior art server-side to the strong Dependence Problem of big data technology.
In a first aspect, this application provides a kind of order bulk statistics method based on server-side, which is characterized in that described Method is applied in server device, including:
The statistics date of the first stroke order is obtained using function getFirstOrderByType (type);
Based on the statistics date of the first stroke order, first day statistics start time is obtained;
Add one day time to obtain described first day statistics finish time described first day statistics start time;
Based on described first day statistics start time and described first day statistics finish time, count described first day Quantity on order, and using function addStaticData (data) be written order statistical form in;
Using last statistics finish time as statistics start time next time, by timed task system according to preset Time interval call function historyDataRun () count the quantity on order of every day successively, and be written the order In statistical form, completed until current all orders count.
Optionally, after current all orders statistics is completed, the method further includes:
Using function getMonthStatCacheTime () obtain finishing touch order the statistics date, it is described last Order is contained in current all orders;
Based on the statistics date of the finishing touch order, the statistics finish time of the previous day is obtained;
The time that the statistics finish time of described the previous day subtracts one day is obtained into the statistics start time of described the previous day;
The statistics finish time of statistics start time and described the previous day based on described the previous day, by timed task system Count described previous again according to preset time interval and preset statistics number call function currentDataRun () It quantity on order, and will be in the quantity on order that counted again update to the order statistical form.
Optionally, described based on described first day statistics start time and described first day statistics finish time, system First day quantity on order is counted, and order statistical form is written using function addStaticData (data) and includes:
Based on described first day statistics start time and described first day statistics finish time, according to different payments Mode counts first day quantity on order, and is written in order statistical form using function addStaticData (data).
Optionally, the means of payment includes wechat payment, Alipay payment or Unionpay's payment.
Present invention also provides a kind of order bulk statistics device based on server-side, which is characterized in that described device packet It includes:
Acquiring unit, the statistics day for obtaining the first stroke order using function getFirstOrderByType (type) Phase;
The acquiring unit is additionally operable to the statistics date based on the first stroke order, when obtaining first day statistics and starting It carves;
The acquiring unit is additionally operable to add one day time to obtain described first described first day statistics start time It statistics finish time;
Statistic unit was used for based on described first day statistics start time and described first day statistics finish time, First day quantity on order is counted, and is written in order statistical form using function addStaticData (data);
The statistic unit is additionally operable to using last statistics finish time as statistics start time next time, by fixed When task system count the order numbers of every day successively according to preset time interval call function historyDataRun () Amount, and be written in the order statistical form, it is completed until current all orders count.
Optionally, the acquiring unit is additionally operable to obtain finishing touch using function getMonthStatCacheTime () The statistics date of order, the finishing touch order are contained in current all orders;
The acquiring unit is additionally operable to the statistics date based on the finishing touch order, and the statistics for obtaining the previous day terminates Moment;
The acquiring unit is additionally operable to obtain the time that the statistics finish time of described the previous day subtracts one day described previous It statistics start time;
The statistics that the statistic unit is additionally operable to statistics start time and described the previous day based on described the previous day terminates Moment, by timed task system according to preset time interval and preset statistics number call function currentDataRun () updates the quantity on order counted again to the order statistical form to count the quantity on order of described the previous day again In.
Optionally, the statistic unit was specifically used for based on described first day statistics start time and described first day Finish time is counted, counts first day quantity on order according to the different means of payment, and use function AddStaticData (data) is written in order statistical form.
Optionally, the means of payment includes wechat payment, Alipay payment or Unionpay's payment.
The third aspect, present invention also provides a kind of computer readable storage medium, the computer readable storage medium It is stored with computer program, which is characterized in that the computer program realizes following steps when being executed by processor:
The statistics date of the first stroke order is obtained using function getFirstOrderByType (type);
Based on the statistics date of the first stroke order, first day statistics start time is obtained;
Add one day time to obtain described first day statistics finish time described first day statistics start time;
Based on described first day statistics start time and described first day statistics finish time, count described first day Quantity on order, and using function addStaticData (data) be written order statistical form in;
Using last statistics finish time as statistics start time next time, by timed task system according to preset Time interval call function historyDataRun () count the quantity on order of every day successively, and be written the order In statistical form, completed until current all orders count.
Fourth aspect this application provides a kind of computer equipment, including processor, memory and is stored in memory Computer program that is upper and can running on a processor, which is characterized in that the processor executes real when the computer program Existing following steps:
The statistics date of the first stroke order is obtained using function getFirstOrderByType (type);
Based on the statistics date of the first stroke order, first day statistics start time is obtained;
Add one day time to obtain described first day statistics finish time described first day statistics start time;
Based on described first day statistics start time and described first day statistics finish time, count described first day Quantity on order, and using function addStaticData (data) be written order statistical form in;
Using last statistics finish time as statistics start time next time, by timed task system according to preset Time interval call function historyDataRun () count the quantity on order of every day successively, and be written the order In statistical form, completed until current all orders count.
The embodiment of the present application is applied in server device, by using function getFirstOrderByType (type) On the statistics date for obtaining the first stroke order, first day statistics start time is obtained, by described first day statistics start time Add one day time to obtain described first day statistics finish time, to count first day quantity on order, and uses Function addStaticData (data) is written in order statistical form, using last statistics finish time as system next time Start time is counted, is united successively according to preset time interval call function historyDataRun () by timed task system The quantity on order of every day is counted, and is written in the order statistical form, is completed until current all orders count.As it can be seen that clothes Business end, which needs not rely on big data technology, can complete order bulk statistics, enrich the realization method of order bulk statistics.
Description of the drawings
Fig. 1 is the flow chart of the order bulk statistics method based on server-side provided in the embodiment of the present application;
Fig. 2 is the structural schematic diagram of the order bulk statistics device based on server-side provided in the embodiment of the present application;
Fig. 3 is the structural schematic diagram of the computer readable storage medium provided in the embodiment of the present application;
Fig. 4 is the structural schematic diagram of the computer equipment provided in the embodiment of the present application.
Specific implementation mode
The embodiment of the present application provides a kind of order bulk statistics method, computer equipment and storage Jie based on server-side Matter, solve in the prior art server-side to the strong Dependence Problem of big data technology.Server-side can be made to be no longer dependent on big number Order bulk statistics can be completed according to technology, enrich the realization method of order bulk statistics.
The technical solution of the embodiment of the present application is in order to solve the above technical problems, general thought is as follows:
The statistics date of the first stroke order is obtained using function getFirstOrderByType (type);
Based on the statistics date of the first stroke order, first day statistics start time is obtained;
Add one day time to obtain described first day statistics finish time described first day statistics start time;
Based on described first day statistics start time and described first day statistics finish time, count described first day Quantity on order, and using function addStaticData (data) be written order statistical form in;
Using last statistics finish time as statistics start time next time, by timed task system according to preset Time interval call function historyDataRun () count the quantity on order of every day successively, and be written the order In statistical form, completed until current all orders count.
The embodiment of the present application is applied in server device, by using function getFirstOrderByType (type) On the statistics date for obtaining the first stroke order, first day statistics start time is obtained, by described first day statistics start time Add one day time to obtain described first day statistics finish time, to count first day quantity on order, and uses Function addStaticData (data) is written in order statistical form, using last statistics finish time as system next time Start time is counted, is united successively according to preset time interval call function historyDataRun () by timed task system The quantity on order of every day is counted, and is written in the order statistical form, is completed until current all orders count.Server-side is not It needs dependence big data technology that can complete order bulk statistics, enriches the realization method of order bulk statistics.
In order to better understand the above technical scheme, below in conjunction with attached drawing and specific embodiment, to above-mentioned technical proposal It is further elaborated.It should be appreciated that specific embodiment described herein is not used to limit only to explain the application Determine the application.
The embodiment of the present application can be based on but be not limited to Redis (Remote Dictionary Server, long-range dictionary clothes Be engaged in device), MySQL (Structured Query Language, structured query language) and timed task systems technology carry out reality It is existing, it is introduced based on the embodiment of the present application only techniques described above, is not used to limit the application.It is understood that In some other realization methods, similar other storage systems, data base management system and timed task can also be used System.
The related introduction of above-mentioned technology is as follows:
Redis:It is a key-value storage system.Redis provides some abundant data structures, including lists (chained list), sets (set), ordered sets (ordered set) and hashes (Hash type), certainly also have and Strings (character string) structure the same Memcached.Data cached functions of the Redis as an efficient network, performance High, Redis can support the read-write frequency per second more than 100K+.
Mysql:It is a kind of associated data library management system, linked database saves the data in different tables, without It is that all data are placed in one big warehouse, which adds speed and improves flexibility, is currently that WEB is managed more Common data management system.
Timed task system:The system that certain tasks can be periodically executed, can setup parameter timing request setting interface.
In order to illustrate technical solution described herein, illustrated below by specific embodiment.
Embodiment one:
Referring to Fig. 1, the order bulk statistics method provided in this embodiment based on server-side includes the following steps:
S101, the statistics date that the first stroke order is obtained using function getFirstOrderByType (type);
Specifically, MySql order tables can be inquired by using function getFirstOrderByType (type) to obtain The statistics date of the first stroke order.It includes but not limited to logical that function getFirstOrderByType (type), which implements process, Cross linked database, inquiry SELECT o.id, o.notify_time, FROM_UNIXTIME (o.notify_time, ' % Y-%m-%d') as time FROM`order`as o INNER JOIN $ joinTable as g WHERE o.id=g.id AND o.state IN (1,2) AND o.notify_time>1 sentences of 0ORDER BY o.id ASC limit obtain first Order data, wherein notify_time are the statistics date of the first stroke order.It is understood that this method is only to realize The one way in which of step S101 is not used to limit the application.
Furthermore, it is possible to the statistics date of the first stroke order is stored in Redis cachings by set () method, for next time It is used when statistics.
S102, the statistics date based on the first stroke order, obtain first day statistics start time;
Preferably, the initial time on the statistics date of the first stroke order can be used, i.e., zero is used as first in zero second when zero It statistics start time, it is of course also possible to using other moment, as long as ensure the moment the first stroke order the statistics moment Before, too many restriction is not done herein.
S103, at the end of being added one day time obtained first day statistics described first day statistics start time It carves;
Wherein, it is in order to more meet actual statistics custom, according to the ability and reality of equipment by way of daily counting Border situation can also select to be counted by other time intervals, not do too many restriction herein.
S104, based on described first day statistics start time and described first day statistics finish time, described in statistics First day quantity on order, and be written in order statistical form using function addStaticData (data);
Wherein, order statistical form can be newly-built statistical form, first day quantity on order can be encapsulated into data, Then it is written in order statistical form using function addStaticData (data).
S105, using last statistics finish time as statistics start time next time, pressed by timed task system The quantity on order of every day is counted successively according to preset time interval call function historyDataRun (), and institute is written It states in order statistical form, is completed until current all orders count.
Wherein, time interval can be one minute, 30 seconds or other times, specifically can be according to the ability and reality of equipment It needs, rational time interval is set, it, can faster completion statistics when time interval is arranged shorter.
It is understood that first day statistics start time was obtained by step S102, so every day does not wrap It includes first day, refers within first day every day after first day to current time.
Specifically, the implementation procedure of one day quantity on order of statistics can be packaged into function historyDataRun (), Call the function according to preset time interval by timed task system again, then can in the short time current all orders, I.e. History Order, all statistics is completed.
As it can be seen that in the present embodiment, server-side, which is not need to rely on big data technology, can complete order bulk statistics, enrich The realization methods of order bulk statistics.
Under the premise of History Order counts completion, daily quantity on order subsequently can be only safeguarded, work as when needing to inquire When preceding quantity on order, as long as the same day current quantity on order is added History Order quantity.But in view of in some tools In the case of body is realized, pay invoice the problem of there may be effective property, such as the previous day order, when talent's payment, then The quantity on order of yesterday can be updated again in every day.
So further, after the completion of current all orders statistics, i.e., in the statistical basis of completion History Order, It can also include the following steps:
A. function getMonthStatCacheTime () is used to obtain the statistics date of finishing touch order;
Wherein, finishing touch order is the finishing touch order in current all orders, i.e. History Order in step S105 In finishing touch order.
Wherein it is possible to the statistics date of finishing touch order is used into function setMonthStatTime (time), wherein Using in set (time) method deposit Redis cachings, used when for counting next time.
B. on the statistics date based on the finishing touch order, the statistics finish time of the previous day is obtained;
Specifically, can will be carved at the beginning of the statistics date of finishing touch order, i.e., zero zero second is as previous when zero It statistics finish time.It is understood that the previous day refers to that the statistics date of the finishing touch order is corresponding previous It, that is, finishing touch order statistics the date yesterday.
C. the time that the statistics finish time of described the previous day subtracts one day is obtained into the statistics start time of described the previous day;
D. the statistics finish time of the statistics start time and described the previous day based on described the previous day, by timed task system Before system counts described again according to preset time interval and preset statistics number call function currentDataRun () One day quantity on order, and will be in the quantity on order that counted again update to the order statistical form.
Wherein it is possible to according to the ability and actual needs of equipment, rational time interval and statistics number, statistics time are set Number.It will be evident that when time interval is arranged smaller, statistics number is arranged more, and data are more accurate.
Specifically, using function getMonthStatCacheTime () method, inquires History Order and count on the same day Time time, as the statistics end time of finishing touch order, time-86400 starts as the statistics of finishing touch order Time, then the quantity on order using orderStat (time-86400, time) method statistics to the previous day.It then again will be above-mentioned Method is encapsulated into function currentDataRun (), by timed task system according to preset time interval and preset system Metering number call function currentDataRun () carrys out circle statistics.
As it can be seen that the quantity on order by updating the previous day, can improve the accuracy of quantity on order.It is ordered daily subsequent In single statistics, since statistics is completed in History Order, only the order of yesterday and today can be counted, realized every day Real-time query order statistics effect, solve the problems, such as big data statistics and caused by order count delay.
It should also be noted that, the present embodiment can also count quantity on order according to the different means of payment.In order to Data analysis is carried out to all kinds of different statistical data.Wherein, the means of payment includes but not limited to wechat payment, Alipay payment Or Unionpay's payment, do not do too many restriction herein.
It should also be noted that, the realization of the present embodiment is based on server device, server device is including but not limited to straight Broadcast the web server used in platform.
Further, the present embodiment can also include the steps that order inquiries, specially use function getData (param), the order data that statistics is completed is inquired, wherein param is the parameter of inquiry, wherein includes to look into Param parameters At the beginning of inquiry, the end time, type etc..So that administrative staff can be according to items such as time started, end time and types Part real-time query quantity on order.
In order to make it easy to understand, this implementation is explained from the angle of application scenarios again below.
The considerations of user A is for cost and time, it is desirable to by realizing that the order batch of live streaming platform is united based on server-side Meter, so as to real-time query quantity on order.First, the statistics date 2018-1-1 of the first stroke order of live streaming platform is obtained, It will then be carved at the beginning of first day and be set as 2018-1-1 00:00:00, the time plus one day will be carved at the beginning of first day, The finish time for obtaining first day is 2018-1-2 00:00:00, the order of finish time is carved at the beginning of obtaining first day Quantity, as first day quantity on order, and be stored in order statistical form, then using first day finish time as second day Start time obtains second day quantity on order with same method, and so on, it calculates arrive current date 2018-2- always 15 quantity on order, so far, History Order statistics are completed.In the subsequent time, only need to count yesterday and today again daily Quantity on order safeguard order statistical form.The order statistical of yesterday is to obtain the statistics closing day of finishing touch order Phase, on the day of 2018-2-15, the statistics Close Date of finishing touch order is 2018-2-15, then at the end of the statistics of yesterday It is 2018-2-15 00 to carve:00:00, one day time is subtracted, the statistics start time 2018-2-14 00 of yesterday is obtained:00: 00, according to mode every two hours primary, that daily statistics is 6 times, the quantity on order of yesterday is recalculated, and update to order and count In table.This day 2018-2-20 has been arrived later, and user A intentionally gets the total number of orders of live streaming platform, then by calculating 2018-2- The quantity on order on 20 same day plus History Order quantity can quick obtaining to the required data of user A.
Based on same inventive concept, this application provides a kind of order bulk statistics device based on server-side refers to figure 2, embodiment two is introduced below in conjunction with Fig. 2.
Embodiment two:
Referring to Fig. 2, the order bulk statistics device provided in this embodiment based on server-side includes:
Acquiring unit 201, the statistics for obtaining the first stroke order using function getFirstOrderByType (type) Date;
The acquiring unit 201 is additionally operable to the statistics date based on the first stroke order, obtains first day statistics and opens Begin the moment;
The acquiring unit 201 is additionally operable to add one day time to obtain described described first day statistics start time One day statistics finish time;
Statistic unit 202, at the end of based on described first day statistics start time and first day statistics It carves, counts first day quantity on order, and be written in order statistical form using function addStaticData (data);
The statistic unit 202 is additionally operable to using last statistics finish time as statistics start time next time, Ordering for every day is counted successively according to preset time interval call function historyDataRun () by timed task system Odd number amount, and be written in the order statistical form, it is completed until current all orders count.
The order bulk statistics device based on server-side and the embodiment of the present application one that the embodiment of the present application two provides provide The order bulk statistics method based on server-side belong to same design, specific implementation process refers to specification full text, herein It repeats no more.
Based on same inventive concept, this application provides a kind of computer readable storage mediums, refer to Fig. 3, below will knot Fig. 3 is closed embodiment three is introduced.
Embodiment three:
A kind of computer readable storage medium 300 is present embodiments provided, the computer readable storage medium 300 stores There are computer program 311, the computer program 311 to realize following steps when being executed by processor:
The statistics date of the first stroke order is obtained using function getFirstOrderByType (type);
Based on the statistics date of the first stroke order, first day statistics start time is obtained;
Add one day time to obtain described first day statistics finish time described first day statistics start time;
Based on described first day statistics start time and described first day statistics finish time, count described first day Quantity on order, and using function addStaticData (data) be written order statistical form in;
Using last statistics finish time as statistics start time next time, by timed task system according to preset Time interval call function historyDataRun () count the quantity on order of every day successively, and be written the order In statistical form, completed until current all orders count.
In specific implementation process, when which is executed by processor, it may be implemented any in embodiment one Embodiment, details are not described herein again.
Based on same inventive concept, this application provides a kind of computer equipments, refer to Fig. 4, below in conjunction with Fig. 4 to reality Example four is applied to be introduced.
Example IV:
This application provides a kind of computer equipment 400, including processor 420, memory 410 and it is stored in memory On 410 and the computer program 411 that can be run on processor 420, the processor 420 execute the computer program 411 Shi Shixian following steps:
The statistics date of the first stroke order is obtained using function getFirstOrderByType (type);
Based on the statistics date of the first stroke order, first day statistics start time is obtained;
Add one day time to obtain described first day statistics finish time described first day statistics start time;
Based on described first day statistics start time and described first day statistics finish time, count described first day Quantity on order, and using function addStaticData (data) be written order statistical form in;
Using last statistics finish time as statistics start time next time, by timed task system according to preset Time interval call function historyDataRun () count the quantity on order of every day successively, and be written the order In statistical form, completed until current all orders count.
By the computer equipment that the present embodiment is introduced be implement the embodiment of the present application one in it is a kind of based on server-side Equipment used by order bulk statistics method, so based on the method described in the embodiment of the present application one, belonging to this field Technical staff can understand the specific implementation mode and its various change form of the computer equipment of the present embodiment, so herein How method in the embodiment of the present application is realized if being no longer discussed in detail for the computer equipment.As long as the affiliated technology people in this field Member implements equipment used by the method in the embodiment of the present application, belongs to the range to be protected of the application, no longer superfluous herein It states.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, the application can be used in one or more wherein include computer usable program code computer The computer program product implemented in usable storage medium (including but not limited to magnetic disk storage CD-ROM, optical memory etc.) Form.
The application is with reference to method, the flow of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of the application has been described, created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the application range.
Obviously, those skilled in the art can carry out the application essence of the various modification and variations without departing from the application God and range.In this way, if these modifications and variations of the application belong to the range of the application claim and its equivalent technologies Within, then the application is also intended to include these modifications and variations.

Claims (10)

1. a kind of order bulk statistics method based on server-side, which is characterized in that the method is applied in server device, Including:
The statistics date of the first stroke order is obtained using function getFirstOrderByType (type);
Based on the statistics date of the first stroke order, first day statistics start time is obtained;
Add one day time to obtain described first day statistics finish time described first day statistics start time;
Based on described first day statistics start time and described first day statistics finish time, described first day of statistics is ordered Odd number amount, and be written in order statistical form using function addStaticData (data);
Using last statistics finish time as statistics start time next time, by timed task system according to it is preset when Between interval call function historyDataRun () count the quantity on order of every day successively, and the order statistics is written In table, completed until current all orders count.
2. the method as described in claim 1, which is characterized in that described after current all orders statistics is completed Method further includes:
The statistics date of finishing touch order is obtained using function getMonthStatCacheTime (), the finishing touch is ordered It is singly contained in current all orders;
Based on the statistics date of the finishing touch order, the statistics finish time of the previous day is obtained;
The time that the statistics finish time of described the previous day subtracts one day is obtained into the statistics start time of described the previous day;
Based on described the previous day statistics start time and described the previous day statistics finish time, by timed task system according to Preset time interval and preset statistics number call function currentDataRun () count described the previous day again Quantity on order, and will be in the quantity on order that counted again update to the order statistical form.
3. method as claimed in claim 1 or 2, which is characterized in that it is described based on described first day statistics start time and Described first day statistics finish time counted first day quantity on order, and using function addStaticData (data) write-in order statistical form includes:
Based on described first day statistics start time and described first day statistics finish time, according to the different means of payment First day quantity on order is counted, and is written in order statistical form using function addStaticData (data).
4. method as claimed in claim 3, which is characterized in that the means of payment include wechat payment, Alipay payment or Unionpay pays.
5. a kind of order bulk statistics device based on server-side, which is characterized in that described device includes:
Acquiring unit, the statistics date for obtaining the first stroke order using function getFirstOrderByType (type);
The acquiring unit is additionally operable to the statistics date based on the first stroke order, obtains first day statistics start time;
The acquiring unit is additionally operable to add one day time to obtain described first day described first day statistics start time Count finish time;
Statistic unit, for based on described first day statistics start time and described first day statistics finish time, statistics First day quantity on order, and be written in order statistical form using function addStaticData (data);
The statistic unit is additionally operable to, using last statistics finish time as statistics start time next time, by timing be appointed Business system counts the quantity on order of every day successively according to preset time interval call function historyDataRun (), And be written in the order statistical form, it is completed until current all orders count.
6. device as claimed in claim 5, it is characterised in that:
The acquiring unit is additionally operable to obtain the statistics day of finishing touch order using function getMonthStatCacheTime () Phase, the finishing touch order are contained in current all orders;
The acquiring unit is additionally operable to the statistics date based on the finishing touch order, at the end of obtaining the statistics of the previous day It carves;
The acquiring unit is additionally operable to the time that the statistics finish time of described the previous day subtracts one day obtaining described the previous day Count start time;
The statistic unit is additionally operable to the statistics finish time of the statistics start time and described the previous day based on described the previous day, It is weighed according to preset time interval and preset statistics number call function currentDataRun () by timed task system The quantity on order of described the previous day is newly counted, and will be in the quantity on order that counted again update to the order statistical form.
7. such as device described in claim 5 or 6, which is characterized in that the statistic unit is specifically used for being based on described first day Statistics start time and described first day statistics finish time, count described first day and order according to the different means of payment Odd number amount, and be written in order statistical form using function addStaticData (data).
8. device as claimed in claim 7, which is characterized in that the means of payment include wechat payment, Alipay payment or Unionpay pays.
9. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, feature to exist In the computer program realizes following steps when being executed by processor:
The statistics date of the first stroke order is obtained using function getFirstOrderByType (type);
Based on the statistics date of the first stroke order, first day statistics start time is obtained;
Add one day time to obtain described first day statistics finish time described first day statistics start time;
Based on described first day statistics start time and described first day statistics finish time, described first day of statistics is ordered Odd number amount, and be written in order statistical form using function addStaticData (data);
Using last statistics finish time as statistics start time next time, by timed task system according to it is preset when Between interval call function historyDataRun () count the quantity on order of every day successively, and the order statistics is written In table, completed until current all orders count.
10. a kind of computer equipment, including processor, memory and storage can be run on a memory and on a processor Computer program, which is characterized in that the processor realizes following steps when executing the computer program:
The statistics date of the first stroke order is obtained using function getFirstOrderByType (type);
Based on the statistics date of the first stroke order, first day statistics start time is obtained;
Add one day time to obtain described first day statistics finish time described first day statistics start time;
Based on described first day statistics start time and described first day statistics finish time, described first day of statistics is ordered Odd number amount, and be written in order statistical form using function addStaticData (data);
Using last statistics finish time as statistics start time next time, by timed task system according to it is preset when Between interval call function historyDataRun () count the quantity on order of every day successively, and the order statistics is written In table, completed until current all orders count.
CN201810172315.2A 2018-03-01 2018-03-01 Server-based order batch statistical method, computer equipment and storage medium Active CN108460129B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810172315.2A CN108460129B (en) 2018-03-01 2018-03-01 Server-based order batch statistical method, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810172315.2A CN108460129B (en) 2018-03-01 2018-03-01 Server-based order batch statistical method, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108460129A true CN108460129A (en) 2018-08-28
CN108460129B CN108460129B (en) 2020-08-04

Family

ID=63216648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810172315.2A Active CN108460129B (en) 2018-03-01 2018-03-01 Server-based order batch statistical method, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108460129B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109711943A (en) * 2018-12-28 2019-05-03 杭州数梦工场科技有限公司 Order statistical method, apparatus and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050091320A (en) * 2004-03-11 2005-09-15 임남규 Pre-purchase system
CN105469264A (en) * 2015-04-30 2016-04-06 上海乐丽电子商务服务有限公司 Method of order data batch acquisition and batch analysis processing
CN106570673A (en) * 2016-11-10 2017-04-19 广州市图吉信息科技有限公司 Commercial concrete online ordering system based on intelligent mobile phone application
CN107193837A (en) * 2016-03-15 2017-09-22 阿里巴巴集团控股有限公司 Data summarization method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050091320A (en) * 2004-03-11 2005-09-15 임남규 Pre-purchase system
CN105469264A (en) * 2015-04-30 2016-04-06 上海乐丽电子商务服务有限公司 Method of order data batch acquisition and batch analysis processing
CN107193837A (en) * 2016-03-15 2017-09-22 阿里巴巴集团控股有限公司 Data summarization method and device
CN106570673A (en) * 2016-11-10 2017-04-19 广州市图吉信息科技有限公司 Commercial concrete online ordering system based on intelligent mobile phone application

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109711943A (en) * 2018-12-28 2019-05-03 杭州数梦工场科技有限公司 Order statistical method, apparatus and system
CN109711943B (en) * 2018-12-28 2021-05-25 杭州数梦工场科技有限公司 Order counting method, device and system

Also Published As

Publication number Publication date
CN108460129B (en) 2020-08-04

Similar Documents

Publication Publication Date Title
CN104580284B (en) Traffic assignments device and method for distributing business
CN107798057B (en) Transaction data processing method, device, storage medium and computer equipment
US20150365291A1 (en) Usage policy for resource management
CN105550274B (en) The querying method and device of this parallel database of two-pack
WO2016123042A1 (en) Data factory platform and operating system
CN107578158A (en) A kind of Order Scheduling optimization method suitable for manufacturing works
CN109766349A (en) The anti-weighing method of task, device, computer equipment and storage medium
CN110162292A (en) Voice broadcast method and device
US8718808B2 (en) Method and a system for propagating a scaling mode in a production process
CN109241099A (en) A kind of data query method and terminal device
CN103902548A (en) System and method for having access to data base and registering, ticket booking and online shopping system
Agrawal et al. Cycle time reduction by improved MRP-based production planning
CN110275799A (en) Billing and accounting system does not shut down a day method for point of contact snapshot remaining sum
CN106469332A (en) A kind of data processing method and device
CN104331494B (en) A kind of method and system of more new data
US20180218415A1 (en) Data center and information processing device
US9595014B1 (en) System and method for executing workflow instance and modifying same during execution
CN108460129A (en) A kind of order bulk statistics method, computer equipment and storage medium based on server-side
CN115239173A (en) Scheduling plan generation method and device, electronic equipment and storage medium
CN115718850A (en) Three-dimensional large scene animation demonstration performance optimization device and method based on three
CN110427389A (en) A kind of data processing and querying method for block chain digital cash
CN110246018A (en) Report generation device, method and equipment
CN110362583A (en) A kind of data processing method and device for multi-data source
CN105045879B (en) A kind of data parallel processing method
WO2015192519A1 (en) Bid ranking method and device

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240123

Address after: 621, No. 35, Mount Taishan Road, Shibei District, Qingdao, Shandong 266000

Patentee after: Ant Home (Qingdao) Network Technology Co.,Ltd.

Country or region after: China

Address before: Room 101-1, Building 2, No. 95, Daguan Middle Road, Tianhe District, Guangzhou, Guangdong 510000 (office only)

Patentee before: Guangzhou Zhongtian Technology Consulting Co.,Ltd.

Country or region before: China

Effective date of registration: 20240123

Address after: Room 101-1, Building 2, No. 95, Daguan Middle Road, Tianhe District, Guangzhou, Guangdong 510000 (office only)

Patentee after: Guangzhou Zhongtian Technology Consulting Co.,Ltd.

Country or region after: China

Address before: 430000 East Lake Development Zone, Wuhan City, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

Country or region before: China