CN111859145A - Information searching method and device, electronic equipment and computer storage medium - Google Patents

Information searching method and device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN111859145A
CN111859145A CN202010749777.3A CN202010749777A CN111859145A CN 111859145 A CN111859145 A CN 111859145A CN 202010749777 A CN202010749777 A CN 202010749777A CN 111859145 A CN111859145 A CN 111859145A
Authority
CN
China
Prior art keywords
request
search
template
information
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010749777.3A
Other languages
Chinese (zh)
Other versions
CN111859145B (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.)
China Travelsky Holding Co
Original Assignee
China Travelsky Holding Co
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 China Travelsky Holding Co filed Critical China Travelsky Holding Co
Priority to CN202010749777.3A priority Critical patent/CN111859145B/en
Publication of CN111859145A publication Critical patent/CN111859145A/en
Application granted granted Critical
Publication of CN111859145B publication Critical patent/CN111859145B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/9538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

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

Abstract

The application provides a method and a device for searching information, electronic equipment and a computer storage medium, wherein the method comprises the following steps: receiving an original search request sent by a user; the original search request comprises a plurality of pieces of first search information and a user identification of a user; searching out a request template corresponding to the user identification from a plurality of pre-created request templates to be used as a target request template; each request template includes a plurality of second search information; the second search information is set in advance according to the requirements of the user; respectively aiming at each second search information in the target request template, judging whether the original search request lacks first search information with the same type as the second search information; integrating second search information of the same type of the first search information which is judged to be missing with the original search request to obtain a complete search request; and searching information by using the complete search request, and outputting a search result. Thereby ensuring information search through a complete search request satisfying the user's needs.

Description

