CN108038563A - A kind of data predication method, server and computer-readable recording medium - Google Patents

A kind of data predication method, server and computer-readable recording medium Download PDF

Info

Publication number
CN108038563A
CN108038563A CN201711224478.2A CN201711224478A CN108038563A CN 108038563 A CN108038563 A CN 108038563A CN 201711224478 A CN201711224478 A CN 201711224478A CN 108038563 A CN108038563 A CN 108038563A
Authority
CN
China
Prior art keywords
time period
period
user
preset time
newly
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.)
Withdrawn
Application number
CN201711224478.2A
Other languages
Chinese (zh)
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.)
Shenzhen Jinli Communication Equipment Co Ltd
Original Assignee
Shenzhen Jinli Communication Equipment 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 Shenzhen Jinli Communication Equipment Co Ltd filed Critical Shenzhen Jinli Communication Equipment Co Ltd
Priority to CN201711224478.2A priority Critical patent/CN108038563A/en
Publication of CN108038563A publication Critical patent/CN108038563A/en
Withdrawn legal-status Critical Current

Links

Classifications

    • 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
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • 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/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • 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/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Marketing (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Data Mining & Analysis (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a kind of data predication method, server and computer-readable recording medium, wherein method includes:Server obtains any active ues variable quantity of target time section;Newly-increased model is obtained, the newly-increased model is used for the functional relation for describing any active ues variable quantity between the number that Adds User;Using any active ues variable quantity and the newly-increased model, the number that Adds User of the first time period of the target time section is calculated.The embodiment of the present invention, using being input to the active users inside the newly-increased model established, can be predicted to obtain the number that Adds User by obtaining active users.

Description

A kind of data predication method, server and computer-readable recording medium
Technical field
The present invention relates to Internet technical field, more particularly to a kind of method of data prediction, server and computer can Read storage medium.
Background technology
For especially Internet firm of many enterprises, the number that Adds User is related to the development and war in enterprise's future Slightly, it is an important way of understanding user demand.Therefore enterprise also tend in order to count Add User number and put into a large amount of people Power material resources.
The existing currently used several technology that Adds User that counts has off-line calculation and stream calculation.Off-line calculation can pass through extraction Then the user's data are carried out analytic statistics to obtain the number that Adds User, but due to historical user's number by historical use data again According to very huge later so that statistic processes is very very long, counts result and is often delayed more than when 8 is small, operation personnel Data can not be obtained in real time.And stream calculation be then when system receives new user data, just to user data into The real-time analytic statistics of row, but due to needing ceaselessly to change user account during statistics, it is therefore desirable to it is costly Computing resource can just obtain the number that Adds User, cost absorbing and benefit is not often directly proportional.
Therefore the time for counting and spending that Adds User using off-line calculation statistics is too long, and reality is although improved using stream calculation Shi Xing, but occupy substantial amounts of computing resource.Generally speaking, cannot be reached at the same time using the existing stroke analysis number that Adds User To high efficiency, inexpensive requirement.
The content of the invention
The embodiment of the present invention provides a kind of method of data prediction, the efficiency of data acquisition can be improved and save prediction into This.
In a first aspect, an embodiment of the present invention provides a kind of method of data prediction, this method includes:
Server obtains any active ues variable quantity of target time section;
Newly-increased model is obtained, the newly-increased model is used to describe any active ues variable quantity between the number that Adds User Functional relation;
Using any active ues variable quantity and the newly-increased model, the first time period of the target time section is calculated The number that Adds User.
Second aspect, an embodiment of the present invention provides a kind of server, which includes being used to perform above-mentioned first party The unit of the method in face, including:
Acquiring unit, for obtaining any active ues variable quantity of target time section;
Above-mentioned acquiring unit is additionally operable to obtain newly-increased model, and the newly-increased model is used to describe any active ues variable quantity With the functional relation between the number that Adds User;
Computing unit, for using any active ues variable quantity and the newly-increased model, calculates the object time The number that Adds User of the first time period of section.
The third aspect, an embodiment of the present invention provides another server, including processor, input equipment and memory, The processor, input equipment, output equipment and memory are connected with each other, wherein, the memory, which is used to store, supports service Device performs the computer program of the above method, and the computer program includes programmed instruction, and the processor is arranged to adjust Instructed with described program, the method for performing above-mentioned first aspect.
Fourth aspect, an embodiment of the present invention provides a kind of computer-readable recording medium, the computer-readable storage medium Computer program is stored with, the computer program includes programmed instruction, and described program instruction makes institute when being executed by a processor State the method that processor performs above-mentioned first aspect.
The embodiment of the present invention is by obtaining active users, using the active users to be input to the newly-increased mould that establishes Inside type, it can predict to obtain the number that Adds User.Since active users can be easier fast in embodiments of the present invention Acquisition (for example utilize stream calculation obtain active users), and newly-increased model can be built before active users are inputted It has been stood that, and newly-increased model can be rebuild with Reusability and periodically, will so make it that the process is very rapid, also protects Demonstrate,prove newly-increased model prediction to Add User several validity, greatly better than off-line calculation, and the embodiment of the present invention employs Predict the method that Adds User, also the different prior art with using statistical, thus reduce obtain Add User when Between and cost, improve efficiency.
Brief description of the drawings
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, general for this area For logical technical staff, without creative efforts, other attached drawings can also be obtained according to these attached drawings.
Fig. 1 is a kind of schematic flow diagram of the method for data prediction provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic flow diagram of the method for data prediction that another embodiment of the present invention provides;
Fig. 3 is a kind of schematic block diagram of server provided in an embodiment of the present invention;
Fig. 4 is a kind of schematic block diagram for server that another embodiment of the present invention provides;
Fig. 5 is a kind of structural diagram of server provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Site preparation describes.
It should be appreciated that ought use in this specification and in the appended claims, term " comprising " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but it is not precluded from one or more of the other feature, whole Body, step, operation, element, component and/or its presence or addition for gathering.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singulative, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combinations and all possible combinations of one or more of the associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determining " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In the specific implementation, the terminal described in the embodiment of the present invention is including but not limited to such as with touch sensitive surface The mobile phone, laptop computer or tablet PC of (for example, touch-screen display and/or touch pad) etc it is other just Portable device.It is to be further understood that in certain embodiments, equipment is not portable communication device, but it is quick with touching Feel the desktop computer of surface (for example, touch-screen display and/or touch pad).
In discussion below, the terminal including display and touch sensitive surface is described.It is, however, to be understood that It is that terminal can include one or more of the other physical user-interface device of such as physical keyboard, mouse and/or control-rod.
Terminal supports various application programs, such as one or more of following:Drawing application program, demonstration application journey Sequence, word-processing application, website create application program, disk imprinting application program, spreadsheet applications, game application Program, telephony application, videoconference application, email application, instant messaging applications, exercise Support application program, photo management application program, digital camera application program, digital camera application program, web-browsing application Program, digital music player application and/or video frequency player application program.
The various application programs that can be performed in terminal can use at least one public of such as touch sensitive surface Physical user-interface device.It can adjust and/or change among applications and/or in corresponding application programs and touch sensitive table The corresponding information shown in the one or more functions and terminal in face.In this way, the public physical structure of terminal is (for example, touch Sensing surface) it can support the various application programs with user interface directly perceived and transparent for a user.
It is that the embodiment of the present invention provides a kind of schematic flow diagram of the method for data prediction referring to Fig. 1, method as shown in the figure It may include:
101:Server obtains any active ues variable quantity of target time section.
In embodiments of the present invention, server is also referred to as servomechanism, for it is a kind of can corresponding clothes from other equipment Business request, and the equipment for handling the service request is carried out, such as be embodied in can be inputted in embodiments of the present invention Output, storage and processing user data, prediction Add User, establish the server for increasing the operations such as model newly.
In embodiments of the present invention, target time section includes needing prediction to Add User several periods, and is needed with this Predict the period similar in several periods that Adds User, can be several hours or one week etc..
In embodiments of the present invention, any active ues is frequently log on website or keep login status for a long time and be website band Carrying out the user of surcharge, the current operation situation that active users are used to weigh website has highly important meaning, wherein, it is active User's variable quantity is the active users in period for dividing of smaller of target time section, such as at 9 points in the morning to the morning 10 points of active users or the active users on Monday etc..
In embodiments of the present invention, before server obtains the active users of target time section, first receive business and report Data, wherein, above-mentioned business reported data includes any active ues information, the i.e. listed message of user, login time etc..Use Business reported data carries out stream calculation and obtains any active ues variable quantity of target time section, such as stream calculation is on business is detected Count off according in an any active ues log-on message when, then one is added to the active users of any active ues corresponding period, I.e. corresponding any active ues variable quantity adds one.Wherein, business reported data is used to record any active ues information, any active ues letter Breath includes any active ues login prompt information, any active ues login time etc..Wherein, stream calculation is used for after occurring in the time in time Ground handles data, and a time progress single treatment occurs, has real-time.
102:Newly-increased model is obtained, newly-increased model is used for the function for describing any active ues variable quantity between the number that Adds User Relation.
In embodiments of the present invention, the function that model is used to describe any active ues variable quantity between the number that Adds User is increased newly Relation, that is, be used for the number that Adds User of the first time period for any active ues variable quantity and target time section for describing target time section Between functional relation.
In embodiments of the present invention, server obtains the user's history data of preset time period before obtaining newly-increased model, Newly-increased model is established using user's history data.Wherein, user's history data include any active ues variable quantity of preset time period With the variable quantity that Adds User of preset time period.
In embodiments of the present invention, preset time period is the period set in advance in a program, can be to be currently needed for One section of period (such as three days before a week or week before one month specified that prediction Adds User before number Deng), it can be seen that be prediction accuracy with selection preset time period it is related with the distance of current time, the time more connects Closely, prediction accuracy is higher, conversely, prediction accuracy declines, further, the sub- period of any duration of preset time period The interior number that Adds User with active users it is known that i.e. any active ues variable quantity of preset time period and the variable quantity that Adds User, And obtained by statistics, wherein, any active ues are to frequently log on website and are the user that surcharge is brought in website, active users Current operation situation for weighing website has highly important meaning, wherein, any active ues variable quantity is in target time section Active users in the period of smaller division, such as the active users at 9 points in the morning to 10 AM or Monday Active users etc..Wherein, Add User number of users of the number for new registration.
In embodiments of the present invention, any active ues variable quantity and Add User change of the user's history data for preset time period The data of change amount, are obtained by the calculation statistics such as off-line calculation or stream calculation calculating, wherein, off-line calculation is used for before calculating Extraction calculates required all data in memory, then carries out the processing to data, such as counts or calculates, and stream calculation is used Data are handled in time after occurring in the time, a time progress single treatment occurs, there is real-time.
For example, server obtains the user's history data in citing current time previous week, the user's history number According to daily Add User number and the active users including Monday to Sunday.
In embodiments of the present invention, the user's history data for the above-mentioned preset time period that server by utilizing obtains are established newly-increased Model, it is expected to obtain the relation to Add User between number and any active ues variable quantity, then using one-variable linear regression algorithm The relation to Add User between number and active users in the identical sub- period in description preset time period, wherein, increase newly Model is used for the relation for describing any active ues variable quantity between the number that Adds User.
In embodiments of the present invention, above-mentioned user's history data are brought into the unary linear regression equation shaped like y=a+bx, Try to achieve constant parameter a and b, wherein, y and x represent respectively in the first time period of preset time period Adding User number with it is default The active users of first time period in period, a and b represent constant parameter.
For example, preset time period is divided into the anyon period, such as preset time period is a week, the sub- time Duan Weiyi days, establish abscissa and ordinate be respectively the N days active users and several coordinate that Adds User of the N days System, wherein, the N days are a sub- period in preset time period, using above-mentioned user's history data on above-mentioned coordinate system Described point, seven described points point-blank, but can may not therefrom find a suitable straight line so that each described point arrives The sum of fore-and-aft distance of this straight line minimum, so as to obtain an one-variable linear regression lines, therefore obtains one-variable linear regression Equation, i.e., obtain the parameter a and b of y=a+bx in this citing.
In embodiments of the present invention, except using unary linear regression equation come describe to Add User number and active users Between relation, it is contemplated that the number that Adds User in actual life may be influenced be subject to the period, such as new at weekend Amount is added more than the number that Adds User on weekdays, the number that Adds User at night more than the number etc. that Adds User in the morning, Then factor in different time periods is added, multiple linear regression equations has been also set up and has described Add User number and any active ues change Relation between amount, for example, Adding User for Monday counts and the active users on the Monday, Last Tuesday to star Functional relation between the active users of phase day.
In embodiments of the present invention, above-mentioned user's history data are brought into shaped like y=a+b1x1+b2x2+...+bkxkIt is more First equation of linear regression, tries to achieve parameter a, b1、b2... and bk, wherein, y is represented in the first time period of preset time period Add User number, x1、x2... and xkRespectively represent preset time period in second time period, the 3rd period ... With the active users of (k+1) period, second time period, the 3rd period ... and (k+1) period two are neither It is identical, first segment time and second time period, the 3rd period ... and one of them period phase of (k+1) period Together, a, b1、b2... and bkRepresent constant parameter.
For example, preset time period is divided into k sub- periods, k can be any preset value, for example, preset time Section Adds User several previous weeks of one day to need to predict, preset time period is divided into 7 periods, i.e., 7 days, k etc. In 7, when y is when Adding User several of Monday, then x1、x2... and xkAny active ues on above-mentioned Monday are represented respectively The active users of number, the previous Tuesday ... on the Monday and Sunday, other are for example when y is the star that needs are predicted When Adding User several of phase two, x1、x2... and xkThe active users on above-mentioned Tuesday are represented respectively, before the Tuesday The active users on one Monday, Wednesday ... and Sunday etc. repeat no more, and the number that Adds User is established with this with living The functional relation of multiple linear regression between jump user's variable quantity, i.e., obtain y=a+b in embodiments of the present invention1x1+b2x2 +...+bkxkParameter a, b1、b2... and bk
In embodiments of the present invention, the unary linear regression equation and multiple linear regression equations for combining above-mentioned acquisition are established Newly-increased model, Added User the relation counted between any active ues variable quantity with description, shaped like y=1/2* ((a+bx)+(a+b1x1 +b2x2+...+bkxk)), y and x represent Adding User number and preset time period in the first time period of preset time period respectively The active users of interior first time period, x1、x2... and xkRepresent respectively, second time period in preset time period, 3rd period ... and the active users of (k+1) period, second time period, the 3rd period ... and the (k+1) period is different between two, first time period and second time period, the 3rd period ... and (k+1) period In a period it is identical, a, b, b1、b2... and bkRepresent constant parameter.
103:Using any active ues variable quantity and newly-increased model, the newly-increased use of the first time period of target time section is calculated Amount.
In embodiments of the present invention, above-mentioned steps 101 to step 102 has obtained any active ues change of target time section Newly-increased model is measured and obtains, it is then in step 103 that any active ues variable quantity input of target time section is above-mentioned newly-increased In model, the number that Adds User for the period that the needs in target time section are predicted can be obtained.
In embodiments of the present invention, server is received above-mentioned business reported data and then is counted using stream calculation Any active ues variable quantity of target time section is obtained, wherein, target time section is to include needs prediction to Add User several time Default a period of time including section, for example, server using above-mentioned business reported data carry out stream calculation obtain when the previous day and When the respective active users of pervious six days of the previous day.
In embodiments of the present invention, the benefit of above-mentioned unary linear regression equation and above-mentioned multiple linear regression equations is combined It is, unary linear regression equation has been briefly described Adding User within each sub- period of preset time period and has counted and live The relation to jump between number of users, this describing mode it is simple but have ignored it is many other may influence to Add User it is several because Element, such as the factor of period, user are not that the uniform time is spent on network in actual life, but have a note Volume peak period, such as at night with weekend when, and other when the such as late into the night and working day, then can be than shallower, therefore Consider further that this important factor of period, resettled one and Added User between number and active users variable quantity Relation, several received each sub- periods from preset time period that Add User of a sub- period of preset time period The influence degree of active users is different, and combination above-mentioned two regression equation, which is conducive to strengthen newly-increased model prediction, to Add User Several order of accuarcy.
By the embodiment of the present invention, user can be input to by obtaining active users using by the active users Inside the newly-increased model established, it can predict to obtain the number that Adds User.Since active users can in embodiments of the present invention To be easier efficiently to obtain (for example obtaining active users using stream calculation), and newly-increased model can be lived in input Established before jump number of users, and newly-increased model can be rebuild with Reusability and periodically, will so cause the process It is very rapid, it also ensure that newly-increased model prediction Adds User several validity, greatly better than off-line calculation, and this hair Bright embodiment employs the method that prediction Adds User, also the different prior art with using statistical, is obtained so as to reduce The time to Add User and cost are taken, improves efficiency.
It is the schematic flow diagram of the method for another data prediction provided in an embodiment of the present invention referring to Fig. 2, left side in figure To increase the flow chart of model foundation newly, right side Adds User flow chart for prediction, and method may include as shown in the figure:
201:Server obtains the user's history data of preset time period.
In embodiments of the present invention, server is also referred to as servomechanism, for it is a kind of can corresponding clothes from other equipment Business request, and the equipment for handling the service request is carried out, such as be embodied in can be inputted in embodiments of the present invention Output, storage and processing user data, prediction Add User, establish the server for increasing the operations such as model newly.
In embodiments of the present invention, preset time period is the period set in advance in a program, can be to be currently needed for One section of period (such as three days before a week or week before one month specified that prediction Adds User before number Deng), it can be seen that be prediction accuracy with selection preset time period it is related with the distance of current time, the time more connects Closely, prediction accuracy is higher, conversely, prediction accuracy declines, further, the sub- period of any duration of preset time period The interior number that Adds User with active users it is known that i.e. any active ues variable quantity of preset time period and the variable quantity that Adds User, And obtained by statistics, wherein, any active ues is frequently log on website or keep login status for a long time and to be that website is brought additional The user of value, the current operation situation that active users are used to weigh website have highly important meaning, wherein, any active ues become Change amount be target time section smaller divide period in active users, such as in the morning 9 points arrive 10 AM Active users or the active users on Monday etc..Wherein, Add User number of users of the number for new registration.
In embodiments of the present invention, any active ues variable quantity of historical data including preset time period and preset time period Add User variable quantity, is obtained by the calculation statistics such as off-line calculation or stream calculation calculating, wherein, off-line calculation is by based on Extraction calculates required all data in memory before calculating, then carries out the processing to data, such as counts or calculates, and flowmeter Calculate and be used to after in the time occurring in time handle data, a time progress single treatment occurs, there is real-time.
For example, server obtains the user's history data in citing current time previous week, the user's history number According to daily Add User number and the active users including Monday to Sunday.
202:Usage history data obtain unary linear regression equation.
In embodiments of the present invention, the first time in server by utilizing one-variable linear regression arthmetic statement preset time period The functional relation to Add User between number and the active users of the first time period in preset time period of section, obtains unitary line Property regression equation.
In embodiments of the present invention, the user's history data for the above-mentioned preset time period that server by utilizing obtains are established newly-increased Model, it is expected to obtain the relation to Add User between number and any active ues variable quantity, then using one-variable linear regression algorithm The relation to Add User between number and active users in the identical sub- period in description preset time period, wherein, increase newly Model is used for the relation for describing any active ues variable quantity between the number that Adds User.
In embodiments of the present invention, above-mentioned user's history data are brought into the unary linear regression equation shaped like y=a+bx, Try to achieve constant parameter a and b, wherein, y and x represent respectively in the first time period of preset time period Adding User number with it is default The active users of first time period in period, a and b represent constant parameter.
For example, preset time period is divided into the anyon period, such as preset time period is a week, the sub- time Duan Weiyi days, establish abscissa and ordinate be respectively the N days active users and several coordinate that Adds User of the N days System, wherein, the N days are a sub- period in preset time period, using above-mentioned user's history data on above-mentioned coordinate system Described point, seven described points point-blank, but can may not therefrom find a suitable straight line so that each described point arrives The sum of fore-and-aft distance of this straight line minimum, so as to obtain an one-variable linear regression lines, therefore obtains one-variable linear regression Equation, i.e., obtain the parameter a and b of y=a+bx in this citing.
203:Usage history data obtain multiple linear regression equations.
In embodiments of the present invention, server by utilizing arithmetic of linearity regression describes the first time in preset time period The functional relation to Add User between number and any active ues variable quantity of preset time period of section, obtains multiple linear regression side Journey.
In embodiments of the present invention, except using unary linear regression equation come describe to Add User number and active users Between relation, it is contemplated that the number that Adds User in actual life may be influenced be subject to the period, such as new at weekend Amount is added more than the number that Adds User on weekdays, the number that Adds User at night more than the number etc. that Adds User in the morning, Then factor in different time periods is added, multiple linear regression equations has been also set up and has described Add User number and any active ues change Relation between amount, for example, Adding User for Monday counts and the active users on the Monday, Last Tuesday to star Functional relation between the active users of phase day.
In embodiments of the present invention, above-mentioned user's history data are brought into shaped like y=a+b1x1+b2x2+...+bkxkIt is more First equation of linear regression, tries to achieve parameter a, b1、b2... and bk, wherein, y is represented in the first time period of preset time period Add User number, x1、x2... and xkRespectively represent preset time period in second time period, the 3rd period ... With the active users of (k+1) period, second time period, the 3rd period ... and (k+1) period two are neither It is identical, first segment time and second time period, the 3rd period ... and one of them period phase of (k+1) period Together, a, b1、b2... and bkRepresent constant parameter.
For example, preset time period is divided into k sub- periods, k can be any preset value, for example, preset time Section Adds User several previous weeks of one day to need to predict, preset time period is divided into 7 periods, i.e., 7 days, k etc. In 7, when y is when Adding User several of Monday, then x1、x2... and xkAny active ues on above-mentioned Monday are represented respectively The active users of number, the previous Tuesday ... on the Monday and Sunday, other are for example when y is the star that needs are predicted When Adding User several of phase two, x1、x2... and xkThe active users on above-mentioned Tuesday are represented respectively, before the Tuesday The active users on one Monday, Wednesday ... and Sunday etc. repeat no more, and the number that Adds User is established with this with living The functional relation of multiple linear regression between jump user's variable quantity, i.e., obtain y=a+b in embodiments of the present invention1x1+b2x2 +...+bkxkParameter a, b1、b2... and bk
204:Combination unary linear regression equation establishes target equation of linear regression, score with multiple linear regression equations Property regression equation be used to describe newly-increased model.
In embodiments of the present invention, the unary linear regression equation and multiple linear regression equations for combining above-mentioned acquisition are established Newly-increased model, Added User the relation counted between any active ues variable quantity with description, shaped like y=1/2* ((a+bx)+(a+b1x1 +b2x2+...+bkxk)), y and x represent Adding User number and preset time period in the first time period of preset time period respectively The active users of interior first time period, x1、x2... and xkRepresent respectively, second time period in preset time period, 3rd period ... and the active users of (k+1) period, second time period, the 3rd period ... and the (k+1) period is different between two, first time period and second time period, the 3rd period ... and (k+1) period In a period it is identical, a, b, b1、b2... and bkRepresent constant parameter.
In embodiments of the present invention, the benefit of above-mentioned unary linear regression equation and above-mentioned multiple linear regression equations is combined It is, unary linear regression equation has been briefly described Adding User within each sub- period of preset time period and has counted and live The relation to jump between number of users, this describing mode it is simple but have ignored it is many other may influence to Add User it is several because Element, such as the factor of period, user are not that the uniform time is spent on network in actual life, but have a note Volume peak period, such as at night with weekend when, and other when the such as late into the night and working day, then can be than shallower, therefore Consider further that this important factor of period, resettled one and Added User between number and active users variable quantity Relation, several received each sub- periods from preset time period that Add User of a sub- period of preset time period The influence degree of active users is different, and combination above-mentioned two regression equation, which is conducive to strengthen newly-increased model prediction, to Add User Several order of accuarcy.
205:Server receives business reported data
In embodiments of the present invention, server is needed any active ues variable quantity being input in newly-increased model and can just needed The number that Adds User wanted, before this, server can receive business reported data, wherein, above-mentioned business reported data includes The listed message of any active ues information, i.e. user, login time etc..
206:Stream calculation, which is carried out, using business reported data obtains any active ues variable quantity of target time section.
In embodiments of the present invention, server is received above-mentioned business reported data and then is counted using stream calculation Any active ues variable quantity of target time section is obtained, wherein, target time section is to include needs prediction to Add User several time Default a period of time including section, for example, server using above-mentioned business reported data carry out stream calculation obtain when the previous day and When the respective active users of pervious six days of the previous day.
207:Newly-increased model is obtained, using any active ues variable quantity and newly-increased model, calculates the first of target time section The number that Adds User of period.
In embodiments of the present invention, the function that model is used to describe any active ues variable quantity between the number that Adds User is increased newly Relation, and above-mentioned steps 201 to step 206 has established newly-increased model and has obtained any active ues change of target time section Amount, any active ues variable quantity of target time section is then inputted in above-mentioned newly-increased model, can obtain mesh in step 207 The number that Adds User for the period that needs in the mark period are predicted.
By the embodiment of the present invention, it can simplify and speed up server by establishing newly-increased model and obtain the number that Adds User Process, and with prediction mode instead of traditional mode for fully relying on stream calculation or off-line calculation, further optimization Server so that server is more intelligent, server is improved the ability for handling huge data, wherein, server can select Select can user send prediction Add User several instructions when begin setting up newly-increased model, can also periodically it is automatic more The new newly-increased model, since the number that Adds User of a website is influenced by the factor of each a variety of various kinds, and these factors are And its it is uncertain complicated, therefore the newly-increased model of different times is different, newly-increased model need to be timed renewal or according to Family request is established in time, and since the functional relation that the newly-increased model of description of the embodiment of the present invention uses is simple, can be in short-term It is interior to be established, therefore the speed of data prediction is improved, efficiency is improved, reduces cost and time.
The embodiment of the present invention also provides a kind of server, which is used for the unit for performing any one of foregoing method. Specifically, it is a kind of schematic block diagram of server provided in an embodiment of the present invention referring to Fig. 3.The server of the present embodiment includes: Acquiring unit 301 and computing unit 302.
Acquiring unit 301, for obtaining any active ues variable quantity of target time section;
Above-mentioned acquiring unit 301, is additionally operable to obtain newly-increased model, newly-increased model be used to describing any active ues variable quantity with it is new Add the functional relation between amount;
Alone 302 are calculated, for using any active ues variable quantity and newly-increased model, when calculating the first of target time section Between section the number that Adds User.
By the described server of implementing Fig. 3, user have acquisition Add User several demands when, server can and Shi Fanying, that is, predict the number that Adds User of current slot, and without that must wait until that the needs obtain several work as that Add User Stream calculation or off-line calculation could be utilized to count and obtain Adding User for the current slot after past completely preceding period Number, and the server is by stream calculation count any active ues variable quantity of target time section, can compare appearance Any active ues variable quantity of target time section is obtained easily and quickly, then the server has the advantages that low time delay, low cost.
Also referring to Fig. 4, Fig. 4 is the structure diagram of another server disclosed by the embodiments of the present invention.Wherein, scheme Server shown in 4 is that server as shown in Figure 3 optimizes.Compared with the server shown in Fig. 3, Fig. 4 institutes In the server shown:
Acquiring unit 301, is additionally operable to before newly-increased model is obtained, and obtains the user's history data of preset time period, uses Family historical data includes any active ues variable quantity of preset time period and the variable quantity that Adds User of preset time period.
Computing unit 302, is also used for user's history data and establishes newly-increased model.
Specifically, using the first time period in one-variable linear regression arthmetic statement preset time period Add User number with Functional relation between the active users of first time period in preset time period, obtains unary linear regression equation;
Specifically, described using arithmetic of linearity regression the first time period in preset time period Add User number with Functional relation between any active ues variable quantity of preset time period, obtains multiple linear regression equations.
Specifically, combination unary linear regression equation establishes target equation of linear regression, mesh with multiple linear regression equations Mark equation of linear regression is used to describe newly-increased model.
Further, when unary linear regression equation can be that y=a+bx, y and x represent the first of preset time period respectively Between Add User number and active users of the first time period in preset time period in section, a and b represents constant parameter.
Further, multiple linear regression equations can be y=a+b1x1+b2x2+...+bkxk, y expression preset time periods First time period in the number that Adds User, x1、x2... and xkSecond time period in preset time period, the are represented respectively Three periods ... and the active users of (k+1) period, second time period, the 3rd period ... and (k+ 1) period is different between two, and first segment time and second time period, the 3rd period ... and (k+1) period are wherein One period is identical, a, b1、b2... and bkRepresent constant parameter.
Further, target equation of linear regression can be y=1/2* ((a+bx)+(a+b1x1+b2x2+...+bkxk)), y Represent Add User number and the work of the first time period in preset time period in the first time period of preset time period respectively with x Jump number of users, x1、x2... and xkRespectively represent preset time period in second time period, the 3rd period ... and The active users of (k+1) period, second time period, the 3rd period ... and (k+1) period two neither phase Together, the first segment time is identical with second time period, the 3rd period ... and one of them period of (k+1) period, a、b、b1、b2... and bkRepresent constant parameter.
In the embodiment of the present invention, acquiring unit 301 is additionally operable to reception business reported data, and business reported data is used to record Any active ues information.
In the embodiment of the present invention, the server apparatus shown in Fig. 4 can also include:
Statistic unit 303, any active ues change of target time section is obtained for carrying out stream calculation using business reported data Change amount.
It is a kind of server schematic block diagram that another embodiment of the present invention provides referring to Fig. 5.The present embodiment as depicted In server can include:One or more processors 501;One or more input equipments 502 and memory 503.It is above-mentioned Processor 501, input equipment 502 and memory 503 are connected by bus 504.Memory 503 is used to store computer program, Computer program includes programmed instruction, and processor 501 is used for the programmed instruction for performing the storage of memory 503.
Input equipment 502, for performing the function of acquiring unit 301, any active ues for obtaining target time section become Change amount and the newly-increased model of acquisition, newly-increased model are used to describe any active ues variable quantity the function pass between the number that Adds User System.
Processor 501, alone 302 function is calculated for performing, for using any active ues variable quantity and newly-increased mould Type, calculates the number that Adds User of the first time period of target time section.
In embodiments of the present invention, above-mentioned input equipment 502, is additionally operable to before newly-increased model is obtained, when obtaining default Between section user's history data, any active ues variable quantities of user's history data including preset time period and preset time period it is new Add family variable quantity.
In embodiments of the present invention, above-mentioned processor 501, is also used for user's history data and establishes newly-increased model.
Specifically, using the first time period in one-variable linear regression arthmetic statement preset time period Add User number with Functional relation between the active users of first time period in preset time period, obtains unary linear regression equation;
Specifically, described using arithmetic of linearity regression the first time period in preset time period Add User number with Functional relation between any active ues variable quantity of preset time period, obtains multiple linear regression equations.
Specifically, combination unary linear regression equation establishes target equation of linear regression, mesh with multiple linear regression equations Mark equation of linear regression is used to describe newly-increased model.
Further, when unary linear regression equation can be that y=a+bx, y and x represent the first of preset time period respectively Between Add User number and active users of the first time period in preset time period in section, a and b represents constant parameter.
Further, multiple linear regression equations can be y=a+b1x1+b2x2+...+bkxk, y expression preset time periods First time period in the number that Adds User, x1、x2... and xkSecond time period in preset time period, the are represented respectively Three periods ... and the active users of (k+1) period, second time period, the 3rd period ... and (k+ 1) period is different between two, and first segment time and second time period, the 3rd period ... and (k+1) period are wherein One period is identical, a, b1、b2... and bkRepresent constant parameter.
Further, target equation of linear regression can be y=1/2* ((a+bx)+(a+b1x1+b2x2+...+bkxk)), y Represent Add User number and the work of the first time period in preset time period in the first time period of preset time period respectively with x Jump number of users, x1、x2... and xkRespectively represent preset time period in second time period, the 3rd period ... and The active users of (k+1) period, second time period, the 3rd period ... and (k+1) period two neither phase Together, the first segment time is identical with second time period, the 3rd period ... and one of them period of (k+1) period, a、b、b1、b2... and bkRepresent constant parameter.
In the embodiment of the present invention, input equipment 502 is additionally operable to reception business reported data, and business reported data is used to remember Record any active ues information.
Processor 501, is additionally operable to perform the function of statistic unit 303, for carrying out stream calculation using business reported data Obtain any active ues variable quantity of target time section.
It should be appreciated that in embodiments of the present invention, alleged processor 501 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at It can also be any conventional processor etc. to manage device.
Input equipment 502 can include Trackpad, fingerprint adopt sensor (finger print information that is used to gathering user and fingerprint Directional information), microphone etc., output equipment 503 can include display (LCD etc.), loudspeaker etc..
The memory 504 can include read-only storage and random access memory, and to processor 501 provide instruction and Data.The a part of of memory 504 can also include nonvolatile RAM.For example, memory 504 can also be deposited Store up the information of device type.
In the specific implementation, processor 501, input equipment 502, the output equipment 503 described in the embodiment of the present invention can Perform the realization side described in the first embodiment and second embodiment of the method for data prediction provided in an embodiment of the present invention Formula, also can perform the implementation of the described server of the embodiment of the present invention, details are not described herein.
A kind of computer-readable recording medium is provided in another embodiment of the invention, and computer-readable recording medium is deposited Computer program is contained, computer program includes programmed instruction, and programmed instruction is executed by processor.
Computer-readable recording medium can be the internal storage unit of the server of foregoing any embodiment, such as service The hard disk or memory of device.Computer-readable recording medium can also be the External memory equipment of server, such as match somebody with somebody on server Standby plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) Card, flash card (Flash Card) etc..Further, computer-readable recording medium can also have been deposited both the inside including server Storage unit also includes External memory equipment.Computer-readable recording medium is used to store needed for computer program and server Other programs and data.Computer-readable recording medium can be also used for temporarily storing the number that has exported or will export According to.
Those of ordinary skill in the art may realize that each exemplary list described with reference to the embodiments described herein Member and algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are performed with hardware or software mode actually, application-specific and design constraint depending on technical solution.Specially Industry technical staff can realize described function to each specific application using distinct methods, but this realization is not It is considered as beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience of description and succinctly, the clothes of foregoing description The specific work process of business device and unit, may be referred to the corresponding process in preceding method embodiment, details are not described herein.
In several embodiments provided herein, it should be understood that disclosed server and method, can pass through Other modes are realized.For example, device embodiment described above is only schematical, for example, the division of unit, only For a kind of division of logic function, there can be other dividing mode when actually realizing, such as multiple units or component can combine Or another system is desirably integrated into, or some features can be ignored, or do not perform.In addition, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, device or unit Connect or electricity, mechanical or other forms connections.
The unit illustrated as separating component may or may not be physically separate, be shown as unit Component may or may not be physical location, you can with positioned at a place, or can also be distributed to multiple networks On unit.Some or all of unit therein can be selected to realize the mesh of the embodiment of the present invention according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also It is that unit is individually physically present or two or more units integrate in a unit.It is above-mentioned integrated Unit can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or in use, can To be stored in a computer read/write memory medium.Based on such understanding, technical scheme substantially or Say that the part to contribute to the prior art, or all or part of the technical solution can be embodied in the form of software product Out, which is stored in a storage medium, including some instructions are used so that a computer equipment (can be personal computer, server, or network equipment etc.) performs all or part of each embodiment method of the present invention Step.And foregoing storage medium includes:It is USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random Access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with Jie of store program codes Matter.

Claims (10)

  1. A kind of 1. method of data prediction, it is characterised in that including:
    Server obtains any active ues variable quantity of target time section;
    Newly-increased model is obtained, the newly-increased model is used for the function for describing any active ues variable quantity between the number that Adds User Relation;
    Using any active ues variable quantity and the newly-increased model, calculate the target time section first time period it is new Add amount.
  2. 2. according to the method described in claim 1, it is characterized in that, before the newly-increased model of the acquisition, further include:
    The server obtains the user's history data of preset time period, and the user's history data include the preset time period Any active ues variable quantity and the preset time period the variable quantity that Adds User;
    The newly-increased model is established using the user's history data.
  3. 3. according to the method described in claim 2, it is characterized in that, described establish described increase newly using the user's history data Model includes:
    Using the first time period described in one-variable linear regression arthmetic statement in preset time period Add User number with it is described pre- If the functional relation between the active users of the first time period in the period, obtains unary linear regression equation;
    Add User described in the first time period in the preset time period number and institute are described using arithmetic of linearity regression The functional relation between any active ues variable quantity of preset time period is stated, obtains multiple linear regression equations;
    Combine the unary linear regression equation and establish target equation of linear regression, the mesh with the multiple linear regression equations Mark equation of linear regression is used to describe the newly-increased model.
  4. 4. according to the method described in claim 3, it is characterized in that, the unary linear regression equation includes:
    Y=a+bx;
    The y and x represents number and the institute of Adding User in the first time period of the preset time period respectively The active users of the first time period in preset time period are stated, a and b represents constant parameter.
  5. 5. according to the method described in claim 3, it is characterized in that, the multiple linear regression equations include:
    Y=a+b1x1+b2x2+...+bkxk
    The y represents the number that Adds User in the first time period of the preset time period, the x1, it is described x2... and the xkRepresent respectively second time period in the preset time period, the 3rd period ... and (k+ 1) active users of period, the second time period, the 3rd period ... and (k+1) period two are neither It is identical, the first segment time and the second time period, the 3rd period ... and (k+1) period one of them Period is identical, a, the b1, the b2... and the bkRepresent constant parameter.
  6. 6. according to the method described in claim 3, it is characterized in that, the target equation of linear regression includes:
    Y=1/2* ((a+bx)+(a+b1x1+b2x2+...+bkxk));
    The y and x represents number and the institute of Adding User in the first time period of the preset time period respectively State the active users of the first time period in preset time period, the x1, the x2... and the xkPoint Do not represent second time period in the preset time period, the 3rd period ... and (k+1) period is described active Number of users, the second time period, the 3rd period ... and (k+1) period are different between two, during the first segment Between, a, institute identical with the second time period, the 3rd period ... and one of them period of (k+1) period State b, the b1, the b2... and the bkRepresent constant parameter.
  7. 7. according to the method described in claim 1-6 any one, it is characterised in that the server obtains target time section Any active ues variable quantity includes:
    The server receives business reported data, and the business reported data is used to record any active ues information;
    Stream calculation, which is carried out, using the business reported data obtains any active ues variable quantity of the target time section.
  8. 8. a kind of server, it is characterised in that including for performing the method as described in claim 1-7 any claims Unit.
  9. A kind of 9. server, it is characterised in that including processor, input equipment, output equipment and memory, the processor, Input equipment, output equipment and memory are connected with each other, wherein, the memory is used to store computer program, the calculating Machine program includes programmed instruction, and the processor is arranged to call described program instruction, performs as claim 1-7 is any Method described in.
  10. A kind of 10. computer-readable recording medium, it is characterised in that the computer-readable storage medium is stored with computer program, The computer program includes programmed instruction, and described program instruction makes the processor perform such as right when being executed by a processor It is required that 1-7 any one of them methods.
CN201711224478.2A 2017-11-28 2017-11-28 A kind of data predication method, server and computer-readable recording medium Withdrawn CN108038563A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711224478.2A CN108038563A (en) 2017-11-28 2017-11-28 A kind of data predication method, server and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711224478.2A CN108038563A (en) 2017-11-28 2017-11-28 A kind of data predication method, server and computer-readable recording medium

Publications (1)

Publication Number Publication Date
CN108038563A true CN108038563A (en) 2018-05-15

Family

ID=62094388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711224478.2A Withdrawn CN108038563A (en) 2017-11-28 2017-11-28 A kind of data predication method, server and computer-readable recording medium

Country Status (1)

Country Link
CN (1) CN108038563A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109299832A (en) * 2018-11-16 2019-02-01 北京奇虎科技有限公司 A kind of prediction technique and device of active users
CN112256814A (en) * 2020-10-28 2021-01-22 每日互动股份有限公司 Information acquisition method, electronic device, and computer-readable storage medium
CN112686483A (en) * 2019-10-17 2021-04-20 ***通信集团陕西有限公司 Early warning area identification method and device, computing equipment and computer storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109299832A (en) * 2018-11-16 2019-02-01 北京奇虎科技有限公司 A kind of prediction technique and device of active users
CN112686483A (en) * 2019-10-17 2021-04-20 ***通信集团陕西有限公司 Early warning area identification method and device, computing equipment and computer storage medium
CN112256814A (en) * 2020-10-28 2021-01-22 每日互动股份有限公司 Information acquisition method, electronic device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN104106053B (en) Use the dynamic CPU GPU load balance of power
US9575634B2 (en) Techniques for asynchronous rendering
CN107515890A (en) A kind of method and terminal for identifying resident point
CN107231264A (en) For the method and apparatus for the capacity for managing Cloud Server
CN109597685A (en) Method for allocating tasks, device and server
CN109597842A (en) Data real-time computing technique, device, equipment and computer readable storage medium
CN108038563A (en) A kind of data predication method, server and computer-readable recording medium
CN107426322A (en) A kind of PUSH message target matching method, server, terminal and computer-readable recording medium
CN107507036A (en) The method and terminal of a kind of data prediction
CN106940652A (en) Method for controlling application program and mobile terminal
CN107239348A (en) A kind of polycaryon processor dispatching method, device and mobile terminal
CN109445884A (en) A kind of functional label methods of exhibiting and terminal device
CN110097170A (en) Information pushes object prediction model acquisition methods, terminal and storage medium
CN109492024A (en) Data processing method, device, computer equipment and storage medium
CN109359160A (en) Method of data synchronization, device, computer equipment and storage medium
CN106406494B (en) A kind of method and terminal of processor scheduling
CN107491300A (en) The reminding method and its terminal of a kind of intelligent function
CN109685255A (en) A kind of method and apparatus for predicting customer churn
CN112052096A (en) Resource processing method and device, server and terminal
CN105848130A (en) Data traffic management method and terminal
CN109598070A (en) A kind of Time Series Forecasting Methods and platform
CN109213662A (en) A kind of user's touch-control behavioral data collection method and terminal
CN106445698B (en) Method and device for acquiring step counting data
CN110347477B (en) Service self-adaptive deployment method and device in cloud environment
CN107515816A (en) The method and server of a kind of data statistics

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20180515

WW01 Invention patent application withdrawn after publication