CN111737571B - Searching method and device and electronic equipment - Google Patents

Searching method and device and electronic equipment Download PDF

Info

Publication number
CN111737571B
CN111737571B CN202010528762.4A CN202010528762A CN111737571B CN 111737571 B CN111737571 B CN 111737571B CN 202010528762 A CN202010528762 A CN 202010528762A CN 111737571 B CN111737571 B CN 111737571B
Authority
CN
China
Prior art keywords
search
relevance
word
results
statement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010528762.4A
Other languages
Chinese (zh)
Other versions
CN111737571A (en
Inventor
陈家泽
李磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010528762.4A priority Critical patent/CN111737571B/en
Publication of CN111737571A publication Critical patent/CN111737571A/en
Application granted granted Critical
Publication of CN111737571B publication Critical patent/CN111737571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure discloses a search method, a search device, electronic equipment and a computer-readable storage medium. The searching method comprises the following steps: receiving a search statement; acquiring the relativity of the search sentence and at least one search word; searching according to the search statement to obtain a plurality of search results; and sorting the search results according to the relevance of the search statement and the at least one search word. According to the method, the technical problem that the search results do not accord with the search intention of the user is solved by acquiring the relevance between the search word and the search sentence and sequencing the search results according to the relevance.

Description

Searching method and device and electronic equipment
Technical Field
The present disclosure relates to the field of searching, and in particular, to a searching method, apparatus, electronic device, and computer-readable storage medium.
Background
Since the advent of the internet concept, the internet began to connect to every corner of the world. The information on the internet is explosively increased, and a mass information resource repository which is unknown is gradually explored and obtained by people. In the last twenty years of development of the internet in China, a search engine is taken as a main way for connecting users and network resources, and is an important tool for people to work, learn and live in the very important way for people to use the internet. Although the search engine can integrate various information to form a huge network resource index library, so as to conveniently provide query service for users, for the use of the search engine, there are cases that a large number of users cannot construct clear and definite search terms (query) to accurately express the search intention. And the search engine stores a large amount of information, the documents in the index library are updated and increased along with time, the contents in the documents also have certain timeliness, and if the user can not provide a query with definite meaning, the search engine can hardly recall the result matched with the user intention.
When the search result is recalled by the query of the user, the query is usually split into a plurality of words, and then the search is performed according to each split word to obtain the search result which is displayed to the user. But the search results so obtained do not match the user's intent. If a user searches for "explosion hooks", the system breaks it down into "explosion" and "hooks", recalls a large number of "explosion" related results, which are not matched to the user's intent, and thus a need exists for a technique to solve the above-mentioned problems.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The embodiment of the disclosure provides the following technical scheme.
In a first aspect, an embodiment of the present disclosure provides a search method, including:
receiving a search statement;
acquiring the relativity of the search sentence and at least one search word;
searching according to the search statement to obtain a plurality of search results;
and sorting the search results according to the relevance of the search statement and the at least one search word.
In a second aspect, an embodiment of the present disclosure provides a search apparatus, including:
the search statement receiving module is used for receiving the search statement;
the relevancy acquisition module is used for acquiring relevancy between the search sentence and at least one search word;
the search module is used for searching according to the search statement to obtain a plurality of search results;
and the sorting module is used for sorting the search results according to the relevance of the search statement and the at least one search word.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the preceding aspects.
In a fourth aspect, embodiments of the present disclosure provide a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions for causing a computer to perform the method of any one of the preceding aspects.
The embodiment of the disclosure discloses a search method, a search device, electronic equipment and a computer-readable storage medium. The searching method comprises the following steps: receiving a search statement; acquiring the relativity of the search sentence and at least one search word; searching according to the search statement to obtain a plurality of search results; and sorting the search results according to the relevance of the search statement and the at least one search word. According to the method, the technical problem that the search results do not accord with the search intention of the user is solved by acquiring the relevance between the search word and the search sentence and sequencing the search results according to the relevance.
The foregoing description is only an overview of the disclosed technology, and may be implemented in accordance with the disclosure of the present disclosure, so that the above-mentioned and other objects, features and advantages of the present disclosure can be more clearly understood, and the following detailed description of the preferred embodiments is given with reference to the accompanying drawings.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a schematic flow chart of a search method according to an embodiment of the disclosure;
FIG. 2 is a schematic diagram of one implementation of a search for obtaining relevance between the search term and at least one search term in a search method provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of another implementation of a step of obtaining relevance between a search term and at least one search term in a search method according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of one implementation of a step of searching according to the search term to obtain multiple search results in the search method according to the embodiment of the present disclosure
Fig. 5 is a schematic structural diagram of an embodiment of a search device provided in an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Fig. 1 is a flowchart of an embodiment of a search method according to an embodiment of the present disclosure, where the search method according to the embodiment may be performed by a search device, and the search device may be implemented as software, or as a combination of software and hardware, and the search device may be integrally provided in a device in a search system, such as a search server or a search terminal device. As shown in fig. 1, the method comprises the steps of:
step S101, receiving a search statement;
in this disclosure, the search term may be a word, phrase, sentence, or the like. The search term is a search term input by a user and received through a man-machine interaction interface, and the user inputs the search term through a text output tool such as a keyboard, a touch screen and the like or inputs the search term through voice through a voice interface such as a microphone and the like by way of example.
Step S102, obtaining the relativity of the search sentence and at least one search word;
in the present disclosure, the search term may be a search term extracted from the search sentence by word segmentation, or may be a search term generated by semantic conversion through a search sentence. The relevance represents a degree of relevance of the search term to the search term.
Optionally, as shown in fig. 2, the step S102 includes, in one embodiment:
step S201, word segmentation is carried out on the search sentence to obtain at least one search word;
step S202, obtaining a search record searched by using the at least one search word;
step S203, obtaining the probability of clicking the search result comprising the search statement by the user in the search record;
and step S204, generating the correlation degree according to the probability.
In this embodiment, the search term is obtained by word segmentation of a search term, i.e., the search term is part of the search term. Thus, since the word segmentation strategy and rule need to have generalization, the word segmentation result does not necessarily reflect the actual intention of the search sentence, such as the search sentence being "explosion hook", the word segmentation result being "explosion", "hook" and "explosion hook", which may contain a large number of search results related to "explosion", but this is not a meaning with "explosion" in "explosion hook", and thus the search results are inaccurate.
In order to prevent this, in step S202, a search record for searching using the at least one search word is acquired, and a search log is included in the search system, in which the search word of the user and the search result clicked by the user are stored. In step S203, a probability that the user clicks on the search result including the search term may be calculated through the search record. If the search word is "ABC", then the search word is divided into "AB", "C" and "ABC", then the probability of the user searching for the search result including "ABC" in the "AB" click title, the probability of the user searching for the search result including "ABC" in the "C" click title, and the probability of the user searching for the search result including "ABC" in the "ABC" click title may be counted through the search log. As shown in the above example, the probability that the user searches for "explosion" and clicks on the search result including "explosion hook" in the title is extremely low, for example, only 0.01%, the probability that the user searches for "hook" and clicks on the search result including "explosion hook" in the title is relatively high, for example, 50%, and the probability that the user searches for "explosion hook" and clicks on the search result including "explosion hook" in the title is extremely high, for example, 99%, then the term "explosion" is not a relevant search term for the search term "explosion hook", and therefore the relevance to "explosion hook" is extremely low.
The correlation is generated on the basis of step S203. Illustratively, the probability value is directly used as the correlation degree, or the probability value is converted into a standard correlation degree according to a preset rule, for example, the correlation degree of a probability that the correlation degree is 1,80% -90% of the probability is higher than 90%, the correlation degree is 0.9, and so on. The above manner of generating the correlation is merely an example, and the present disclosure is not limited to a specific manner of generating the correlation from the probability, and will not be described herein.
Optionally, as shown in fig. 3, in another embodiment, the step S102 includes:
step S301, obtaining a search record searched by using the search statement;
step S302, obtaining the probability of clicking the search result comprising the at least one search word by a user in the search record;
and step S303, generating the correlation degree according to the probability.
In this embodiment, in step S301, a search record searched using the search term is directly acquired. This is because some search terms may contain implicit semantics that cannot be split by direct word segmentation, so in this embodiment, the search terms are not segmented first, but rather their search logs are obtained directly. In step S302, the probability of a user clicking on a search result including a certain search term is counted in the search record. If the user searches for "ABDE", the probability of clicking on the search result including "ABC" in the title is high when the user searches for "ABDE" by counting the search records in the search log, so that although "ABC" is not a word segmentation result of "ab+de", the correlation degree between "ABC" and "ABDE" is high. If the user searches for the explosion + bait, the probability that the user clicks the article comprising the explosion hook in the title in the search record is high and reaches 99%, the explosion + bait is indicated to have an implicit semantic of the explosion hook, and the relativity of the search word of the explosion hook and the search sentence of the explosion + bait is high.
The correlation is generated on the basis of step S302. Illustratively, the probability value is directly used as the correlation degree, or the probability value is converted into a standard correlation degree according to a preset rule, for example, the correlation degree of a probability that the correlation degree is 1,80% -90% of the probability is higher than 90%, the correlation degree is 0.9, and so on. The above manner of generating the correlation is merely an example, and the present disclosure is not limited to a specific manner of generating the correlation from the probability, and will not be described herein.
Optionally, in another embodiment, the step S102 includes:
acquiring search words related to the search statement;
and searching a relativity relation table according to the search word to obtain the relativity of the search word and the search sentence.
Because the correlation degree is stable and does not need to be updated frequently, the calculation amount can be reduced by pre-calculating once and then directly searching when in use. In this embodiment, the correlation is pre-calculated and stored in a correlation table, and the correlation table is directly checked when in use. Wherein the correlation relationship table is generated by:
determining a number of search results clicked after searching through the search term;
determining a number of target search results in the title of the clicked search result with the search term;
calculating the relevance according to the number of the target search results and the number of the clicked search results;
and generating the relevance relation table by taking the search word, the search sentence and the relevance as table entries of the relevance relation table.
In the above steps, the search results clicked after searching by each search term can be obtained through the search log, for example, the user searches for "explosion", the clicked articles include articles including "Kunshan explosion", "Tonggong explosion", "Living explosion", "cosmic explosion", "explosion hook" in the title, etc., the total number of these articles is the number of the clicked search results, the current search statement is "explosion hook", the number of articles including "explosion hook" in the title is counted, then the relevance between "explosion" and "explosion hook" is obtained by dividing the number of articles including "explosion hook" in the title by the total number of the clicked articles, and the specific calculation method of the relevance can refer to the step S204 or the step S203, which will not be repeated here. After the relevance is obtained, the search word, the search sentence and the relevance are used as table items, and a relevance relation table is generated, namely, the search word corresponding to the relevance relation table and the relevance of each search word can be obtained through searching the search sentence.
Step S103, searching according to the search statement to obtain a plurality of search results;
optionally, as shown in fig. 4, the step S103 includes:
step S401, generating a plurality of search words according to the search statement;
step S402, searching is carried out according to each search word to obtain a plurality of search results.
Optionally, in one embodiment, the step S401 includes: and segmenting the search sentence to generate a plurality of search words.
Optionally, in another embodiment, the step S401 includes: the search term is input into a search term generation model to generate a plurality of search terms. The search word generation model is a pre-trained model, the training data set is a text pair formed by search words in the titles of search sentences of users and search results clicked by the users, and therefore the model can learn the relation between the search sentences and the search words. After training is completed, new search sentences are input, and corresponding search words can be generated. Illustratively, the search term generation model includes an encoder and a decoder, wherein a first vector representing the search term is generated by inputting the search term into the encoder, then decoding the first vector input to generate a search term corresponding to the search term, and constraints may be added at the decoder decoding time so that the decoder may generate a plurality of different search terms, wherein the search term generated by the search term generation model may be the same as or different from the result of the word segmentation, such as by inputting "explosion+decoy" into the model, which would output "explosion", "explosion hook", "decoy", and so on. For example, the search term generation model may use a model transformer, LSTM, etc., and will not be described herein.
Optionally, the step S402 includes:
searching according to each search word to obtain a plurality of search results of each search word;
the plurality of results for each search term are ranked.
Illustratively, in the above steps, the plurality of search results are ranked according to a default order based on each search term. If the search words are "explosion", "hook" and "explosion hook" according to the search frequency of the search words, the search results recalled by using "explosion" are displayed at the front if the search words are "explosion", "hook" and "explosion hook" according to statistics that the number of times the "explosion" is searched is the greatest. Thus, the default ranking may not actually conform to the user's search intent, and thus the search results are adjusted in the next step.
Step S104, sorting the search results according to the relevance of the search statement and the at least one search word.
Optionally, the step S104 includes:
determining a new ranking coefficient based on the ranking coefficient of the at least one search term and the relevance;
and sorting the search results according to the new sorting coefficient.
For example, taking the number of occurrences of the search term as the ranking coefficient, for example, the number of occurrences of the "explosion" is 100, the number of occurrences of the "hook" is 50, the number of occurrences of the "explosion hook" is 10, the ranking coefficient of the "explosion" is 100, the "hook" is 50, the "explosion hook" is 30, but the ranking does not conform to the search intention of the user, so that each ranking coefficient is multiplied by the relevance, taking the probability as an example of the relevance directly in the above example, the relevance of the "explosion" is 0.01%, the relevance of the "hook" is 50%, the new ranking coefficient of the "explosion" is calculated to be 100×0.01=0.01, the new ranking coefficient of the "explosion" is 50×50×25, the ranking coefficient of the "explosion hook" is 30×99×29.7, the search result of the "explosion hook" is ranked at the forefront, the search result of the "hook" is then the search result of the "explosion" and the search result of the "explosion" is ranked at the end or is not displayed.
Through the searching method, the final searching results can be ordered through the relevance of the searching words and the searching sentences, so that the searching results accord with the searching intention of the user.
In another embodiment, in the step S103, the search term used in searching may be limited directly by the relevance between the search term and the search sentence, such as the "explosion hook" described above, when the statistics result indicates that the relevance between the search term of "explosion" and the "explosion hook" is very low, the term of "explosion" may be removed directly from the search term of "explosion hook", and search resources may be saved when searching is not performed, and when the final search result is displayed, the display may be performed in order according to the relevance between the search terms used.
The embodiment of the disclosure discloses a search method, which comprises the following steps: receiving a search statement; acquiring the relativity of the search sentence and at least one search word; searching according to the search statement to obtain a plurality of search results; and sorting the search results according to the relevance of the search statement and the at least one search word. According to the method, the technical problem that the search results do not accord with the search intention of the user is solved by acquiring the relevance between the search word and the search sentence and sequencing the search results according to the relevance.
In the foregoing, although the steps in the foregoing method embodiments are described in the foregoing order, it should be clear to those skilled in the art that the steps in the embodiments of the disclosure are not necessarily performed in the foregoing order, but may be performed in reverse order, parallel, cross, etc., and other steps may be further added to those skilled in the art on the basis of the foregoing steps, and these obvious modifications or equivalent manners are also included in the protection scope of the disclosure and are not repeated herein.
Fig. 5 is a schematic structural diagram of an embodiment of a search device according to an embodiment of the present disclosure, as shown in fig. 5, the device 500 includes: a search term receiving module 501, a relevance obtaining module 502, a searching module 503 and a ranking module 504. Wherein,
a search term receiving module 501, configured to receive a search term;
a relevance obtaining module 502, configured to obtain relevance between the search term and at least one search term;
a search module 503, configured to search according to the search statement to obtain a plurality of search results;
a ranking module 504, configured to rank the search results according to the relevance of the search term and the at least one search term.
Further, the correlation obtaining module 502 is further configured to:
word segmentation is carried out on the search sentence to obtain at least one search word;
acquiring a search record searched by using the at least one search word;
acquiring the probability of clicking a search result comprising the search statement by a user in the search record;
and generating the correlation degree according to the probability.
Further, the correlation obtaining module 502 is further configured to:
acquiring a search record searched by using the search statement;
acquiring the probability of clicking a search result comprising the at least one search word by a user in the search record;
and generating the correlation degree according to the probability.
Further, the correlation obtaining module 502 is further configured to:
acquiring search words related to the search statement;
and searching a relativity relation table according to the search word to obtain the relativity of the search word and the search sentence.
Further, the correlation table is generated by the following steps:
determining a number of search results clicked after searching through the search term;
determining a number of target search results in the title of the clicked search result with the search term;
calculating the relevance according to the number of the target search results and the number of the clicked search results;
and generating the relevance relation table by taking the search word, the search sentence and the relevance as table entries of the relevance relation table.
Further, the searching module 503 is further configured to:
generating a plurality of search words according to the search statement;
and searching according to each search word to obtain a plurality of search results.
Further, the searching module 503 is further configured to:
the search term is input into a search term generation model to generate a plurality of search terms.
Further, the searching module 503 is further configured to:
searching according to each search word to obtain a plurality of search results of each search word;
the plurality of results for each search term are ranked.
Further, the sorting module 504 is further configured to:
determining a new ranking coefficient based on the ranking coefficient of the at least one search term and the relevance;
and sorting the search results according to the new sorting coefficient.
The apparatus of fig. 5 may perform the method of the embodiment of fig. 1-4, and reference is made to the relevant description of the embodiment of fig. 1-4 for parts of this embodiment not described in detail. The implementation process and the technical effect of this technical solution are described in the embodiments shown in fig. 1 to 4, and are not described herein.
Referring now to fig. 6, a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a search statement; acquiring the relativity of the search sentence and at least one search word; searching according to the search statement to obtain a plurality of search results; and sorting the search results according to the relevance of the search statement and the at least one search word.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a search method including:
receiving a search statement;
acquiring the relativity of the search sentence and at least one search word;
searching according to the search statement to obtain a plurality of search results;
and sorting the search results according to the relevance of the search statement and the at least one search word.
Further, the obtaining the relevance between the search sentence and at least one search word includes:
word segmentation is carried out on the search sentence to obtain at least one search word;
acquiring a search record searched by using the at least one search word;
acquiring the probability of clicking a search result comprising the search statement by a user in the search record;
and generating the correlation degree according to the probability.
Further, the obtaining the relevance between the search sentence and at least one search word includes:
acquiring a search record searched by using the search statement;
acquiring the probability of clicking a search result comprising the at least one search word by a user in the search record;
and generating the correlation degree according to the probability.
Further, the obtaining the relevance between the search sentence and at least one search word includes:
acquiring search words related to the search statement;
and searching a relativity relation table according to the search word to obtain the relativity of the search word and the search sentence.
Further, the correlation table is generated by the following steps:
determining a number of search results clicked after searching through the search term;
determining a number of target search results in the title of the clicked search result with the search term;
calculating the relevance according to the number of the target search results and the number of the clicked search results;
and generating the relevance relation table by taking the search word, the search sentence and the relevance as table entries of the relevance relation table.
Further, the searching according to the search statement to obtain a plurality of search results includes:
generating a plurality of search words according to the search statement;
and searching according to each search word to obtain a plurality of search results.
Further, the generating a plurality of search terms according to the search statement includes:
the search term is input into a search term generation model to generate a plurality of search terms.
Further, the searching according to each search term to obtain a plurality of search results includes:
searching according to each search word to obtain a plurality of search results of each search word;
the plurality of results for each search term are ranked.
Further, the ranking the search results according to the relevance of the search term to the at least one search term includes:
determining a new ranking coefficient based on the ranking coefficient of the at least one search term and the relevance;
and sorting the search results according to the new sorting coefficient. According to one or more embodiments of the present disclosure, there is provided a search apparatus including:
the search statement receiving module is used for receiving the search statement;
the relevancy acquisition module is used for acquiring relevancy between the search sentence and at least one search word;
the search module is used for searching according to the search statement to obtain a plurality of search results;
and the sorting module is used for sorting the search results according to the relevance of the search statement and the at least one search word.
Further, the correlation obtaining module is further configured to:
word segmentation is carried out on the search sentence to obtain at least one search word;
acquiring a search record searched by using the at least one search word;
acquiring the probability of clicking a search result comprising the search statement by a user in the search record;
and generating the correlation degree according to the probability.
Further, the correlation obtaining module is further configured to:
acquiring a search record searched by using the search statement;
acquiring the probability of clicking a search result comprising the at least one search word by a user in the search record;
and generating the correlation degree according to the probability.
Further, the correlation obtaining module is further configured to:
acquiring search words related to the search statement;
and searching a relativity relation table according to the search word to obtain the relativity of the search word and the search sentence.
Further, the correlation table is generated by the following steps:
determining a number of search results clicked after searching through the search term;
determining a number of target search results in the title of the clicked search result with the search term;
calculating the relevance according to the number of the target search results and the number of the clicked search results;
and generating the relevance relation table by taking the search word, the search sentence and the relevance as table entries of the relevance relation table.
Further, the search module is further configured to:
generating a plurality of search words according to the search statement;
and searching according to each search word to obtain a plurality of search results.
Further, the search module is further configured to:
the search term is input into a search term generation model to generate a plurality of search terms.
Further, the search module is further configured to:
searching according to each search word to obtain a plurality of search results of each search word;
the plurality of results for each search term are ranked.
Further, the sorting module is further configured to:
determining a new ranking coefficient based on the ranking coefficient of the at least one search term and the relevance;
and sorting the search results according to the new sorting coefficient.
According to one or more embodiments of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any one of the search methods of the first aspect.
According to one or more embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions for causing a computer to perform any one of the search methods of the foregoing first aspect.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).