Information searching method and device, electronic equipment and computer storage medium
Technical Field
The present application relates to the field of information search technologies, and in particular, to a method and an apparatus for searching information, an electronic device, and a computer storage medium.
Background
With the development of the internet and the prosperity of electronic commerce, the demand of ticket change is increased sharply, and the number of businesses and services is also increased, so that the request parameters of the ticket change search system are more and more complicated.
Besides necessary travel information, passenger identity and seller information, a complete passenger ticket change search request needs to be additionally provided with information such as various related preferences and the like, such as information of freight rate type, cabin and the like, freight rate airline department, flight market airline department, transit and the like. Because of the relatively large amount of information to be input, a client needs to fully understand the meaning of each field of a request when wanting to input a complete request meeting the requirements of the client, but considering that some users have limited understanding of the fields of the request, the client is allowed to choose not to fill in some fields which are not required to be filled in, namely, an incomplete search request can be sent to a search engine. When the search engine searches, the search engine searches the fields which are not filled in the request by using the maximum range, so that the search results fed back contain the search results which meet the requirements of the user as much as possible.
However, since the user cannot fill in complete information, the search engine searches with such incomplete requests, and often cannot accurately provide the user with search results meeting the user's needs, thereby affecting the user's use. Moreover, the missing information is searched in the maximum range, which not only results in the reduction of the searching efficiency, but also occupies more computer resources.
Disclosure of Invention
Based on the defects of the prior art, the application provides an information searching method and device, electronic equipment and a computer storage medium, so as to solve the problems that the search result meeting the requirements of a user cannot be accurately provided and the search efficiency is low when an incomplete search request is adopted for information search in the prior art.
In order to achieve the above object, the present application provides the following technical solutions:
a first aspect of the present application provides an information search method, including:
receiving an original search request sent by a user; wherein the original search request comprises a plurality of first search information and a user identification of the user;
searching out a request template corresponding to the user identification from a plurality of pre-created request templates to serve as a target request template; wherein each of the request templates includes a plurality of second search information; the second search information is set in advance according to the requirements of the user;
respectively aiming at each second search information in the target request template, judging whether the original search request lacks first search information of the same type as the second search information;
integrating second search information which is judged to be missing and has the same type with the original search request to obtain a complete search request;
and searching information by using the complete search request, and outputting a search result.
Optionally, in the above information searching method, the finding, from a plurality of pre-configured request templates, a request template corresponding to the user identifier as a target request template includes:
analyzing the original search request to obtain a plurality of pieces of first search information and user identification of the user;
finding out a key value pair containing the user identification from a mapping table constructed in advance; the key of the key-value pair is the user identifier, and the value of the key-value pair is a request template corresponding to the user identifier;
and taking the value of the searched key value pair as the target request template.
Optionally, in the above information searching method, the integrating the second search information, which is determined to be missing, of the same type as each of the first search information with the original search request to obtain a complete search request includes:
and jointly constructing to obtain the complete search request by utilizing the second search information which is judged to be the same type as the missing first search information and the first search information obtained by analyzing the original search request.
Optionally, in the above information searching method, the mapping table constructing method includes:
acquiring user identification of a user and each piece of second search information;
generating a template name corresponding to the user identifier, and storing the user identifier and the corresponding template name in a template configuration table;
constructing a request template by using the second search information, and naming the request template by using the template name corresponding to the user identifier;
and when the system is started, loading the template configuration table, and generating key value pairs by the user identification in the template configuration table and the request template named by the template name in the template configuration table to obtain the mapping table.
Optionally, in the above information searching method, before determining, for each second search information in the target request template, whether the original search request includes search information corresponding to the second search information, the method further includes:
if the request template corresponding to the user identifier is not found from the plurality of pre-created request templates, taking a pre-created default request template as the target request template; the default request template comprises a plurality of second search information, and the second search information is set according to the maximum search range of the type to which the second search information belongs.
A second aspect of the present application provides an apparatus for searching for information, including:
the receiving unit is used for receiving an original search request sent by a user; wherein the original search request comprises a plurality of first search information and a user identification of the user;
the searching unit is used for searching a request template corresponding to the user identification from a plurality of pre-established request templates to serve as a target request template; wherein each of the request templates includes a plurality of second search information; the second search information is set in advance according to the requirements of the user;
a judging unit, configured to judge, for each piece of second search information in the target request template, whether first search information of the same type as the second search information is missing in the original search request;
the integration unit is used for integrating second search information which is judged to be missing and has the same type with the original search request to obtain a complete search request;
and searching information by using the complete search request, and outputting a search result.
Optionally, in the above information searching apparatus, the searching unit includes:
the analysis unit is used for analyzing the original search request to obtain a plurality of pieces of first search information and the user identification of the user;
the searching subunit is used for searching the key value pair containing the user identifier from a mapping table constructed in advance; the key of the key-value pair is the user identifier, and the value of the key-value pair is a request template corresponding to the user identifier;
and the first determining unit is used for taking the value of the searched key value pair as the target request template.
Optionally, in the above information searching apparatus, the integration unit includes:
and the integration subunit is used for jointly constructing and obtaining the complete search request by utilizing the second search information which is judged to be the same type as the missing first search information and the first search information obtained by analyzing the original search request.
Optionally, in the above information searching apparatus, the apparatus further includes a constructing unit, where the constructing unit includes:
the acquisition unit is used for acquiring user identification of a user and each piece of second search information;
the first generating unit is used for generating a template name corresponding to the user identifier and storing the user identifier and the corresponding template name into a template configuration table;
the template construction unit is used for constructing a request template by utilizing the second search information and naming the request template by using the template name corresponding to the user identifier;
and the second generation unit is used for loading the template configuration table when the system is started, and generating key value pairs by the user identification in the template configuration table and the request template named by the template name in the template configuration table to obtain the mapping table.
Optionally, the information searching apparatus further includes:
a second determining unit, configured to, if the searching unit does not find a request template corresponding to the user identifier from the plurality of pre-created request templates, use a pre-created default request template as the target request template; the default request template comprises a plurality of second search information, and the second search information is set according to the maximum search range of the type to which the second search information belongs.
A third aspect of the present application provides an electronic device comprising:
one or more processors;
a memory having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method of searching for information as described in any above.
A fourth aspect of the present application provides a computer storage medium storing a program for implementing the method of searching for information as described in any one of the above when the program is executed.
According to the information searching method, the original searching request sent by the user is obtained, and the request template corresponding to the user identification in the original searching request is found out from a plurality of pre-created request templates, wherein each request template comprises a plurality of pieces of second searching information. Then, respectively aiming at each second search information in the target request template, judging whether the original search request lacks first search information with the same type as the second search information, thereby determining the missing information in the original request, and integrating the second search information with the same type as the first search information which is judged to be missing with the original search request to obtain a complete search request, so that the information search can be finally carried out by utilizing the complete search request. Because the complete search request is used in the search process and the second search information is set in advance according to the requirements of the user, the search result meeting the requirements of the user can be accurately provided for the user, the search efficiency can be improved, and a large amount of computer resources are prevented from being occupied.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic flowchart of an information search method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of another information searching method according to another embodiment of the present application;
fig. 3 is a schematic flowchart of a method for constructing a mapping table according to another embodiment of the present application;
fig. 4 is a schematic structural diagram of an information search system according to another embodiment of the present application;
fig. 5 is a schematic structural diagram of an information search apparatus according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of a lookup unit according to another embodiment of the present application;
FIG. 7 is a schematic structural diagram of a building unit according to another embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
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 are shown in the 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 rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
The term "include" and variations thereof as used herein are 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". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
As shown in fig. 1, an embodiment of the present application provides an information search method, which specifically includes the following steps:
s101, receiving an original search request sent by a user, wherein the original search request comprises a plurality of pieces of first search information and user identification of the user.
The first search information refers to information output by a user, and may specifically include filtering condition information, personal information, and the like. The user identifier of the user refers to a unique identifier of the user, and specifically may be an office number of the user in a passenger ticket change search application scenario, or may also be an account number or an identity card number of the user.
Specifically, after a user inputs a plurality of pieces of first search information on a search interface of a terminal, the user clicks to determine search, a request sent to a search engine is an original search request, and at the moment, the original search request sent by the user is intercepted, that is, the original search request sent by the user is received. Therefore, in the embodiment of the application, unlike the prior art that information search is directly performed by using an original search request, the original search request is intercepted and subsequent processing is performed.
S102, searching out a request template corresponding to the user identification from a plurality of pre-created request templates to serve as a target request template, wherein each request template comprises a plurality of pieces of second search information, and the second search information is set according to the requirements of the user in advance.
Specifically, in the embodiment of the application, second search information meeting the user requirements is determined in advance according to the user requirements, and a corresponding request template is created for the user by using the second search information. Alternatively, the user may be in direct contact with the user to communicate, thereby determining the user's needs, and creating the request template according to the user's needs. In the field of aviation, for example, it may be that the agents communicate with each other directly by the staff member, so that the agent's needs on each field are determined according to the contents of the communication, and the agent does not need to understand the meaning of each field of the search request. Or alternatively, historical search behavior data of the user, such as input search information and information of selected search results, is obtained to train the neural network model, and the search preference of the user can be obtained according to the search information input by the user previously and the information of the selected search results. Therefore, after the neural network model is trained, for each user, the historical search behavior data of the user is input into the neural network model, so that a plurality of second search information corresponding to the user is output, and then the template is created by using the second search information.
It should be noted that the request template may include second search information corresponding to each field in the complete search request, that is, the second search information includes the same type as each first search information in the complete search request. Of course, since there must be some information to be filled in, there must be information of the origin and the terminal in the original search request, for example, in the flight search. Therefore, the request template may only include the second search information corresponding to a partial field in the complete search request. Alternatively, since the search information, which is generally selectively input by the user, belongs to the information of the individual preference of the user, all or part of the search preference information of the user is generally included in the request template.
It should be further noted that, because some users do not create the request template corresponding to the user in time, or cannot create the template corresponding to the user, for example, a new user who performs information search for the first time, and then needs to obtain a complete search request by using the request template, in another embodiment of the present application, if a request template corresponding to the user identifier is not found from a plurality of pre-created request templates, a pre-created default request template is used as the target request template.
Wherein the default request template includes a plurality of second search information. Since the default request template is not created for the user, in order to enable the final search result to include a search result meeting the user requirement, in the embodiment of the present application, each second search information in the default request template is set according to the maximum search range of the type to which the second search information belongs. For example, the arrangement is for economy class, business class and first class with respect to the class and the like.
S103, respectively aiming at each second search information in the target request template, judging whether the first search information with the same type as the second search information is lacked in the original search request.
Specifically, each second search information in the target request template is respectively paired with the first search information in the original search request in sequence, if the first search information of the same type as the second search information exists in the original search request, it is determined that the first search information of the same type as the second search information is not missing in the original search request, the comparison with the current second search information is stopped, and then the comparison with the next second search information is performed, that is, for the first search information that is not missing, the second search information of the same type is still retained in the search request, and the second search information of the same type is not supplemented to the original search request. If the first search information of the same type as the second search information is missing in the original search request, step S104 is executed.
And S104, integrating the second search information with the same type of the first search information which is judged to be missing with the original search request to obtain a complete search request.
Specifically, each time it is determined whether one piece of first search information of the same type as the second search information is missing in the original search request, the second search information may be supplemented to the original search request. Of course, it may also be that all the second search information that needs to be supplemented is determined first, and all the second search information that needs to be supplemented is supplemented to the original search request again, so that integration of the same type of the second search information of the missing first search information and the original search request is achieved, and a complete search request is obtained.
And S105, searching information by using the complete search request, and outputting a search result.
Specifically, in the embodiment of the present application, after the complete search request is obtained, the complete search request is issued in place of the original search request, so as to perform information search by using information in the complete search request, and a searched search result is output and fed back to the user.
According to the information searching method provided by the embodiment of the application, the original searching request sent by the user is obtained, and the request template corresponding to the user identifier in the original searching request is found out from a plurality of pre-created request templates, wherein each request template comprises a plurality of pieces of second searching information. Then, respectively aiming at each second search information in the target request template, judging whether the original search request lacks first search information with the same type as the second search information, thereby determining the missing information in the original request, and integrating the second search information with the same type as the first search information which is judged to be missing with the original search request to obtain a complete search request, so that the information search can be finally carried out by utilizing the complete search request. Because the complete search request is used in the search process and the second search information is set in advance according to the requirements of the user, the search result meeting the requirements of the user can be accurately provided for the user, the search efficiency can be improved, and a large amount of computer resources are prevented from being occupied.
Another embodiment of the present application provides another information searching method, as shown in fig. 2, which specifically includes the following steps:
s201, receiving an original search request sent by a user, wherein the original search request comprises a plurality of pieces of first search information and user identification of the user.
It should be noted that, the specific implementation process of step S201 may refer to step S101 in the foregoing method embodiment accordingly, and details are not described here again.
S202, analyzing the original search request to obtain a plurality of pieces of first search information and user identification of the user.
Specifically, in the embodiment of the present application, an intercepted original search request is parsed, so that one original search request is parsed into a plurality of pieces of first search information and a user identifier of a user.
S203, finding out a key value pair containing the user identification from a pre-constructed mapping table, wherein the key of the key value pair is the user identification, and the value of the key value pair is a request template corresponding to the user identification.
In the embodiment of the application, the request template is stored in a key-value pair mode, so that the request template is managed conveniently and the corresponding request template is found quickly.
Optionally, an embodiment of the present application provides a method for constructing a mapping table, as shown in fig. 3, specifically including the following steps:
s301, acquiring the user identification of the user and each piece of second search information.
Specifically, the input user identifier or the user identifier configured for the user is obtained, and each piece of second search information corresponding to the input user is obtained.
S302, generating a template name corresponding to the user identifier, and storing the user identifier and the corresponding template name in a template configuration table.
It should be noted that the user identifier is unique, and the template name is also unique, so that the user identifier and the template name are in one-to-one correspondence. Therefore, the user identifier and the corresponding template name are stored in the template configuration table to maintain the corresponding relationship between the user identifier and the template name.
S303, constructing a request template by using the second search information, and naming the template name corresponding to the user identifier as the request template.
Since the corresponding relationship between the user identifier of the user and the template name is established for one user, after the request template is constructed by using the second search information of the user, the template name corresponding to the user identifier of the user is named as the request template, which is equivalent to establishing the corresponding relationship between the request template and the user identifier.
S304, when the system is started, loading the template configuration table, and generating key value pairs by the user identification in the template configuration table and the request template named by the template name in the template configuration table to obtain the mapping table.
Specifically, for each user identifier in the template configuration table, the template name of the user identifier can be determined according to the template configuration table, then the request template named by the template name is found, finally, a key value pair in the mapping table is constructed by using the user identifier and the request template, namely, an index is constructed, and finally, the key value pair jointly forms the mapping table. For example, the user identifier is PEK001, the template name of the corresponding request template is PEK001_ request.json, the key of the constructed index 1 is PEK001, and the value is the structure corresponding to PEK001_ request.json.
It should be noted that, in this embodiment of the present application, a default request template may also be constructed, and therefore, a corresponding key-value pair also needs to be constructed, since the key-value pair does not correspond to any user, a key of the key-value pair may be a specific identifier or a null character string, and a value of the key-value pair is the default request template, so as to obtain a corresponding index. For example, an index 2 is constructed, the key of the index 2 is an empty character string, and the value is a structure corresponding to default _ request.
And S204, taking the value of the searched key value pair as a target request template.
Optionally, the method may also include finding a key value pair corresponding to the user identifier, using a value of the key value pair as the target request template, if the key value pair corresponding to the user identifier is not found, returning a key value pair corresponding to the default request template, and using a value of the key value pair as the target request template.
S205, respectively aiming at each second search information in the target request template, judging whether the first search information with the same type as the second search information is missing in the original search request.
It should be noted that, in the specific implementation of step S205, reference may be made to step S103 in the foregoing method embodiment, which is not described herein again.
S206, by utilizing the second search information which is judged to be the same type as the missing first search information and each first search information obtained by analyzing the original search request, a complete search request is jointly constructed.
In the embodiment of the present application, the original search request is analyzed as the user identifier and the plurality of first search information, so that a new search request needs to be reconstructed by the second search information, which is determined to be missing and has the same type, and each first search information obtained by analyzing the original search request, so as to obtain a complete search request.
And S207, searching information by using the complete search request, and outputting a search result.
It should be noted that, in the specific implementation of step S207, reference may be made to step S105 in the foregoing method embodiment, and details are not described here again.
According to another information searching method provided by the embodiment of the application, the original searching request sent by the user is received and analyzed to obtain a plurality of pieces of first searching information and the user identification of the user, then the key value pair containing the user identification is found out from the pre-constructed mapping table, and the value of the key value pair is used as the request template, so that the value of the found key value pair is used as the target request template. And respectively aiming at each second search information in the target request template, judging whether the original search request lacks first search information with the same type as the second search information, and jointly constructing to obtain a complete search request by utilizing the second search information with the same type as the first search information which is judged to be missing and each first search information obtained by analyzing the original search request, thereby ensuring that the information search is carried out by adopting the complete search request. And because the second search information is set in advance according to the requirements of the user, the search result meeting the requirements of the user can be accurately provided for the user, the search efficiency can be improved, and a large amount of computer resources are prevented from being occupied.
The flowchart 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 names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Although the operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous.
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. Moreover, 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.
Computer program code for carrying out operations for the present disclosure may be written in any combination of 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
As shown in fig. 4, in order to implement the information searching method provided in the foregoing embodiment, another embodiment of the present application further provides an information searching system, which specifically includes: the system comprises a template management component, a template loading component and a search engine.
The template management component is mainly used for acquiring the user identification and the second search information, constructing the request template, structuring the data of the request template, namely generating a mapping table, and storing the mapping table in the memory for subsequent use.
The template loading component is mainly used for analyzing an original search request sent by a user so as to obtain a user identifier, searching and loading a request template corresponding to the user identifier, then determining a missing value in the original search request, integrating the missing value in the original search request into the request by using the corresponding value in the request template so as to obtain a complete search request, and inputting the complete search request.
The search engine is used for searching information according to the complete search request and outputting a search result to the user.
As shown in fig. 5, another embodiment of the present application provides an apparatus for searching information, including the following units:
a receiving unit 501, configured to receive an original search request sent by a user.
Wherein the original search request includes a plurality of first search information and a user identification of the user.
A searching unit 502, configured to search a request template corresponding to the user identifier from a plurality of request templates created in advance, as a target request template.
Wherein each request template includes a plurality of second search information; the second search information is set in advance according to the requirements of the user.
The determining unit 503 is configured to determine, for each piece of second search information in the target request template, whether the first search information of the same type as the second search information is missing in the original search request.
The integration unit 504 is configured to integrate the second search information, which is determined to be of the same type as the missing first search information, with the original search request to obtain a complete search request.
The search unit 505 performs information search using the complete search request and outputs a search result.
Optionally, as shown in fig. 6, in another embodiment of the present application, the search unit includes the following units:
the parsing unit 601 is configured to parse the original search request to obtain a plurality of first search information and a user identifier of the user.
A searching subunit 602, configured to search, from a mapping table constructed in advance, a key-value pair including a user identifier.
And the key of the key value pair is the user identifier, and the value of the key value pair is the request template corresponding to the user identifier.
A first determining unit 603, configured to use the found value of the key-value pair as a target request template.
Optionally, the integration unit in another embodiment of the present application specifically includes:
and the integration subunit is used for jointly constructing to obtain a complete search request by utilizing the second search information which is judged to be the same type as the lost first search information and the first search information obtained by analyzing the original search request.
Optionally, another embodiment of the present application further includes a building unit, as shown in fig. 7, the building unit specifically includes:
an obtaining unit 701, configured to obtain a user identifier of the user and each piece of second search information.
The first generating unit 702 is configured to generate a template name corresponding to the user identifier, and store the user identifier and the corresponding template name in the template configuration table.
The template building unit 703 is configured to build the request template by using the second search information, and name the request template by using the template name corresponding to the user identifier.
A second generating unit 704, configured to load the template configuration table when the system is started, and generate a key-value pair from the user identifier in the template configuration table and the request template named by the template name in the template configuration table, so as to obtain a mapping table.
Optionally, the information search apparatus provided in another embodiment of the present application may further include:
the second determining unit is used for taking the pre-established default request template as a target request template if the searching unit does not find the request template corresponding to the user identifier from the pre-established request templates; the default request template comprises a plurality of second search information, and the second search information is set according to the maximum search range of the type to which the second search information belongs.
It should be noted that, for the specific working process of the units related in the embodiment of the present disclosure, corresponding steps in the foregoing method embodiments may be referred to accordingly, and details are not described here again.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above 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: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
Another embodiment of the present application provides an electronic device, as shown in fig. 8, including:
one or more processors 801.
A memory 802 on which one or more programs are stored, which when executed by the one or more processors 801, cause the one or more processors to implement a method of searching for information as disclosed in any of the embodiments above.
Another embodiment of the present application provides a computer storage medium for storing a program, and when the program is executed, the computer storage medium is used for implementing the information searching method disclosed in any one of the above embodiments.
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. A 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.
It should be noted that the computer storage media described above in this disclosure can be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination 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 present 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer storage medium 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 storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
Example 1 provides a method of searching for information, according to one or more embodiments of the present disclosure, including:
receiving an original search request sent by a user; wherein the original search request comprises a plurality of first search information and a user identification of the user;
searching out a request template corresponding to the user identification from a plurality of pre-created request templates to serve as a target request template; wherein each of the request templates includes a plurality of second search information; the second search information is set in advance according to the requirements of the user;
respectively aiming at each second search information in the target request template, judging whether the original search request lacks first search information of the same type as the second search information;
integrating second search information which is judged to be missing and has the same type with the original search request to obtain a complete search request;
and searching information by using the complete search request, and outputting a search result.
Optionally, in the above information searching method, the finding, from a plurality of pre-configured request templates, a request template corresponding to the user identifier as a target request template includes:
analyzing the original search request to obtain a plurality of pieces of first search information and user identification of the user;
finding out a key value pair containing the user identification from a mapping table constructed in advance; the key of the key-value pair is the user identifier, and the value of the key-value pair is a request template corresponding to the user identifier;
and taking the value of the searched key value pair as the target request template.
Optionally, in the above information searching method, the integrating the second search information, which is determined to be missing, of the same type as each of the first search information with the original search request to obtain a complete search request includes:
and jointly constructing to obtain the complete search request by utilizing the second search information which is judged to be the same type as the missing first search information and the first search information obtained by analyzing the original search request.
Optionally, in the above information searching method, the mapping table constructing method includes:
acquiring user identification of a user and each piece of second search information;
generating a template name corresponding to the user identifier, and storing the user identifier and the corresponding template name in a template configuration table;
constructing a request template by using the second search information, and naming the request template by using the template name corresponding to the user identifier;
and when the system is started, loading the template configuration table, and generating key value pairs by the user identification in the template configuration table and the request template named by the template name in the template configuration table to obtain the mapping table.
Optionally, in the above information searching method, before determining, for each second search information in the target request template, whether the original search request includes search information corresponding to the second search information, the method further includes:
if the request template corresponding to the user identifier is not found from the plurality of pre-created request templates, taking a pre-created default request template as the target request template; the default request template comprises a plurality of second search information, and the second search information is set according to the maximum search range of the type to which the second search information belongs.
Example 2 provides an apparatus for searching information, according to one or more embodiments of the present disclosure, including:
the receiving unit is used for receiving an original search request sent by a user; wherein the original search request comprises a plurality of first search information and a user identification of the user;
the searching unit is used for searching a request template corresponding to the user identification from a plurality of pre-established request templates to serve as a target request template; wherein each of the request templates includes a plurality of second search information; the second search information is set in advance according to the requirements of the user;
a judging unit, configured to judge, for each piece of second search information in the target request template, whether first search information of the same type as the second search information is missing in the original search request;
the integration unit is used for integrating second search information which is judged to be missing and has the same type with the original search request to obtain a complete search request;
and searching information by using the complete search request, and outputting a search result.
Optionally, in the above information searching apparatus, the searching unit includes:
the analysis unit is used for analyzing the original search request to obtain a plurality of pieces of first search information and the user identification of the user;
the searching subunit is used for searching the key value pair containing the user identifier from a mapping table constructed in advance; the key of the key-value pair is the user identifier, and the value of the key-value pair is a request template corresponding to the user identifier;
and the first determining unit is used for taking the value of the searched key value pair as the target request template.
Optionally, in the above information searching apparatus, the integration unit includes:
and the integration subunit is used for jointly constructing and obtaining the complete search request by utilizing the second search information which is judged to be the same type as the missing first search information and the first search information obtained by analyzing the original search request.
Optionally, in the above information searching apparatus, the apparatus further includes a constructing unit, where the constructing unit includes:
the acquisition unit is used for acquiring user identification of a user and each piece of second search information;
the first generating unit is used for generating a template name corresponding to the user identifier and storing the user identifier and the corresponding template name into a template configuration table;
the template construction unit is used for constructing a request template by utilizing the second search information and naming the request template by using the template name corresponding to the user identifier;
and the second generation unit is used for loading the template configuration table when the system is started, and generating key value pairs by the user identification in the template configuration table and the request template named by the template name in the template configuration table to obtain the mapping table.
Optionally, the information searching apparatus further includes:
a second determining unit, configured to, if the searching unit does not find a request template corresponding to the user identifier from the plurality of pre-created request templates, use a pre-created default request template as the target request template; the default request template comprises a plurality of second search information, and the second search information is set according to the maximum search range of the type to which the second search information belongs.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
While several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A method for searching for information, comprising:
receiving an original search request sent by a user; wherein the original search request comprises a plurality of first search information and a user identification of the user;
searching out a request template corresponding to the user identification from a plurality of pre-created request templates to serve as a target request template; wherein each of the request templates includes a plurality of second search information; the second search information is set in advance according to the requirements of the user;
respectively aiming at each second search information in the target request template, judging whether the original search request lacks first search information of the same type as the second search information;
integrating second search information which is judged to be missing and has the same type with the original search request to obtain a complete search request;
and searching information by using the complete search request, and outputting a search result.
2. The method according to claim 1, wherein the searching for the request template corresponding to the user identifier from a plurality of pre-configured request templates as a target request template comprises:
analyzing the original search request to obtain a plurality of pieces of first search information and user identification of the user;
finding out a key value pair containing the user identification from a mapping table constructed in advance; the key of the key-value pair is the user identifier, and the value of the key-value pair is a request template corresponding to the user identifier;
and taking the value of the searched key value pair as the target request template.
3. The method of claim 2, wherein the integrating the second search information, which is determined to be missing, of the same type as each of the first search information with the original search request to obtain a complete search request comprises:
and jointly constructing to obtain the complete search request by utilizing the second search information which is judged to be the same type as the missing first search information and the first search information obtained by analyzing the original search request.
4. The method of claim 2, wherein the mapping table is constructed by:
acquiring user identification of a user and each piece of second search information;
generating a template name corresponding to the user identifier, and storing the user identifier and the corresponding template name in a template configuration table;
constructing a request template by using the second search information, and naming the request template by using the template name corresponding to the user identifier;
and when the system is started, loading the template configuration table, and generating key value pairs by the user identification in the template configuration table and the request template named by the template name in the template configuration table to obtain the mapping table.
5. The method of claim 1, wherein before determining whether the original search request includes the search information corresponding to the second search information for each second search information in the target request template, further comprising:
if the request template corresponding to the user identifier is not found from the plurality of pre-created request templates, taking a pre-created default request template as the target request template; the default request template comprises a plurality of second search information, and the second search information is set according to the maximum search range of the type to which the second search information belongs.
6. An apparatus for searching information, comprising:
the receiving unit is used for receiving an original search request sent by a user; wherein the original search request comprises a plurality of first search information and a user identification of the user;
the searching unit is used for searching a request template corresponding to the user identification from a plurality of pre-established request templates to serve as a target request template; wherein each of the request templates includes a plurality of second search information; the second search information is set in advance according to the requirements of the user;
a judging unit, configured to judge, for each piece of second search information in the target request template, whether first search information of the same type as the second search information is missing in the original search request;
the integration unit is used for integrating second search information which is judged to be missing and has the same type with the original search request to obtain a complete search request;
and searching information by using the complete search request, and outputting a search result.
7. The apparatus of claim 6, wherein the lookup unit comprises:
the analysis unit is used for analyzing the original search request to obtain a plurality of pieces of first search information and the user identification of the user;
the searching subunit is used for searching the key value pair containing the user identifier from a mapping table constructed in advance; the key of the key-value pair is the user identifier, and the value of the key-value pair is a request template corresponding to the user identifier;
and the first determining unit is used for taking the value of the searched key value pair as the target request template.
8. The apparatus of claim 7, further comprising a construction unit, the construction unit comprising:
the acquisition unit is used for acquiring user identification of a user and each piece of second search information;
the first generating unit is used for generating a template name corresponding to the user identifier and storing the user identifier and the corresponding template name into a template configuration table;
the template construction unit is used for constructing a request template by utilizing the second search information and naming the request template by using the template name corresponding to the user identifier;
and the second generation unit is used for loading the template configuration table when the system is started, and generating key value pairs by the user identification in the template configuration table and the request template named by the template name in the template configuration table to obtain the mapping table.
9. An electronic device, comprising:
one or more processors;
a memory having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method of searching for information as recited in any of claims 1 to 5.
10. A computer storage medium storing a program for implementing a method of searching for information according to any one of claims 1 to 5 when the program is executed.
CN202010749777.3A 2020-07-30 2020-07-30 Information searching method and device, electronic equipment and computer storage medium Active CN111859145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010749777.3A CN111859145B (en) 2020-07-30 2020-07-30 Information searching method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010749777.3A CN111859145B (en) 2020-07-30 2020-07-30 Information searching method and device, electronic equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN111859145A true CN111859145A (en) 2020-10-30
CN111859145B CN111859145B (en) 2024-02-09

