Specific embodiment
Clear, complete description is carried out to technical solution of the present invention below with reference to attached drawing, it is clear that described implementation
Example is only a part of the embodiments of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, this field is general
Logical technical staff obtained all other embodiment without making creative work belongs to the present invention and is protected
The range of shield.
The terms such as " module " that the present invention uses, " device " be intended to include with computer-related entity, such as it is but unlimited
In hardware, firmware, combination thereof, software or software in execution.For example, module can be, and it is not limited to: processing
Process, processor, object, executable program, the thread of execution, program and/or the computer run on device.For example, it counts
Calculating the application program run in equipment and this calculating equipment can be module.One or more modules can be located in execution
In one process and/or thread, a module can also be located on a computer and/or be distributed in two or more calculating
Between machine.
The technical solution that the invention will now be described in detail with reference to the accompanying drawings.
With reference to Fig. 1, it illustrates the exemplary process diagrams of page display method according to an embodiment of the invention.
As shown in Figure 1, page display method provided in an embodiment of the present invention, may include steps of:
S110: page properties are extracted from the page to be shown.
Page display method provided in an embodiment of the present invention is suitable for user and sends web-page requests, browser by browser
Receive the scene shown after the page to be shown of destination service system return to the page to be shown.
The executing subject of page display method provided in an embodiment of the present invention can be specially with kernel adaption function
Browser;Alternatively, the device being connect with browser.
In practical application, the web-page requests that browser is sent can be specially http (hyper text transfer
Protocol, hypertext transfer protocol) message request;Correspondingly, the page to be shown that destination service system returns can be specific
For the http page.Wherein, destination service system refers to the service system that user accesses in advance;User can directly access target service
System, or destination service system is jumped to by the service system of current accessed.
In the embodiment of the present invention, the page properties extracted from the page to be shown may include following at least one: js
(javascript, Java script), css (cascading style sheet, cascading style sheets) and meta (member) attribute.
In the embodiment of the present invention, about the extraction of js, the extraction of css and the extraction of meta attribute, ability can be used
The common technological means of field technique personnel, and will not be described here in detail.
S120: it according to the page properties of extraction and preset Core Choice model, finds out between the page to be shown
The highest browser kernel of matching degree, and kernel is rendered as the corresponding target of the page to be shown.
Specifically, keywording can be carried out to the page properties of extraction, according to the keyword generation extracted and institute
State the corresponding set of keywords of the page to be shown.
Then, clear with this according to preset bayesian algorithm in the Core Choice model for each browser kernel
The corresponding Core Choice model parameter of device kernel of looking at calculates when the set of keywords occurs using the browser kernel as target wash with watercolours
The probability of kernel is contaminated, and as the matching degree between the browser kernel and the page to be shown.Wherein, browser kernel pair
The probability of occurrence of the Core Choice model parameter answered each keyword when being specially using browser kernel as target rendering kernel.
Consider the probability for rendering kernel when the corresponding set of keywords of the page to be shown occurs using browser kernel as target
It is bigger, indicate that the browser kernel is best to the rendering display effect of the page to be shown.
Therefore, can according to the matching degree between each browser kernel and the page to be shown, find out with it is described to
Show the highest browser kernel of matching degree between the page, and corresponding using the browser kernel found out as the page to be shown
Target render kernel.
In the embodiment of the present invention, the page of the webpage of different service systems can be collected in advance;It is all for collecting
The page carries out page properties extraction, carries out participle and keyword recognition to all js, css and meta attributes of extraction, extracts
All keywords, and it is directed to each keyword, corresponding critical field is set.
In this way, after the page properties for extracting the page to be shown by step S110, it can be for preset each
The page properties of extraction are carried out the extraction of the corresponding keyword of the critical field by critical field, if being drawn into the critical field
Corresponding keyword, then value of the page to be shown in the critical field is the corresponding keyword of the critical field;If not taking out
The corresponding keyword of the critical field is got, then value of the page to be shown in the critical field is indicated with designated identification, example
Such as " 0 ", "None" etc..
Value based on the page to be shown in each critical field constitutes set of keywords corresponding with the page to be shown.
May include in the embodiment of the present invention, in Core Choice model preset bayesian algorithm and in advance training it is each clear
The corresponding Core Choice model parameter of device kernel of looking at.
After generating set of keywords corresponding with the page to be shown, it can be directed to each browser kernel, according to shellfish
This algorithm of leaf Core Choice model parameter corresponding with the browser kernel calculates when set of keywords occurs in the browser
Core is the probability that target renders kernel, and as the matching degree between the browser kernel and the page to be shown.
In practical application, the corresponding Core Choice model parameter of browser kernel is referred to using browser kernel as target wash with watercolours
The probability of occurrence of the corresponding keyword of each critical field when contaminating kernel.P (w can be passed throughi|Kj) indicate with j-th of browser kernel
KjThe corresponding keyword w of i-th of critical field in set of keywords when rendering kernel for targetiProbability of occurrence.
Wherein, i is the integer that value 1 arrives n, and j is the integer that value 1 arrives m, and m is the sum of browser kernel, and n is default
Critical field sum.
Bayesian algorithm specifically includes following formula (1), (2) and (3).
Wherein, P (Kj|Wn) indicate set of keywords WnBrowser kernel K when appearancejThe probability of kernel is rendered for target;P
(Kj) indicate j-th of browser kernel KjProbability of occurrence, value 1/m.
According to formula (1), formula (2), formula (3) and browser kernel KjCorresponding Core Choice model parameter P (wi|
Kj), set of keywords W can be calculatednBrowser kernel K when appearancejProbability P (the K of kernel is rendered for targetj/Wn)。
In the embodiment of the present invention, based in advance training the corresponding Core Choice model parameter of each browser kernel,
The probability of occurrence of each keyword, can calculate separately out according to formula (3) when i.e. using each browser kernel as target rendering kernel
The probability of occurrence of one set of keywords when rendering kernel as target using different browser kernels.And according to formula (2) and respectively
The probability of occurrence of browser kernel calculates the probability of occurrence of a set of keywords.
Then, kernel is rendered according to formula (1), the probability of occurrence of each browser kernel, by target of each browser kernel
When the probability of occurrence of the set of keywords and probability of occurrence of set of keywords, calculate separately out when set of keywords occurs with difference
Browser kernel be target render kernel probability.
In this way, each browser kernel is directed to, using the browser kernel as target wash with watercolours when set of keywords can be occurred
The probability of kernel is contaminated as the matching degree between the browser kernel and the page to be shown.It is highest clear finally to select matching degree
Device kernel is look at as the corresponding target rendering kernel of the page to be shown.
S130: rendering is carried out to the page to be shown by target rendering kernel and is shown.
In the embodiment of the present invention, after finding out the corresponding target rendering kernel of the page to be shown by step S120,
The mark of available target rendering kernel, is searched from the kernel pond in local or cloud according to the mark that target renders kernel and
The corresponding browser kernel of the mark, and load, rendering is carried out to the page to be shown by the browser kernel of load and is shown.
In the embodiment of the present invention, the kernel pond in cloud is synchronous with local kernel pond holding.For example, working as the kernel pond in cloud
It is middle when changing, it, will be newly-increased clear in the kernel pond in cloud for example, newly-increased browser kernel or browser kernel update
It lookes at device kernel and/or updated browser is synchronized in local kernel pond.
In the embodiment of the present invention, if finding browser kernel corresponding with the mark from local kernel Chi Zhongwei,
Browser kernel in the kernel pond in cloud can be synchronized in local kernel pond, be allowed to from local kernel pond
It is loaded into target rendering kernel.
Page display method provided in an embodiment of the present invention, by extracting page properties from the page to be shown;According to mentioning
The page properties taken and preset Core Choice model are found out in the highest browser of matching degree between the page to be shown
Core, and kernel is rendered as the corresponding target of the page to be shown;It is aobvious that rendering is carried out to the page to be shown by target rendering kernel
Show.In this way, can find corresponding target rendering kernel for the page to be shown from different service systems, solve use
Family accesses existing compatibility issue when different service systems, improves user experience, and development cost is small.
On the basis of the above embodiments, in the page display method that further embodiment of this invention provides, the method is also
It include: according to the corresponding Core Choice model parameter P (w of browser kernel as described under type training in advancei|Kj):
From browser kernel KjAt least one page properties are extracted in corresponding sample page, as browser kernel KjIt is right
The sample page property set answered;Wherein, the sample page is with the browser kernel KjKernel is rendered for target.
For preset each critical field, the corresponding keyword of the critical field is carried out to the sample page property set
Extraction;If being drawn into, value of the sample page in the critical field is the corresponding keyword of the critical field;If
It is not drawn into, then value of the sample page in the critical field is indicated with designated identification.
For i-th of critical field, if value of the sample page in i-th of critical field is the specified mark
Know, then Core Choice model parameter P (wi|Kj) it is 0.
If value of the sample page in i-th of critical field is the corresponding keyword w of i-th of critical fieldi, then
Core Choice model parameter P (wi|Kj) are as follows: the corresponding keyword w of i-th of critical field in the sample page property setiGo out
The ratio of the frequency of occurrence summation of occurrence number keyword corresponding with critical field each in the sample page property set.
Other steps of the embodiment of the present invention are similar to previous embodiment step, and the embodiment of the present invention repeats no more.
Page display method provided in an embodiment of the present invention, based on the sample page for rendering kernel using browser kernel as target
Face calculates the corresponding Core Choice model parameter of browser kernel, and the accuracy for the browser kernel being adapted to out can be improved, mention
High user experience.
On the basis of the above embodiments, in the page display method that further embodiment of this invention provides, the method is also
If including: that the browser kernel updates, according to the sample for rendering kernel using updated browser kernel as target
The page carries out re -training to the corresponding Core Choice model parameter of the browser kernel.
Consider when browser kernel updates, when updated browser kernel is to training Core Choice model parameter
The rendering display effect of selected sample page can may also change.
Therefore, it in order to improve the accuracy of Core Choice model, in the embodiment of the present invention, can select again to update
Browser kernel afterwards is the sample page that target renders kernel.Then, according to using updated browser kernel as target wash with watercolours
The sample page for contaminating kernel carries out re -training to the corresponding Core Choice model parameter of the browser kernel.
It is corresponding to the browser kernel according to the sample page for rendering kernel using updated browser kernel as target
The implementation method that Core Choice model parameter carries out re -training can be using Core Choice model parameter in above-described embodiment
Training method.
Other steps of the embodiment of the present invention are similar to previous embodiment step, and the embodiment of the present invention repeats no more.
Page display method provided in an embodiment of the present invention can be ensured by timely updating for Core Choice model parameter
The validity of Core Choice model improves the accuracy of the target rendering kernel of final choice.
On the basis of the various embodiments described above, further embodiment of this invention provides a kind of page display device.
With reference to Fig. 2, it illustrates the structural schematic diagrams of page display device according to an embodiment of the invention.
As shown in Fig. 2, page display device 200 provided in an embodiment of the present invention may include: attributes extraction unit 201,
Kernel adaptation unit 202 and page display unit 203.
Wherein, attributes extraction unit 201 is for extracting page properties from the page to be shown.
Kernel adaptation unit 202 for according to extraction page properties and preset Core Choice model, find out and institute
State the highest browser kernel of matching degree between the page to be shown, and as in the corresponding target rendering of the page to be shown
Core.
Page display unit 203 is used to carry out rendering by the verification page to be shown in target rendering to show.
In practical application, page display device 200 provided in an embodiment of the present invention be may be disposed in browser;Or the page
Display device 200 is independently arranged with browser, realized jointly by the interaction between page display device 200 and browser to
Show the display of the page.Alternatively, each unit in page display device 200 may be disposed in different equipment, by different
The display of the page to be shown is realized in interaction between equipment and browser jointly.
Optionally, the page properties include following at least one: Java script js, cascading style sheets css and member meta
Attribute.
Optionally, kernel adaptation unit 202 is specifically used for carrying out keywording to the page properties of extraction, according to extraction
Keyword out generates set of keywords corresponding with the page to be shown;For each browser kernel, according to described interior
Preset bayesian algorithm Core Choice model parameter corresponding with the browser kernel, calculates the key in core preference pattern
When word set occurs using the browser kernel as target render kernel probability, and as the browser kernel with it is described to be shown
Matching degree between the page;Wherein, the corresponding Core Choice model parameter of browser kernel is specially using browser kernel as mesh
The probability of occurrence of each keyword when mark rendering kernel;According to the matching degree between each browser kernel and the page to be shown,
Find out the highest browser kernel of matching degree between the page to be shown.
Optionally, kernel adaptation unit 202 can be directed to preset each critical field, carry out to the page properties of extraction
The extraction of the corresponding keyword of the critical field;If being drawn into, value of the page to be shown in the critical field is
The corresponding keyword of the critical field;If not being drawn into, value of the page to be shown in the critical field is used specified
Mark indicates;Value based on the page to be shown in each critical field constitutes pass corresponding with the page to be shown
Key word set.
Optionally, kernel adaptation unit 202 can (1), formula (2), formula (3) and browser kernel according to the following formula
KjCorresponding Core Choice model parameter P (wi|Kj), calculate set of keywords WnBrowser kernel K when appearancejFor target rendering
Probability P (the K of kernelj/Wn):
Wherein, m is the sum of browser kernel, and n is the sum of critical field;P(Kj) indicate j-th of browser kernel Kj
Probability of occurrence, value 1/m;P(wi|Kj) indicate with j-th of browser kernel KjKeyword when rendering kernel for target
The corresponding keyword w of i-th of critical field in setiProbability of occurrence, i is the integer that value 1 arrives n, and j is that value 1 is whole to m
Number.
Optionally, page display device 200 provided in an embodiment of the present invention can also include: parameter training unit.
Parameter training unit is used to be directed to each browser kernel, the corresponding Core Choice model of the training browser kernel
Parameter.
Specifically, parameter training unit can be selected according to the corresponding kernel of browser kernel as described under type training in advance
Select model parameter P (wi|Kj):
From browser kernel KjAt least one page properties are extracted in corresponding sample page, as browser kernel KjIt is right
The sample page property set answered;Wherein, the sample page is with the browser kernel KjKernel is rendered for target;For default
Each critical field, the extraction of the corresponding keyword of the critical field is carried out to the sample page property set;If being drawn into,
Then value of the sample page in the critical field is the corresponding keyword of the critical field;It is described if not being drawn into
Value of the sample page in the critical field is indicated with designated identification;For i-th of critical field, if the sample page exists
Value in i-th of critical field is the designated identification, then Core Choice model parameter P (wi|Kj) it is 0;If the sample page
Value of the face in i-th of critical field is the corresponding keyword w of i-th of critical fieldi, then Core Choice model parameter P (wi|
Kj) are as follows: the corresponding keyword w of i-th of critical field in the sample page property setiFrequency of occurrence and the sample page
The ratio of the frequency of occurrence summation of the corresponding keyword of each critical field in property set.
Optionally, in the embodiment of the present invention, if parameter training unit is also used to the browser kernel and updates, root
Updated browser kernel is the sample page that target renders kernel, Core Choice mould corresponding to the browser kernel accordingly
Shape parameter carries out re -training.
Page display device 200 provided in an embodiment of the present invention, by extracting page properties from the page to be shown;According to
The page properties of extraction and preset Core Choice model find out the highest browser of matching degree between the page to be shown
Kernel, and kernel is rendered as the corresponding target of the page to be shown;Kernel is rendered by target to render the page to be shown
Display.In this way, the page to be shown from different service systems can be found corresponding target rendering kernel, be solved
User accesses existing compatibility issue when different service systems, improves user experience, and development cost is small.
The embodiment of page display device provided by the invention specifically can be used for executing the place of above-mentioned each method embodiment
Process is managed, details are not described herein for function, is referred to the detailed description of above method embodiment.
With reference to Fig. 3, it illustrates the entity structure schematic diagrames of electronic equipment according to an embodiment of the invention.Such as Fig. 3
Shown, which may include: processor (processor) 301, memory (memory) 302 and bus 303,
In, processor 301, memory 302 completes mutual communication by bus 303.Processor 301 can call memory 302
In computer program, to execute method provided by above-mentioned each method embodiment, for example,
Page properties are extracted from the page to be shown;According to the page properties of extraction and preset Core Choice model, look into
Find out the highest browser kernel of matching degree between the page to be shown, and as the corresponding mesh of the page to be shown
Mark rendering kernel;Rendering is carried out by the verification page to be shown in target rendering to show.
In another embodiment, the page properties include following at least one:
Java script js, cascading style sheets css and member meta attribute.
In another embodiment, following method is realized when the processor 301 executes the computer program:
The page properties according to extraction and preset Core Choice model, find out between the page to be shown
The highest browser kernel of matching degree, comprising:
Keywording is carried out to the page properties of extraction, is generated and the page to be shown according to the keyword extracted
Corresponding set of keywords;
For each browser kernel, according in preset bayesian algorithm in the Core Choice model and the browser
The corresponding Core Choice model parameter of core calculates and renders kernel by target of the browser kernel when set of keywords occurs
Probability, and as the matching degree between the browser kernel and the page to be shown;Wherein, browser kernel is corresponding interior
The probability of occurrence of core preference pattern parameter each keyword when being specially using browser kernel as target rendering kernel;
According to the matching degree between each browser kernel and the page to be shown, find out with the page to be shown it
Between the highest browser kernel of matching degree.
In another embodiment, following method is realized when the processor 301 executes the computer program:
The page properties of described pair of extraction carry out keywording, according to the keyword that extracts generate with it is described to be shown
The corresponding set of keywords of the page, comprising:
For preset each critical field, the page properties of extraction are carried out with the pumping of the corresponding keyword of the critical field
It takes;If being drawn into, value of the page to be shown in the critical field is the corresponding keyword of the critical field;If not
It is drawn into, then value of the page to be shown in the critical field is indicated with designated identification;
Value based on the page to be shown in each critical field constitutes key corresponding with the page to be shown
Word set.
In another embodiment, following method is realized when the processor 301 executes the computer program:
It is described corresponding interior according to preset bayesian algorithm in the Core Choice model and each browser kernel
Core preference pattern parameter calculates the probability for rendering kernel when the set of keywords occurs using the browser kernel as target, packet
It includes:
(1), formula (2), formula (3) and the corresponding Core Choice model parameter P (w of browser kernel according to the following formulai
|Kj), calculate set of keywords WnBrowser kernel K when appearancejProbability P (the K of kernel is rendered for targetj/Wn):
Wherein, m is the sum of browser kernel, and n is the sum of critical field;P(Kj) indicate j-th of browser kernel Kj
Probability of occurrence, value 1/m;P(wi|Kj) indicate with j-th of browser kernel KjKeyword when rendering kernel for target
The corresponding keyword w of i-th of critical field in setiProbability of occurrence, i is the integer that value 1 arrives n, and j is that value 1 is whole to m
Number.
In another embodiment, following method is realized when the processor 301 executes the computer program:
The method also includes:
According to the corresponding Core Choice model parameter P (w of browser kernel as described under type training in advancei|Kj):
From browser kernel KjAt least one page properties are extracted in corresponding sample page, as browser kernel KjIt is right
The sample page property set answered;Wherein, the sample page is with the browser kernel KjKernel is rendered for target;
For preset each critical field, the corresponding keyword of the critical field is carried out to the sample page property set
Extraction;If being drawn into, value of the sample page in the critical field is the corresponding keyword of the critical field;If
It is not drawn into, then value of the sample page in the critical field is indicated with designated identification;
For i-th of critical field, if value of the sample page in i-th of critical field is the specified mark
Know, then Core Choice model parameter P (wi|Kj) it is 0;
If value of the sample page in i-th of critical field is the corresponding keyword w of i-th of critical fieldi, then
Core Choice model parameter P (wi|Kj) are as follows: the corresponding keyword w of i-th of critical field in the sample page property setiGo out
The ratio of the frequency of occurrence summation of occurrence number keyword corresponding with critical field each in the sample page property set.
In another embodiment, following method is realized when the processor 301 executes the computer program:
The method also includes:
If the browser kernel updates, according to the sample for rendering kernel using updated browser kernel as target
This page carries out re -training to the corresponding Core Choice model parameter of the browser kernel.
Electronic equipment provided in an embodiment of the present invention at least has following technical effect that by mentioning from the page to be shown
Take page properties;According to the page properties of extraction and preset Core Choice model, between the page to be shown is found out
Kernel is rendered with the highest browser kernel of degree, and as the corresponding target of the page to be shown;Kernel is rendered by target to treat
The display page is shown.In this way, corresponding target can be found for the rendering page to be shown from different service systems
Kernel is rendered, user is solved and accesses existing compatibility issue when different service systems, improve user experience, and develop
Cost is small.
The embodiment of the present invention discloses a kind of computer program product, and the computer program product is non-transient including being stored in
Computer program on computer readable storage medium, the computer program include program instruction, when described program instructs quilt
When computer executes, computer is able to carry out method provided by above-mentioned each method embodiment, for example,
Page properties are extracted from the page to be shown;According to the page properties of extraction and preset Core Choice model, look into
Find out the highest browser kernel of matching degree between the page to be shown, and as the corresponding mesh of the page to be shown
Mark rendering kernel;Rendering is carried out by the verification page to be shown in target rendering to show.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage
Medium storing computer program, the computer program make the computer execute side provided by above-mentioned each method embodiment
Method, for example,
Page properties are extracted from the page to be shown;According to the page properties of extraction and preset Core Choice model, look into
Find out the highest browser kernel of matching degree between the page to be shown, and as the corresponding mesh of the page to be shown
Mark rendering kernel;Rendering is carried out by the verification page to be shown in target rendering to show.
In addition, the logical order in above-mentioned memory can be realized and as independence by way of SFU software functional unit
Product when selling or using, can store in a computer readable storage medium.Based on this understanding, of the invention
Technical solution substantially the part of the part that contributes to existing technology or the technical solution can be with software in other words
The form of product embodies, which is stored in a storage medium, including some instructions use so that
One computer installation (can be personal computer, server or network equipment etc.) executes each embodiment institute of the present invention
State all or part of the steps of method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-
Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can be with
Store the medium of program code.
The apparatus embodiments described above are merely exemplary, wherein described, unit can as illustrated by the separation member
It is physically separated with being or may not be, component shown as a unit may or may not be physics list
Member, it can it is in one place, or may be distributed over multiple network units.It can be selected according to the actual needs
In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness
Labour in the case where, it can understand and implement.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can
It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on
Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should
Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers
It enables and using so that a computer installation (can be personal computer, server or network equipment etc.) executes each implementation
Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used
To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;
And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and
Range.