Claims (11)

1. A search method, comprising:
receiving a search statement;
acquiring the relativity of the search sentence and at least one search word;
searching according to the search statement to obtain a plurality of search results;
ranking the search results according to the relevance of the search statement to the at least one search term; wherein the search results are ranked according to a new ranking factor; the new ranking factor is determined based on the ranking factor of the at least one search term and the relevance.
2. The search method of claim 1, wherein the obtaining the relevance of the search term to at least one search term comprises:
word segmentation is carried out on the search sentence to obtain at least one search word;
acquiring a search record searched by using the at least one search word;
acquiring the probability of clicking a search result comprising the search statement by a user in the search record;
and generating the correlation degree according to the probability.
3. The search method of claim 1, wherein the obtaining the relevance of the search term to at least one search term comprises:
acquiring a search record searched by using the search statement;
acquiring the probability of clicking a search result comprising the at least one search word by a user in the search record;
and generating the correlation degree according to the probability.
4. The search method of claim 1, wherein the obtaining the relevance of the search term to at least one search term comprises:
acquiring search words related to the search statement;
and searching a relativity relation table according to the search word to obtain the relativity of the search word and the search sentence.
5. The search method of claim 4, wherein the relevance relation table is generated by:
determining a number of search results clicked after searching through the search term;
determining a number of target search results in the title of the clicked search result with the search term;
calculating the relevance according to the number of the target search results and the number of the clicked search results;
and generating the relevance relation table by taking the search word, the search sentence and the relevance as table entries of the relevance relation table.
6. The searching method of claim 1, wherein the searching according to the search statement results in a plurality of search results, comprising:
generating a plurality of search words according to the search statement;
and searching according to each search word to obtain a plurality of search results.
7. The search method of claim 6, wherein the generating a plurality of search terms from the search term comprises:
the search term is input into a search term generation model to generate a plurality of search terms.
8. The searching method of claim 6, wherein the searching according to each search term results in a plurality of search results, comprising:
searching according to each search word to obtain a plurality of search results of each search word;
the plurality of results for each search term are ranked.
9. A search apparatus, comprising:
the search statement receiving module is used for receiving the search statement;
the relevancy acquisition module is used for acquiring relevancy between the search sentence and at least one search word;
the search module is used for searching according to the search statement to obtain a plurality of search results;
the sorting module is used for sorting the search results according to the relevance of the search statement and the at least one search word; wherein the search results are ranked according to a new ranking factor; the new ranking factor is determined based on the ranking factor of the at least one search term and the relevance.
10. An electronic device, comprising:
a memory for storing computer readable instructions; and
a processor for executing the computer readable instructions such that the processor when run implements the method according to any one of claims 1 to 8.
11. A non-transitory computer readable storage medium storing computer readable instructions which, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8.
CN202010528762.4A 2020-06-11 2020-06-11 Searching method and device and electronic equipment Active CN111737571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010528762.4A CN111737571B (en) 2020-06-11 2020-06-11 Searching method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010528762.4A CN111737571B (en) 2020-06-11 2020-06-11 Searching method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111737571A CN111737571A (en) 2020-10-02
CN111737571B true CN111737571B (en) 2024-01-30

