Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application.
It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majority
Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps
It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application
A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from
In the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as
One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determination ".
In logging in system by user or website, system needs to come in the information of the user and configuration load.Usual situation
Under, system is all the load of instant realization user information when user logs in.
But for system or website, sometimes in face of the phenomenon that having a large number of users within certain period while logging in.Example
Such as, it is illustrated by taking Taobao as an example.It is well known that the commodity for gathering cost-effective column of Taobao are typically all in every morning ten
What point started to snap, so have a large number of users in a period of time while logging in Taobao before and after 10 points of every morning.
In this case, using the method for conventional user information load, system just needs to be completed in a short time pair
The load work of a large number of users information can not only bring very big pressure to system in this way, but also will lead to system operational speed
Slack-off, there is card machine, even delay machine phenomenon in navigation process in user, seriously affects user experience.
Based on this, the embodiment of the present application provides a kind of loading method of user information, can be according to the historical log of user
Information, prediction obtain the login time of user next time, and in advance will before the login time, when the systematic comparison free time
The information load of the user is come in.In this way, the user log in when, system there is no need to temporarily load the information of the user, by
This can effectively accelerate the access speed of user, promote user experience, and can reduce system pressure.
It referring to Fig.1, is the flow chart of one embodiment of the loading method of the application user information.As shown in Figure 1, described
Method is used for server, and the method may include following steps:
Step 101: obtaining historical log information of the user from current time in preset time.
Step 102: according to the historical log information, obtaining the predicted value of user login time next time.
Step 103: before the user next time predicted value of login time, completion adds the information of the user
It carries.
In the embodiment of the present application, according to historical log information of the user from current time in preset time period, it is somebody's turn to do
The predicted value of user's login time next time, so that system can login time predicted value arrives it next time at this
Before, the information of the user is loaded in advance in the system free time, it is of the existing technology to solve the problems, such as.
So that system can effectively add there is no need to temporarily load the information of the user when the user logs in
The access speed of fast user, promotes user experience, and can reduce system pressure.
It is the flow chart of another embodiment of the loading method of the application user information referring to Fig. 2.As shown in Fig. 2, institute
Method is stated for server, the method may include following steps:
Step 201: server obtains the time of user's the last login in preset time period from current time.
In the embodiment of the present application, server obtains the historical log information of user, extracts the user from current time
The temporal information logged in each time in preset time period.
Specifically, server can all record the temporal information of user's secondary login, address letter when user's each login system
It ceases (such as IP address etc.), and in the database using above- mentioned information as historical log information preservation.
Step 202: using the user from current time first logging into as starting in preset time period, statistics obtains
The last login belongs to the login times in the preset time period.
In the embodiment of the present application, server to from current time in preset time period the user log in every time belong to it is described
Login times in preset time period are counted, using the user in the preset time period first log into as rise
Begin, as the 1st time, statistics obtains the user and logs in the n-th login belonged in the preset time period every time.Wherein, n is
Natural number.
In the embodiment of the present application, server can record the secondary login in the temporal information that user logs in every time and belong to this
The login times of user within a preset period of time.
For example, it is assumed that the preset time period is one month, then the login to the user from current time in one month time
Number is counted.For example, the user has logged in 45 times in one month, then recorded in the temporal information that the user logs in every time
The login times that the secondary login belongs to.For example, the corresponding login times of first time login from current time in one month are
1, it is 45 that the last time from current time in one month, which logs in corresponding login times,.
It should be noted that wherein, the preset time period can be preset by user oneself according to business scenario, for example be fallen
The login time or 20 days nearest that number is the 20th time.
Step 203: the login times in the preset time period are belonged to according to the last login, it is pre- using logging in
Survey model, prediction obtain the user logs in next time with it is described from current time the last time login interval time it is pre-
Measured value;Wherein, the login prediction model be logged in every time in preset time period from current time with the user it is corresponding
It is sample data that interval time and the user log in the login times belonged in the preset time period every time, utilizes minimum two
What multiplication was fitted;It is described that log in corresponding interval time every time be the user logs in every time and log in next time between
Interval time.
In the embodiment of the present application, for the log-on message of each user within a preset period of time, corresponding log in advance is established
Survey model.It, can in conjunction with the user the last log-on message within a preset period of time using the login prediction model of the user
To obtain the predicted value that the user logs in the interval time logged in described the last time next time.It is predicted according to the interval time
Value can be easily obtained the predicted value of user login time next time, so that system can be next at this
Before secondary login time predicted value arrives, the information of the user is loaded in advance in the system free time, to solve existing skill
Art there are the problem of.
In the following, describing in detail to the establishment process of the login prediction model of the embodiment of the present application.This logs in prediction mould
The foundation of type may include following step 2031 to step 2033.
Step 2031: server obtains the time that the user logs in preset time period every time from current time, meter
Calculation is logged in corresponding interval time every time.
When each login system of user, server can all record the temporal information of user's secondary login, address information (such as
IP address etc.), and in the database using above- mentioned information as historical log information preservation.
In the embodiment of the present application, server can be from obtaining the user in preset time period from current time in database
Historical log information, extract the temporal information that the user logs in every time, and be calculated the user log in every time it is corresponding
Interval time.Wherein, logging in corresponding interval time every time is the interval user logs in every time and logs in next time between
Time.
For example, it is assumed that the preset time period is one month, and the user has logged in 45 times in one month.By obtaining
To log-on message obtain, for the user in this one month, the time of the 20th login is 8:12:34 on January 2nd, 2015, the
The time of 21 logins is 14:37:54 on January 2nd, 2015, then can be calculated the user the 20th time and log in corresponding interval
Time is 20 seconds 25 minutes 6 hours.In practical applications, in order to count conveniently, the unit of the interval time can be set as the second,
It is 23120 seconds that then user's jth time, which is logged in the interval time Tj of jth+1 time login,.
And so on, it can be calculated between the user logs in each time and log within a preset period of time next time
Interval time.
Step 2032: using the user from current time first logging into as starting in preset time period, count
Log in the login times belonged in the preset time period every time to the user.
In the embodiment of the present application, server acquires the user stepping on from current time, in preset time period every time
After the temporal information of record, all log-on messages of the user within a preset period of time are counted, statistics obtains the user and exists
Total login times n and each login in preset time period belong to the jth in the preset time period time and log in.
Wherein, the user corresponding login times of once login earliest in preset time period from current time are 1, i.e.,
Belong to the 1st login in the preset time period for earliest primary login;User preset time period from current time
It is interior it is recent to log in corresponding login times be n, as recent login belongs to n-th in the preset time period
Secondary login.
Step 2033: with the user log in every time corresponding interval time and the user log in every time belong to it is described pre-
If the login times in the period are sample data, using least square method, fitting obtains the login prediction model of the user.
In the embodiment of the present application, login of the user from current time, in preset time period is established using least square method
Prediction model, the data sample of the model are that the user from current time in preset time period logs in corresponding every time
The login times belonged in the preset time period are logged in every time every time and the user.
Specifically, the user by the user from current time in preset time period is each in the embodiment of the present application
It logs in corresponding interval time and the user logs in the login times belonged in the preset time period as coordinate system every time
In a point.Wherein, the abscissa of the point is that the user logs in the login times belonged in the preset time period every time,
Ordinate is that the user logs in corresponding interval time every time.
It is possible thereby to make, user log-on message each in preset time period from current time all respective coordinates systems
In a point, and user's multiple points in the information respective coordinates system of all logins within a preset period of time.For example, it is assumed that user
Login times total within a preset period of time are 27 times from current time, then 27 points in respective coordinates system.
In the embodiment of the present application, carried out curve fitting using least square method to point all in above-mentioned coordinate system, finally
Obtained curvilinear equation is the user from current time, corresponding login prediction model in preset time period.
It is the exemplary diagram of the least square method curve matching of the application referring to Fig. 3.In Fig. 3, with the user in preset time
It is illustrated for total login times n=27 in section.
What needs to be explained here is that in practical applications, when the unit of the interval time is the second, the numerical value of the interval time
It is general all bigger.For example, being once exemplified as the interval time in previous embodiment is 23120 seconds, this will be so that in a coordinate system
The calculating a little to carry out curve fitting with the later period is taken to bring big inconvenience.Meanwhile for the embodiment of the present application, system is to this
The prediction of login time does not need to be accurate to second grade user next time, it is only necessary to a general time range.As,
System does not need to know that user can specifically log on after how many second, it is only necessary to know the user probably in several hours
Can log in after (per hour 3600 seconds) can.
Therefore, in the embodiment of the present application, when carrying out curve fitting, when can log in corresponding interval every time to the user
Between carry out abstract processing, make it easier to described point in a coordinate system and the operation that the least square method in later period is fitted be simpler
It is clean, mitigate the workload of system operations, improves the speed and efficiency of operation.Still by taking interval time is 23120 seconds as an example, this is abstract
Change, which is specifically as follows, reduces 10000 times for the interval time, and it is latter to retain decimal point to the data obtained after 10000 times of diminution
Position data, then the interval time after available abstract is 2.3.Thus, it is possible to easily log in corresponding login to this time
Number and interval time described point in a coordinate system, and simplify the operand of least square method fitting.
As shown in figure 3, each point corresponding interval time is the data after abstracting in coordinate system shown in Fig. 3.Wherein, scheme
The corresponding abscissa of each point in coordinate system shown in 3, the as user log in corresponding login times every time and are respectively as follows:
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,
26,27)
The corresponding ordinate of each point in coordinate system shown in Fig. 3, when as logging in corresponding interval every time to the user
Between abstract after be respectively as follows:
(10,9.6,9.0,9.3,8.4,8.2,8,7.5,7.4,7.7,7,6.5,6.2,6,5.9,5.9,6.1,6,5.9,
5.8,5.9,5.8,5.7,5.5,5.6,5.4,5.3)
It is fitted to obtain a curve using the polynomial curve fitting principle of least square method according to these points, which is
For in the period, the corresponding login prediction model of the user.
Specifically, being stepped on every time from current time, in preset time period in the embodiment of the present application with the user below
It records corresponding login times and the user is logged in corresponding interval time as sample every time and is fitted using least square method
Process to login prediction model of the user from current time, in preset time period is described in detail.
Step a: polynomial fitting is set as shown in formula (1):
Y=a0+a1x+…+anxn (1)
Step b: the sum of the distance (i.e. the quadratic sum of partial variance) of each point in coordinates computed system to this curve,
In, the abscissa x of each point in coordinate systemjEqual to the user, the user logs in category every time in preset time period from current time
Login times in the preset time period, the ordinate y of each point in coordinate systemjCorrespondence is logged in every time equal to the user
Interval time abstract after data, specifically as shown in formula (2):
Step c: in order to which qualified a (a is calculated0, a1... ak), a is asked to formula (2) the rightiPartial derivative, obtain
The simultaneous mode of following formula (3) are as follows:
Step d: abbreviation is carried out to the left side of each equation in above-mentioned formula (3), is obtained shown in formula (4):
Step e: converting equation shown in above-mentioned formula (4) to the form of matrix, obtains generalized circular matrix shown in formula (5)
Formula:
Step f: to being obtained after generalized circular matrix abbreviation shown in formula (5):
Step g: by the solution to equation shown in formula (6), coefficient matrix a (a is calculated0, a1... ak), by the coefficient
Matrix substitute into formula (1), obtain final least square polynomial fit equation, also be the user from current time, preset
Login prediction model in period.
For example, being still illustrated taking what is shown in fig. 3 as an example.To 27 points in shown in Fig. 3 using above-mentioned least square method into
Row curve matching, finally obtained matched curve are as follows:
Y=-10-6x5+5×10-5x4-0.0003x3+0.0006x2-0.3317x+10.262 (7)
Wherein, R2It is 0.9814.The R2The also known as goodness of fit of the curve, value show the quasi- of the curve closer to 1
The accuracy of conjunction is higher.
So far the establishment process of the login prediction model to the user is just completed.
Using the login prediction model, corresponding login times are logged in conjunction with user's the last time, can be calculated
User's the last time log in and next time log between interval time predicted value.
What needs to be explained here is that if in practical applications, in the aforementioned establishment process for logging in prediction model, to this
Interval time is abstracted, then after the predicted value of the interval time is calculated, needs to carry out back suction to the predicted value
As changing.For example, the abstract used in previous embodiment is that interval time is reduced 10000 times, then between needing to being calculated
Expand 10000 times every the predicted value of time.
Step 204: the time that described user's the last time is logged in adds the predicted value of the interval time, obtains described
The predicted value of user's login time next time.
For example, being still illustrated taking what is shown in fig. 3 as an example.From the figure 3, it may be seen that the corresponding login prediction model of Fig. 3 is formula (7),
And the user logs on as the 27th login the last time, then y=8.061743 can be calculated in x=27 substitution formula (7).
It is counter to the data being calculated to be abstracted, as expand 10000 times, obtain user the last time logs in and
The predicted value of the interval time logged in next time is 80617.43 seconds, can as predict to obtain user login time next time
After away from the 27th time login time 17 seconds 23 minutes about 22 hours.
Herein, it is only necessary to which the time for logging in the user the 27th time adds this 17 seconds 23 minutes 22 hours, this can be obtained
User logs in next time, the predicted time of as the 28th time login.
It is possible thereby to make, before the predicted time that system can be logged at the user the 28th time arrives, in the system free time
When, it is previously-completed the information load of the user, one avoids network rush hour temporarily to net caused by user information load
Network blocking, promotes the experience of user.
Step 205: before the user next time the predicted value arrival of login time, completing the information to the user
Load.
What needs to be explained here is that the server can set timer in the embodiment of the present application, periodically this is stepped on
Record prediction model is updated.Specifically, the timing when timer arrives, triggers the server Boot Model and updates step,
So that the server obtains the renewable time and plays the temporal information that the user logs in every time in preset time period, when according to the update
Temporal information that the user in preset time period logs in every time is carved according to process described in above-mentioned steps 1031 to 1033, again
Fitting obtains from renewable time, the corresponding login prediction model of the user in preset time period.
In practical applications, server can generally be set to the update cycle of the login prediction model as 30 days.It is taking
It, can be corresponding with the model by updated login prediction model after device completion be engaged in the update step of the login prediction model
Sample data substitutes original model and data, and saves in the database.
When server is again started up prediction steps, server can be automatically according to the updated login prediction model and this
The corresponding sample data of model (as renewable time rise, obtain in preset time period sample data) to the user next time
Login time is predicted.
In the embodiment of the present application, logged in every time in preset time period from current time with user corresponding interval time and
It is sample data that the user logs in the login times belonged in the preset time period every time, is fitted using least square method
Login prediction model of the user arrived in the preset time period.In conjunction with the user, the last time belongs within a preset period of time
Login times in the preset time period, the available user log in and the last interval logged in next time
The predicted value of time.According to the interval time predicted value, the predicted value of available user login time next time, so as to
So that system can be before login time predicted value arrives next time for this, in the system free time in advance to the information of the user
It is loaded, it is of the existing technology to solve the problems, such as.
So that system can effectively add there is no need to temporarily load the information of the user when the user logs in
The access speed of fast user, promotes user experience, and can reduce system pressure.
Corresponding with the present processes embodiment, present invention also provides the embodiments of device and server.
The embodiment of the loading device of the application user information can be using on the server.Installation practice can pass through
Software realization can also be realized by way of hardware or software and hardware combining.Taking software implementation as an example, it anticipates as a logic
Device in justice is to be read computer program instructions corresponding in nonvolatile memory by the processor of equipment where it
Into memory, operation is formed.For hardware view, as shown in figure 4, to be set where the loading device of the application user information
A kind of standby hardware structure diagram, other than processor shown in Fig. 4, memory, network interface and nonvolatile memory,
Equipment in embodiment where device can also include other hardware, such as client generally according to the actual functional capability of the equipment
For end equipment, camera, touch screen, communication component etc. may include, for server, may include and be responsible for processing message
Forwarding chip etc..
It is one embodiment block diagram of the loading device of the application user information, which, which can apply, is taking referring to Fig. 5
It is engaged on device:
The apparatus may include: first acquisition unit 501, predicting unit 502 and loading unit 503.
The first acquisition unit 501, for obtaining historical log information of the user from current time in preset time.
The predicting unit 502, for according to the historical log information, obtaining user login time next time
Predicted value.
The loading unit 503, for completing to the use before the user next time predicted value of login time
The information at family loads.
In the embodiment of the present application, according to historical log information of the user from current time in preset time period, it is somebody's turn to do
The predicted value of user's login time next time, so that system can login time predicted value arrives it next time at this
Before, the information of the user is loaded in advance in the system free time, it is of the existing technology to solve the problems, such as.
So that system can effectively add there is no need to temporarily load the information of the user when the user logs in
The access speed of fast user, promotes user experience, and can reduce system pressure.
Wherein, the first acquisition unit 501 includes: to obtain subelement and the first statistics subelement the time.
Time obtains subelement, for obtain user from current time in preset time period it is the last log in when
Between.
First statistics subelement, for using the user from current time first logging into as in preset time period
Begin, statistics obtains the login times that the last login belongs in the preset time period.
Wherein, the predicting unit 502 includes: to log in prediction subelement.
Subelement is predicted in the login, for belonging to the login in the preset time period according to the last login
Number, using prediction model is logged in, prediction obtains the user and logs in next time to step on described the last time from current time
The predicted value of the interval time of record;
Wherein, the login prediction model is to log in correspond to every time in preset time period from current time with the user
Interval time and the user to log in the login times that belong in the preset time period every time be sample data, utilize minimum
What square law was fitted;It is described that log in corresponding interval time every time be the user logs in every time and log in next time between
Interval time.
Wherein, described device further include: second acquisition unit, computing unit, the second statistic unit and fitting unit.
The second acquisition unit, for obtain that the user logs in preset time period every time from current time when
Between.
The computing unit, is calculated and logs in corresponding every time the time for being logged in every time according to the user
Every the time.
Second statistic unit, for using the user from current time in preset time period first log into as
Starting, statistics obtain the user and log in the login times belonged in the preset time period every time.
The fitting unit, for logging in corresponding interval time every time with the user and the user logs in category every time
It is sample data in the login times in the preset time period, using least square method, fitting obtains the login of the user
Prediction model.
Wherein, described device further include: updating unit, for being periodically updated to the login prediction model.
Wherein, the updating unit includes: timer and update fitting subelement.
Timer updates fitting subelement for periodically triggering;
The update is fitted subelement, and for being risen with renewable time, the user logs in correspondence every time in preset time period
Interval time and the user to log in the login times that belong in the preset time period every time be sample data, utilize minimum
Square law, fitting obtain updated login prediction model.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
The application also provides a kind of server, comprising: processor;For storing the storage of the processor-executable instruction
Device.
Wherein, the processor is configured to: obtain historical log information of the user from current time in preset time;
According to the historical log information, the predicted value of user login time next time is obtained;It is logged in next time in the user
Before the predicted value of time, complete to load the information of the user.
In the embodiment of the present application, logged in every time in preset time period from current time with user corresponding interval time and
It is sample data that the user logs in the login times belonged in the preset time period every time, is fitted using least square method
Login prediction model of the user arrived in the preset time period.In conjunction with the user, the last time belongs within a preset period of time
Login times in the preset time period, the available user log in and the last interval logged in next time
The predicted value of time.According to the interval time predicted value, the predicted value of available user login time next time, so as to
So that system can be before login time predicted value arrives next time for this, in the system free time in advance to the information of the user
It is loaded, it is of the existing technology to solve the problems, such as.
So that system can effectively add there is no need to temporarily load the information of the user when the user logs in
The access speed of fast user, promotes user experience, and can reduce system pressure.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize application scheme.Those of ordinary skill in the art are not paying
Out in the case where creative work, it can understand and implement.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the application
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the application, these modifications, purposes or
Person's adaptive change follows the general principle of the application and including the undocumented common knowledge in the art of the application
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the application are by following
Claim is pointed out.
It should be understood that the application is not limited to the precise structure that has been described above and shown in the drawings, and
And various modifications and changes may be made without departing from the scope thereof.Scope of the present application is only limited by the accompanying claims.