Family

ID=72946764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010749777.3A Active CN111859145B (en) 2020-07-30 2020-07-30 Information searching method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN111859145B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080208804A1 (en) * 2007-02-28 2008-08-28 International Business Machines Corporation Use of Search Templates to Identify Slow Information Server Search Patterns
CN103235644A (en) * 2013-04-15 2013-08-07 北京百纳威尔科技有限公司 Information displaying method and device
CN106372194A (en) * 2016-08-31 2017-02-01 杭州追灿科技有限公司 Method and system for showing search results
CN109697249A (en) * 2018-12-07 2019-04-30 深圳市云歌人工智能技术有限公司 Search for method, system and the storage medium of target object and issue object
CN110489635A (en) * 2018-05-15 2019-11-22 阿里巴巴集团控股有限公司 Data object search control method, apparatus and system
CN111079397A (en) * 2019-12-25 2020-04-28 中国建设银行股份有限公司 Task file generation method and device based on image recognition

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080208804A1 (en) * 2007-02-28 2008-08-28 International Business Machines Corporation Use of Search Templates to Identify Slow Information Server Search Patterns
CN103235644A (en) * 2013-04-15 2013-08-07 北京百纳威尔科技有限公司 Information displaying method and device
CN106372194A (en) * 2016-08-31 2017-02-01 杭州追灿科技有限公司 Method and system for showing search results
CN110489635A (en) * 2018-05-15 2019-11-22 阿里巴巴集团控股有限公司 Data object search control method, apparatus and system
CN109697249A (en) * 2018-12-07 2019-04-30 深圳市云歌人工智能技术有限公司 Search for method, system and the storage medium of target object and issue object
CN111079397A (en) * 2019-12-25 2020-04-28 中国建设银行股份有限公司 Task file generation method and device based on image recognition