Family

ID=72648830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010528762.4A Active CN111737571B (en) 2020-06-11 2020-06-11 Searching method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111737571B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113177061B (en) * 2021-05-25 2023-05-16 马上消费金融股份有限公司 Searching method and device and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663048A (en) * 2012-03-29 2012-09-12 奇智软件(北京)有限公司 Method and device for providing search result
CN105095187A (en) * 2015-08-07 2015-11-25 广州神马移动信息科技有限公司 Search intention identification method and device
CN107491547A (en) * 2017-08-28 2017-12-19 北京百度网讯科技有限公司 Searching method and device based on artificial intelligence
CN107832432A (en) * 2017-11-15 2018-03-23 北京百度网讯科技有限公司 A kind of search result ordering method, device, server and storage medium
CN108628867A (en) * 2017-03-16 2018-10-09 北京科瑞云安信息技术有限公司 Multi-key word cipher text retrieval method towards cloud storage and system
CN109815396A (en) * 2019-01-16 2019-05-28 北京搜狗科技发展有限公司 Search term Weight Determination and device
CN109933714A (en) * 2019-03-18 2019-06-25 北京搜狗科技发展有限公司 A kind of calculation method, searching method and the relevant apparatus of entry weight
CN110147494A (en) * 2019-04-24 2019-08-20 北京三快在线科技有限公司 Information search method, device, storage medium and electronic equipment
CN110147437A (en) * 2019-05-23 2019-08-20 北京金山数字娱乐科技有限公司 A kind of searching method and device of knowledge based map

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090240498A1 (en) * 2008-03-19 2009-09-24 Microsoft Corporation Similiarity measures for short segments of text

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663048A (en) * 2012-03-29 2012-09-12 奇智软件(北京)有限公司 Method and device for providing search result
CN105095187A (en) * 2015-08-07 2015-11-25 广州神马移动信息科技有限公司 Search intention identification method and device
CN108628867A (en) * 2017-03-16 2018-10-09 北京科瑞云安信息技术有限公司 Multi-key word cipher text retrieval method towards cloud storage and system
CN107491547A (en) * 2017-08-28 2017-12-19 北京百度网讯科技有限公司 Searching method and device based on artificial intelligence
CN107832432A (en) * 2017-11-15 2018-03-23 北京百度网讯科技有限公司 A kind of search result ordering method, device, server and storage medium
CN109815396A (en) * 2019-01-16 2019-05-28 北京搜狗科技发展有限公司 Search term Weight Determination and device
CN109933714A (en) * 2019-03-18 2019-06-25 北京搜狗科技发展有限公司 A kind of calculation method, searching method and the relevant apparatus of entry weight
CN110147494A (en) * 2019-04-24 2019-08-20 北京三快在线科技有限公司 Information search method, device, storage medium and electronic equipment
CN110147437A (en) * 2019-05-23 2019-08-20 北京金山数字娱乐科技有限公司 A kind of searching method and device of knowledge based map

