Specific embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following
When description is related to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous
Key element.Embodiment described in following exemplary embodiment does not represent the institute consistent with the application
There is embodiment.Conversely, they are only with described in detail in such as appended claims, the application
The example of the consistent apparatus and method of a little aspects.
It is, only merely for the purpose of description specific embodiment, and to be not intended to be limiting in term used in this application
The application." one kind ", " institute of the singulative used in the application and appended claims
State " and " being somebody's turn to do " be also intended to include most forms, unless context clearly shows that other implications.Should also
Work as understanding, term "and/or" used herein is referred to and associated lists item comprising one or more
Purpose any or all may combination.
It will be appreciated that though may describe various using term first, second, third, etc. in the application
Information, but these information should not necessarily be limited by these terms.These terms only be used for by same type of information that
This is distinguished.For example, in the case of without departing from the application scope, the first information can also be referred to as
Two information, similarly, the second information can also be referred to as the first information.Depending on linguistic context, as in this institute
Use word " if " can be construed to " and ... when " or " when ... when " or " response
In it is determined that ".
Fig. 1 is a kind of schematic flow sheet of the script pre-heating mean shown in the exemplary embodiment of the application one.
Fig. 1 is refer to, the script pre-heating mean can be using in the server, it is also possible to applies at end
In end, following steps are included:
Step 101, in system start-up or model modification, obtains the related history of the local model for preserving
Data, as the corresponding variable class script of the model parameter evidence is entered.
In the present embodiment, it is to solve the problems, such as that script execution for the first time is time-consuming longer, can opens in system
During dynamic or model modification, the historical data is obtained.Such as:After system restarts, can obtain
The historical data of the model correlation for locally preserving, after certain model modification, can obtain being somebody's turn to do for local preservation
The related historical data of model.
In the present embodiment, the model can be understood as application scenarios, and a certain model can be to having one
Individual or multiple variable class scripts.The historical data is that institute is used when variable class script is once performed
Real business datum.Such as:After variable class script is issued, if receiving real business datum
Need to call the variable class script, then system can be after the variable class script be finished, by institute
The historical data that real business datum is stated as variable class script correspondence model is stored.Additionally,
The local historical data for preserving can also be updated according to the situation system that variable class script is performed.
Step 102, according to it is described enter parameter evidence, script preheating is carried out to the variable class script.
Based on abovementioned steps 101, system is entering parameter according to after described in getting, can enter join according to described
Data are preheated to variable class script.Such as:System can start asynchronous thread according to it is described enter parameter
According to preheating to variable class script, and when preheating is finished or reaches default preheating duration, permit
Perhaps business datum is called to variable class script.
By above description as can be seen that the application system can be obtained in system start-up or model modification
The related historical data of the local model for preserving enters parameter evidence as the corresponding variable class script of the model,
Then according to it is described enter parameter according to carrying out script preheating, so as in variable class script by real business
Preheating is completed before data call, is shortened primary execution of variable class script and is taken, called between reduction system
Overtime ratio, lifted Consumer's Experience.
The application is described with reference to specific embodiment realizes process.
Fig. 2 is the schematic flow sheet of another kind of script pre-heating mean shown in the exemplary embodiment of the application one.
Fig. 2 is refer to, the script pre-heating mean can be using in the server, it is also possible to applies at end
In end, following steps are included:
Step 201, in system start-up or model modification, obtains the related history of the local model for preserving
Data, as the corresponding variable class script of the model parameter evidence is entered.
In the present embodiment, the machine after system start-up, after the variable class file translation cached before system
Discernible instruction will be cleared, so after system start-up, consumption when variable class script is performed for the first time
When it is longer, at this point it is possible to the related historical data of the model for obtaining local preservation.Additionally, in model more
When new, such as:During the model of more new and old edition, the corresponding variable class script of model is when performing first time
It is time-consuming also can be longer, at this time it is also possible to the related historical data of the model for obtaining local preservation.
In the present embodiment, the historical data be once performance variable class script when it is used real
Business datum, system can preserve the corresponding relation of variable class script and its used historical data, than
Such as:System can be stored in the corresponding relation of the variable class script and its used historical data firmly
In the nonvolatile memories such as disk.System can also preserve the variable class script institute in units of model
The corresponding relation of category model and its used historical data, such as:System can with preservation model title with
The corresponding relation of historical data, the application is not particularly limited to this.Below keeping model name and going through
It is described as a example by the corresponding relation of history data.
Table 1
Refer to the example of table 1, a kind of model historical data associated therewith of local preservation of the application it is right
The schematic diagram that should be related to.By taking table 1 as an example, the corresponding variable class scripts of model A were once used upon execution
Cross historical data 1, historical data 2 and historical data 3, then system preservation model A and historical data 1,
The corresponding relation of historical data 2 and historical data 3.Specifically, model A can to should have one or
The multiple variable class scripts of person, each variable class script once used one or more historical data,
In practical implementations, system will also maintain related each historical data changes corresponding with model A of model A
The corresponding relation of amount class script, such as:The key assignments for saving historical data or mark change corresponding with model A
The corresponding relation of amount class script.And the corresponding variable class script of Model B once used upon execution history
Data 4, the then corresponding relation of system preservation model B and historical data 4.It should be noted that table 1
It is simply a kind of for result and the pictute of principle, during actual development, it is not necessarily to group
Knit such list item.The application is not particularly limited to this.
In this step, system can obtain the related to the model of local preservation according to model name
Historical data.
Step 202, starts asynchronous thread, according to it is described enter parameter according to entering to travel far and wide to the variable class script
This preheating.
Based on abovementioned steps 201, system is entering parameter according to after described in getting, can start asynchronous thread
According to it is described enter parameter according to carrying out script preheating to the corresponding variable class script of model.In the present embodiment,
Preheated using asynchronous thread, when preheating is not completed, also do not interfered with the normal tune of variable class script
With.
In this step, system can be during variable class script be preheated, by the translated machine of interpreter
The discernible instruction of device is stored in the buffer, such as:Internal memory, so as to the follow-up variable class script for the first time
During execution, translated machine recognizable instruction can be read from caching, save the translation time, be entered
And shorten call it is time-consuming.
Step 203, when preheating is finished or reaches default preheating duration, it is allowed to perform the variable class
Script.
In the present embodiment, system can be after the preheating of variable class script be finished, it is allowed to perform the variable
Class script, such as:System can be set up and be connected after the preheating of variable class script is finished with peripheral system,
And start to receive the business datum for needing performance variable class script that peripheral system sends.
In the present embodiment, system is after the preset duration is reached, it is allowed to performance variable class script.Lift
For example, system can obtain the historical data of model correlation of local preservation to make after restarting
To enter parameter evidence, then according to it is described enter parameter according to carrying out script preheating to variable class script, when reaching institute
When stating preheating duration, start to allow to perform the variable class script.Wherein, the duration of the preheating can be with
It is configured by developer or management personnel, such as:Developer or management personnel can be by institutes
The duration for stating preheating is set to the pre- heat consumption of the most slow variable class script of preheating speed in all variable class scripts
When, so that when the duration of the preheating is reached, all variable class scripts can be preheated and finished.
It can thus be seen that the present embodiment system carries out the pre- of variable class script according to real historical data
Heat, and after the preheating of variable class script is finished, it is allowed to the variable class script is performed, so as to
Before using real business datum first time performance variable class script, the machine of cached variable class script can be known
Other instruction, and then execution of the shortening script when performing first time is time-consuming, that what is called between reduction system is super
When ratio.
Step 204, when business datum is received, main thread performs the affiliated model of the business datum
Variable class script.
Based on abovementioned steps 203, system is being allowed after business datum is called to variable class script, just
Can start to receive real business datum.When business datum is received, main thread is performed and the industry
The corresponding variable class script of the affiliated model of business data.
Whether step 205, after being finished, obtains execution and takes, judge that the execution is time-consuming and be more than
Default threshold value, if so, then execution step 206.
Based on abovementioned steps 204, after variable class script is finished, historical data can be proceeded by
Renewal process.Specifically, in this step, after variable class script is finished, judge to perform
Whether the execution of the variable class script is time-consuming is more than default threshold value.Wherein, the default threshold value can
To be configured according to acceptable execution duration by developer or management personnel, such as:Can be with
The default threshold value is set to into 100ms.Be less than when the execution for performing the variable class script is time-consuming or
When person is equal to the default threshold value, the effect of explanatory variable class script preheating preferably terminates current process.
When the execution of the variable class script is time-consuming is more than the default threshold value, execution step 206.
Step 206, opens asynchronous thread, protects the business datum as the historical data of affiliated model
There is local, related to update affiliated model historical data.
Based on the judged result of abovementioned steps 205, when the execution of the variable class script is taken more than described
During default threshold value, the pre-heat effect of explanatory variable class script is poor, it is understood that there may be the variable class script
The problem that is not preheating to of some branches, so in this step, system makees the business datum
It is the related storage of history data P of the affiliated model of the variable class script local, to update the model phase
The historical data of pass, so, can be preheating to more variable class scripts when next system reboot
Branch.Meanwhile, be to save memory space, can also by preserving in the related historical data of the model when
Between earliest historical data delete.
Optionally, in one example, when new model is issued, due to the corresponding variable class of the model
Script was not called, so locally not yet preserving the related historical data of the model.At this point it is possible to
Preserve the related historical data of the model.Specifically, after the business datum for new model is received,
Main thread performs the corresponding variable class script of the new model, and after being finished, by the business number
According to the storage of history data P as the new model local, go through until local new model for preserving is related
History data reach default quantity, such as:10 etc..
Citing below realizes process come the preservation and renewal for describing foregoing model relevant historical data.
When new model is issued, because system was not carried out the corresponding variable class script of the new model, so
It is local not preserve the related historical data of the new model.In the corresponding variable class script of the new model
After being once finished, the quantity of the historical data of the new model correlation that system validation is locally preserved is
0, so using business datum as historical data when first time can be performed the variable class script by system
It is stored in locally, while preserving the corresponding relation of the historical data and the model name.
It is assumed that default quantity is 10, then it is finished for ten times before the corresponding variable class script of the model
Afterwards, system can all be stored in the business datum for using every time locally.Once perform in the script the tenth
Bi Hou, whether system judges that this is performed time-consuming more than default threshold value, if this performs time-consuming being more than
The threshold value, then use business datum as the new model phase when system once performs the script using the tenth
The storage of history data P of pass deletes the business datum that the local first time for preserving uses local.
It is corresponding with the embodiment of aforementioned script pre-heating mean, present invention also provides script preheating device
Embodiment.
The embodiment of the application script preheating device can be applied on server or terminal.Device is implemented
Example can be realized by software, it is also possible to be realized by way of hardware or software and hardware combining.With software
It is the place by its place server or terminal as the device on a logical meaning as a example by realization
Corresponding computer program instructions in nonvolatile memory are read what operation in internal memory was formed by reason device.
From for hardware view, as shown in figure 3, being the application script preheating device place server or terminal
A kind of hardware structure diagram, except the processor shown in Fig. 3, internal memory, network interface and non-volatile
Property memorizer outside, the server that device is located in embodiment either terminal generally according to the server or
The actual functional capability of terminal, can also include other hardware, and this is repeated no more.
Fig. 4 is a kind of structural representation of the script preheating device shown in the exemplary embodiment of the application one.
Fig. 4 is refer to, the script preheating device 300 can include:Acquiring unit 301, preheating unit
302nd, unit 303, performance element 304, updating block 305 and storage unit 306 are allowed.
Wherein, the acquiring unit 301, in system start-up or model modification, obtains local preservation
The related historical data of model, as the corresponding variable class script of the model parameter evidence is entered;
The preheating unit 302, according to it is described enter parameter evidence, script is carried out to the variable class script pre-
Heat.
Optionally, the acquiring unit 301, with specific reference to model name obtain it is local it is preserving with it is described
The related historical data of model.
Optionally, the preheating unit 302, specifically starts asynchronous thread, and the variable class script is entered
Travel far and wide this preheating.
The permission unit 303, when preheating is finished or reaches default preheating duration, it is allowed to perform
The variable class script;
The performance element 304, when business datum is received, main thread performs the business datum institute
The variable class script of category model;
The updating block 304, after being finished, obtains execution and takes, and judges that described execution takes
Whether it is more than predetermined threshold value, asynchronous thread is if so, then opened, using the business datum as affiliated model
Storage of history data P local, with the related historical data of more new model.
The storage unit 306, for the related historical data of preservation model;
The storage unit 306, specifically when business datum is received, main thread performs the business number
According to the variable class script of affiliated model;After being finished, using the business datum as affiliated model
Storage of history data P local, until the related historical data of the local affiliated model for preserving reaches default
Quantity.
The function of unit and effect realizes that process specifically refers in said method correspondence in said apparatus
Step realizes process, will not be described here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part ginseng
See the part explanation of embodiment of the method.Device embodiment described above is only schematic,
It is wherein described as separating component explanation unit can be or may not be it is physically separate, make
Can be for the part that unit shows or may not be physical location, you can with positioned at a place,
Or can also be distributed on multiple NEs.Can select according to the actual needs part therein or
Person's whole module is realizing the purpose of application scheme.Those of ordinary skill in the art are not paying creativeness
In the case of work, you can to understand and implement.
The preferred embodiment of the application is the foregoing is only, it is all at this not to limit the application
Within the spirit and principle of application, any modification, equivalent substitution and improvements done etc. should be included in
Within the scope of the application protection.