Also Published As

Publication number Publication date
CN111859145B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN112883412B (en) Device identifier dependent operation handling for packet based data communications
US20150347305A1 (en) Method and apparatus for outputting log information
CN108572970B (en) Structured data processing method and distributed processing system
CN113839977A (en) Message pushing method and device, computer equipment and storage medium
US9313284B2 (en) Smart posting with data analytics and semantic analysis to improve a message posted to a social media service
CN111694866A (en) Data searching and storing method, data searching system, data searching device, data searching equipment and data searching medium
CN114281803A (en) Data migration method, device, equipment, medium and program product
CN110852720A (en) Document processing method, device, equipment and storage medium
CN110597602A (en) Transaction processing method and device, computer equipment and storage medium
US20140207757A1 (en) Using Metaphors to Present Concepts Across Different Intellectual Domains
US20160308933A1 (en) Addressing application program interface format modifications to ensure client compatibility
CN110928594A (en) Service development method and platform
CN116467607B (en) Information matching method and storage medium
CN110609707B (en) Online data processing system generation method, device and equipment
CN116974906A (en) Code verification method, device, computer equipment and storage medium
CN115827058A (en) Data processing method, device, equipment and storage medium
CN111859145B (en) Information searching method and device, electronic equipment and computer storage medium
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN113393288A (en) Order processing information generation method, device, equipment and computer readable medium
CN111221858B (en) Data processing method, device and equipment
CN111597156A (en) Civil aviation data processing method and device, electronic equipment and storage medium
CN111983962B (en) System and method for generating mapping relation of service flow
US11589194B2 (en) Location-driven social network boosting
CN115987782B (en) Cloud hostname generation method, device, equipment, storage medium and program product
CN113360380B (en) Method and device for generating data case based on flow chart

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