CN106383878B - A kind of generation method and device of page menus cache file - Google Patents

A kind of generation method and device of page menus cache file Download PDF

Info

Publication number
CN106383878B
CN106383878B CN201610819828.9A CN201610819828A CN106383878B CN 106383878 B CN106383878 B CN 106383878B CN 201610819828 A CN201610819828 A CN 201610819828A CN 106383878 B CN106383878 B CN 106383878B
Authority
CN
China
Prior art keywords
cache file
administrator
registration conditions
score value
login
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.)
Active
Application number
CN201610819828.9A
Other languages
Chinese (zh)
Other versions
CN106383878A (en
Inventor
符志清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201610819828.9A priority Critical patent/CN106383878B/en
Publication of CN106383878A publication Critical patent/CN106383878A/en
Application granted granted Critical
Publication of CN106383878B publication Critical patent/CN106383878B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides the generation method and device of a kind of page menus cache file, which comprises obtains the score value of whole registration conditions;The registration conditions include logging in administrator, log in language and logging in purpose system;Calculate the total score of each registration conditions combination;The registration conditions combination is that any one logs in administrator, a login language, a login purpose system;From all total scores being calculated, the maximum registration conditions combination of preset quantity total score is chosen;For selected registration conditions combination producing page menus cache file.Using the embodiment of the present application, the speed for accelerating to generate page menus cache file may be implemented.

Description

A kind of generation method and device of page menus cache file
Technical field
This application involves Internet technical field more particularly to a kind of generation methods and dress of page menus cache file It sets.
Background technique
Page menus is the interface presented after a logging in system by user first.Generally, user can incite somebody to action after first logging into The page menus for needing to present caches, and to log on later after, can reduce directly using the page menus of caching Interface response time.
In general, on same system, due to administrator right, with the presence or absence of virtual management system, to log in language etc. a variety of Factor generally requires to generate a variety of different page menus.
Generally, the manipulable system function of the high administrator of permission is abundanter, correspondingly, the page that page menus has Face is more.For example, the page all in the accessible system of super keepe, corresponding page menus are also most;And day Will administrator can only access the page of system log, and corresponding page menus is just only with respect to the page of log.
In the system for supporting virtual management system, the function that each virtual management system is supported is not exactly the same, Corresponding page menus is not also just identical.The virtual management system is a kind of a pair of of multiple virtualization techniques, specifically one Platform physical equipment invents more logical device, and every logical device can possess independent administrator, hardware resource (such as connects Mouth, CPU, memory use amount etc.) and software resource.Mutually indepedent between Different Logic equipment, each logical device is corresponding System has relatively independent page menus.
When logging in language difference, though the corresponding page it is identical but using text be also it is different, finally lead The page menus of cause is not also identical.
In the prior art, in the case where logging on to specific virtual system using language-specific for cura specialis person, due to The registration conditions being related to include logging in administrator, log in language and logging in the combination of these three registration conditions of purpose system, entirely The page menus generated in system may be very more.Assuming that a certain system has administrator 1024, virtual system (purpose system) There are 6 kinds, logging in language there are 2 kinds, then there will be 12288 kinds after the combination of all registration conditions, that is, described there are 12288 Middle different page menus.When having a variety of page menus, each page menus caching is in advance caching by server File is not too much real.So common practice is all, when user's (client) first logs into, server is according to client The registration conditions combination (may include logging in administrator, logging in language, log in destination address) of offer temporarily delays page menus Cache file is saved as, to be supplied to user.In this way, the cache file can be stored in local by client, for subsequent When logging on, the cache file is directly used, without obtaining page menus from server, substantially increases clothes in this way It is engaged in the device response time.It generates a kind of page menus however, every and requires the consumption regular hour, and page menus content is more The time of consumption is longer.So required time will be longer, generates when the above-mentioned combination first login based on specific registration conditions The cache file of page menus can also take a long time.
Summary of the invention
The generation method and device of a kind of page menus cache file provided by the present application, it is slow to solve existing page menus Deposit slower problem.
According to a kind of generation method of page menus cache file provided by the embodiments of the present application, which comprises
Obtain the score value of whole registration conditions;The registration conditions include logging in administrator, log in language and logging in purpose System;
Calculate the total score of each registration conditions combination;The registration conditions combination is that any one logs in management Member, a login language, a login purpose system;
From all total scores being calculated, the maximum registration conditions combination of preset quantity total score is chosen;
For selected registration conditions combination producing page menus cache file.
Optionally, the score value for obtaining whole registration conditions, specifically includes:
According to the login frequency of administrator each in preset duration, the first score value is obtained;Wherein, the login frequency of the administrator Rate and the first score value are proportional;
The language used according to area is logged in, obtains the second score value;Wherein, second score value for logging in locale language is big In the second score value of other Languages;
According to the login frequency of purpose system each in preset duration, third score value is obtained;Wherein, the purpose system is stepped on It records frequency and third score value is proportional.
Optionally, the type of the administrator includes:
The administrator of administrator and systemic presupposition that user voluntarily creates, and administrator's power that the user voluntarily creates Great administrator's weight in systemic presupposition.
Optionally, the type of the purpose system includes:
Public system and not common system, and the public system weight is greater than not common system weight.
Optionally, the login voice weight, which is greater than, logs in administrator greater than login purpose system.
Optionally, described is selected registration conditions combination producing page menus cache file, is specifically included:
For selected registration conditions combination producing page menus cache file, wherein the page menus does not include navigation Item.
According to a kind of method of calibration of page menus cache file provided by the embodiments of the present application, which comprises
Read 18, end character in cache file to be verified;
Judge 18 characters whether be</xsl:stylesheet>;
It is in 18 characters</xsl:stylesheet>in the case where, determine that the cache file is complete.
Optionally, the method also includes:
In the case where determining the complete situation of the cache file, to one integrity flag of the cache file label.
According to the generating means of page menus cache file provided by the embodiments of the present application, described device includes:
Acquiring unit, for obtaining the score value of whole registration conditions;The registration conditions include logging in administrator, logging in language It makes peace and logs in purpose system;
Computing unit, for calculating the total score of each registration conditions combination;The registration conditions combination is to appoint It anticipates one and logs in administrator, a login language, a login purpose system;
Selection unit, for choosing the maximum login of preset quantity total score from all total scores being calculated Conditional combination;
Cache unit, for for selected registration conditions combination producing page menus cache file.
According to a kind of calibration equipment of page menus cache file provided by the embodiments of the present application, described device includes:
Reading unit, for reading 18 last characters of cache file to be verified;
Judging unit, for judge 18 characters whether be</xsl:stylesheet>;
Determination unit, for being in 18 characters</xsl:stylesheet>in the case where, determine the caching text Part is complete.
In the embodiment of the present application, by the way that score value is arranged to whole registration conditions, and the combination of each registration conditions is calculated Then total score picks out most common a part of registration conditions combination, i.e. the selection maximum login of preset quantity total score Conditional combination is finally the registration conditions combination producing page menus cache file picked out.In this way, due to cache file Including the page menus that most frequentation is asked, so user first logs into and can directly use cache file in most situations, To which server generates cache file without interim.In this way, being greatly lowered the time of server response, user's body is improved It tests.
Detailed description of the invention
Fig. 1 is page menus schematic diagram;
Fig. 2 is the flow chart of the generation method for the page menus cache file that one embodiment of the application provides;
Fig. 3 is the schematic diagram of navigation bar and menu bar in page menus;
Fig. 4 is the flow chart of the method for calibration for the page menus cache file that one embodiment of the application provides;
Fig. 5 is a kind of hardware structure diagram of equipment where the generating means of page menus cache file provided by the present application;
Fig. 6 is the module diagram of the generating means for the page menus cache file that one embodiment of the application provides;
Fig. 7 is a kind of hardware structure diagram of equipment where the calibration equipment of page menus cache file provided by the present application;
Fig. 8 is the module diagram of the calibration equipment for the page menus cache file that one embodiment of the application provides.
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 ".
Referring to one embodiment of the application can be applied in Web system, which may include server and client.
The server is for providing Web service, such as client access server, then server provides its needs Web service.
In general, the client can download from a server a cache file when accessing server for the first time.This is slow Deposit the page menus that accession page is stored in file.Such as one shown in FIG. 1 typical page menus schematic diagram.
As previously described, because administrator right, with the presence or absence of virtual management system, log in many factors such as language, often A variety of different page menus can be combined into.
When having a variety of page menus, server in advance caches each page menus for cache file not too much Reality.So common practice is all, when user's (client) first logs into, login that server is provided according to client Page menus caching is temporarily caching text by conditional combination (may include logging in administrator, logging in language, log in destination address) Part, to be supplied to user.In this way, the cache file can be stored in local by client, when for subsequent logging on, The cache file is directly used, without obtaining page menus from server, when substantially increasing server response in this way Between.It generates a kind of page menus however, every and requires consumption regular hour, and the time of the more consumption of page menus content It is longer.So required time will be longer, generates page menus when the above-mentioned combination first login based on specific registration conditions Cache file can also take a long time.
To solve the above-mentioned problems, Fig. 2 is referred to, for the life for the page menus cache file that one embodiment of the application provides At the flow chart of method, which is described from server side, comprising the following steps:
Step 110: obtaining the score value of whole registration conditions;The registration conditions include log in administrator, log in language and Log in purpose system.
In the present embodiment, since registration conditions include logging in administrator, so point for obtaining whole registration conditions Value, can specifically include: obtain the first score value for all logging in administrator.
Specifically, server obtains the first score value for all logging in administrator, may include:
According to the login frequency of administrator each in preset duration, the first score value is obtained.
The preset duration can be an artificial pre-set empirical value.
The login frequency of each administrator is that operation log in the preset duration (can be the last system of exclusion Operation log since starting) login times obtained are analyzed, further, according to the size of the login frequency to each administrator First score value is set.
For example, in one month (preset duration), for finding 100 login records in operation log, wherein administrator 1 It has logged in 20 times, administrator 2 has logged in 10 times, and administrator 3 has logged in 8 times.So, according to the login frequency of each administrator, if Set corresponding first score value:
Administrator 1, logs in 20 time/month of frequency, and the first score value is 0.2;
Administrator 2, log in 10 time/month of frequency, and the first score value is 0.1;
Administrator 3, log in 8 time/month of frequency, and the first score value is 0.08.
It should be noted that being not logged on the administrator of frequency in preset duration, corresponding first score value can be 0, So for not having logged the first score value of administrator not record.
Certainly, the above-mentioned example for being converted into the first score value according to login frequency is only exemplary, in the specific implementation, clothes Business device can be adjusted flexibly.Generally, the login frequency of the administrator and the first score value are proportional, i.e. login frequency is higher Administrator, the first score value also can be accordingly higher;Conversely, logging in the lower administrator of frequency, the first score value also can be accordingly lower.
It is noted that in practical applications, the type of administrator usually may include:
The administrator of administrator and systemic presupposition that user voluntarily creates.
In the embodiment of the present application, different types of administrator's weight can be identical, is also possible to not identical 's.
In the case of identical for different types of administrator's weight, then, server, which obtains, all logs in the of administrators One score value is only the first score value according to above-mentioned login set of frequency.
For in the different types of different situation of administrator's weight, then, server, which obtains, all logs in administrators The first score value other than according to the first score value of above-mentioned login set of frequency in addition a weight can also be set.At this Apply in embodiment, administrator's weight that user voluntarily creates is greater than administrator's weight of systemic presupposition.For example, user voluntarily creates The administrator's weight built is 2, and administrator's weight of systemic presupposition is 1.
Continue to use in above-mentioned example: the hypothesis of administrator 1 is the administrator of systemic presupposition, and administrator 2 assumes to be that user voluntarily creates The administrator built, and weight ratio is 1:2, then finally obtained first score value are as follows:
Administrator 1,0.2*1=0.2;
Administrator 2,0.1*2=0.2
In this way, being more in line in practical application, user voluntarily creates by the way that different weights are arranged to different administrator's types Administrator it is higher than administrator's weight of systemic presupposition.
In the present embodiment, since registration conditions include logging in language, second score value for obtaining whole registration conditions, It can specifically include: obtaining the second score value for all logging in language.
Specifically, server obtains the second score value for all logging in language, can specifically include:
The language used according to area is logged in, obtains the second score value.
In practical applications, what area server, which is located at, generally just will use local language.For example, in Chinese state It is interior, it generally substantially will use Chinese as login language;And in the U.S., it generally substantially will use English as login language Speech.So second score value for logging in locale language is greater than the second score value of other Languages in the present embodiment.For example, in State can set 2 for the second score value of Chinese, and the second score value of other Languages is set as 1.For another example can be to other languages Second score value of speech refines again, such as English is used as International Language, compared to other language (Japanese, Korean, Latin language etc.) Second score value is high.Similar, this second score value can be server and have more actual conditions flexible setting.Generally, described to step on The second score value for recording locale language is greater than the second score value of other Languages.
In the present embodiment, since registration conditions include login purpose system, so the whole registration conditions of the acquisition Third score value, can specifically include: obtain the third score value for all logging in purpose system.
Specifically, server obtains the third score value for all logging in purpose system, may include:
According to the login frequency for respectively logging in purpose system in preset duration, third score value is obtained;
The preset duration is identical as aforementioned preset duration, and details are not described herein again.
The login frequency of each purpose system is that operation log in the preset duration (can be the last system of exclusion Operation log since system starting) login times obtained are analyzed, further, according to the size of the login frequency to each purpose Third score value is arranged in system.
For example, in one month (preset duration), for finding 100 login records in operation log, wherein purpose system A has been logged in 20 times, and purpose system B has been logged in 10 times, and purpose system C has been logged in 8 times.So, according to the login of each purpose system Corresponding third score value is arranged in frequency:
Purpose system A, logs in 20 time/month of frequency, and third score value is 0.2;
Purpose system B, logs in 10 time/month of frequency, and third score value is 0.1;
Purpose system C, logs in 8 time/month of frequency, and third score value is 0.08.
It should be noted that being not logged on the purpose system of frequency in preset duration, corresponding third score value can be 0, so for not having logged purpose system third score value not record.
Certainly, the above-mentioned example for being converted into third score value according to login frequency is only exemplary, in the specific implementation, clothes Business device can be adjusted flexibly.Generally, the login frequency of the purpose system and third score value are proportional, i.e. login frequency is higher Purpose system, third score value also can be accordingly higher;Conversely, logging in the lower purpose system of frequency, third score value also can be corresponding It is lower.
It is noted that in practical applications, the type of purpose system usually may include:
Public system and not common system.
In the present embodiment, the not common system, that is, not common management system, the different moneys distributed when according to virtualization Source Type is also different;Such as be divided into interface management system, IP management system, VRF management system, vlan management system etc..Each Not common system can only be managed based on owned resource, such as interface management system can only be checked and be configured and be distributed To its interface, and it cannot check and configure the interface for belonging to public system or other not common systems.
The public system, that is, public administration system comprising all functional modules, all hardware on whole logistics equipment Resource and software resource.That is, public system includes all resources and function of all not common systems.
Generally, due to which the addressable page of public system, not common system is different surely accesses;Rather than public system energy The page of access, public system one surely access.So the page menus cache file of public system can be than not common system Cache file is big, and it is also longer to generate cache file time-consuming.
In the embodiment of the present application, different types of purpose system weight can be identical, is also possible to not phase With.
In the case of identical for different types of purpose system weight, then, server, which obtains, all logs in purpose system Third score value, be only the third score value according to above-mentioned login set of frequency.
For in the different types of different situation of purpose system weight, then, server, which obtains, all logs in purposes In addition a weight can also be arranged other than according to the third score value of above-mentioned login set of frequency in the third score value of system. In the embodiment of the present application, the public system weight is greater than not common system weight.For example, public system weight is 2, non-public affairs System weight is 1 altogether.
It continues to use in above-mentioned example, purpose system A hypothesis is non-public system, and purpose system B hypothesis is public system, and Weight ratio is 1:2, then finally obtained third score value are as follows:
Purpose system A, 0.2*1=0.2;
Purpose system B, 0.1*2=0.2
In this way, being more in line in practical application, public system ratio by the way that different weights are arranged to different purpose system types Not common system weight is high.
Step 120: calculating the total score of each registration conditions combination;The registration conditions combination is any one Log in administrator, a login language, a login purpose system.
As previously described, because registration conditions are related to logging in administrator, log in language, log in purpose system, so logging in It can be there are many kinds of result after conditional combination.
This step is exactly the total score for calculating the combination of each registration conditions.
Specifically, shown in the following formula 1 of calculation formula:
Total score=<log in the second score value>+<the first score value of administrator>+<the third score value of purpose system>of language Formula 1
It in practical applications, above-mentioned three kinds of registration conditions status and aniso- can if being only the calculating as formula 1 Deviation can be generated to final result.
Since in these three registration conditions, logging in language is to play decisive role, and different language will lead to entire page The text importing of face menu is different.It logs in administrator to take second place, different administrators are corresponding, and the page could there may be overlappings.It logs in Purpose systemic effect is minimum, and virtual associated system function is in contrast less common.
So the login voice weight, which is greater than, logs in administrator greater than login in another embodiment of the application Purpose system.
For example, adding 1000000 weight on the basis of logging in the second score value of voice;Logging in the first of administrator 100 weight is added on the basis of score value;Not additional weight on the basis of logging in the third score value of purpose system, then calculate public affairs Shown in the following formula 2 of formula:
Total score=<log in the first score value>* 100+<login system of the second score value>* 1000000+<administrator of language Third score value > formula 2
In the present embodiment, it is assumed that there are log in administrator 6, log in 2 kinds of language, log in purpose system 3, then log in item Part combination there is 6*2*3=36 kind, then 36 total scores can be calculated by step 120.
Step 130: from all total scores being calculated, choosing the maximum registration conditions group of preset quantity total score It closes.
In the present embodiment, since the bigger registration conditions combination explanation of total score is more common, the embodiment of the present application is exactly to select Take out the most common registration conditions combination of certain amount.
Specifically, from the above-mentioned total score being calculated, the maximum registration conditions group of preset quantity total score is chosen It closes.
The preset quantity can be an artificial pre-set empirical value.
For example, certain total score being calculated is as follows:
Registration conditions combination 1, total score 100;
Registration conditions combination 2, total score 30;
Registration conditions combination 3, total score 82;
Registration conditions combination 4, total score 54;
Registration conditions combination 5, total score 66;
Registration conditions combination 6, total score 69;
Registration conditions combination 7, total score 80;
Registration conditions combination 8, total score 79;
Registration conditions combination 9, total score 99;
Registration conditions combination 10, total score 45;
Assuming that preset quantity is 3, then server needs select that 3 total scores are maximum to be stepped on from above-mentioned 10 total scores Record conditional combination.It is 100,99,82 since total score is maximum, so the registration conditions group selected is combined into 1,9,3.
Step 140: for selected registration conditions combination producing page menus cache file.
In the present embodiment, server can be selected registration conditions combination producing page menus cache file.
In page menus as shown in Figure 3 in the schematic diagram of navigation bar and menu bar, usual page menus can be divided into two A part: the menu bar 41 in left side and the navigation bar 42 on right side.
In the present embodiment, the generation page menus cache file be can be, while by the menu bar in the left side and the right side The navigation bar of side is cached as page menus.
In the present embodiment, server can be selected registration conditions combination producing page menus cache file.
Through this embodiment, by the way that score value is arranged to whole registration conditions, and the total of each registration conditions combination is calculated Then score value picks out most common a part of registration conditions combination, i.e. the selection maximum login item of preset quantity total score Part combination, is finally the registration conditions combination producing page menus cache file picked out.In this way, due to cache file packet The page menus that most frequentation is asked is included, so user first logs into and can directly use cache file in most situation, from And server generates cache file without interim.In this way, being greatly lowered the time of server response, user's body is improved It tests.
Generally, when user logs in, the navigation bar on the right side can't be shown immediately, so server can be with It is not necessarily navigation bar and generates caching.Therefore, in some other embodiment, the page menus can only include menu bar, and It does not include navigation bar.It is clicked in the menu bar after some option receiving user, server just goes to obtain corresponding navigation Item.
Limited generally, due to interface shape, the page quantity in navigation bar all will not be excessive in fact, such as usually 1-6 A, so server temporarily obtains the time consumed by navigation bar substantially in Millisecond, user will not experience the time substantially On consumption, user experience would not also be had an impact.
Through this embodiment, since in entire cache file, the page quantity of navigation bar may occupy all page quantities 50% or so of (page of the page, menu bar including navigation bar), so if generating the page if navigation bar not being cached The time of the cache file of menu can reduce very much.
The reduced time is measured with time complexity below.The time complexity can be used for measuring an algorithm The superiority and inferiority of time efficiency and space efficiency.In computer science, Riming time of algorithm can be calculated according to the quantity of input value The order of magnitude.In the present embodiment, the time complexity in script cache file generating algorithm is O (n2), due to not needing to cache Navigation bar (for accounting for 50%), so original 1/4 will be shortened to by averagely generating the time of cache file.
In practical applications, server may be due to unexpected (such as process be killed) when generating page menus cache file Cause cache file generated imperfect.Therefore, after client has downloaded the cache file when first logging into, need using The cache file, it is also necessary to which cache file is verified.In general, the verification is verified to entire cache file , it checks whether complete.However, this verification mode, often as cache file is bigger, verification is time-consuming also more.
In order to solve the problems, such as that cache file verification is time-consuming more, Fig. 4 is referred to, the page provided for one embodiment of the application The flow chart of the method for calibration of face menu cache file, the method are described with client-side, comprising the following steps:
Step 210: reading last 18 characters in cache file to be verified.
Step 220: judge 18 characters whether be</xsl:stylesheet>.
Step 230: being in 18 characters</xsl:stylesheet>in the case where, determine that the cache file is complete It is whole.
In the present embodiment, since a complete cache file must be finally a tail tag label, and tail tag label must be "</xsl:stylesheet>", the tail tag label be with beginning label "<xsl:stylesheet>" corresponding, and tail tag label "</xsl:stylesheet>" only occur once in entire cache file, it is impossible to repeat.So to cache file school When testing, can be optimized for directly reading last 18 characters (newline containing end) will not go out if cache file is imperfect Existing tail tag label, thus read 18 characters must not for "</xsl:stylesheet>", it can determine that cache file is endless It is whole;If cache file is complete, there must be tail tag label, so read 18 characters must be
"</xsl:stylesheet>", it can determine that cache file is complete.
In another embodiment of the application, after step 230, the method also includes:
In the case where determining the complete situation of the cache file, to one integrity flag of the cache file label.
In practical applications, since cache file is once generating and would not change, there is no need to log in all to carry out school every time It tests.So the present embodiment, by the cache file passed through to verification, to one integrity flag of the cache file label.? When user logs in, the integrity flag that its registration conditions combines corresponding cache file is first detected, if integrity flag's table Show completely, then directly can improve user experience without carrying out duplication check using the cache file.
Corresponding with the method for calibration embodiment of aforementioned page menus cache file, present invention also provides a kind of page dishes The embodiment of the generating means of single cache file.
The generating means embodiment of the application page menus cache file can also pass through hardware by software realization Or the mode of software and hardware combining is realized.It taking software implementation as an example, is by where it as the device on a logical meaning Computer program instructions corresponding in nonvolatile memory are read into memory what operation was formed by the processor of equipment.From hard For part level, as shown in figure 5, for a kind of hardware configuration of equipment where the generating means of the application page menus cache file Figure, other than processor shown in fig. 5, network interface, memory and nonvolatile memory, in embodiment where device Equipment can also include other hardware generally according to the actual functional capability of the generation of the page menus cache file, no longer superfluous to this It states.
It is the module map of the generating means for the page menus cache file that one embodiment of the application provides referring to Fig. 6, it is described Device includes: acquiring unit 310, computing unit 320, selection unit 330 and cache unit 340.
Wherein, acquiring unit 310, for obtaining the score value of whole registration conditions;The registration conditions include logging in management Member logs in language and logs in purpose system;
Computing unit 320, for calculating the total score of each registration conditions combination;The registration conditions combination is Any one logs in administrator, a login language, a login purpose system;
Selection unit 330, for choosing from all total scores being calculated, preset quantity total score is maximum to be stepped on Record conditional combination;
Cache unit 340, for for selected registration conditions combination producing page menus cache file.
In an optional implementation:
The acquiring unit 310, can specifically include:
First acquisition subelement obtains the first score value for the login frequency according to administrator each in preset duration;Its In, the login frequency of the administrator and the first score value are proportional;
Second obtains subelement, and the language for using according to area is logged in obtains the second score value;Wherein, the login Second score value of locale language is greater than the second score value of other Languages;
Third obtains subelement and obtains third score value for the login frequency according to purpose system each in preset duration;Its In, the login frequency and third score value of the purpose system are proportional.
In an optional implementation:
The type of the administrator includes:
The administrator of administrator and systemic presupposition that user voluntarily creates, and administrator's power that the user voluntarily creates Great administrator's weight in systemic presupposition.
In an optional implementation:
The type of the purpose system includes:
Public system and not common system, and the public system weight is greater than not common system weight.
In an optional implementation:
The login voice weight, which is greater than, logs in administrator greater than login purpose system.
In an optional implementation:
For selected registration conditions combination producing page menus cache file, wherein the page menus does not include navigation Item.
Corresponding with the method for calibration embodiment of aforementioned page menus cache file, present invention also provides a kind of page dishes The embodiment of the calibration equipment of single cache file.
The calibration equipment embodiment of the application page menus cache file can also pass through hardware by software realization Or the mode of software and hardware combining is realized.It taking software implementation as an example, is by where it as the device on a logical meaning Computer program instructions corresponding in nonvolatile memory are read into memory what operation was formed by the processor of equipment.From hard For part level, as shown in fig. 7, for a kind of hardware configuration of equipment where the calibration equipment of the application page menus cache file Figure, other than processor shown in Fig. 7, network interface, memory and nonvolatile memory, in embodiment where device Equipment can also include other hardware generally according to the actual functional capability of the verification of the page menus cache file, no longer superfluous to this It states.
It is the module map of the calibration equipment for the page menus cache file that one embodiment of the application provides referring to Fig. 8, it is described Device includes: reading unit 410, judging unit 420 and determination unit 430.
Wherein, reading unit 410, for reading 18 last characters of cache file to be verified;
Judging unit 420, for judge 18 characters whether be</xsl:stylesheet>;
Determination unit 430, for being in 18 characters</xsl:stylesheet>in the case where, it determines described slow It is complete to deposit file.
In an optional implementation:
Described device further include:
Marking unit, it is complete to the cache file label one in the case where determining the complete situation of the cache file Whole property mark.
In conclusion by the way that score value is arranged to whole registration conditions, and calculating each login by application the present embodiment Then the total score of conditional combination picks out most common a part of registration conditions combination, i.e. selection preset quantity total score Maximum registration conditions combination, is finally the registration conditions combination producing page menus cache file picked out.In this way, by In cache file include the page menus that most frequentation is asked, so user first logs into and can directly use in most situation Cache file, so that server generates cache file without interim.In this way, being greatly lowered the time of server response, mention High user experience.
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.
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.

Claims (10)

1. a kind of generation method of page menus cache file, which is characterized in that the described method includes:
Obtain the score value of whole registration conditions;The registration conditions include logging in administrator, log in language and logging in purpose system;
Calculate the total score of each registration conditions combination;The registration conditions combination be any one log in administrator, One login language, a login purpose system;
From all total scores being calculated, the maximum registration conditions combination of preset quantity total score is chosen;
For selected registration conditions combination producing page menus cache file.
2. the method according to claim 1, wherein the score value for obtaining whole registration conditions, specifically includes:
According to the login frequency of administrator each in preset duration, the first score value is obtained;Wherein, the login frequency of the administrator with First score value is proportional;
The language used according to area is logged in, obtains the second score value;Wherein, second score value for logging in locale language is greater than it Second score value of its language;
According to the login frequency of purpose system each in preset duration, third score value is obtained;Wherein, the login frequency of the purpose system Rate and third score value are proportional.
3. according to the method described in claim 2, it is characterized in that, the type of the administrator includes:
The administrator of administrator and systemic presupposition that user voluntarily creates, and administrator's weight that the user voluntarily creates is big In administrator's weight of systemic presupposition.
4. according to the method described in claim 2, it is characterized in that, the type of the purpose system includes:
Public system and not common system, and the public system weight is greater than not common system weight.
5. being stepped on the method according to claim 1, wherein the login language weight is greater than greater than login administrator Record purpose system.
6. the method according to claim 1, wherein described is selected registration conditions combination producing page dish Single cache file, specifically includes:
For selected registration conditions combination producing page menus cache file, wherein the page menus does not include navigation bar.
7. a kind of method of calibration of page menus cache file, which is characterized in that the described method includes:
Read 18, end character in cache file to be verified;Wherein, the cache file is any one of claim 1-6 The page menus cache file of generation;
Judge 18 characters whether be</xsl:stylesheet>;
It is in 18 characters</xsl:stylesheet>in the case where, determine that the cache file is complete.
8. the method according to the description of claim 7 is characterized in that the method also includes:
In the case where determining the complete situation of the cache file, to one integrity flag of the cache file label.
9. a kind of generating means of page menus cache file, which is characterized in that described device includes:
Acquiring unit, for obtaining the score value of whole registration conditions;The registration conditions include log in administrator, log in language and Log in purpose system;
Computing unit, for calculating the total score of each registration conditions combination;The registration conditions combination is any one A login administrator, a login language, a login purpose system;
Selection unit, for choosing the maximum registration conditions of preset quantity total score from all total scores being calculated Combination;
Cache unit, for for selected registration conditions combination producing page menus cache file.
10. a kind of calibration equipment of page menus cache file, which is characterized in that described device includes:
Reading unit, for reading 18 last characters of cache file to be verified;Wherein, the cache file is wanted for right The page menus cache file for asking any one of 1-6 to generate;
Judging unit, for judge 18 characters whether be</xsl:stylesheet>;
Determination unit, for being in 18 characters</xsl:stylesheet>in the case where, determine that the cache file is complete It is whole.
CN201610819828.9A 2016-09-12 2016-09-12 A kind of generation method and device of page menus cache file Active CN106383878B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610819828.9A CN106383878B (en) 2016-09-12 2016-09-12 A kind of generation method and device of page menus cache file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610819828.9A CN106383878B (en) 2016-09-12 2016-09-12 A kind of generation method and device of page menus cache file

Publications (2)

Publication Number Publication Date
CN106383878A CN106383878A (en) 2017-02-08
CN106383878B true CN106383878B (en) 2019-05-07

Family

ID=57936498

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610819828.9A Active CN106383878B (en) 2016-09-12 2016-09-12 A kind of generation method and device of page menus cache file

Country Status (1)

Country Link
CN (1) CN106383878B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479249A (en) * 2010-11-26 2012-05-30 中国科学院声学研究所 Method for eliminating cache data of memory of embedded browser
KR20120131464A (en) * 2011-05-25 2012-12-05 (주)넷트루컨설팅그룹 Multi web service apparatus and method therefor
CN104581344A (en) * 2014-12-29 2015-04-29 深圳创维数字技术有限公司 Menu interface display method and digital TV receiving terminal
CN105512251A (en) * 2015-12-01 2016-04-20 北京百度网讯科技有限公司 Page cache method and device
CN105930537A (en) * 2016-06-23 2016-09-07 乐视控股(北京)有限公司 Page storing method and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090172567A1 (en) * 2007-12-31 2009-07-02 International Business Machines Corporation Dynamically added navigation widget for loose integration of web pages across different web applications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479249A (en) * 2010-11-26 2012-05-30 中国科学院声学研究所 Method for eliminating cache data of memory of embedded browser
KR20120131464A (en) * 2011-05-25 2012-12-05 (주)넷트루컨설팅그룹 Multi web service apparatus and method therefor
CN104581344A (en) * 2014-12-29 2015-04-29 深圳创维数字技术有限公司 Menu interface display method and digital TV receiving terminal
CN105512251A (en) * 2015-12-01 2016-04-20 北京百度网讯科技有限公司 Page cache method and device
CN105930537A (en) * 2016-06-23 2016-09-07 乐视控股(北京)有限公司 Page storing method and electronic equipment

Also Published As

Publication number Publication date
CN106383878A (en) 2017-02-08

Similar Documents

Publication Publication Date Title
US10594729B2 (en) Dynamically configuring a honeypot
CN107948314B (en) Business processing method and device based on rule file and server
US9971767B1 (en) Context-aware translation memory to facilitate more accurate translation
CN106991112B (en) Information query method and device
US10706032B2 (en) Unsolicited bulk email detection using URL tree hashes
US20160261530A1 (en) Moderating online discussion using graphical text analysis
EP3058481B1 (en) Acceleration based on cached flows
CA2861617A1 (en) Method and system to provide video-based search results
US10325091B2 (en) Generation of secure passwords in real-time using personal data
US10650272B2 (en) On demand testing as a service for base text direction verification testing
AU2017265064B2 (en) Access to data on a remote device
US11360973B2 (en) Generating multilingual queries
CN109582844A (en) A kind of method, apparatus and system identifying crawler
US11093292B2 (en) Identifying recurring actions in a hybrid integration platform to control resource usage
CN107291486A (en) The installation method and device of a kind of operating system
US10810105B2 (en) Logging stored information for identifying a fix for and/or a cause of an error condition
CN110909290A (en) Method and system for combining multiple systems into large single-page application
US20210255888A1 (en) Executing commands in a virtual environment
CN110574033B (en) Remote procedure call to reduce multimedia content delivery
US9398041B2 (en) Identifying stored vulnerabilities in a web service
CN106383878B (en) A kind of generation method and device of page menus cache file
US20210034754A1 (en) Security testing based on user request
JP2023067815A (en) Method, system and computer program product for detecting changes of external content referenced by external links (content management system)
US20230090713A1 (en) Automated digital text optimization and modification
CN106790521A (en) The system and method for distributed networking is carried out using the node device based on FTP

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building

Applicant after: Hangzhou Dipu Polytron Technologies Inc

Address before: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building

Applicant before: Hangzhou Dipu Technology Co., Ltd.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant