CN109815477A - The method and apparatus for identifying browser information - Google Patents
The method and apparatus for identifying browser information Download PDFInfo
- Publication number
- CN109815477A CN109815477A CN201811474132.2A CN201811474132A CN109815477A CN 109815477 A CN109815477 A CN 109815477A CN 201811474132 A CN201811474132 A CN 201811474132A CN 109815477 A CN109815477 A CN 109815477A
- Authority
- CN
- China
- Prior art keywords
- browser
- keyword
- weight
- information
- keywords
- 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.)
- Granted
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
This application discloses a kind of method and apparatus for identifying browser information.This method comprises: the User Agent to browser is segmented, multiple keywords are obtained;The corresponding weight of each keyword is inquired in browser keyword dictionary, wherein include: multiple browser keywords, the corresponding weight of each browser keyword and the corresponding browser information of each browser keyword in browser keyword dictionary;Using the corresponding browser information of the maximum keyword of weight as the objective browser information identified.By the application, solve identification browser information step complexity in the related technology, the low problem of accuracy.
Description
Technical field
This application involves information discriminating technology fields, in particular to a kind of method and dress for identifying browser information
It sets.
Background technique
User Agent, abbreviation UA, Chinese are user agent's information, are a special string heads, so that service
Device can identify the operating system that client uses and version, cpu type, browser and version, browser rendering engine, browser
Language, browser plug-in etc..Number of site is often through judging that UA to send not to different operating system, different browser
With the page, thus need the corresponding browser information of accurate judgement UA, such as the information such as title, version of browser, in turn
It is configured according to browser information, since the information for including in UA is more, is likely to be obtained not by the analysis to UA accordingly
With the information of browser, it is difficult to accurately identify corresponding browser information by UA, may cause certain pages can not be
Situations such as normally being shown in some browser.
Complicated, the low problem of accuracy for identification browser information step in the related technology, not yet proposes effective at present
Solution.
Summary of the invention
The main purpose of the application is to provide a kind of method and apparatus for identifying browser information, to solve the relevant technologies
Middle identification browser information step is complicated, the low problem of accuracy.
To achieve the goals above, according to the one aspect of the application, a kind of identification browser information method is provided.It should
Method includes: to segment to the User Agent of browser, obtains multiple keywords;It is inquired in browser keyword dictionary
The corresponding weight of each keyword, wherein include: multiple browser keywords, each browser in browser keyword dictionary
The corresponding weight of keyword and the corresponding browser information of each browser keyword;The maximum keyword of weight is corresponding
Browser information is as the objective browser information identified.
Further, it is inquired in browser keyword dictionary before the corresponding weight of each keyword, this method is also wrapped
It includes: acquiring multiple browser keywords, browser keyword includes at least the kernel title of browser, manufacturer's name of browser
Claim, the version name of browser, browser title;It is each browser keyword setting power according to the type of browser keyword
Weight;Determine the corresponding browser information of each browser keyword;According to multiple browser keywords, each browser keyword
Corresponding weight and the corresponding browser information of each browser keyword construct browser keyword dictionary.
Further, weight is arranged for each browser keyword according to the type of browser keyword includes: to browsing
The first weight is arranged in the kernel title of device, and the second weight is arranged to the trade name of browser, sets to the version name of browser
Third weight is set, the 4th weight is arranged to browser title, wherein the first weight is less than the second weight, and the second weight is less than the
Three weights, third weight is less than the 4th weight.
Further, using the corresponding browser information of the maximum keyword of weight as the objective browser information identified
Include: the maximum keyword of weight there are it is multiple in the case where, to the maximum keyword of multiple weights according to the length of keyword
Degree sequence, and obtain the longest keyword of length;Using the longest keyword of length corresponding browser information as identifying
Objective browser information.
Further, the corresponding weight of each keyword is inquired in browser keyword dictionary includes: detection browser
With the presence or absence of the browser keyword with Keywords matching in keyword dictionary;It is crucial with the browser of Keywords matching if it exists
Word then obtains the corresponding weight of browser keyword.
Further, in detection browser keyword dictionary with the presence or absence of with the browser keyword of Keywords matching it
Afterwards, this method further include: if it does not exist with the browser keyword of Keywords matching, then return to the unknown identification of browser information
As a result.
To achieve the goals above, according to the another aspect of the application, a kind of identification browser information device is provided.It should
Device includes: participle unit, segments for the User Agent to browser, obtains multiple keywords;Query unit is used
In inquiring the corresponding weight of each keyword in browser keyword dictionary, wherein include: more in browser keyword dictionary
A browser keyword, the corresponding weight of each browser keyword and the corresponding browser letter of each browser keyword
Breath;First determination unit, for using the corresponding browser information of the maximum keyword of weight as the objective browser identified
Information.
Further, the device further include: acquisition unit, for acquiring multiple browser keywords, browser keyword
Including at least the kernel title of browser, the trade name of browser, the version name of browser, browser title;Setting is single
Member, for being that weight is arranged in each browser keyword according to the type of browser keyword;Second determination unit, for determining
The corresponding browser information of each browser keyword;Construction unit, for according to multiple browser keywords, each browser
The corresponding weight of keyword and the corresponding browser information of each browser keyword construct browser keyword dictionary.
To achieve the goals above, according to the another aspect of the application, a kind of storage medium is provided, storage medium includes
The program of storage, wherein program executes any one of the above identification browser information method.
To achieve the goals above, according to the another aspect of the application, a kind of processor is provided, processor is for running
Program, wherein program executes any one of the above identification browser information method when running.
By the application, using following steps: being segmented to the User Agent of browser, obtain multiple keywords;
The corresponding weight of each keyword is inquired in browser keyword dictionary, wherein include: multiple in browser keyword dictionary
Browser keyword, the corresponding weight of each browser keyword and the corresponding browser information of each browser keyword;
Using the corresponding browser information of the maximum keyword of weight as the objective browser information identified, solve in the related technology
Identify that browser information step is complicated, the low problem of accuracy.By dividing in browser keyword dictionary User Agent
The multiple keywords obtained after word are inquired, using the corresponding browser information of the maximum keyword of weight as the mesh identified
Browser information is marked, and then achieved the effect that simplified identification browser information step, improved recognition accuracy.
Detailed description of the invention
The attached drawing constituted part of this application is used to provide further understanding of the present application, the schematic reality of the application
Example and its explanation are applied for explaining the application, is not constituted an undue limitation on the present application.In the accompanying drawings:
Fig. 1 is the flow chart according to identification browser information method provided by the embodiments of the present application;And
Fig. 2 is the schematic diagram according to identification browser information device provided by the embodiments of the present application.
Specific embodiment
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application
Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only
The embodiment of the application a part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people
Member's every other embodiment obtained without making creative work, all should belong to the model of the application protection
It encloses.
It should be noted that the description and claims of this application and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to embodiments herein described herein.In addition, term " includes " and " tool
Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing a series of steps or units
Process, method, system, product or equipment those of are not necessarily limited to be clearly listed step or unit, but may include without clear
Other step or units listing to Chu or intrinsic for these process, methods, product or equipment.
For ease of description, below to the invention relates to part noun or term be illustrated:
User Agent: user agent's information, abbreviation UA are a special string heads, enable the server to identify
Operating system and version, cpu type, browser and version, browser rendering engine, browser language, the browsing that client uses
Device plug-in unit etc..
According to an embodiment of the present application, a kind of identification browser information method is provided.
Fig. 1 is the flow chart according to the identification browser information method of the embodiment of the present application.As shown in Figure 1, this method packet
Include following steps:
Step S101 segments the User Agent of browser, obtains multiple keywords.
Specifically, participle and keyword extraction are carried out to User Agent using general segmentation methods, obtains multiple passes
Keyword.
Step S102 inquires the corresponding weight of each keyword in browser keyword dictionary, wherein browser is crucial
It include: multiple browser keywords, the corresponding weight of each browser keyword and each browser keyword in word dictionary
Corresponding browser information.
It should be noted that each browser keyword included in browser keyword dictionary is provided with weight, if
The corresponding weight of some keyword can be inquired in browser keyword dictionary, illustrate also to find the browser corresponding clear
It lookes at device information, illustrates that the keyword is effective keyword, if inquiry is less than some keyword pair in browser keyword dictionary
The weight and browser information answered illustrate that the keyword is invalid keyword, do not contribute determining browser information as
Keyword.
Browser keyword dictionary needs are pre-created, and optionally, believe in identification browser provided by the embodiments of the present application
It in breath method, is inquired in browser keyword dictionary before the corresponding weight of each keyword, this method further include: acquisition is more
A browser keyword, kernel title of the browser keyword including at least browser, the trade name of browser, browser
Version name, browser title;It is that weight is arranged in each browser keyword according to the type of browser keyword;It determines each
The corresponding browser information of browser keyword;According to multiple browser keywords, the corresponding weight of each browser keyword
And the corresponding browser information of each browser keyword constructs browser keyword dictionary.
Specifically, common browser keyword is acquired, including is not limited to browser kernel title, browser manufacturer name
Title, version name, browser title, common browser keyword etc. is arranged, and is arranged according to browser type for it
Weight, and browser information corresponding with each browser keyword is recorded, include at least browser title and browser version
Number etc., common browser keyword and its corresponding weight, browser information are arranged and generate keyword browser dictionary.
In order to accurately obtain the corresponding browser information of User Agent, optionally, in knowledge provided by the embodiments of the present application
In other browser information method, it includes: to clear that weight, which is arranged, for each browser keyword according to the type of browser keyword
The first weight is arranged in the kernel title of device of looking at, and the second weight is arranged to the trade name of browser, to the version name of browser
Third weight is set, the 4th weight is arranged to browser title, wherein the first weight is less than less than the second weight, the second weight
Third weight, third weight is less than the 4th weight.
It should be noted that the corresponding kernel of multiple and different browsers is identical, interior verification determines unique browser institute
The contribution risen is smaller, determines lower first weight for browser kernel;There is also corresponding manufacturers for multiple and different browsers
Identical situation, but the contribution that the unique browser of determination plays in manufacturer is larger than kernel, can be greater than for manufacturer's setting
Second weight of the first weight;And the corresponding browser information of version name is more accurate, is greater than the second power for version name setting
The third weight of weight;In addition, there may be browser titles for the keyword segmented to User Agent, according to browser name
Title can directly determine corresponding browser, and the 4th weight of third weight is greater than for the setting of browser title.
For example, the first weight definition for being kernel setting is 0, and specifically, (MSIE) Trident, WebKit, Gecko,
The weight of the keywords such as Presto is disposed as 0;The second weight definition for manufacturer's setting is 5, specifically, MSIE, Safari,
The weight of the keywords such as Chrome, Firefox is disposed as 5;Third weight definition for version name setting is 10, specifically
Ground, MSIE 8.0, Version/5 (10 or less Safari version), Chrome/19, Version/10 (Opera version),
The weight of the keywords such as FireFox/21 is disposed as 10;The 4th weight definition for the setting of browser title is 15, specifically,
The weight of the keywords such as BaiduBrowser, 360EE, XiaoMi is disposed as 15.
Through this embodiment, according to the type of keyword, big keyword is contributed by what the unique browser of determination rose
Higher weight is set, to improve the accuracy for obtaining the corresponding browser information of User Agent.
Optionally, in identification browser information method provided by the embodiments of the present application, in browser keyword dictionary
Inquiring the corresponding weight of each keyword includes: to detect in browser keyword dictionary with the presence or absence of the browsing with Keywords matching
Device keyword;If it exists with the browser keyword of Keywords matching, then the corresponding weight of browser keyword is obtained.
Specifically, the corresponding weight of searching keyword and the process phase of browser information in browser keyword dictionary
When in consulting the dictionary, inquiry whether there is browser keyword identical with keyword in browser keyword dictionary, and if it exists,
Obtain browser keyword respective weights.
Optionally, in identification browser information method provided by the embodiments of the present application, in detection browser key word character
In allusion quotation with the presence or absence of with after the browser keyword of Keywords matching, this method further include: if it does not exist with Keywords matching
Browser keyword, then return identification browser information be unknown recognition result.
It should be noted that if inquiring browser corresponding less than any one keyword in browser keyword dictionary
Information illustrates that the keyword that the User Agent is segmented is invalid keyword, is inquired according to User Agent less than clear
Look at device information, returning to identification browser information is unknown recognition result.
Step S103 believes the corresponding browser information of the maximum keyword of weight as the objective browser identified
Breath.
For example, the keyword for inquiring browser information segmented according to User Agent be respectively " MSIE8.0 ",
" MSIE ", " qq ", due to " MSIE8.0 " corresponding version name, " MSIE " corresponding trade name, " qq " corresponds to browser title,
Be ranked up according to weight: 8.0 < qq of MSIE < MSIE determines that " qq " corresponding browser information is clear as the target identified
Look at device information.
For another example being respectively according to the keyword for inquiring browser information that User Agent is segmented
" WebKit ", " Safari ", " Version/x ", due to " WebKit " corresponding kernel title, " Safari " corresponding trade name,
" Version/x " corresponds to version name, is ranked up according to weight: WebKit < Safari < Version/x is determined
" Version/x " corresponding browser information is as the objective browser information identified.
For another example being respectively according to the keyword for inquiring browser information that User Agent is segmented
" Chrome ", " Chrome/xx ", " XiaoMi ", due to " Chrome " corresponding trade name, " Chrome/xx " corresponding version name
Claim, " XiaoMi " corresponding browser title, be ranked up according to weight: Chrome < Chrome/xx < XiaoMi is determined
" XiaoMi " corresponding browser information is as the objective browser information identified.
For another example being respectively " Gecko/ according to the keyword for inquiring browser information that User Agent is segmented
Presto ", " Firefox ", " Version/x ", " Opera ", due to " WebKit " corresponding kernel title, " Safari " corresponding factory
Quotient's title, " Version/x " corresponding version name, " Opera " corresponding browser title, are ranked up: Gecko/ according to weight
Presto < Firefox < Version/x < Opera determines that " Opera " corresponding browser information is clear as the target identified
Look at device information.
Optionally, in identification browser information method provided by the embodiments of the present application, by the maximum keyword pair of weight
The browser information answered as the objective browser information identified include: there is a situation where in the maximum keyword of weight it is multiple
Under, it sorts to the maximum keyword of multiple weights according to the length of keyword, and obtain the longest keyword of length;Most by length
The corresponding browser information of long keyword is as the objective browser information identified.
It should be noted that keyword is longer, it includes effective information it is more, the browser information determined by it is more quasi-
Really, thus, the maximum keyword of weight there are it is multiple in the case where, by the corresponding browser information of the longest keyword of length
As the objective browser information identified, to improve the accuracy of identification browser information.
Identification browser information method provided by the embodiments of the present application, is divided by the User Agent to browser
Word obtains multiple keywords;The corresponding weight of each keyword is inquired in browser keyword dictionary, wherein browser closes
It include: that multiple browser keywords, the corresponding weight of each browser keyword and each browser are crucial in keyword dictionary
The corresponding browser information of word;Using the corresponding browser information of the maximum keyword of weight as the objective browser letter identified
Breath solves identification browser information step complexity in the related technology, the low problem of accuracy.By in browser key word character
The multiple keywords obtained after User Agent participle are inquired in allusion quotation, by the corresponding browser of the maximum keyword of weight
Information has reached simplified identification browser information step, has improved identification accurately as the objective browser information identified
The effect of rate.
It should be noted that step shown in the flowchart of the accompanying drawings can be in such as a group of computer-executable instructions
It is executed in computer system, although also, logical order is shown in flow charts, and it in some cases, can be with not
The sequence being same as herein executes shown or described step.
The embodiment of the present application also provides a kind of identification browser information devices, it should be noted that the embodiment of the present application
Identification browser information device can be used for executing provided by the embodiment of the present application browser information method for identification.With
Under identification browser information device provided by the embodiments of the present application is introduced.
Fig. 2 is the schematic diagram according to the identification browser information device of the embodiment of the present application.As shown in Fig. 2, the device packet
It includes: participle unit 10, query unit 20, the first determination unit 30.
Specifically, participle unit 10 segment for the User Agent to browser, obtain multiple keywords;
Query unit 20, for inquiring the corresponding weight of each keyword in browser keyword dictionary, wherein browsing
It include: multiple browser keywords, the corresponding weight of each browser keyword and each browser in device keyword dictionary
The corresponding browser information of keyword;
First determination unit 30, for using the corresponding browser information of the maximum keyword of weight as the target identified
Browser information.
Optionally, in identification browser information device provided by the embodiments of the present application, the device further include: acquisition is single
Member, for acquiring multiple browser keywords, browser keyword includes at least the kernel title of browser, the manufacturer of browser
Title, the version name of browser, browser title;Setting unit, for being each clear according to the type of browser keyword
Weight is arranged in device keyword of looking at;Second determination unit, for determining the corresponding browser information of each browser keyword;Building
Unit, for according to multiple browser keywords, the corresponding weight of each browser keyword and each browser keyword
Corresponding browser information constructs browser keyword dictionary.
Optionally, in identification browser information device provided by the embodiments of the present application, setting unit includes: setting mould
The first weight is arranged for the kernel title to browser in block, the second weight is arranged to the trade name of browser, to browser
Version name third weight is set, the 4th weight is arranged to browser title, wherein the first weight is less than the second weight, the
Two weights are less than third weight, and third weight is less than the 4th weight.
Optionally, in identification browser information device provided by the embodiments of the present application, the first determination unit 10 includes: row
Sequence module, for the maximum keyword of weight there are it is multiple in the case where, to the maximum keyword of multiple weights according to key
The length of word sorts, and obtains the longest keyword of length;Determining module is used for the corresponding browsing of the longest keyword of length
Device information is as the objective browser information identified.
Optionally, in identification browser information device provided by the embodiments of the present application, query unit 20 includes: detection mould
Block, for detecting in browser keyword dictionary with the presence or absence of the browser keyword with Keywords matching;Module is obtained, is used for
If it exists with the browser keyword of Keywords matching, then the corresponding weight of browser keyword is obtained.
Optionally, in identification browser information device provided by the embodiments of the present application, the device further include: return single
Member is not being deposited after in detection browser keyword dictionary with the presence or absence of the browser keyword with Keywords matching
In the case where the browser keyword with Keywords matching, then the unknown recognition result of browser information is returned.
Identification browser information device provided by the embodiments of the present application, by participle unit 10 to the User of browser
Agent is segmented, and multiple keywords are obtained;It is corresponding that query unit 20 inquires each keyword in browser keyword dictionary
Weight, wherein include: multiple browser keywords, the corresponding power of each browser keyword in browser keyword dictionary
Weight and the corresponding browser information of each browser keyword;First determination unit 30 is corresponding by the maximum keyword of weight
Browser information solves identification browser information step complexity in the related technology as the objective browser information identified,
The low problem of accuracy, by being carried out in browser keyword dictionary to the multiple keywords obtained after User Agent participle
Inquiry, using the corresponding browser information of the maximum keyword of weight as the objective browser information identified, and then reaches
The effect for simplifying identification browser information step, improving recognition accuracy.
The identification browser information device includes processor and memory, above-mentioned participle unit 10, query unit 20, and
One determination units 30 etc. store in memory as program unit, execute above-mentioned journey stored in memory by processor
Sequence unit realizes corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be set one
Or more, solve to identify that browser information step is complicated in the related technology by adjusting kernel parameter, the low problem of accuracy.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, if read-only memory (ROM) or flash memory (flash RAM), memory include that at least one is deposited
Store up chip.
The embodiment of the invention provides a kind of storage mediums, are stored thereon with program, real when which is executed by processor
The existing identification browser information method.
The embodiment of the invention provides a kind of processor, the processor is for running program, wherein described program operation
Browser information method is identified described in Shi Zhihang.
The embodiment of the invention provides a kind of equipment, equipment include processor, memory and storage on a memory and can
The program run on a processor, processor performs the steps of when executing program divides the User Agent of browser
Word obtains multiple keywords;The corresponding weight of each keyword is inquired in browser keyword dictionary, wherein browser closes
It include: that multiple browser keywords, the corresponding weight of each browser keyword and each browser are crucial in keyword dictionary
The corresponding browser information of word;Using the corresponding browser information of the maximum keyword of weight as the objective browser letter identified
Breath.
It is inquired in browser keyword dictionary before the corresponding weight of each keyword, this method further include: acquisition is more
A browser keyword, kernel title of the browser keyword including at least browser, the trade name of browser, browser
Version name, browser title;It is that weight is arranged in each browser keyword according to the type of browser keyword;It determines each
The corresponding browser information of browser keyword;According to multiple browser keywords, the corresponding weight of each browser keyword
And the corresponding browser information of each browser keyword constructs browser keyword dictionary.
It includes: the kernel name to browser that weight, which is arranged, for each browser keyword according to the type of browser keyword
Claim setting the first weight, the second weight be arranged to the trade name of browser, third weight is arranged to the version name of browser,
4th weight is arranged to browser title, wherein the first weight is less than third weight, third less than the second weight, the second weight
Weight is less than the 4th weight.
It include: to weigh using the corresponding browser information of the maximum keyword of weight as the objective browser information identified
The maximum keyword of weight sorts to the maximum keyword of multiple weights according to the length of keyword there are in the case where multiple, and
Obtain the longest keyword of length;Using the corresponding browser information of the longest keyword of length as the objective browser identified
Information.
It includes: detection browser keyword dictionary that the corresponding weight of each keyword is inquired in browser keyword dictionary
The interior browser keyword with the presence or absence of with Keywords matching;If it exists with the browser keyword of Keywords matching, then obtain
The corresponding weight of browser keyword.
After whether there is the browser keyword with Keywords matching in detection browser keyword dictionary, this method
Further include: if it does not exist with the browser keyword of Keywords matching, then return to the unknown recognition result of browser information.Herein
In equipment can be server, PC, PAD, mobile phone etc..
Present invention also provides a kind of computer program products, when executing on data processing equipment, are adapted for carrying out just
The program of beginningization there are as below methods step: the User Agent of browser is segmented, multiple keywords are obtained;In browser
The corresponding weight of each keyword of inquiry in keyword dictionary, wherein include: that multiple browsers close in browser keyword dictionary
Keyword, the corresponding weight of each browser keyword and the corresponding browser information of each browser keyword;Most by weight
The corresponding browser information of big keyword is as the objective browser information identified.
It is inquired in browser keyword dictionary before the corresponding weight of each keyword, this method further include: acquisition is more
A browser keyword, kernel title of the browser keyword including at least browser, the trade name of browser, browser
Version name, browser title;It is that weight is arranged in each browser keyword according to the type of browser keyword;It determines each
The corresponding browser information of browser keyword;According to multiple browser keywords, the corresponding weight of each browser keyword
And the corresponding browser information of each browser keyword constructs browser keyword dictionary.
It includes: the kernel name to browser that weight, which is arranged, for each browser keyword according to the type of browser keyword
Claim setting the first weight, the second weight be arranged to the trade name of browser, third weight is arranged to the version name of browser,
4th weight is arranged to browser title, wherein the first weight is less than third weight, third less than the second weight, the second weight
Weight is less than the 4th weight.
It include: to weigh using the corresponding browser information of the maximum keyword of weight as the objective browser information identified
The maximum keyword of weight sorts to the maximum keyword of multiple weights according to the length of keyword there are in the case where multiple, and
Obtain the longest keyword of length;Using the corresponding browser information of the longest keyword of length as the objective browser identified
Information.
It includes: detection browser keyword dictionary that the corresponding weight of each keyword is inquired in browser keyword dictionary
The interior browser keyword with the presence or absence of with Keywords matching;If it exists with the browser keyword of Keywords matching, then obtain
The corresponding weight of browser keyword.
After whether there is the browser keyword with Keywords matching in detection browser keyword dictionary, this method
Further include: if it does not exist with the browser keyword of Keywords matching, then return to the unknown recognition result of browser information.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie
The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element
There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art,
Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement,
Improve etc., it should be included within the scope of the claims of this application.
Claims (10)
1. a kind of method for identifying browser information characterized by comprising
The User Agent of browser is segmented, multiple keywords are obtained;
The corresponding weight of each keyword is inquired in browser keyword dictionary, wherein the browser key word character
It include: that multiple browser keywords, each corresponding weight of browser keyword and each browser close in allusion quotation
The corresponding browser information of keyword;
Using the corresponding browser information of the maximum keyword of weight as the objective browser information identified.
2. the method according to claim 1, wherein inquiring each key in browser keyword dictionary
Before the corresponding weight of word, the method also includes:
Multiple browser keywords are acquired, the multiple browser keyword includes at least the kernel title of browser, browser
Trade name, the version name of browser, browser title;
It is that weight is arranged in each browser keyword according to the type of the browser keyword;
Determine the corresponding browser information of each browser keyword;
According to the multiple browser keyword, each corresponding weight of browser keyword and each browser
The corresponding browser information of keyword constructs the browser keyword dictionary.
3. according to the method described in claim 2, it is characterized in that, being each described according to the type of the browser keyword
Weight is arranged in browser keyword
First weight is arranged to the kernel title of the browser, the second weight is arranged to the trade name of the browser, it is right
Third weight is arranged in the version name of the browser, and the 4th weight is arranged to the browser title, wherein first power
It is less than second weight again, second weight is less than the third weight, and the third weight is less than the 4th weight.
4. the method according to claim 1, wherein the corresponding browser information of the maximum keyword of weight is made
Objective browser information to identify includes:
The maximum keyword of the weight there are it is multiple in the case where, to the maximum keyword of multiple weights according to keyword
Length sequence, and obtain the longest keyword of length;
Using the corresponding browser information of the longest keyword of the length as the objective browser information identified.
5. the method according to claim 1, wherein inquiring each key in browser keyword dictionary
The corresponding weight of word includes:
It detects in the browser keyword dictionary with the presence or absence of the browser keyword with the Keywords matching;
If it exists with the browser keyword of the Keywords matching, then the corresponding weight of the browser keyword is obtained.
6. according to the method described in claim 5, it is characterized in that, whether there is detecting in the browser keyword dictionary
After the browser keyword of the Keywords matching, the method also includes:
If it does not exist with the browser keyword of the Keywords matching, then the unknown recognition result of browser information is returned.
7. a kind of device for identifying browser information characterized by comprising
Participle unit segments for the User Agent to browser, obtains multiple keywords;
Query unit, for inquiring the corresponding weight of each keyword in browser keyword dictionary, wherein described clear
Look in device keyword dictionary includes: multiple browser keywords, the corresponding weight of each browser keyword and each
The corresponding browser information of the browser keyword;
First determination unit, for using the corresponding browser information of the maximum keyword of weight as the objective browser identified
Information.
8. device according to claim 7, which is characterized in that described device further include:
Acquisition unit, for acquiring multiple browser keywords, the browser keyword includes at least the kernel name of browser
Claim, the trade name of browser, the version name of browser, browser title;
Setting unit, for being that weight is arranged in each browser keyword according to the type of the browser keyword;
Second determination unit, for determining the corresponding browser information of each browser keyword;
Construction unit, for according to the multiple browser keyword, the corresponding weight of each browser keyword and
The each browser keyword corresponding browser information building browser keyword dictionary.
9. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein described program right of execution
Benefit require any one of 1 to 6 described in identify browser information method.
10. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run
Benefit require any one of 1 to 6 described in identify browser information method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811474132.2A CN109815477B (en) | 2018-12-04 | 2018-12-04 | Method and device for identifying browser information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811474132.2A CN109815477B (en) | 2018-12-04 | 2018-12-04 | Method and device for identifying browser information |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109815477A true CN109815477A (en) | 2019-05-28 |
CN109815477B CN109815477B (en) | 2023-10-17 |
Family
ID=66601916
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811474132.2A Active CN109815477B (en) | 2018-12-04 | 2018-12-04 | Method and device for identifying browser information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109815477B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017096967A1 (en) * | 2015-12-10 | 2017-06-15 | 乐视控股(北京)有限公司 | Method and device for self-adaptively displaying web page |
CN107463573A (en) * | 2016-06-02 | 2017-12-12 | 广州市动景计算机科技有限公司 | Content information provides method, equipment, browser, electronic equipment and server |
CN107590164A (en) * | 2016-07-08 | 2018-01-16 | 广州市动景计算机科技有限公司 | For generating the method, equipment and server of Hot Contents |
CN108280106A (en) * | 2017-03-08 | 2018-07-13 | 广州市动景计算机科技有限公司 | Processing method, device and the mobile terminal of search key |
EP3373161A1 (en) * | 2017-03-09 | 2018-09-12 | Wipro Limited | Method and system for classification of web browsing history |
-
2018
- 2018-12-04 CN CN201811474132.2A patent/CN109815477B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017096967A1 (en) * | 2015-12-10 | 2017-06-15 | 乐视控股(北京)有限公司 | Method and device for self-adaptively displaying web page |
CN107463573A (en) * | 2016-06-02 | 2017-12-12 | 广州市动景计算机科技有限公司 | Content information provides method, equipment, browser, electronic equipment and server |
CN107590164A (en) * | 2016-07-08 | 2018-01-16 | 广州市动景计算机科技有限公司 | For generating the method, equipment and server of Hot Contents |
CN108280106A (en) * | 2017-03-08 | 2018-07-13 | 广州市动景计算机科技有限公司 | Processing method, device and the mobile terminal of search key |
EP3373161A1 (en) * | 2017-03-09 | 2018-09-12 | Wipro Limited | Method and system for classification of web browsing history |
Non-Patent Citations (2)
Title |
---|
李周辉等: "浏览器识别研究", 《信息网络安全》 * |
杨雪等: "Chrome浏览器历史记录提取与分析", 《计算机应用与软件》 * |
Also Published As
Publication number | Publication date |
---|---|
CN109815477B (en) | 2023-10-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Martin et al. | Counting keys in parallel after a side channel attack | |
CN110019668A (en) | A kind of text searching method and device | |
US20110176737A1 (en) | Personalized tag ranking | |
TWI710917B (en) | Data processing method and device | |
WO2015185020A1 (en) | Information category obtaining method and apparatus | |
CN110019669A (en) | A kind of text searching method and device | |
US11836331B2 (en) | Mathematical models of graphical user interfaces | |
CN108710662B (en) | Language conversion method and device, storage medium, data query system and method | |
Liu et al. | Using g features to improve the efficiency of function call graph based android malware detection | |
Prokopova et al. | Influence analysis of selected factors in the function point work effort estimation | |
CN110147223B (en) | Method, device and equipment for generating component library | |
CN106610989B (en) | Search keyword clustering method and device | |
CN107665208B (en) | User preference measurement method and device | |
Cao et al. | A heterogeneous information network method for entity set expansion in knowledge graph | |
CN112100400A (en) | Node recommendation method and device based on knowledge graph | |
CN110020071A (en) | The determination method and device of competing product vehicle | |
CN109815477A (en) | The method and apparatus for identifying browser information | |
CN114756750A (en) | Method and device for predicting click rate of recommended target | |
CN110955845A (en) | User interest identification method and device, and search result processing method and device | |
CN106909571B (en) | Analysis method and device for access path of website | |
CN110309273A (en) | Answering method and device | |
JP2022168859A (en) | Computer implementation method, computer program, and system (prediction query processing) | |
CN110059272B (en) | Page feature recognition method and device | |
CN110188301A (en) | Information aggregation method and device for website | |
CN110019771B (en) | Text processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20201224 Address after: Room 2020, 2 / F, building 27, No. 25, North Third Ring Road West, Haidian District, Beijing 100098 Applicant after: Beijing minglue Zhaohui Technology Co.,Ltd. Address before: Room 9014, 9 / F, building 3, yard 30, Shixing street, Shijingshan District, Beijing 100041 Applicant before: ADMASTER TECHNOLOGY (BEIJING) Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |