Embodiment
Fig. 1 shows a kind of system architecture for information search.As shown in figure 1, the system is used to realize on-line search,
The server 200 interacted including user equipment 100, with user equipment 100 by network is (such as:Types of databases server
Or application server etc.), above-mentioned server 200 may be configured with to store the data warehouse of file to be searched.Searching for
Cheng Zhong, first, certain for the application (Application, APP) that user can install on user equipment 100 realize function of search
Input search entry (Search Query) in the page, or, certain is accessed by user equipment 100 and is used to realize function of search
Webpage (such as:All kinds of search engine web sites) and input search entry in the webpage.Then, user equipment 100 can be generated and taken
Searching request (Search Request) with above-mentioned search entry, and the searching request is sent to by server by network
200.Finally, server 200 searches for the result for including above search entry according to certain search strategy from database, and will
As a result above-mentioned user equipment 100 is fed back to.The object of search can be to be searched by all types of information (such as word, picture) group
Into Internet resources, object search includes but is not limited to:Document, and/or webpage, and/or application (Application, APP)
The page.Can also be off-line search or local search it should be noted that search procedure is not limited to on-line search, such as:From with
The file or folder of search comprising above-mentioned search entry etc. in the local hard drive of family equipment.
In the related art, because the scope of information search is often larger, the result for causing finally to search is more and holds
Easily there is the not high result of more correlation, cause information search efficiency and accuracy relatively low.For example, if user input
Search entry is:" deep learning algorithm ", then in search procedure, it can search out and all include the entry " deep learning algorithm "
Article, webpage etc. are simultaneously presented to user.However, under some truths, the search result that user expects to see is a kind of right
The article that " deep learning algorithm " is explained in detail, it is seen then that because existing hunting zone is excessively wide in range, cause to obtain searches
Hitch fruit is too many, too miscellaneous, is unfavorable for user and is quickly found out the result truly needed.Therefore, set forth herein following technical scheme, with
At least one aspect in solving the above problems.
Exemplified by the concrete application scene of search document, come in document application (or document class small routine) by one kind herein
Illustrate the implementation that the embodiment of the present application provides.Wherein, document application be mounted on user equipment can check it is various
Document content applies APP.Certainly, this scene is not limited to.
Fig. 2 shows a kind of flow for method that document is searched in document application that an exemplary embodiment provides.Match somebody with somebody
Close shown in Fig. 1 and Fig. 2, this method can be applied to document application server, and in one embodiment, this method comprises the steps
101~104, wherein:
In a step 101, the search entry that user inputs in document application is received.
In a step 102, will be each according to the set information for indicating at least one document snippet type in document to be searched
The document snippet for belonging to the document snippet type in document to be searched is defined as target fragment to be searched.
Every part of document can be made up of one or more predefined parts (i.e. document snippet), such as:Title division, summary portion
Point, body part, annotation part, reference portion etc..Wherein, each section in document can also be subdivided into one or more sons
Part, such as:Title division can be divided into first order title division (or main title part) and second level title division (or secondary mark
Inscribe part) etc..It is well known that for a document, some parts are used to summarize the core content of entire chapter document
Or summarize, e.g., the content of title (including document topic, main title, subtitle etc.) or summary generally can more reflect entire chapter text
The core content or key message of shelves, if hunting zone to be limited to the part of core content or key message contained above,
It certainly will can improve the accuracy of information search.
In one embodiment, a variety of document snippet types can be pre-defined, and can be in advance according to document snippet type
The document content of every a document is divided into multiple document snippets.Such as:The document snippet type of definition includes:h1、h2、h3、
Body, cite etc., wherein, " h1 " can represent the topic of document, and " h2 " can represent the first order title of document, and " h3 " can be with
The second level title of document is represented, " body " can represent the body matter of document, and " cite " can represent the reference in document.
In order to improve the accuracy of document searching, the developer of application program or can be preset using person (user) for referring to
Show the set information of at least one document snippet type in document to be searched, so that computer equipment can be believed according to setting
Breath determines document searching scope.For example, when set information is:When " h1&h2 ", then show during document searching, need
To belong to type " h1 " document snippet (i.e. document topic) in each document and belong to the document snippet of type " h2 " (i.e.
First order title in document) in search whether there is search entry.
In one embodiment, before step 102, methods described may also include:
According to ID, set information corresponding with the ID is searched, wherein the set information is that user is advance
Set and upload on document application server.
In the present embodiment, because each user is different to the demand of document searching precision or document searching scope, therefore can be with
Provide a user the function of personalized setting hunting zone.User can be by the operation in being applied in document (as input is set
Information chooses in preset options) set.After user completes to set, set information can be stepped on user in document application
The ID of record forms corresponding relation, and uploads on document application server, in order to subsequently search.
In another embodiment, before step 102, methods described may also include:
If not finding set information corresponding with the ID, the set information of the document application acquiescence is obtained.
As described above, user can adjust accordingly according to the demand of personalization to set information.When user does not set
During the set information of fixed personalization, then the document searching process in the document application needs to enter according to the set information of acquiescence
OK, the set information of document application acquiescence is alternatively referred to as document and applies initial set information, and the set information of the acquiescence can be by
Application developer or attendant's setting.For example, the set information of document application acquiescence is " h1&h2 ".
Shown in Fig. 3 A is a kind of exemplary document five application page.In this example embodiment, the document page 10 may include one
The file catalogue region 13 of document content display area 11 and one.Wherein, file catalogue region 13 is used to show that various documents are corresponding
Catalogue, file catalogue region 13 may include under one or more first order directory objects 131 and first order directory object 131
One or more second level directory objects 132, etc..Document content display area 11 is used for user from above-mentioned file catalogue area
The specific document content for the directory object selected in domain 13 is shown.In this example embodiment, document content display area 11
It may include the first document snippet 110 for showing document topic, for showing the of two different first order titles respectively
Two document snippets 112,113, for showing the 3rd document snippet 114,116 of two different second level titles respectively, it is used for
Show the 4th document snippet 1140,1160, etc. of body matter.If selected target type is h1 and h2, by document
The first document snippet 110 for belonging to type " h1 " and the second document snippet 112,113 for belonging to type " h2 " are defined as waiting to search
The destination document fragment of rope.It should be noted that Fig. 3 A merely illustrate a kind of document five application page, herein to the shape of the page
Formula or layout are not restricted.
In another embodiment, can according to the target identification of setting, by document to be searched with the target identification pair
The document snippet answered is defined as destination document fragment to be searched.
Wherein it is possible to it is in advance multiple document snippets according to certain regular partition by document, and be each part
Determine a mark for being used to define the part identity.For example, can be carried out according to the paragraph number or number of words that document includes
Division, such as:Each paragraph is a document snippet, or every 200 word is document snippet, etc..Shown in Fig. 3 B is another
A kind of exemplary document file page, the document page 11 ' can be divided into multiple document snippets according to paragraph, such as:First paragraph
Fall part 115, the second paragraph part 117, the 3rd paragraph part 119 etc..Wherein it is possible to each document snippet is compiled according to paragraph
Number corresponding mark is determined, such as:First paragraph part is identified as " 001 ", and the second paragraph part is identified as " 002 ", with this
Analogize.Herein basis on, if the target identification that user selectes is " 001 " and " 002 ", by document with target identification
First paragraph part 115 corresponding to " 001 " and the second paragraph part 117 corresponding with target identification " 002 " are defined as waiting to search
The destination document fragment of rope.
Certainly, determining that the set information of destination document fragment to be searched is not limited to situation listed above, example
Such as:Set information is the quantity of destination document fragment to be searched.It is respectively text wherein it is possible in advance according to searching accuracy
Each document snippet to be searched that shelves include defines corresponding priority, such as:The priority of document topic is excellent higher than main title
First level, the priority of main title are higher than the priority of subtitle, and the priority of subtitle is higher than priority of text etc..Hereafter,
If the quantity of the destination document fragment to be searched set is 1, it is determined that destination document fragment be document theme portion;If set
The quantity of fixed destination document fragment to be searched be 2, it is determined that destination document fragment be document theme portion and main title
Part;If the quantity of the destination document fragment to be searched set is 3, it is determined that destination document fragment be document topic portion
Point, main title part and subtitle part, by that analogy.Set information is not enumerated one by one herein.
In another feasible embodiment, after step 101, before step 102, methods described may also include:
Determine the number of characters included in the search entry;
Corresponding relation between the document snippet type indicated according to predetermined number of characters and set information, it is determined that with
Set information corresponding to the number of characters included in the search entry.
Usually, consider from the accuracy angle of document searching, when the number of characters that the search entry of user's input includes compared with
When few, it may be more suitable for for the topic of document or title being defined as target fragment to be searched;And when the search of user's input
When the number of characters that entry includes is more, it may be more suitable for for the full text of document being defined as target fragment to be searched.In view of
This, the document snippet class that user's (using person or application developer) can be indicated with predetermined number of characters and set information
Corresponding relation between type.Such as:If the document snippet type of definition includes:H1, h2, h3, body, cite, when number of characters is 1
In~3 during any one numerical value, corresponding document snippet type includes:H1, h2, any one in being 3~6 when number of characters
During numerical value, corresponding document snippet type includes:H1, h2 and h3, etc., do not enumerate herein.
In step 103, for each document to be searched, if there is institute in target fragment in the document to be searched
Search entry is stated, the destination document that the document to be searched is determined to search.
Fig. 4 shows a kind of displayed page for document searching result that an exemplary embodiment provides.With reference to Fig. 3 A and Fig. 4
Shown, in the above example, the document page 10 may also include a search button 12 that document searching is carried out for user.Work as user
After clicking on the search button 12, user equipment can switch to searched page 20, with the input search entry in searched page 20.
Certainly, in other embodiments, user can directly input search entry in document file page 10 and scan for.For document
Speech, due to typically include the key content of document in summary or title or summarizing content, can by the summary part of document or
Title is (such as:Page title, main title, subtitle etc.) at least one of be defined as target fragment to be searched, then searched for
The purpose of journey is to look for out each document for including search entry " Button " in summary part or title division.As for
The document of search entry " Button " comprising user's input in other parts (such as body part), then will not be put into final
In document searching result, so as to improve the accuracy of document searching process and search efficiency.
At step 104, generate document searching result according to the one or more destination documents searched and feed back to use
Family.
In one embodiment, the document searching result includes:For accessing the document content page of the destination document
Link, and/or the destination document where catalogue.
As shown in figure 4, for example, if user's search entry of input in entry input frame 21 is " Button ", lead to
Crossing the search result 23 that search obtains includes the catalogue where object search:
Components/ data inputtings/Button buttons;
Component/Button;
......
Wherein, the character " Button " included in above-mentioned catalogue can be shown as hyperlink (hyperlink) form,
Also, the character " Button " can be shown as particular color or specific font etc..User is shown by clicking on hyperlink form
The character " Button " shown, you can the page request for showing object (such as document) particular content is sent to server, so as to
Most the page presentation comprising object (such as document) particular content can check each search result 23 one by one to user, user at last
Particular content.
In one embodiment, it is described to before document searching result described in user feedback after document searching result is obtained
Method may also include the steps of:
According to priority corresponding with occurring the document snippet of the search entry in each destination document height, it is determined that often
Order of one destination document in document searching result;
According to the order, generation is comprising the search result of link corresponding to each destination document and feeds back to user.
By taking document class object as an example, document is divided into after multiple document snippets, can be that each document snippet determines phase
The priority answered, for example, h1 > h2 > h3, it is represented:The priority of document theme portion is excellent higher than first order title division
First level, the priority of first order title division are higher than the priority of second level title division.Then, may finally be according to identified
Priority height, determines order of each destination document in document searching result, the higher document of correlation is come and more leaned on
Preceding position, it is easy to user to check the very first time.For example, the search entry of user's input is " Button ", final search obtains 3
Individual search result:Document a, document b and document c, wherein, document a includes entry in document theme portion:" Button ", text
Shelves b includes entry in the title division of the second level:" Button ", document c include entry in first order title division:
" Button ", then search result corresponding to document a can finally be made number one in the results list, will be searched corresponding to document c
Hitch fruit comes second, and search result corresponding to document b is come into the 3rd.
It is visible by the process of step 101 to step 104:For some include the document class application of some documents,
By the set information set in advance for being used to indicate at least one document snippet type in document to be searched, can be treated each
The document snippet for belonging to the document snippet type in search document is defined as target fragment to be searched, and is made with target fragment
Whether to include the scope of the search entry inputted in search document application.The document search technique can reach diminution document and search
The purpose of rope scope so that the document searching result accuracy finally given is higher, and then improves document searching efficiency.
Fig. 5 is the hardware configuration of a kind of electronic equipment according to an exemplary embodiment.Fig. 5 is refer to, in hardware
Aspect, the electronic equipment include processor, internal bus, network interface, memory (including internal memory and non-volatile memories
Device), the hardware being also possible that certainly required for other business.Wherein, can be stored with to realize in text in memory
The interrelated logic (i.e. computer program) of document is searched in shelves application, corresponding to processor can be read from nonvolatile memory
Computer program is into internal memory and then runs.Certainly, in addition to software realization mode, the application is not precluded from other realization sides
Formula, such as mode of logical device or software and hardware combining etc., that is to say, that the executive agent of following handling process is simultaneously unlimited
Due to each logic unit or hardware or logical device.
As shown in fig. 6, in one embodiment, a kind of device that document is searched in document application, applied to document application
Server, described device include receiving unit 301, fragment determining unit 302, document matches unit 303 and result feedback unit
304;Wherein:
The receiving unit 301 receives the search entry that user inputs in document application.
The fragment determining unit 302 is believed according to the setting for indicating at least one document snippet type in document to be searched
Breath, is defined as target fragment to be searched by the document snippet for belonging to the document snippet type in each document to be searched.
The document matches unit 303 is for each document to be searched, if the target fragment in the document to be searched
The destination document interior search entry occur, that the document to be searched is determined to search.
The result feedback unit 304 generates document searching result and anti-according to one or more destination documents for searching
Feed user.
In one embodiment, described device also includes set information obtaining unit;Wherein:
The set information obtaining unit, according to ID, search set information corresponding with the ID, wherein institute
It is that user presets and uploaded on document application server to state set information.
In another embodiment, the set information obtaining unit, setting corresponding with the ID is not being found
During information, the set information of the document application acquiescence is obtained.
In one embodiment, described device also includes number of characters determining unit and set information determining unit;Wherein:
The number of characters determining unit determines the number of characters included in the search entry;
The document snippet type that the set information determining unit indicates according to predetermined number of characters and set information
Between corresponding relation, it is determined that set information corresponding with the number of characters included in the search entry.
In one embodiment, the document searching result includes:For accessing the document content page of the destination document
Link, and/or the destination document where catalogue.
In one embodiment, the result feedback unit, including order determining unit and generation unit;Wherein:
The order determining unit is according to corresponding with occurring the document snippet of the search entry in each destination document
Priority height, determines order of each destination document in document searching result;
The generation unit is simultaneously anti-according to the order, search result of the generation comprising the corresponding link of each destination document
Feed user.
In one embodiment, a kind of computer-readable storage medium, is stored thereon with computer program, and the computer program is located
Reason device realizes following steps when performing:
Receive the search entry that user inputs in document application;
According to the set information for indicating at least one document snippet type in document to be searched, by each document to be searched
The document snippet for belonging to the document snippet type is defined as target fragment to be searched;
For each document to be searched, if there is the search entry in target fragment in the document to be searched,
The destination document that the document to be searched is determined to search;
According to the one or more destination documents generation document searching result searched and feed back to user.
It should be noted that on the premise of not disagreing, said apparatus embodiment and above method embodiment can be each other
Supplement.
System, device, module or the unit that above-described embodiment illustrates, it can specifically be realized by computer chip or entity,
Or realized by the product with certain function.One kind typically realizes that equipment is computer, and the concrete form of computer can
To be personal computer, laptop computer, cell phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet PC, wearable device or these equipment
The combination of any several equipment.
For convenience of description, it is divided into various units during description apparatus above with function to describe respectively.Certainly, this is being implemented
The function of each unit can be realized in same or multiple softwares and/or hardware during application.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and internal memory.
Internal memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium
Example.
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 instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein
Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of elements not only include those key elements, but also wrapping
Include the other element being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described
Other identical element also be present in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product.
Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code
The shape for the computer program product that storage media is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The application can be described in the general context of computer executable instructions, such as program
Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type
Part, data structure etc..The application can also be put into practice in a distributed computing environment, in these DCEs, by
Task is performed and connected remote processing devices by communication network.In a distributed computing environment, program module can be with
In the local and remote computer-readable storage medium including storage device.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment
Divide mutually referring to what each embodiment stressed is the difference with other embodiment.It is real especially for system
For applying example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method
Part explanation.
Embodiments herein is the foregoing is only, is not limited to the application.For those skilled in the art
For, the application can have various modifications and variations.All any modifications made within spirit herein and principle, it is equal
Replace, improve etc., it should be included within the scope of claims hereof.