Also Published As

Publication number Publication date
CN111737571A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN111368185B (en) Data display method and device, storage medium and electronic equipment
CN111414498A (en) Multimedia information recommendation method and device and electronic equipment
CN114861889B (en) Deep learning model training method, target object detection method and device
CN113407814B (en) Text searching method and device, readable medium and electronic equipment
CN115757400B (en) Data table processing method, device, electronic equipment and computer readable medium
CN112287206A (en) Information processing method and device and electronic equipment
CN111435406A (en) Method and device for correcting database statement spelling errors
CN112906394A (en) Address recognition method, device, equipment and storage medium
CN111078849A (en) Method and apparatus for outputting information
CN114995691B (en) Document processing method, device, equipment and medium
CN111737571B (en) Searching method and device and electronic equipment
CN117312525A (en) Knowledge graph-based question and answer method, device, equipment and storage medium
US20230085684A1 (en) Method of recommending data, electronic device, and medium
CN111737572B (en) Search statement generation method and device and electronic equipment
CN113468529B (en) Data searching method and device
CN111382365B (en) Method and device for outputting information
CN111309988B (en) Character string retrieval method and device based on coding and electronic equipment
CN111782895B (en) Retrieval processing method and device, readable medium and electronic equipment
CN112148751B (en) Method and device for querying data
CN110598133A (en) Method, apparatus, electronic device, and computer-readable storage medium for determining an order of search items
CN113609309B (en) Knowledge graph construction method and device, storage medium and electronic equipment
CN113032808B (en) Data processing method and device, readable medium and electronic equipment
US20240135196A1 (en) Method and apparatus for knowledge graph construction, storage medium, and electronic device
CN110619093B (en) Method, apparatus, electronic device, and computer-readable storage medium for determining an order of search items
CN110807089B (en) Question answering method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant