Method for constructing database, method for searching information, related device and computer program product
By building a search database associated with the search model, using historical search paths and call description information, the problem that search models in the prior art is difficult to efficiently extract search results, and more efficient search performance and efficiency are achieved.
Patent Information
- Application Number
- CN202411143266.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-13
AI Technical Summary
In the construction of search models, prior art, it is difficult to efficiently extract and provide search results from the database, resulting in inefficient search performance and inefficiency.
By reading the historical search path from the preset database, readable call description information is generated, and based on this, a search database associated with the search model is constructed, the name tag and call description information of the historical search results are stored, and the search database is updated periodically. Use the search model to directly read the search path to improve search efficiency.
It improves the search performance and efficiency of the search model, easily extracts the required search results, and ensures the latest and quality of the data.
Smart Images

Figure CN119127837A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, specifically to the field of artificial intelligence technology such as data processing, information retrieval, and deep learning, and especially to methods, devices, electronic devices, computer-readable storage media, and computer program products for building databases and searching for information. Background Art
[0002] With the development of society and Internet technology, in order to facilitate users to obtain the information they need, technologies such as intelligent question answering and online search have also developed accordingly. For example, you can choose to build a search model and a search (neural) network based on these technologies. Users can provide the question information they want to query to these search models and search networks to obtain the answer information as the search result of the question information.
[0003] Usually, in the above process, the "answer information" as the search result is stored in the database in advance, so that the search model can extract the "information" (for example, complete, readable content) corresponding to the search intention from the database as the search result after determining the user's search intention (for example, determining the name, keywords and other target content of the information that the user wants to query). Therefore, how to enable the search model to provide search services and complete searches more efficiently and effectively is worthy of attention and urgent need. Summary of the invention
[0004] The embodiments of the present disclosure provide a method, device, electronic device, computer-readable storage medium, and computer program product for constructing a database and searching for information.
[0005] In a first aspect, an embodiment of the present disclosure proposes a method for constructing a database, comprising: generating call description information that can be read by a search model based on a historical search path of reading historical search results from a preset database, wherein the call description information is expressed based on a readable language set corresponding to the search model, and the call description information is used to describe the action process of reading historical search results from the preset database; based on the name tags of the historical search results and the corresponding call description information, constructing a search database associated with the search model, wherein the name tags of the historical search results in the search database and the call description information corresponding to the historical search results are stored in pairs.
[0006] In some embodiments, the search model is a large language model and the readable language set is a natural language set.
[0007] In some embodiments, it also includes: periodically reading historical search behavior of requesting to read historical search results from a preset database based on historical search logs; and determining a historical search path for reading historical search results from the preset database based on the historical search behavior.
[0008] In some embodiments, the method further includes associating, in a search database, reference questions corresponding to the historical search results with the historical search results.
[0009] In some embodiments, in a search database, question information corresponding to historical search results is associated with historical search results, including: generating a question vector corresponding to the reference question based on the reference question corresponding to the historical search results; and associating the question vector of the reference question corresponding to the historical search results with the historical search results.
[0010] In some embodiments, the method further includes: in response to receiving a modification request for the target call description information in the search database, modifying the target call description information based on the updated call description information indicated by the modification request.
[0011] In a second aspect, an embodiment of the present disclosure proposes a method for searching information, comprising: in response to a search database including a target name tag of a target search result that matches a target question, reading target call description information corresponding to the target name tag from the search database, wherein the search database is constructed based on the method for constructing a database described in the first aspect above; using a search model to read the target search result from a preset database based on the target call description information, and using the target search result as the search result corresponding to the target question
[0012] In a third aspect, an embodiment of the present disclosure proposes a device for building a database, comprising: a call description information generation unit, configured to generate call description information that can be read by a search model based on a historical search path of reading historical search results from a preset database, wherein the call description information is expressed based on a readable language set corresponding to the search model, and the call description information is used to describe the action process of reading historical search results from the preset database; a search database construction unit, configured to build a search database associated with the search model based on the name tags of the historical search results and the corresponding call description information, wherein the name tags of the historical search results in the search database and the call description information corresponding to the historical search results are stored in pairs.
[0013] In some embodiments, the search model is a large language model and the readable language set is a natural language set.
[0014] In some embodiments, it also includes: a historical search behavior reading unit, which is configured to periodically read the historical search behavior of historical search results from a preset database based on the historical search log; and a historical search path determination unit, which is configured to determine the historical search path for reading historical search results from the preset database based on the historical search behavior.
[0015] In some embodiments, the method further includes: a reference question associating unit configured to associate the reference question corresponding to the historical search result with the historical search result in the search database.
[0016] In some embodiments, in a search database, question information corresponding to historical search results is associated with historical search results, including: generating a question vector corresponding to the reference question based on the reference question corresponding to the historical search results; and associating the question vector of the reference question corresponding to the historical search results with the historical search results.
[0017] In some embodiments, it also includes: a call description information updating unit, which is configured to modify the target call description information based on the updated call description information indicated by the modification request in response to receiving a modification request for the target call description information in the search database.
[0018] In a fourth aspect, an embodiment of the present disclosure proposes a device for searching information, comprising: a call description information reading unit, configured to read target call description information corresponding to the target name tag from the search database in response to a search database including a target name tag of a target search result that matches a target question, wherein the search database is constructed based on the device for constructing a database described in the third aspect above; a search result determination unit, configured to use a search model to read the target search result from a preset database based on the target call description information, and use the target search result as the search result corresponding to the target question.
[0019] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that when the at least one processor executes, it is able to implement the method for constructing a database as described in any implementation manner in the first aspect, or implement the method for searching information as described in any implementation manner in the third aspect.
[0020] In a sixth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, which are used to enable a computer to implement a method for constructing a database as described in any implementation method in the first aspect, or to implement a method for searching information as described in any implementation method in the third aspect when executed.
[0021] In the seventh aspect, an embodiment of the present disclosure provides a computer program product comprising a computer program, which, when executed by a processor, can implement the method for constructing a database as described in any implementation manner in the first aspect, or implement the method for searching information as described in any implementation manner in the third aspect.
[0022] The method, apparatus, electronic device, computer-readable storage medium and computer program product for constructing a database provided by the embodiments of the present disclosure generate call description information that can be read by a search model based on a historical search path of historical search results read from a preset database, wherein the call description information is expressed based on a readable language set corresponding to the search model, and the call description information is used to describe the action process of reading historical search results from a preset database; based on the name tags of the historical search results and the corresponding call description information, a search database associated with the search model is constructed, wherein the name tags of the historical search results in the search database and the call description information corresponding to the historical search results are stored in pairs.
[0023] The methods, devices, electronic devices, computer-readable storage media and computer program products for searching information provided by the embodiments of the present disclosure read target call description information corresponding to the target name tag from the search database in response to a search database including a target name tag of a target search result that matches a target question, wherein the above-mentioned method for constructing a database of the search database is constructed; the target search result is read from a preset database based on the target call description information using a search model, and the target search result is used as the search result corresponding to the target question.
[0024] Therefore, the present invention can maintain a search path that can be read by the search model for the search results in the search database, so that the search model can subsequently directly use the search database to read the search path, and extract the required search results simply and efficiently, which can improve the search performance and search efficiency of the search model.
[0025] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0027] Figure 1 is an exemplary system architecture in which the present disclosure may be applied;
[0028] Figure 2 A flowchart of a process of building a database provided by an embodiment of the present disclosure;
[0029] Figure 3 A flowchart of a process of associating reference questions in a search database provided by an embodiment of the present disclosure;
[0030] Figure 4 A flowchart of a process of searching for information provided by an embodiment of the present disclosure;
[0031] Figure 5 A flowchart of a combined process of building a database and searching for information implemented in an application scenario provided by an embodiment of the present disclosure;
[0032] Figure 6 A structural block diagram of a device for building a database provided in an embodiment of the present disclosure;
[0033] Figure 7 A structural block diagram of a device for searching information provided by an embodiment of the present disclosure;
[0034] Figure 8 A schematic diagram of the structure of an electronic device suitable for executing a method for building a database and searching for information provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description. It should be noted that the embodiments in the present disclosure and the features in the embodiments may be combined with each other without conflict.
[0036] In addition, in the technical solutions involved in this disclosure, the acquisition, storage, use, processing, transportation, provision and disclosure of user personal information (such as historical search behaviors, historical search results and historical search paths involved in this disclosure, etc.) are in compliance with the relevant laws and regulations and do not violate public order and good morals.
[0037] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the method, apparatus, electronic device, and computer-readable storage medium for building a database and searching for information disclosed herein can be applied.
[0038] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0039] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Terminal devices 101, 102, 103 and server 105 may be installed with various applications for realizing information communication between the two.
[0040] Terminal devices 101, 102, 103 and server 105 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc.; when terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above, which can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here. When server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server; when the server is software, it can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here.
[0041] The server 105 can provide various services through various built-in applications. For example, the server 105 can build a search database for supporting the search model through the database construction class application running therein. For example, the server 105 can determine the historical search path for reading historical search results from the preset database based on the service and action process of reading historical search results from the preset database provided by the terminal devices 101, 102, and 103 used by the user based on the network 104; then, the server 105 can generate call description information that can be read by the search model based on the historical search path for reading historical search results from the preset database, wherein the call description information is expressed based on the readable language set corresponding to the search model, and the call description information is used to describe the action process of reading historical search results from the preset database. Then, the server 105 builds a search database associated with the search model based on the name tag of the historical search result and the corresponding call description information, wherein the name tag of the historical search result in the search database and the call description information corresponding to the historical search result are stored in pairs.
[0042] Accordingly, as discussed above, the server 105 can also provide online search services to users based on the constructed database through the online search application running therein. For example, the user can use the terminal devices 101, 102, 103 to provide (target) questions to the server 105 through the network 104, so as to use the server 105 to find the search results corresponding to the target question online. Accordingly, the server 105 can determine the search results for "answering" the target question based on the analysis of the target question; then, query whether the name tag corresponding to the search result is included in the search database constructed in the above manner; next, if the name tag is included in the above search database, then extract the target call description information corresponding to the name tag from the search database based on the name tag; finally, use the search model based on the target call description information to read the corresponding target search result from the preset database, and use the target search result as the search result corresponding to the target question.
[0043] In some scenarios, if the historical search path of the historical search results has been pre-stored in the server 105 locally in various ways, when the server 105 detects that the data has been stored locally (for example, when starting to process the previously saved database construction task), it may choose to directly obtain the data locally. In this case, when the exemplary system architecture 100 is only used to implement the process of building a database, it may not include the terminal devices 101, 102, 103 and the network 104.
[0044] Accordingly, in some scenarios, if the preset database is maintained by terminal devices 101, 102, 103, and terminal devices 101, 102, 103 have the capability to build a search database, when the exemplary system architecture 100 is used to implement the process of building a database and / or searching for information, it may no longer include server 105.
[0045] Since providing search services may often require strong storage resources and strong computing power, the methods for building a database and searching for information provided in the subsequent embodiments of the present disclosure are generally performed by the server 105 with strong computing power and more computing resources. Accordingly, the means for building a database and searching for information are generally also set in the server 105. However, it should also be pointed out that when the terminal devices 101, 102, and 103 also have computing power and computing resources that meet the requirements, the terminal devices 101, 102, and 103 can also similarly complete the various operations handed over to the server 105, and then output the same results as the server 105. Especially in the case where there are multiple terminal devices with different computing powers at the same time, but when, for example, the terminal device where the database construction application is located has strong computing power and more remaining computing resources, the terminal device can be allowed to perform the above operations, thereby appropriately reducing the computing pressure of the server 105. Accordingly, the means for building a database can also be set in the terminal devices 101, 102, and 103.
[0046] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0047] Next, we will first explain the process of building a database. For easier understanding, please refer to Figure 2 , Figure 2 A flowchart of a process of building a database provided by an embodiment of the present disclosure, wherein process 200 includes the following steps:
[0048] Step 201: Generate call description information that can be read by the search model based on the historical search path of the historical search results read from the preset database;
[0049] For ease of understanding, for example Figure 1 The server 105 is shown as an example of the execution subject of the process of building a database. It should be understood that the selection of the execution subject is only an example for easy understanding and is not intended to limit it. For example, in combination with specific scenarios and requirements, terminal devices 101, 102 and 103 can also be selected as the execution subject of the process of building a database.
[0050] In the embodiments of the present disclosure, the execution entity may search for "search behaviors" and "historical search behaviors" that read historical search results from a preset database by analyzing the historical interaction behaviors.
[0051] The preset database may be, for example, a database discussed above for providing search results, which can be used by users, or a database to which users have access rights. Typically, the execution entity may provide search services to users based on the content stored in these preset databases.
[0052] Accordingly, for these search behaviors, or historical search behaviors, the execution subject can parse the specific actions (processes) of these search behaviors and determine the historical search path for reading the historical search results from the preset database. For example, the execution subject can use the access path when reading the "historical search results" as the historical search path. For example, the historical search path can be expressed in the form of preset database>X>Y>Z (or, preset database / X / Y / Z form), indicating that the storage location of the historical search results is at the "Z" position in the preset database. Accordingly, the historical search results can be finally read by entering the "Y" position in the "X" position, and then entering the "Z" position in the "Y" position. Accordingly, in such an example, "preset database>X>Y>Z" can be understood as the historical search path for reading the historical search results from the preset database.
[0053] In some embodiments, the historical search path may be diverse according to different database structures. For example, the historical search path may include the query statement used (eg, Structured Query Language, SQL for short), the name of the called interface, etc.
[0054] Accordingly, the execution subject can generate call description information that can be read by the search model based on the historical search path. The search model can be a model that searches and provides query results for the input content based on the processing of the input content (for example, a Boolean model, a search algorithm model, a search language model, etc. for providing question and answer, file query and other services). The call description information is used to describe the action process of reading historical search results from a preset database. That is, the search model can understand the action process of reading historical search results from a preset database based on the call description information (for example, reading the above-mentioned access and reading process of obtaining historical search results based on "preset database>X>Y>Z").
[0055] For example, the search model can understand based on the call description information that when it needs to retrieve historical search results, it can access the preset database and reach the three positions X, Y, and Z successively to "find" the required historical search results.
[0056] For another example, in the case of query statements and interface names, the search model can "reproduce" query statements and call corresponding interfaces to reach the location of historical search results and obtain historical search results. Accordingly, the search model can continuously act and "reproduce" related search and interface call actions based on the "understanding" of the call description information.
[0057] It should be understood that the process in which the search model obtains "historical search results" based on calling the description information actually only reaches the "historical search results", and does not necessarily obtain the "historical search results" "intact". Because in some scenarios, the "historical search results" may have changed due to data updates and other reasons, so the content obtained by the subsequent search model may actually have been updated. Accordingly, in this way, in the process of providing data based on the "recurrence" (historical) search path method, it can also be guaranteed that the search model can continuously obtain the "latest" search results to ensure data quality.
[0058] In the above process, in order to enable the search model to smoothly read the call description information, the call description information will be expressed based on the readable language set corresponding to the search model. For example, a readable language set that can be understood by the search model can be maintained in advance for the search model, and the readable language set records the "language content" (for example, words, sentences, etc.) that can be read and understood by the search model.
[0059] Accordingly, the execution subject can generate call description information that can be read by the search model based on the actual meaning corresponding to the "action" and the historical search path. For example, for actions such as entering an action and calling an interface, the execution subject can generate a "word" that can be read and understood by the search model and can execute the "enter action" based on the actual meaning corresponding to the "action" and the readable language set. Then, the execution subject combines the "word" indicating the entry action with the corresponding "target address pointed to by the entry action" to obtain the call description information to indicate the "enter target address".
[0060] In some embodiments, the call description information may also be determined based on the annotations and comments of the code that implements "reading the historical search path of historical search results from a preset database." For example, in the case where the search model is able to "understand" and read the annotations and comments, the execution subject may directly use the annotations and comments as the call description information. For example, in the case where data is stored in the form of a "table" in the database, the execution subject may read the "annotations" corresponding to each parameter (for example, the parameters corresponding to the header) based on the information of the "table" to determine the above-mentioned "meaning."
[0061] Exemplarily, for input and output parameters, they can be adaptively "annotated" after being searched using the database field data definition language (Data Definition Language, DDL for short) (for example, after being found by connecting the underscores of the words, the "annotation" is completed based on the definition field specifications corresponding to the preset database), and the interface output parameters can be searched and annotated based on the "camel case" code specifications, for example, which will not be repeated here.
[0062] In the case where the search model cannot "understand" or read the annotations and comments, the execution subject converts them into "readable language" that the search model can understand based on the semantics of the annotations and comments and the readable language set, and uses the conversion result as the call description information. In some embodiments, it is also possible to choose to parse the operations and action instructions (or codes, languages) in the environment where the preset database is located, and then "translate" them into the readable language set accordingly. That is, establish a correspondence and mapping relationship between the action instructions in the two environments. Therefore, after determining the historical search path, the execution subject can directly determine the action instructions that can be read and "understood" by the search model based on the correspondence and mapping relationship, and then generate the call description information.
[0063] In some embodiments, in order to facilitate the search model to more accurately and effectively "understand" the action process, the call description information can also "explain", "annotate", or "describe" the parameters used. In this way, it is possible to avoid potential misunderstandings of the search model due to different marking forms and languages used for parameters with the "same meaning" in different databases and environments. For example, for "stage", when the search model can understand natural language and natural language is the available language of the search model, the call description information describes the "stage" as a "stage" in natural language. As a result, the subsequent search model can understand the meaning of "stage" as "stage" based on the call description information, and search for content associated with the "stage".
[0064] In some optional implementations of this embodiment, the search model may be a large language model, which is an artificial intelligence model designed to understand and generate human language, and LLM may perform processing operations accordingly based on the content it understands to obtain corresponding processing results. For example, LLM may be specifically a generative large language model trained based on a model framework of a large language model. LLM can learn a large amount of language knowledge and world knowledge by performing large-scale pre-training on massive unlabeled data, and has a general solution capability for multiple tasks through key technologies such as instruction fine-tuning and human alignment.
[0065] Accordingly, when the search model is LLM, the call description information can be expressed as a readable language set using a natural language set.
[0066] For example, after the execution subject determines the actions of each link based on the historical search path, it refers to the historical search path based on natural language to describe the action process of reading the historical search results from the preset database to obtain the call description information. For example, the call description information can be, for example, entering the I position in the preset database, using SQL1, and then calling the "A interface" with "xxx" as the input parameter.
[0067] Therefore, using LLM as a search model can not only improve the search capability, but also enable the generation of call description information based on natural language, so that the call description information can be expressed more simply and accurately, which can not only reduce the difficulty of generating description information, but also improve the quality of use of call description information.
[0068] It should be understood that in some embodiments, in the process of providing search results for a search question, it may be necessary to use "intermediate search results" to obtain the final historical search results. For example, for an "A" search result, although it is the final search result, it may be obtained by combining multiple intermediate results. For example, the execution subject may need to first obtain the "B" search result and the "C" search result, and then determine the "A" search result based on the combination of the "B" search result and the "C" search result (for example, the "A" search result is actually obtained by analyzing the combination of the "B" search result and the "C" search result). Alternatively, in some scenarios, it is necessary to first obtain the "B" search result, and then obtain the "C" search result based on the "B" search result, and finally obtain the "A" search result based on the "C" search result.
[0069] Accordingly, in such a scenario, the execution subject can determine the corresponding call description information for each search result separately, and then obtain the final call description information based on the combination of the various call description information. For example, in an example where the search result "B" needs to be obtained first, and then the search result "C" is obtained based on the search result "B", and finally the search result "A" is obtained based on the search result "C", the call description information for the search result "C" is actually a combination of the call description information for the search result "B" and the call description from the search result "B" to the search result "C".
[0070] Step 202: Based on the name tags of the historical search results and the corresponding call description information, a search database associated with the search model is constructed.
[0071] In an embodiment of the present disclosure, the execution entity may determine a name tag based on the name of the historical search result determined in step 201 above (or, information that can be used to identify the historical search result, for example, a result number that can be understood based on, for example, a mapping table to point to the historical search result), and then construct a search database associated with the search model in the form of a combination of the name tag and the corresponding call description information. The name tag of the historical search result and the call description information corresponding to the historical search result in the search database are stored in pairs.
[0072] For example, for the "A" search result, the search database may be stored in the form of an information pair of the name tag "A" - the call description information corresponding to "A" by way of example. Correspondingly, the search database may provide the call description information for obtaining the (historical) search result corresponding to the name tag based on the name tag. For example, when the subsequent search model expects to search for "A", the call description information corresponding to the name tag "A" can be obtained from the search database. Then, the search model reads the "A search result" by understanding and reading the action process indicated by the call description information to obtain the "A search result" and "replicating" this action process.
[0073] In some embodiments, the type of the search database and the preset database may be the same or different. For example, the preset database may be a relational database, while the search database may be a NoSQL database.
[0074] The method for constructing a database provided by the embodiments of the present disclosure can maintain a search path in the search database that can be read by the search model, enabling the search model to directly utilize the search database to read the search path in the future, simply and efficiently extract the required search results, and improving the search performance and search efficiency of the search model.
[0075] In some embodiments, to ensure the use value of the search database, the execution entity may also periodically obtain historical search logs and update the search database based on the historical search behaviors existing in the historical search logs (for example, supplement new historical search results and call description information corresponding to new historical search paths). For example, the execution entity may set interceptors for Hypertext Transfer Protocol (HTTP), JavaServer Faces (JSF), and Message Queue (MQ). Then, by setting interceptors for the universally unique identifier (UUID) of the search application and function, and using the interceptors to record the corresponding historical search behaviors.
[0076] Then, the executing entity can determine the historical search path for reading historical search results from a preset database based on the historical search behavior (i.e., analyze the action process of finding and providing "search results" for the historical search behavior, and finally determining and obtaining the "search results" to determine the "search path". For example, the final search path can be based on cleaning the data and selecting the search path that can reach the "search results" in the shortest and most efficient way as the final result).
[0077] Accordingly, the execution entity may periodically update the content in the search database using the determined historical search behavior to ensure the quality of the search database.
[0078] In some scenarios, if the call description information obtained later by the executing entity conflicts with the call description information obtained earlier, the executing entity can choose to report the conflict to the maintenance personnel based on a pre-set maintenance mechanism, or choose to "select the call description information obtained later" based on a pre-configured mechanism to maintain the search database, thereby ensuring the availability of the call description information.
[0079] In some embodiments, the execution entity may also allow, for example, a maintenance person to query the content in the search database, and allow the maintenance person to update the search database based on demand, so as to meet different needs while ensuring the quality of use of the search database. For example, the maintenance person may request to modify the target call description information in the search database (for example, provide updated call description information for the target call description information, or indicate to modify the target call description information based on the updated call description information).
[0080] Accordingly, the execution entity can modify the target call description information based on the updated call description information indicated by the modification request in response to receiving a modification request for the target call description information in the search database, so as to adjust and update the search database according to the instructions of the maintenance personnel to ensure the quality of use of the search database.
[0081] In some embodiments, in order to improve the use value of the search database and improve the search efficiency, the execution entity can also choose to store the reference questions for the (historical) search results in the search database. That is, the execution entity can also choose to associate the reference questions corresponding to the historical search results with the historical search results in the search database. As a result, the search model can subsequently directly find the required call description information based on the "question" without having to first determine the desired "search result". As a result, the search model can "match name tags" in the search database and use the search database more efficiently.
[0082] For example, the execution entity may determine reference questions based on the search information used by the user for historical search results, and then the execution entity chooses to add these reference questions to the search database in association with the search results, so that the user can find the corresponding search results based on the matching search method of the reference questions.
[0083] Alternatively or additionally, in the process of determining reference questions based on search information used by users for historical search results, the executing entity may also increment the reference questions that can be used by, for example, data augmentation methods (e.g., based on a generative adversarial network), thereby enhancing the matching capability for "questions".
[0084] In some embodiments, the execution entity may also choose to represent the "reference question" in a "vector" manner to achieve association, so as to further enhance the matching capability for the "question".
[0085] For this, please refer to Figure 3 . Figure 3 A flowchart of a process of associating reference questions in a search database provided by an embodiment of the present disclosure, wherein process 300 includes the following steps:
[0086] Step 301: Based on the reference question corresponding to the historical search results, generate a question vector corresponding to the reference question;
[0087] Specifically, as discussed above, the execution entity can generate a question vector (for example, the vector can be a "semantic vector") for representing these reference questions based on an analysis of the obtained reference questions (for example, those used by users in historical search behaviors and obtained incrementally by the execution entity).
[0088] Step 302: Associating the question vector of the reference question corresponding to the historical search results with the historical search results.
[0089] Specifically, based on the above step 301, the execution entity can associate the question vector with the historical search results (or, with the name tag of the corresponding historical search results) in the search database. Accordingly, after determining the question entered by the user, you can choose to generate a corresponding search vector based on the question. Then, use the search vector to find a "target question vector" with a similarity that meets the requirements in the search database. Accordingly, if such a target question vector exists, the "(historical) search result" pointed to by the name tag corresponding to the target question vector can be determined as the "search result" corresponding to the question.
[0090] It should be understood that, in actual use, the process of "matching vectors" can be configured to be completed by the search model (for example, when the search model has sufficient capabilities, the search model can be selected to fully provide vector matching and search result services), or other models independent of the search model (for example, vector matching models) can be selected to complete the process of "matching vectors" to reduce the computational pressure of the search model and reduce the computing power configuration requirements for the search model.
[0091] Next, the process of searching for information using the database constructed using the method for constructing a database discussed above will be further described. Figure 4 . Figure 4 A flowchart of a process of searching for information provided by an embodiment of the present disclosure, wherein process 400 includes the following steps:
[0092] Step 401: In response to the search database including a target name tag of a target search result matching a target question, read target call description information corresponding to the target name tag from the search database.
[0093] In an embodiment of the present disclosure, the execution subject may, upon receiving, for example, a question provided by a user (described as a target question for ease of understanding), perform a query in the database constructed by the method for constructing a database discussed above to determine whether the search database includes a target name tag of a target search result that matches the target question. Accordingly, if the search database includes a target name tag of a target search result that matches the target question, the execution subject may respond thereto by reading the target call description information corresponding to the target name tag from the search database.
[0094] For example, the execution entity may choose to determine the user's search intent based on the question, and then determine whether the search database includes a target name tag of the target search result that matches the target question based on the "target search result" pointed to by the search intent.
[0095] Alternatively or additionally, in the case where, for example, a reference question is associated with the search database, the execution subject may also determine whether there is a target reference question in the search database that includes the user's question and satisfies a similarity threshold (for example, greater than or equal to the similarity threshold) in terms of text similarity based on a "text similarity matching" method. If so, the execution subject may determine that the search database includes a target name tag of a target search result that matches the target question (i.e., a tag corresponding to the target reference question).
[0096] Accordingly, as discussed above, if the reference question is associated in the form of a "question vector", the execution subject can similarly search for the existence of a target name tag based on vector matching, which will not be repeated here.
[0097] As discussed above, in some embodiments, this step may also be implemented by the execution entity using a search model (e.g., LLM) (e.g., searching for the target name tag and / or reading the target call description information may be actually performed by the search model), and the description will not be repeated here.
[0098] Step 402: Using the search model based on the target call description information, read the target search result from the preset database, and use the target search result as the search result corresponding to the target question.
[0099] In an embodiment of the present disclosure, after reading the target call description information corresponding to the target name tag from the search database based on the above step 401, a search model (for example, LLM) is used to reproduce the "action process" based on the "instructions" of the target call description information, and the target search results are read from the preset database, and the target search results are used as the search results corresponding to the target question to complete the search for the "target question".
[0100] It should be understood that the search model can be pre-deployed in the execution entity so that the execution entity can directly provide search services by calling the search model, or it can be independently deployed in the execution entity and used to provide search information services, for example, by the execution entity authorizing access to it.
[0101] In the method for searching information provided by the embodiments of the present disclosure, the search model can directly use the search database to read the search path, thereby extracting the required search results simply and efficiently.
[0102] As an alternative or in addition, after obtaining the target search results, the execution subject may also choose to adjust and optimize the expression form of the target search results to obtain content that is easier for users to understand, and then provide the adjusted and optimized content to users for reading and use (for example, instructing LLM to rewrite the target search results based on the user's questions to enhance the readability of the target search results). In this way, it is easier for users to understand and read the search results, and the user experience is improved.
[0103] For a deeper understanding, you can also refer to Figure 5 . Figure 5 The complete process 500 provided by the present disclosure in combination with a specific application scenario and implemented in an application scenario includes a process of constructing a database and a process of searching for information using a database constructed based on the process of constructing the database.
[0104] For ease of understanding, we will also refer to Figure 1 The system architecture 100 is shown for discussion. In the process 500, the server 105 can be used as the execution subject of the process of building a database and the process of searching for information.
[0105] Referring to process 500 , server 105 may control terminal device 103 to (periodically) execute S501 to provide historical search log 510 .
[0106] Accordingly, the server 105 may execute S501 to analyze the historical search log 510 , and find and read the historical search behavior 513 pointing to the search result 511 .
[0107] Next, after reading the historical search behavior 513 , the server 105 may execute S503 to determine the historical search path 515 based on the search behavior 513 .
[0108] Exemplarily, the historical search path 515 may indicate first entering the search result 521 , then jumping to obtain the search result 522 based on the content of the search result 521 , and finally jumping to obtain the search result 511 based on the search result 522 .
[0109] Accordingly, the server 105 may continue to execute S504 to generate call description information 517 based on the historical search path 515. Exemplarily, in the scenario shown in process 500, LLM (e.g., LLM 540) may be used as a search model. Accordingly, the actual content of the call description information 517 may be a natural language form to describe the action process of the historical search path 515.
[0110] After obtaining the call description information 517, the server 105 may execute S505 to construct a search database 530. Exemplarily, in the search database 530, the name tag and the corresponding call description information may be stored in pairs in the form of the name tag 531-call description information 517 of the search result 511. (For ease of understanding, in the search database 530, only the name tag-call description information storage result for the search result 511 is shown. In practice, the search database 530 may store the name tag-call description information of multiple search results based on actual conditions).
[0111] After storing the name tag-call description information of the search result 511, the server 105 may also choose to execute S506 to add a question vector 532 for the search result 511 in the search database 530. For example, the question vector 532 may be obtained by vectorizing (one or more) reference questions corresponding to the search result 511 as discussed above.
[0112] Accordingly, for ease of understanding, the search database 530 with the question vector 532 added thereto may be exemplarily updated to the search database 530'. In the search database 530', for the search result 511, the "combined information" of the name tag 531 of the search result 511, the call description information 517, and the question vector 532 are maintained in combination.
[0113] Thus, the server 105 completes the process of building (searching) the database.
[0114] Next, as described above, the search database 530 ′ can be used by the LLM 540 , and thus, the process of implementing the search data based on the search database 530 ′ will be further described.
[0115] For example, when the terminal device 101 communicates with the server 105 to perform S507 to provide the target question 550 to the server 105, the server 105 may process the target question 550 using the LLM 540. For example, the LLM 540 may be used to determine the similarity between the target question 550 and the question vectors in the search database 530'.
[0116] Exemplarily, the server 105 may determine a target question vector (eg, a question vector with a similarity greater than or equal to a similarity threshold and with the highest similarity) based on the similarity provided by the LLM 540 . Exemplarily, the target question vector is the question vector 532 .
[0117] Then, the server 105 may obtain the call description information corresponding to the problem vector 532 , that is, the call description information 517 , based on the problem vector 532 .
[0118] For ease of understanding and to simplify configuration, in some embodiments, the search model may be directly selected to obtain the call description information, read the call description information, and read the search results according to the call description information. For example, LLM 540 may be deployed in server 105, and LLM 540 may be directly understood as using the question vector 532 to obtain the call description information 517 corresponding to the question vector 532.
[0119] It should be understood that even if LLM 540 is not deployed in server 105, server 105 can also similarly grant permissions to LLM 540 so that LLM 540 can similarly perform the above operation process, which will not be repeated here.
[0120] Next, after obtaining the call description information 517, the server 105 may execute S508 (using LLM 540) to read the search result 511 based on the call description information 517 (i.e., the action process of "reproducing" the search result 521, then obtaining the search result 522, and then obtaining the search result 511 again after obtaining the search result 522).
[0121] Finally, after obtaining the search result 511 , the server 105 may execute S509 to return the search result 511 as the search result of the target question 550 to the terminal device 101 .
[0122] Further references Figure 6 As an implementation of the method for constructing a database shown in the above figures, the present disclosure provides an embodiment of a device for constructing a database. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0123] like Figure 6 As shown, the device 600 for constructing a database in this embodiment may include: a call description information generating unit 601 and a search database constructing unit 602. The call description information generating unit 601 is configured to generate call description information that can be read by a search model based on a historical search path of reading historical search results from a preset database, wherein the call description information is expressed based on a readable language set corresponding to the search model, and the call description information is used to describe the action process of reading historical search results from the preset database; the search database constructing unit 602 is configured to construct a search database associated with the search model based on the name tags of the historical search results and the corresponding call description information, wherein the name tags of the historical search results in the search database and the call description information corresponding to the historical search results are stored in pairs.
[0124] In the present embodiment, in the device 600 for constructing a database, the specific processing of calling the description information generating unit 601 and the search database constructing unit 602 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of steps 201 - 202 in the corresponding embodiment are not repeated here.
[0125] In some embodiments, the search model is a large language model and the readable language set is a natural language set.
[0126] In some embodiments, the device 600 also includes: a historical search behavior reading unit, configured to periodically read the historical search behavior of reading historical search results from a preset database based on the historical search log; and a historical search path determination unit, configured to determine the historical search path for reading historical search results from a preset database based on the historical search behavior.
[0127] In some embodiments, the apparatus 600 further includes: a reference question associating unit configured to associate the reference question corresponding to the historical search result with the historical search result in the search database.
[0128] In some embodiments, in a search database, question information corresponding to historical search results is associated with historical search results, including: generating a question vector corresponding to the reference question based on the reference question corresponding to the historical search results; and associating the question vector of the reference question corresponding to the historical search results with the historical search results.
[0129] In some embodiments, the apparatus 600 further includes: a call description information updating unit configured to, in response to receiving a modification request for the target call description information in the search database, modify the target call description information based on the updated call description information indicated by the modification request.
[0130] This embodiment exists as an apparatus embodiment corresponding to the above-mentioned method embodiment. The apparatus for constructing a database provided by this embodiment can maintain a search path that can be read by a search model for search results in a search database, so that the search model can subsequently directly use the search database to read the search path, thereby extracting the required search results simply and efficiently, and improving the search performance and search efficiency of the search model.
[0131] Further references Figure 7 As an implementation of the information search method shown in the above figures, the present disclosure provides an embodiment of a device for searching information. Figure 4 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0132] like Figure 7 As shown, the apparatus 700 for searching information in this embodiment may include: a call description information reading unit 701 and a search result determining unit 702. The call description information reading unit 701 is configured to read the target call description information corresponding to the target name tag from the search database in response to the search database including the target name tag of the target search result matching the target question, wherein the search database is based on Figure 6The device 600 for constructing a database is constructed; the search result determination unit 702 is configured to use the search model based on the target call description information, read the target search result from the preset database, and use the target search result as the search result corresponding to the target question
[0133] In the present embodiment, in the device for searching information 700, the specific processing of calling the description information reading unit 701 and the search result determining unit 702 and the technical effects thereof can be referred to in Figure 4 The relevant descriptions of steps 401 - 402 in the corresponding embodiment are not repeated here.
[0134] This embodiment exists as a device embodiment corresponding to the above method embodiment. In the device for searching information provided by this embodiment, the search model can directly use the search database to read the search path, so as to extract the required search results simply and efficiently.
[0135] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0136] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0137] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0138] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0139] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as building a database and searching for information. For example, in some embodiments, the method of building a database and searching for information may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the method of building a database and searching for information described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the method of building a database and searching for information in any other appropriate manner (e.g., by means of firmware).
[0140] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0141] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0142] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A 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, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0143] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0144] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by 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), and the Internet.
[0145] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services. The server can also be divided into a server of a distributed system, or a server combined with a blockchain.
[0146] According to the technical solution of the embodiment of the present disclosure, a search path that can be read by a search model can be maintained for search results in a search database, so that the search model can subsequently directly use the search database to read the search path, thereby extracting the required search results simply and efficiently, thereby improving the search performance and search efficiency of the search model.
[0147] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions provided by this disclosure can be achieved, and this document does not limit this.
[0148] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for constructing a database, comprising: Based on the historical search path of reading the historical search results from the preset database, generating call description information that can be read by the search model, wherein the call description information is expressed based on the readable language set corresponding to the search model, and the call description information is used to describe the action process of reading the historical search results from the preset database; Based on the name tags of the historical search results and the corresponding call description information, a search database associated with the search model is constructed, wherein the name tags of the historical search results and the call description information corresponding to the historical search results are stored in pairs in the search database.
2. The method according to claim 1, wherein: The search model is a large language model, and the readable language set is a natural language set.
3. The method according to claim 1, further comprising: Periodically, based on the historical search log, read the historical search behavior of the historical search results from the preset database by requesting the historical search results; Based on the historical search behavior, a historical search path for reading the historical search results from the preset database is determined.
4. The method according to claim 1, further comprising: In the search database, a reference question corresponding to the historical search result is associated with the historical search result.
5. The method according to claim 4, wherein: The step of associating the question information corresponding to the historical search results with the historical search results in the search database includes: Based on the reference question corresponding to the historical search results, generating a question vector corresponding to the reference question; A question vector of a reference question corresponding to the historical search result is associated with the historical search result.
6. The method according to claim 1, further comprising: In response to receiving a modification request for the target call description information in the search database, the target call description information is modified based on the updated call description information indicated by the modification request.
7. A method for searching information, comprising: In response to a search database including a target name tag of a target search result matching the target question, reading target call description information corresponding to the target name tag from the search database, wherein the search database is constructed based on the method for constructing a database according to any one of claims 1 to 6; The target search result is read from a preset database using a search model based on the target call description information, and the target search result is used as the search result corresponding to the target question.
8. A device for building a database, comprising: A call description information generating unit is configured to generate call description information that can be read by a search model based on a historical search path of reading historical search results from a preset database, wherein the call description information is expressed based on a readable language set corresponding to the search model, and the call description information is used to describe an action process of reading the historical search results from the preset database; The search database construction unit is configured to construct a search database associated with the search model based on the name tags of the historical search results and the corresponding call description information, wherein the name tags of the historical search results and the call description information corresponding to the historical search results in the search database are stored in pairs.
9. A device for searching information, comprising: a call description information reading unit, configured to read the target call description information corresponding to the target name tag from the search database in response to the search database including the target name tag of the target search result matching the target question, wherein the search database is constructed based on the device for constructing a database according to claim 8; The search result determination unit is configured to use a search model to read the target search result from a preset database based on the target call description information, and use the target search result as the search result corresponding to the target question.
10. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for constructing a database as described in any one of claims 1 to 6, or the method for searching information as described in claim 7.
11. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method for constructing a database according to any one of claims 1 to 6, or the method for searching information according to claim 7.
12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for constructing a database according to any one of claims 1 to 6, or the method for searching information according to claim 7.
Citation Information
Patent Citations
Information search method, apparatus and apparatus / terminal / server
CN109101658A
Search result recall method and device, server and storage medium
CN110083688A
Graph data semantic search method based on comparative learning and large language model
CN116450867A
