A kind of article search method and systemTechnical field
The application is related to retrieval technique field, more particularly to a kind of character search method and system.
Background technology
At present, Internet user's popularity rate is more than half, and China Internet number of netizen is sure to occupy the first in the world.With the traditional matchmaker in the whole worldBody slump of disastrous proportions, Chinese network information transmission surmounts TV information communication turns into irreversible trend.
With the continuous development of internet, many writers of new generation are emerged in a manner of network writer, by being read on networkThe welcome of person.However, the article delivered for network writer, ununified Managed Solution, reader search article on networkAlso just as looking for a needle in a haystack, not only waste time and energy, and article content also is difficult to obtain retrieval well and effective on networkPropagate.
The content of the invention
In view of this, this application provides a kind of article search method and system, to overcome web documents in the prior artSearch the problem of inconvenient.
To achieve these goals, this application provides following technical scheme:
A kind of article search method, this method include:
The index list built in advance according to the displaying of the query statement of user;The index list includes:At least one set is closedThe one-to-one relationship of keyword and article;
The keyword inputted according to the user received, determine the synonym and/or near synonym of the keyword;
According to the keyword, the synonym of the keyword and/or near synonym and the index list, in databaseIt is middle to search article to be found corresponding with the keyword, the synonym of the keyword and/or near synonym, and treated described in displaySearch the identification information of article;The identification information includes:The topic of article, deliver time, author, type, summary.
Preferably, in addition to:The article to be found is screened using boolean calculation, to determine target article.
Preferably, the structure of the index list includes:
Crawl meets the article of preset kind on the internet;
The article for meeting preset kind is subjected to Keywords matching processing in keyword dictionary, obtains described meetKeyword corresponding to the article of preset kind;
By meet keyword corresponding to the article of preset kind and the article for meeting preset kind one a pairIt should be related to and be stored in the index list as index relative.
Preferably, in addition to:The index relative is linked into described meet in the article of preset kind.
Preferably, the article that the crawl on the internet meets preset kind includes:Interconnected by PHP crawlersOnline crawl meets the article of preset kind.
A kind of article searching system, the system include:
Construction unit, for building index list in advance, the index list includes:At least one set of keyword and articleOne-to-one relationship;
Display unit, for the index list built in advance according to the displaying of the query statement of user;
Determining unit, for the keyword according to the user input received, determine the synonym of the keywordAnd/or near synonym;
Searching unit, for according to the keyword, the synonym of the keyword and/or near synonym and the indexList, text to be found corresponding with the keyword, the synonym of the keyword and/or near synonym is searched in databaseChapter;
Display unit, for showing the identification information of the article to be found;The identification information includes:The topic of articleMesh, deliver time, author, type, summary.
Preferably, in addition to:
Screening unit, for screening the article to be found using boolean calculation, to determine target article.
Preferably, the construction unit includes:
Placement unit, the article of preset kind is met for capturing on the internet;
Matching unit, for the article for meeting preset kind to be carried out at Keywords matching in keyword dictionaryReason, obtain described meeting keyword corresponding to the article of preset kind;
Storage unit, for meeting keyword corresponding to the article of preset kind and the preset kind that meets by describedThe one-to-one relationship of article is stored in the index list as index relative.
Preferably, the construction unit also includes:Link unit, for by the index relative link to it is described meet it is pre-If in the article of type.
Preferably, the placement unit is specifically used for capturing on the internet by PHP crawlers meeting preset kindArticle.
From above technical scheme, this application provides a kind of article search method and system, the search method passes throughThe article of foundation and the corresponding relation of keyword, it can directly be found and keyword and keyword according to the keyword that user inputsArticle corresponding to synonym and/or near synonym, make reader's more convenient and quicker obtains the information of oneself needs.It is provided hereinArticle search method not only allowed user to save to search and the time but also allow article to be promoted.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existingThere is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only thisThe embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basisThe accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is a kind of flow chart for article search method that the embodiment of the present application one provides;
Fig. 2 is a kind of flow chart for article search method that the embodiment of the present application two provides;
Fig. 3 is a kind of flow chart for structure index list that the embodiment of the present application two provides;
Fig. 4 is the flow chart for another structure index list that the embodiment of the present application two provides;
Fig. 5 is a kind of structure chart for article searching system that the embodiment of the present application three provides;
Fig. 6 is a kind of structure chart for article searching system that the embodiment of the present application four provides;
Fig. 7 is a kind of structure chart for construction unit that the embodiment of the present application four provides;
Fig. 8 is the structure chart for another construction unit that the embodiment of the present application four provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, completeSite preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based onEmbodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not madeEmbodiment, belong to the scope of protection of the invention.
For overcome in the prior art web documents search the problem of inconvenient, this application provides a kind of article search method andSystem, concrete scheme are as described below:
Embodiment one
The embodiment of the present application one provides a kind of article search method, is carried as shown in figure 1, Fig. 1 is the embodiment of the present application oneA kind of flow chart of the article search method supplied.This method includes:
S101:The index list built in advance according to the displaying of the query statement of user;
Wherein, in this application, index list includes:The one-to-one relationship of at least one set of keyword and article;
S102:The keyword inputted according to the user received, it is determined that synonym and/or near synonym with keyword;
S103:According to keyword, the synonym of keyword and/or near synonym and index list, searched in databaseArticle to be found corresponding with keyword, the synonym of keyword and/or near synonym, and show the mark letter of article to be foundBreath;
Wherein, identification information comprises at least the topic of article, delivers one kind or more in time, author, type, summaryKind.
In this application, in order to allow reader to obtain more going to join added with the actual effect information of reference value, more related informationsExamine so as to obtain valuable information, newest information obtained by the retrieval of data, allow reader's more convenient and quicker obtain fromThe information that oneself needs, is also convenient for user and sees other relevant informations, look for and inquire about without taking a significant amount of time,So not only allowed user to save the time but also allowed web documents to be promoted, the style of the page also allows people to feel comfortable.
From above technical scheme, this article search method that the embodiment of the present application one provides passes through the text that pre-establishesThe corresponding relation of chapter and keyword, it can directly be found and keyword and keyword synonym according to the keyword that user inputsAnd/or article corresponding near synonym, make reader's more convenient and quicker obtains the information of oneself needs.Article provided hereinSearch method had not only allowed user's saving to want to search the time but also had allowed web documents to be promoted.
Embodiment two
On the basis of embodiment one, the embodiment of the present application two provides a kind of more specifically article search method, such as Fig. 2Shown, Fig. 2 is a kind of flow chart for article search method that the embodiment of the present application two provides.This method includes:
S101:The index list built in advance according to the displaying of the query statement of user;
Wherein, in this application, index list includes:The one-to-one relationship of at least one set of keyword and article.
In this application, the idiographic flow of structure index list is given, as shown in figure 3, Fig. 3 is the embodiment of the present application twoA kind of flow chart of the structure index list provided.The structure of index list includes:
S1011:Crawl meets the article of preset kind on the internet;
Specifically, the article that crawl on the internet meets preset kind includes:By PHP crawlers on the internetCrawl meets the article of preset kind.
S1012:Article is subjected to Keywords matching processing in keyword dictionary, obtains keyword corresponding to article;
Specifically, in the present embodiment, the article for meeting preset kind is subjected to Keywords matching in keyword dictionaryProcessing, obtains meeting keyword corresponding to the article of preset kind.
S1013:The one-to-one relationship of keyword corresponding to article and article is stored in index column as index relativeTable.
Specifically, in the present embodiment, keyword corresponding to the article of preset kind will be met and meet preset kindThe one-to-one relationship of article is stored in index list as index relative.
Specifically, construction method provided herein is built upon PHP (Hypertext Preprocessor, EnglishSupertext pre-processes language) on language basis, major ranking website on internet is grabbed by PHP crawlers firstHeat search article information, after obtaining article, further according to obtained article, to system database, (system database is i.e. for a large amount of numbersAccording to the obtained keyword dictionary of analysis) data carry out Keywords matching processing, so as to obtain a kind of right of keyword and articleI.e. index relative should be related to, be saved in index list, when a user conducts a search, keyword can be inputted in front end page,Then searched according to keyword with index relative in database and obtain the corresponding article of keyword.
Wherein, obtain keyword corresponding to article specifically can be by analysing and comparing to obtain text to article content big dataChapter central idea, and distribute suitable keyword to article.
Specifically, the as shown in figure 4, flow chart for another structure index list that Fig. 4, which is the embodiment of the present application two, to be provided.Its in addition to including the step shown in Fig. 3, in addition to:
S1014:Index relative is linked in corresponding article.
In this application, the article of preset kind is met corresponding to index relative can also being linked to, in order to fasterFast ground extracts this article in database, to show user.
S102:The keyword inputted according to the user received, it is determined that synonym and/or near synonym with keyword;
S103:According to keyword, the synonym of keyword and/or near synonym and index list, searched in databaseArticle to be found corresponding with keyword, the synonym of keyword and/or near synonym, and show the mark letter of article to be foundBreath;
Wherein, identification information comprises at least the topic of article, delivers one kind or more in time, author, type, summaryKind.
S104:Article to be found is screened using boolean calculation, to determine target article.
The most basic boolean calculation of boolean calculation has:AND (logical AND), OR (logic or) and NOT (logicsIt is non-), this is the basic means for realizing keyword retrieval, such as article is searched for generally, after establishing index can improve search speed.
It should be noted that when carrying out keyword input in this application, we can use asterisk wildcard, for example, input" * functions * " can then come out the article search for including " function " in database, and current most of website is provided which the work(of asterisk wildcardCan, such as using "" 0 or 1 character is represented, use " * " to represent unlimited character.When being retrieved using English, wildcardThe use of symbol is primarily to realize the comprehensive representation of the various form English- word spellings with identical root, such as " * "Right truncation is formed during the right for appearing in word, left truncation is formed when appearing in the word left side.
This article search method provided from above technical scheme, the embodiment of the present application two, passes through what is pre-establishedThe corresponding relation of article and keyword, it can directly be found and keyword and keyword synonym according to the keyword that user inputsAnd/or article corresponding near synonym, make reader's more convenient and quicker obtains the information of oneself needs.Article provided hereinSearch method had not only allowed user to save the time but also had allowed web documents to be promoted.
Embodiment three
On the basis of embodiment one, the embodiment of the present application three, which carries, discloses a kind of article searching system, as shown in figure 5,Fig. 5 is a kind of structure chart for article searching system that the embodiment of the present application three provides, and the system includes:Construction unit 201, displayingUnit 202, determining unit 203, searching unit 204 and display unit 205, wherein,
Construction unit 201, for building index list in advance;
Wherein, index list includes:The one-to-one relationship of at least one set of keyword and article;
Display unit 202, for the index list built in advance according to the displaying of the query statement of user;
Determining unit 203, for according to receive user input keyword, determine keyword synonym and/orNear synonym;
Searching unit 204, for according to keyword, the synonym of keyword and/or near synonym and index list, in numberAccording to lookup article to be found corresponding with keyword, the synonym of keyword and/or near synonym in storehouse;
Display unit 205, for showing the identification information of article to be found;
Wherein, identification information comprises at least the topic of article, delivers one kind or more in time, author, type, summaryKind.
It should be noted that display unit 202 and display unit 205 can be same unit, or different units,Concrete condition no longer limits in this application according to setting is actually needed.
Specifically, the present embodiment can be referred to mutually with the same or analogous ground of embodiment one, in the present embodiment no longerRepeat.
Example IV
On the basis of embodiment three, the embodiment of the present application four provides a kind of more specifically article searching system, such as Fig. 6Shown, Fig. 6 is a kind of structure chart for article searching system that the embodiment of the present application four provides.The system includes:Construction unit201st, display unit 202, determining unit 203, searching unit 204, display unit 205 and screening unit 206, wherein,
Construction unit 201, for building index list in advance;
Wherein, index list includes:The one-to-one relationship of at least one set of keyword and article;
Specifically, in the present embodiment, as shown in fig. 7, Fig. 7 is a kind of construction unit that the embodiment of the present application four providesStructure chart, the construction unit include:Placement unit 2011, matching unit 2012 and storage unit 2013, wherein,
Placement unit 2011, the article of preset kind is met for capturing on the internet;
Placement unit is specifically used for capturing the article for meeting preset kind on the internet by PHP crawlers.
Matching unit 2012, for the article for meeting preset kind to be carried out at Keywords matching in keyword dictionaryReason, obtains meeting keyword corresponding to the article of preset kind;
Storage unit 2013, for the article that will meet keyword corresponding to the article of preset kind Yu meet preset kindOne-to-one relationship be stored in index list as index relative.
Specifically, structure principle provided herein is built upon PHP (Hypertext Preprocessor, EnglishSupertext pre-processes language) on language basis, major ranking website on internet is grabbed by PHP crawlers firstHeat search article information, after obtaining article, further according to obtained article, to system database, (system database is i.e. for a large amount of numbersAccording to the obtained keyword dictionary of analysis) data carry out Keywords matching processing, so as to obtain a kind of right of keyword and articleI.e. index relative should be related to, be saved in index list, when a user conducts a search, keyword can be inputted in front end page,Then searched according to keyword with index relative in database and obtain the corresponding article of keyword.
Wherein, obtain keyword corresponding to article specifically can be by analysing and comparing to obtain text to article content big dataChapter central idea, and distribute suitable keyword to article.
Specifically, as shown in figure 8, Fig. 8 is the structure chart for another construction unit that the embodiment of the present application four provides.Except bagInclude outside structure as shown in Figure 7, in addition to:
Link unit 2014, for index relative to be linked in related article.
In this application, the article of preset kind is met corresponding to index relative can also being linked to, in order to fasterFast ground extracts this article in database, to show user.
Display unit 202, for the index list built in advance according to the displaying of the query statement of user;
Determining unit 203, for according to receive user input keyword, determine keyword synonym and/orNear synonym;
Searching unit 204, for according to keyword, the synonym of keyword and/or near synonym and index list, in numberAccording to lookup article to be found corresponding with keyword, the synonym of keyword and/or near synonym in storehouse;
Display unit 205, for showing the identification information of article to be found;
Wherein, identification information comprises at least the topic of article, delivers one kind or more in time, author, type, summaryKind.
It should be noted that display unit 202 and display unit 205 can be same unit, or different units,Concrete condition no longer limits in this application according to setting is actually needed.
Screening unit 206, for screening article to be found using boolean calculation, to determine target article.
The most basic boolean calculation of boolean calculation has:AND (logical AND), OR (logic or) and NOT (logicsIt is non-), this is the basic means for realizing keyword retrieval, such as article is searched for generally, after establishing index can improve search speed.
It should be noted that when carrying out keyword input in this application, we can use asterisk wildcard, for example, input" * functions * " can then come out the article search for including " function " in database, and current most of website is provided which the work(of asterisk wildcardCan, such as using "" 0 or 1 character is represented, use " * " to represent unlimited character.When being retrieved using English, wildcardThe use of symbol is primarily to realize the comprehensive representation of the various form English- word spellings with identical root, such as " * "Right truncation is formed during the right for appearing in word, left truncation is formed when appearing in the word left side.
Specifically, the querying method described in due to the present embodiment simultaneously corresponding embodiment two, therefore, the present embodiment and realityApplying the same or analogous ground of example two can mutually refer to, and repeat no more in the present embodiment.
This article searching system provided from above technical scheme, the embodiment of the present application four, passes through what is pre-establishedThe corresponding relation of article and keyword, it can directly be found and keyword and keyword synonym according to the keyword that user inputsAnd/or article corresponding near synonym, make reader's more convenient and quicker obtains the information of oneself needs.Article provided hereinSearch method had not only allowed user to save the time but also had allowed web documents to be promoted.
Finally, it is to be noted that, herein, such as first and second or the like relational terms be used merely to byOne entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operationBetween any this actual relation or order be present.Moreover, term " comprising ", "comprising" or its any other variant meaningCovering including for nonexcludability, so that process, method, article or equipment including a series of elements not only include thatA little key elements, but also the other element including being not expressly set out, or also include for this process, method, article orThe intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", is not arrangedExcept other identical element in the process including the key element, method, article or equipment being also present.
Each embodiment is described by the way of progressive in this specification, what each embodiment stressed be and otherThe difference of embodiment, between each embodiment identical similar portion mutually referring to.
The foregoing description of the disclosed embodiments, professional and technical personnel in the field are enable to realize or using the application.A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined hereinGeneral Principle can be realized in other embodiments in the case where not departing from spirit herein or scope.Therefore, the applicationThe embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase oneThe most wide scope caused.