Retrieval method and related device

By generating prompt instructions and building a knowledge base, and using large models to retrieve path links and document slices of the business system, the problem of inefficient business module retrieval in the existing technology is solved, and fast and accurate business module operation and user experience improvement is achieved.

CN120371973APending Publication Date: 2025-07-25BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510516142.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently and accurately retrieve and operate the required business modules in a business system, resulting in inefficiency and poor user experience.

Method used

By obtaining the path information of user problems and business modules, generating prompt instructions, using the big model to search path links and document slices, a knowledge base is built to improve retrieval accuracy and efficiency.

Benefits of technology

It realizes the rapid and accurate finding and operation of business modules, improves the speed and efficiency of users to solve problems, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371973A_ABST
    Figure CN120371973A_ABST
Patent Text Reader

Abstract

The invention discloses a retrieval method and a related device, and relates to the field of artificial intelligence, and the method comprises the steps: obtaining a user question and path information of all business modules contained in a target business system, generating a first prompt instruction prompt according to the path information of all the business modules and the user question, inputting the first prompt instruction prompt into a pre-configured large model, and obtaining a path link of a first target business module related to the user question, retrieving a target document slice of which the association degree with the user question meets the requirement from a pre-constructed knowledge base, generating a second prompt instruction prompt by the target document slice and the user question, and inputting the second prompt instruction prompt into the large model to obtain answer information. On the basis of the two prompts, the answer information for solving the problem is provided for the user, and the path link of the related service module is provided for the user, so that the user can quickly operate the target service system, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular, to a retrieval method and related device. Background Art

[0002] When a user operates a business system, they often encounter the situation where they want to use a certain business module of the business system but don't know how to find it or how to use it. Common solutions are as follows: After the user enters a question related to the business module, the most relevant documents are retrieved based on the user's question using the keyword matching method. Then, the user reads the retrieved question answers and gradually operates the business system to find and use the required business module.

[0003] However, this method has the following problems: (1) A business system usually consists of a large number of business modules, and each business module may correspond to one or more documents (such as user guide documents, design documents, test case documents, etc.). The efficiency of keyword matching is limited, and it is difficult to efficiently screen out the most relevant documents when facing a large number of documents; (2) The retrieval accuracy of the keyword matching method is relatively low, which may result in the user not being able to obtain a question answer or obtaining an inaccurate question answer; (3) It takes a lot of time for the user to read the retrieved documents, and they also need to gradually operate the business system to find the required business module, resulting in low efficiency. Summary of the Invention

[0004] In view of the above problems, this application provides a retrieval method and related device to achieve the purpose of efficiently and accurately retrieving documents, and then quickly and accurately finding and operating the required business module. The specific solutions are as follows:

[0005] The first aspect of this application provides a retrieval method, including:

[0006] Obtain a user question and path information of all business modules included in the target business system, where the user question is used to inquire about how to use the functions of the target business system, and the path information of any business module is used to describe the operation path from the initial interface of the target business system to the front-end interface of this business module;

[0007] Generate a first prompt instruction prompt from the path information of all business modules and the user question, and input the first prompt instruction prompt into a pre-configured large model to obtain a path link of a first target business module related to the user question, where the first prompt instruction prompt is used to prompt the large model to retrieve the path information of the first target business module from the path information of all business modules and convert it into the path link;

[0008] Retrieve target document slices from a pre-built knowledge base whose relevance to the user's question meets the requirements. The knowledge base includes multiple document slices, which are obtained by segmenting the original document, and the original document is the document corresponding to the business module in the target business system.

[0009] Generate a second prompt instruction prompt from the target document slice and the user's question, and input the second prompt instruction prompt into the large model to obtain answer information. The second prompt instruction prompt is used to prompt the large model to retrieve the answer information from the target document slice, and the answer information is used to indicate how to operate on the first target business module to solve the user's question.

[0010] In a possible implementation, the knowledge base is a vector knowledge base, and the document slices are represented as slice vectors in the vector knowledge base.

[0011] The retrieving of target document slices from a pre-built knowledge base whose relevance to the user's question meets the requirements includes:

[0012] Process the user's question into a question vector.

[0013] Perform similarity matching between the question vector and the slice vectors in the vector knowledge base to obtain at least one slice vector that is most similar to the question vector, and determine the document slices corresponding to the at least one slice vector as the target document slices.

[0014] In a possible implementation, the performing of similarity matching between the question vector and the slice vectors in the vector knowledge base to obtain at least one slice vector that is most similar to the question vector includes:

[0015] Construct a hierarchical navigable node network from the slice vectors in the vector knowledge base using a preset probability function and a preset connection strategy. The hierarchical navigable node network includes multiple levels, each level includes n slice vectors. When n is greater than 1, each slice vector among the n slice vectors is connected to m slice vectors among the other n - 1 slice vectors, where 1 ≤ m ≤ n - 1, and both m and n are positive integers.

[0016] Randomly select x slice vectors from the highest level of the hierarchical navigable node network, use the x slice vectors as initial slice vectors respectively, and recursively search for a slice vector that is closest to the question vector and located in the lowest level starting from the initial slice vectors to find x slice vectors as the at least one slice vector, where x is a positive integer.

[0017] In a possible implementation, the process of constructing the vector knowledge base includes:

[0018] Obtain the original document set corresponding to the target business system, where the original document set includes the original documents corresponding to all business modules;

[0019] For each original document included in the original document set: perform preliminary segmentation on the original document according to a preset slicing rule to obtain at least one initial slice, process the incomplete statements in the at least one initial slice into complete statements to obtain at least one document slice, and process each document slice in the at least one document slice into a slice vector to obtain the slice vector corresponding to each original document;

[0020] Construct the vector knowledge base according to the slice vectors corresponding to all the original documents in the original document set.

[0021] In a possible implementation, it further includes:

[0022] Monitor the update event of the original document set;

[0023] When the update event is monitored, determine the event type of the update event;

[0024] If the event type is the original document replacement type, delete the slice vector corresponding to the old document before replacement from the vector knowledge base, and update the slice vector corresponding to the new document after replacement to the vector knowledge base;

[0025] If the event type is the original document addition type, update the slice vector corresponding to the newly added document to the vector knowledge base;

[0026] If the event type is the original document deletion type, delete the slice vector corresponding to the deleted document from the vector knowledge base.

[0027] In a possible implementation, it further includes:

[0028] Determine the original document where the target document slice is located as the first original document;

[0029] Obtain the meta information of the first original document, where the meta information includes one or more of the following information: the identity identifier of the first original document, the title of the first original document, the identity identifier of the knowledge base where the first original document is located, and the address of the target front-end interface, and the target front-end interface refers to the front-end interface of the business module corresponding to the first original document;

[0030] Return the answer information, the path link of the first target business module, the target document slice, and the meta information of the first original document to the user.

[0031] The second aspect of this application provides a retrieval device, including:

[0032] An information acquisition module, configured to acquire a user question and path information of all business modules included in a target business system, where the user question is used to inquire about how to use the functions of the target business system, and the path information of any business module is used to describe the operation path from the home interface of the target business system to the front-end interface of this business module;

[0033] A link retrieval module, configured to generate a first prompt instruction prompt from the path information of all business modules and the user question, input the first prompt instruction prompt into a pre-configured large model, and obtain a path link of a first target business module related to the user question, where the first prompt instruction prompt is used to prompt the large model to retrieve the path information of the first target business module from the path information of all business modules and convert it into the path link;

[0034] A slice retrieval module, configured to retrieve a target document slice from a pre-constructed knowledge base, where the relevance of the target document slice to the user question meets the requirements. The knowledge base includes multiple document slices, and the document slices are obtained by segmenting the original document, and the original document is the document corresponding to the business module in the target business system;

[0035] An answer generation module, configured to generate a second prompt instruction prompt from the target document slice and the user question, input the second prompt instruction prompt into the large model, and obtain answer information, where the second prompt instruction prompt is used to prompt the large model to retrieve the answer information from the target document slice, and the answer information is used to indicate how to operate the first target business module to solve the user question.

[0036] The third aspect of this application provides a computer program product, including computer-readable instructions, which when running on an electronic device, enable the electronic device to implement the retrieval method of the first aspect or any implementation manner of the first aspect.

[0037] The fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, where:

[0038] The memory is used to store a computer program;

[0039] The processor is used to execute the computer program, so that the electronic device can implement the retrieval method of the first aspect or any implementation manner of the first aspect.

[0040] The fifth aspect of the present application provides a computer storage medium carrying one or more computer programs, which can enable an electronic device to implement the retrieval method of the first aspect or any implementation manner of the first aspect when the one or more computer programs are executed by the electronic device.

[0041] With the above technical solution, the retrieval method provided by the present application obtains the user's question and the path information of all business modules included in the target business system, generates a first prompt instruction prompt from the path information of all business modules and the user's question, inputs the first prompt instruction prompt into a pre-configured large model to obtain the path link of the first target business module related to the user's question, retrieves the target document slice whose relevance to the user's question meets the requirements from the pre-constructed knowledge base, generates a second prompt instruction prompt from the target document slice and the user's question, and inputs the second prompt instruction prompt into the large model to obtain the answer information. It can be seen that through the construction of the knowledge base, the present application can quickly retrieve the required target document slice, improving the retrieval efficiency and accuracy.

[0042] Furthermore, the present application generates a second prompt instruction prompt based on the user's question and the target document slice, enabling the large model to more accurately understand the intention of the user's question, obtain answer information with higher accuracy, and improve the speed and efficiency of the user to solve the problem.

[0043] Still further, the present application also generates a first prompt instruction prompt based on the user's question and the path information of all business modules, enabling the large model to accurately output the path link of the first target business module on the basis of accurately understanding the intention of the user's question. The user can quickly enter the operation interface of the first target business module by clicking the path link, and then quickly operate the first business module based on the answer information, with higher efficiency and better user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the original elements and elements are not necessarily drawn to scale.

[0045] Figure 1 It is a schematic diagram of a system architecture provided by the present application;

[0046] Figure 2 It is an optional hardware structure schematic diagram of the terminal 100 provided by the present application;

[0047] Figure 3Schematic structural diagram of a server 200 provided by this application;

[0048] Figure 4 Schematic flow diagram of a retrieval method provided by this application;

[0049] Figure 5 Schematic structural diagram of a retrieval device provided by this application;

[0050] Figure 6 Schematic structural diagram of an electronic device provided by this application. Detailed implementation manners

[0051] The embodiments of this application will be described below with reference to the accompanying drawings in the embodiments of this application. The terms used in the embodiments of this application are only used to explain the specific embodiments of this application, rather than intended to limit this application.

[0052] The embodiments of this application will be described below with reference to the accompanying drawings. Those of ordinary skill in the art will know that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0053] The terms "first", "second", etc. in the specification and claims of this application and the above accompanying drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinguishing when describing objects with the same attributes in the embodiments of this application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device including a series of units does not have to be limited to those units, but may include other units not clearly listed or inherent to these process, method, product or device.

[0054] See Figure 1 , Figure 1 shows a schematic diagram of a system architecture. The system may include a terminal 100 and a server 200. Among them, the server 200 may include one or more servers ( Figure 1 illustrated by taking one server as an example), and the server 200 may provide the method provided in the embodiments of this application for one or more terminals.

[0055] Among them, an application program may be installed on the terminal 100. The above application program and web page may provide an interface. The terminal 100 may receive relevant parameters input by the user on the interface and send the above parameters to the server 200. The server 200 may obtain a processing result based on the received parameters and return the processing result to the terminal 100.

[0056] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters by itself, without the cooperation of the server. The embodiments of the present application do not limit this.

[0057] Next, the product form of the terminal 100 will be described. Figure 1 in the terminal 100;

[0058] The terminal 100 in the embodiments of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiments of the present application do not impose any restrictions on this.

[0059] Figure 2 FIG. shows an optional schematic diagram of the hardware structure of the terminal 100.

[0060] Referring to Figure 2 as shown, the terminal 100 may include a radio frequency unit 110, a first memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), a headphone jack 163 (optional), a first processor 170, an external interface 180, a power supply 190, and other components. Those skilled in the art can understand that Figure 2 This is only an example of a terminal or a multifunctional device, and does not constitute a limitation on the terminal or the multifunctional device. It may include more or fewer components than shown in the figure, or combine some components, or different components.

[0061] The input unit 130 can be used to receive input numeric or character information and generate key signal inputs related to the user settings and function control of the portable multifunctional device. Specifically, the input unit 130 can include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect touch operations of the user thereon or nearby (such as operations of the user using any suitable object such as a finger, a joint, a stylus, etc. on or near the touch screen), and drive corresponding connection devices according to a preset program. The touch screen can detect the touch action of the user on the touch screen, convert the touch action into a touch signal and send it to the first processor 170, and can receive and execute commands sent by the first processor 170; the touch signal at least includes contact coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, multiple types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch screen. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, the other input devices 132 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.

[0062] Among them, the other input devices 132 can receive input data, etc.

[0063] The display unit 140 can be used to display information input by the user or information provided to the user, various menus of the terminal 100, an interactive interface, file display, and / or the playback of any multimedia file.

[0064] The first memory 120 can be used to store instructions and data. The first memory 120 mainly includes a storage instruction area and a storage data area. The storage data area can store various data, such as multimedia files, texts, etc.; the storage instruction area can store software units such as an operating system, applications, instructions required for at least one function, etc., or their subsets or extended sets. It can also include a non-volatile random access memory; it provides the first processor 170 with including managing the hardware, software, and data resources in the computing processing device, supporting control software and applications. It is also used for the storage of multimedia files and the storage of running programs and applications.

[0065] The first processor 170 is the control center of the terminal 100, connecting various parts of the entire terminal 100 through various interfaces and lines. By running or executing instructions stored in the first memory 120 and calling data stored in the first memory 120, it executes various functions of the terminal 100 and processes data, thereby exercising overall control over the terminal device. Optionally, the first processor 170 may include one or more processing units; preferably, the first processor 170 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the first processor 170. In some embodiments, the first processor 170 and the first memory 120 may be implemented on a single chip. In some embodiments, they may also be separately implemented on independent chips. The first processor 170 can also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the first memory 120, so that each functional module therein executes corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.

[0066] Among them, the first memory 120 can be used to store software codes related to the retrieval method. The first processor 170 can execute the steps of the retrieval method or schedule other units (such as the above-mentioned input unit 130 and display unit 140) to implement corresponding functions.

[0067] The radio frequency unit 110 (optional) can be used for receiving and sending information or signals during a call. For example, after receiving the downlink information from the base station, it is sent to the first processor 170 for processing; in addition, the uplink data designed is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. This wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0068] Among them, in the embodiment of this application, the radio frequency unit 110 can send data to the server 200 and receive the processing result sent by the server 200.

[0069] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network interface.

[0070] The terminal 100 also includes a power supply 190 (such as a battery) for powering each component. Preferably, the power supply can be logically connected to the first processor 170 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system.

[0071] The terminal 100 also includes an external interface 180. This external interface can be a standard Micro USB interface or a multi-pin connector, and can be used to connect the terminal 100 to other devices for communication, or can be used to connect a charger to charge the terminal 100.

[0072] Although not shown, the terminal 100 may also include a flashlight, a Wireless Fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which will not be elaborated here. Some or all of the methods described below can be applied to the terminal 100 as Figure 2 shown.

[0073] Next, the product form of the server 200 will be described. Figure 1 in the server 200;

[0074] Figure 3 A schematic structural diagram of a server 200 is provided, as Figure 3 shown. The server 200 includes a first bus 201, a second processor 202, a communication interface 203, and a second memory 204. The second processor 202, the second memory 204, and the communication interface 203 communicate with each other through the first bus 201.

[0075] The first bus 201 can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The first bus 201 can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 3 only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0076] The second processor 202 can be any one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Micro Processor (MP), or a Digital Signal Processor (DSP), etc.

[0077] The second memory 204 can include a volatile memory, such as a Random Access Memory (RAM). The second memory 204 can also include a non-volatile memory, such as a Read-Only Memory (ROM), a flash memory, a Hard Disk Drive (HDD), or a Solid State Drive (SSD).

[0078] Among them, the second memory 204 can be used to store software codes related to the retrieval method, and the second processor 202 can execute the steps of the retrieval method of the chip or schedule other units to implement corresponding functions.

[0079] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the first processor 170 in the terminal 100 and the second processor 202 in the server 200 can be hardware circuits (such as Application Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), general-purpose processor, DSP, microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the first processor 170 and the second processor 202 can be a hardware system with the function of executing instructions, such as a CPU, DSP, etc., or a hardware system without the function of executing instructions, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware system without the function of executing instructions and the hardware system with the function of executing instructions.

[0080] Next, the retrieval method provided by the embodiments of the present application will be introduced. Taking the application of this retrieval method to a computer device as an example, optionally, the computer device can specifically be Figure 1 the terminal 100 in, or a system composed of the terminal 100 and the server 200.

[0081] Referring to Figure 4 , Figure 4 is a schematic flowchart of a retrieval method provided by an embodiment of the present application. The method may include:

[0082] Step S401, obtain the user question and the path information of all service modules included in the target service system.

[0083] Here, the user question refers to a question related to the usage method of the target service system, which is used to inquire about how to use the functions of the target service system. For example, how to set user permissions in the target service system.

[0084] The above-mentioned target service system refers to the service system that needs to be retrieved according to the present application, such as an enterprise middle platform system.

[0085] In this embodiment, the target service system is composed of multiple service modules. For example, the target service system is composed of service modules such as a permission management module, a role assignment module, a data management module, a service logic processing module, and a log monitoring module. It can be understood that each service module can have a front-end interface. Then, this embodiment can obtain the operation path from the first interface of the target service system to the front-end interface of the service module, and for the convenience of introduction, this operation path is defined as the path information of the service module.

[0086] Step S402: Generate a first prompt instruction prompt based on the path information of all business modules and the user's question, and input the first prompt instruction prompt into a pre-configured large model to obtain a path link of the first target business module related to the user's question.

[0087] Here, the first prompt instruction prompt is used to prompt the large model to retrieve the path information of the first target business module from the path information of all business modules and convert the retrieved path information into a path link. The training data used by the pre-configured large model in the training phase includes: training questions, the path information of all business modules included in the target business system, and the path links of the business modules related to the training questions.

[0088] Optionally, the generation process of the first prompt instruction prompt may include: obtaining a pre-configured first prompt instruction template, where the first prompt instruction template includes a first question slot and a path slot, and the first prompt instruction template is used to prompt the pre-configured large model to give a path link of the business module related to the user's question based on the path information of the business module in the path slot and the user's question in the first question slot; filling the path information of all business modules into the path slot and filling the user's question into the first question slot to obtain the first prompt instruction prompt.

[0089] In this embodiment, for the convenience of description, the above-mentioned business module related to the user's question is defined as the first target business module.

[0090] Optionally, the process of "inputting the first prompt instruction prompt into a pre-configured large model to obtain a path link of the first target business module related to the user's question" may include: performing intent recognition on the user's question included in the first prompt instruction prompt through the large model to obtain an intent recognition result, determining the first target business module according to the intent recognition result, determining the path information of the first target business module from the path information of all business modules included in the first prompt instruction prompt, and generating a path link from the path information of the first target business module to obtain a path link of the first target business module.

[0091] Optionally, the above-mentioned large model may be a GPT (Generative Pre-trained Transformer) large model, Claude large model, etc. developed by OpenAI, and the present application does not make any limitations.

[0092] Step S403: Retrieve target document slices from a pre-constructed knowledge base whose relevance to the user's question meets the requirements.

[0093] Among them, the knowledge base includes multiple document slices, which are obtained by segmenting the original document. The original document is the document corresponding to the business module in the target business system.

[0094] In this embodiment, a knowledge base can be pre-constructed to store all the original documents corresponding to the target business system.

[0095] Here, the original document refers to the document corresponding to the business module in the target business system, such as the Wiki document in the Feishu system. In this embodiment, the document corresponding to the business module includes but is not limited to the following documents: usage instruction document, design document, test case document. As introduced above, the target business system consists of multiple business modules. Optionally, each business module in the multiple business modules corresponds to at least one original document.

[0096] Considering that the original document may describe various aspects of the corresponding business module and has a long length, there may be information in the original document that is irrelevant to the user's question. Therefore, after directly retrieving the original document from the knowledge base, it is necessary to further screen the content in the original document, which is time-consuming.

[0097] To solve the above time-consuming problem, optionally, in this embodiment, the original documents corresponding to all the business modules included in the target business system can be grouped into the original document set corresponding to the target business system. After obtaining the original document set corresponding to the target business system, for each original document included in the original document set, the original document is segmented according to a preset slicing rule to obtain at least one document slice that is content-independent and semantically complete, and then the above knowledge base is constructed based on all the document slices included in the original document set.

[0098] Optionally, the process of "segmenting the original document according to a preset slicing rule to obtain at least one document slice that is content-independent and semantically complete" may include: initially segmenting the original document according to the preset slicing rule to obtain at least one initial slice, and processing the incomplete sentences in the at least one initial slice into complete sentences to obtain at least one document slice.

[0099] Optionally, the preset slicing rule can be a rule for slicing according to a fixed number of words (such as 500 words), or a rule for slicing according to semantic paragraphs, or a rule for slicing according to a fixed number of slices, etc. Here, the slicing rule of this embodiment enables the document slices to adapt to the input limit of the large model.

[0100] Of course, the above slicing rule can also be other, and the present application does not make specific limitations.

[0101] Optionally, the process of "processing incomplete statements in at least one initial slice into complete statements" may include: extracting each incomplete statement in at least one initial slice, determining the number of words of each incomplete statement in each initial slice, dividing the incomplete statement into the initial slice with the most words, and deleting the incomplete statement in other initial slices.

[0102] For example, for an 800-word original document, sliced into initial slice 1 (including the 1st to 500th words) and initial slice 2 (including the 501st to 800th words) with each 500 words as an initial slice. Suppose the 490th to 505th words form a sentence. Since the first 10 words of this sentence are sliced into initial slice 1 and the last 5 words are sliced into initial slice 2, this sentence is an incomplete statement in both initial slice 1 and initial slice 2. Also, since initial slice 1 contains more words of this incomplete statement, the incomplete statement is divided into initial slice 1 and the incomplete statement in initial slice 2 is deleted. Thus, after processing the incomplete statements, document slice 1 (including the 1st to 505th words) and document slice 2 (including the 506th word to the 800th word) are obtained.

[0103] Optionally, before segmenting the original document, the original document can be preprocessed to delete the useless content in the original document. Optionally, the useless content includes but is not limited to the following: blank lines, HTML (HyperText Markup Language) tags.

[0104] Optionally, the process of "obtaining the set of original documents corresponding to the target business system" may include: obtaining the set of original documents corresponding to the target business system through the preset API (Application Programming Interface) of the target business system. Taking the Feishu system as an example of the target business system, the preset API can be an OpenAPI interface (i.e., an open interface); optionally, the OpenAPI interface includes but is not limited to the following interfaces: Wiki document query interface, document directory acquisition interface.

[0105] After constructing the above knowledge base, this embodiment can calculate the correlation between the user question and the document slices in the knowledge base to retrieve the document slices that meet the correlation requirement from the knowledge base. For the convenience of the following introduction, the retrieved document slices are defined as target document slices.

[0106] Optionally, the process of "retrieving a target document slice that meets the requirement of relevance to the user's question from a pre-built knowledge base" may include: determining a knowledge plug-in corresponding to the user's question, and invoking the knowledge plug-in to retrieve a target document slice that meets the requirement of relevance to the user's question from the knowledge base.

[0107] Step S404: Generate a second prompt instruction prompt from the target document slice and the user's question, and input the second prompt instruction prompt into the large model to obtain answer information.

[0108] Among them, the second prompt instruction prompt is used to prompt the large model to retrieve answer information from the target document slice, and the answer information is used to indicate how to operate on the first target business module to solve the user's question.

[0109] Here, the training data used by the large model in the training phase includes: training questions, training document slices that meet the requirement of relevance to the training questions, and answer information of the training questions.

[0110] Optionally, the generation process of the second prompt instruction prompt may include: obtaining a pre-configured second prompt instruction template, where the second prompt instruction template includes a second question slot and a document slice slot, and the second prompt instruction template is used to prompt the large model to give answer information to the user's question based on the document slice in the document slice slot and the user's question in the second question slot; filling the target document slice into the document slice slot and filling the user's question into the second question slot to obtain the second prompt instruction prompt.

[0111] For example, the second prompt instruction prompt may be: User's question: How to set Feishu Wiki permissions? Target document slice: 1. [Document title 1] The steps to set permissions include xx; 2. [Document title 2] Feishu Wiki permissions support xx; Please answer the user's question based on the above information.

[0112] In this embodiment, the large model can perform question relevance analysis on each target document slice to ensure that the answer information of the user's question is more in line with the user's question.

[0113] Optionally, the process of "inputting the second prompt instruction prompt into the large model to obtain answer information" may include: performing intent recognition on the user's question included in the first prompt instruction prompt through the large model to obtain an intent recognition result, determining the first target business module according to the intent recognition result, and searching for operation information (such as an operation process) corresponding to the first target business module from the target document slice included in the first prompt instruction prompt as the answer information to the above user's question.

[0114] It should be noted that the above-mentioned first prompt instruction prompt and second prompt instruction prompt provided in this embodiment are only examples. In addition, the historical data of the user (such as search records, browsing preferences, etc.) can also be added to the first prompt instruction prompt and / or the second prompt instruction prompt to further optimize.

[0115] Optionally, a personalized answer style can also be added to the first prompt instruction prompt and / or the second prompt instruction prompt, so that the answer information output by the large model and the path link of the first target business module are more personalized.

[0116] Optionally, the answer style can be, for example, a table, a combination of text and graphics, etc.

[0117] Of course, there can also be other optimization perspectives, which are not specifically limited in this application.

[0118] The retrieval method provided in this application obtains the user's question and the path information of all business modules included in the target business system, generates a first prompt instruction prompt from the path information of all business modules and the user's question, inputs the first prompt instruction prompt into a pre-configured large model to obtain the path link of the first target business module related to the user's question, retrieves the target document slice whose relevance to the user's question meets the requirements from the pre-built knowledge base, generates a second prompt instruction prompt from the target document slice and the user's question, and inputs the second prompt instruction prompt into the large model to obtain the answer information. It can be seen that through building a knowledge base, this application can quickly retrieve the required target document slice, improving the retrieval efficiency and retrieval accuracy.

[0119] Furthermore, this application generates a second prompt instruction prompt based on the user's question and the target document slice, enabling the large model to more accurately understand the intention of the user's question, obtain answer information with higher accuracy, and improve the speed and efficiency of the user to solve the problem.

[0120] Still further, this application also generates a first prompt instruction prompt based on the user's question and the path information of all business modules, enabling the large model to accurately output the path link of the first target business module on the basis of accurately understanding the intention of the user's question. The user can quickly enter the operation interface of the first target business module by clicking on the path link, and then, based on the answer information, quickly operate the first business module, with higher efficiency and better user experience.

[0121] In some embodiments of this application, the process of the previous step S403 "retrieve the target document slice whose relevance to the user's question meets the requirements from the pre-built knowledge base" is introduced.

[0122] In a possible implementation, the above knowledge base can be a vector knowledge base.

[0123] Optionally, the process of constructing the vector knowledge base may include: obtaining the original document set corresponding to the target business system, for each original document included in the original document set, performing preliminary segmentation on the original document according to a preset segmentation rule to obtain at least one initial slice, processing the incomplete statements in the at least one initial slice into complete statements to obtain at least one document slice, and processing each document slice in the at least one document slice into a slice vector to obtain the slice vector corresponding to each original document; constructing a vector knowledge base according to the slice vectors respectively corresponding to all the original documents in the original document set.

[0124] Among them, the process of "performing preliminary segmentation on the original document according to a preset segmentation rule to obtain at least one initial slice, processing the incomplete statements in the at least one initial slice into complete statements to obtain at least one document slice" can refer to the introduction above and will not be repeated here.

[0125] Optionally, the process of "processing each document slice in the at least one document slice into a slice vector" may include: using a large model to process each document slice into a slice vector, or using a vector generation tool to process each document slice into a slice vector.

[0126] In a possible implementation, the process of "constructing a vector knowledge base according to the slice vectors respectively corresponding to all the original documents in the original document set" may include: obtaining the meta information of each original document in the original document set, generating a vector identifier for each of the at least one slice vector corresponding to each original document, and constructing a vector knowledge base according to the meta information of each original document, the slice vector corresponding to each original document, and the vector identifier.

[0127] Optionally, the meta information of the original document includes one or more of the following information: the identification (ID) of the original document, the title of the original document, the identification of the knowledge base where the original document is located, and the address of the front-end interface of the business module corresponding to the original document.

[0128] It should be noted that the above meta information of the original document is only an example. In addition, the meta information can also be others, such as: the document link of the original document, the update time, the document summary, etc.

[0129] In this embodiment, a mapping relationship between the document and the slice can be established in the data relationship table according to the meta information of the original document, the slice vector, and the vector identifier of the slice vector, so as to obtain a vector knowledge base including the mapping relationship between the document and the slice.

[0130] In this embodiment, the mapping relationship between documents and slices is established, which can ensure that after the target slice document is retrieved later, the corresponding original document can be traced back further.

[0131] Considering that the set of original documents corresponding to the target business system may be updated, in order to ensure the timeliness of the update of the vector knowledge base, optionally, this embodiment can monitor the update event of the set of original documents. When the update event is monitored, the event type of the update event is judged, and then the vector knowledge base is updated based on the event type.

[0132] Optionally, the process of "updating the vector knowledge base based on the event type" may include: if the event type is the original document replacement type, the slice vectors corresponding to the old documents before replacement are deleted from the vector knowledge base, and the slice vectors corresponding to the new documents after replacement are updated to the vector knowledge base; if the event type is the original document addition type, the slice vectors corresponding to the added documents are updated to the vector knowledge base; if the event type is the original document deletion type, the slice vectors corresponding to the deleted documents are deleted from the vector knowledge base.

[0133] Among them, the generation processes of the slice vectors corresponding to the new documents and the slice vectors corresponding to the added documents are the same as those in the previous text. For details, refer to the previous introduction and will not be elaborated here.

[0134] Taking the slice vectors corresponding to the old documents as an example, optionally, the process of determining the slice vectors corresponding to the old documents from the vector knowledge base may include: obtaining the document identifier of the old document, and obtaining the slice vectors corresponding to the document identifier of the old document according to the mapping relationship between the previous documents and slices as the slice vectors corresponding to the old documents.

[0135] The process of determining the slice vectors corresponding to the deleted documents from the vector knowledge base can refer to the process of determining the slice vectors corresponding to the old documents from the vector knowledge base and will not be elaborated here.

[0136] It should also be noted that the above process of setting the monitoring event is only an example and is not a limitation to this application. In addition, periodic updates and other methods can also be used to ensure the timeliness of the update of the vector knowledge base.

[0137] The following introduces the process of retrieving the target document slices from the pre-built vector knowledge base whose relevance to the user's question meets the requirements.

[0138] This embodiment can first process the user's question into a question vector. Here, the process of processing the user's question into a question vector corresponds to the process of processing the document slices into slice vectors in the previous text. For details, refer to the previous introduction and will not be elaborated here.

[0139] Next, this embodiment can perform a similarity match between the problem vector and the slice vectors in the vector knowledge base to obtain at least one slice vector that is most similar to the problem vector.

[0140] Finally, determine the document slices corresponding to the at least one slice vector as the target document slices.

[0141] To improve the efficiency of vector matching, optionally, the process of "performing a similarity match between the problem vector and the slice vectors in the vector knowledge base to obtain at least one slice vector that is most similar to the problem vector" in this embodiment may include: constructing a hierarchical navigable node network from the slice vectors in the vector knowledge base using a preset probability function and a preset connection strategy, where the hierarchical navigable node network includes multiple levels, each level includes n slice vectors, when n>1, each slice vector among the n slice vectors is connected to m slice vectors among the other n-1 slice vectors, 1≤m≤n-1, and both m and n are positive integers; randomly select x slice vectors from the highest level of the hierarchical navigable node network, use the x slice vectors as initial slice vectors respectively, and recursively search for a slice vector that is closest to the problem vector and located in the lowest level starting from the initial slice vectors to find x slice vectors as the at least one slice vector, where x is a positive integer.

[0142] The above-mentioned preset probability function is used to determine which level the slice vectors in the vector knowledge base can fall into, and the above-mentioned preset connection strategy is used to determine how the slice vectors in the vector knowledge base should be connected at each level.

[0143] Optionally, the above-mentioned hierarchical navigable node network can be a Hierarchical Navigable Small World (HNSW) network.

[0144] Optionally, the process of "recursively searching for a slice vector that is closest to the problem vector and located in the lowest level starting from the initial slice vectors" may include:

[0145] Search for the distances (such as Euclidean distance) between the initial slice vector, the other slice vectors connected to the initial slice vector and the problem vector in the highest level, find the slice vector with the smallest distance (for ease of description, define this slice vector with the smallest distance as the first slice vector), then search for the distances between the first slice vector, the other slice vectors connected to the first slice vector and the problem vector, find the slice vector with the smallest distance, and so on, until the slice vector with the smallest distance found in the highest level remains unchanged, and define this unchanged slice vector as the second slice vector;

[0146] Find the distances between the second slice vector and other slice vectors connected to the second slice vector and the problem vector at the next level below the highest level, and find the slice vector with the smallest distance (for ease of description, define this slice vector with the smallest distance as the third slice vector). Then, find the distances between the third slice vector and other slice vectors connected to the third slice vector and the problem vector, and find the slice vector with the smallest distance, and so on, until the slice vector with the smallest distance found at the next level below the highest level remains unchanged. Define this unchanged slice vector as the fourth slice vector;

[0147] And so on, until the slice vector with the smallest distance found at the lowest level remains unchanged. Define this unchanged slice vector as a slice vector most similar to the problem vector.

[0148] Process all the initial slice vectors in sequence according to the above process, and x slice vectors most similar to the problem vector can be obtained.

[0149] It should be noted that other algorithms can also be used in the above process of "matching the similarity between the problem vector and the slice vectors in the vector knowledge base", such as the Approximate Nearest Neighbor (ANN) algorithm. The present application does not make specific limitations.

[0150] In summary, this embodiment adopts the vector matching method, which can quickly retrieve the top N (the value of N can be determined according to the actual situation) document slices with relatively high relevance to the user's question from the vector knowledge base, thereby ensuring that the subsequent generated answer information is more in line with the user's question.

[0151] In some embodiments of the present application, the answer information and the path link of the first target service module can also be returned to the user.

[0152] In this embodiment, not only the answer information is returned to the user, but also the path link of the first target service module is returned to the user, so that the user can quickly find the front-end interface of the first target service module and perform quick operations on the first target service module, improving the user experience.

[0153] Optionally, this embodiment can display the above path link of the first target service module on the current display interface of the target service system. Here, the current display interface can be any interface of the target service system, such as the home page or the front-end interface of any service system, etc. By enabling the user to click on the path link of the first target service module on the current display interface, the user can quickly jump to the front-end interface of the first target service module. In the case where the user is not familiar with the target service system, it can help the user quickly find the front-end interface to be operated, improving the user's usage efficiency of the target service system.

[0154] Similarly, in this embodiment, the above answer information can be displayed on the current display interface, enabling the user to quickly master the operation method of the first target service module through the answer information and improving the operation efficiency of the first target service module.

[0155] Of course, the above method of displaying on the current display interface is only an example. In addition, other methods can be used to return to the user, such as pop-up display, display in the form of a message reminder, etc. The present application does not make specific limitations.

[0156] As introduced above, the present application will return the answer information and the path link of the first target service module to the user. Optionally, in addition, the following information can also be returned: the target document slice and / or the meta information of the original document where the target document slice is located.

[0157] That is, in this embodiment, the original document where the target document slice is located can be determined. For the convenience of later introduction, this original document is defined as the first original document.

[0158] This embodiment can also obtain the meta information of the first original document, and then return the meta information of the first original document and / or the target document slice, as well as the above answer information and the path link of the first target service module to the user. Here, the meta information of the first original document is the same as the meta information provided above. For details, please refer to the above introduction and will not be elaborated here.

[0159] This embodiment returns the meta information of the first original document, such as the document link of the first original document, and the target document slice to the user, enabling the user to not only obtain the question answer and quickly jump to the front-end interface related to the user's question, but also view the original content based on which the question answer is made, improving the user experience.

[0160] Optionally, the meta information of the first original document and / or the target document slice are presented to the user in a recommended form. For example, the recommended content is: Your question may be related to the following documents: 1. [Document Title 1]: Document Abstract xx; 2. [Document Title 2]: Document Abstract xx; ….

[0161] Optionally, the above recommended content can be displayed on the business front-end interface so that the user can view and learn the first original document and the target document slice in real time.

[0162] Furthermore, optionally, the user behavior of the user selecting a certain first original document or target document slice on the business front-end interface can be recorded for optimizing the present application.

[0163] In summary, while returning the answer information to the user, this embodiment preserves more context information for the user (i.e., the meta-information of the above-mentioned first original document and the slices of the target document), facilitating the user to view the original text in depth and making the retrieved results seen by the user richer and more logical.

[0164] To further improve the user experience, this embodiment can also construct a business document mapping relationship to associate the business with logical relationships with the documents.

[0165] Optionally, the process of constructing the business document mapping relationship can include: obtaining the set of original documents corresponding to the target business system, and constructing the business document mapping relationship according to the logical relationship between each original document in the set of original documents and the business modules in the target business system, improving the business relevance of document retrieval.

[0166] Optionally, to facilitate subsequent rapid retrieval based on the business document mapping relationship, this embodiment can also associate corresponding document classification labels, attributes, etc. information with each original document in the business document mapping relationship. For example, the document classification labels include: management documents, business operation documents, and so on.

[0167] Optionally, this embodiment can store the above-mentioned business document mapping relationship and the information such as the document classification labels and attributes associated with the original documents in a relational database for subsequent querying and dynamic updating.

[0168] As introduced above, this embodiment can dynamically monitor the update events of the set of original documents, and when an update event is detected, it can also update the business document mapping relationship.

[0169] Based on the constructed business document mapping relationship, this embodiment can also determine the second target business module corresponding to the current display interface of the target business system, then query the original documents corresponding to the second target business module from the pre-constructed business document mapping relationship above as the second original documents, obtain the meta-information of the second original documents, and return the meta-information of the second original documents to the user.

[0170] That is, to avoid the situation that after the user opens the target business system, they do not know how to operate the current display interface or have low operation efficiency, this embodiment can, at the request of the user or actively recommend to the user the meta-information of the second original documents corresponding to the current display interface, thereby helping the user quickly operate the current display interface to improve the operation efficiency of the user for the target business system.

[0171] To enable those skilled in the art to better understand this application, the following briefly introduces an application scenario of the embodiments of this application.

[0172] After the user opens the target business system, no matter which display interface of the target business system (referred to as the current display interface in this application) the user is on, the method provided in the above embodiment is adopted to recommend the meta-information of the second original document related to the current display interface to the user, so as to help the user quickly operate the current display interface.

[0173] Taking the first interface of the target business system as the current display interface as an example, through the meta-information of the second original document, the user can quickly understand the meanings represented by the icons on the first interface and the functions that can be realized by each icon, etc.

[0174] In addition, there may be a question input box on the current display interface for the user to input user questions. When it is detected that there is a user question input, the search instruction of the user question can be responded to, and the path information of all business modules included in the target business system can be obtained. A first prompt instruction prompt is generated from the path information of all business modules and the user question. Taking the user question as "how to set Feishu Wiki permissions" as an example, the first prompt instruction Prompt can be: User question: How to set Feishu Wiki permissions? Path information of all business modules included in the target business system: {Permission management module: Path information 1; Role assignment module: Path information 2; Data management module: Path information 3;...}; Please find the path information of the business module related to the user question based on the above information and convert the found path information into a path link. Then the first prompt instruction prompt is input into the pre-configured large model to obtain the path link of the first target business module related to the user question. For example, the path link generated according to the path information 1 is output based on the above first prompt instruction prompt.

[0175] In addition, the search instruction of the user question can also be responded to, and the target document slice whose relevance to the user question meets the requirements is retrieved from the pre-constructed knowledge base. A second prompt instruction prompt is generated from the target document slice and the user question. Still taking the user question as "how to set Feishu Wiki permissions" as an example, the second prompt instruction prompt can be: User question: How to set Feishu Wiki permissions? Target document slice: 1. [Document title 1] The steps to set permissions include xx; 2. [Document title 2] Feishu Wiki permissions support xx; Please answer the user question based on the above information. The second prompt instruction prompt is input into the large model to obtain the answer information. For example, the answer information is "The steps to set Feishu Wiki permissions include xx".

[0176] Finally, return the answer information, the path link of the first target business module, the meta-information of the first original document, the target document slice, etc. to the user, so as to help the user quickly obtain the answer and path link related to the first target business module pointed to by the user's question intention, enabling the user to quickly solve the problem and improving the user experience.

[0177] For example, if the user's question entered on the home page is "How to set Feishu Wiki permissions", on the one hand, this embodiment returns the method for setting user permissions (i.e., the answer information, such as "The steps for setting Feishu Wiki permissions include xx") to the user, and on the other hand, returns the setting interface of user permissions in the form of a path link (i.e., the path link generated according to path information 1) to the user. The user can click on the path link to quickly jump to the setting interface of user permissions, and then follow the setting method to gradually set on the setting interface, improving the overall efficiency of the user setting user permissions.

[0178] The above introduced a retrieval method provided by an embodiment of the present application. Next, a device for executing the above retrieval method will be introduced.

[0179] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of a retrieval device provided by an embodiment of the present application. As Figure 5 shown, the device may include:

[0180] An information acquisition module 501, configured to acquire a user question and path information of all business modules included in the target business system, where the user question is used to inquire about how to use the functions of the target business system, and the path information of any business module is used to describe the operation path from the home page of the target business system to the front-end interface of the business module;

[0181] A link retrieval module 502, configured to generate a first prompt instruction prompt from the path information of all business modules and the user question, and input the first prompt instruction prompt into a pre-configured large model to obtain a path link of a first target business module related to the user question, where the first prompt instruction prompt is used to prompt the large model to retrieve the path information of the first target business module from the path information of all business modules and convert it into a path link;

[0182] A slice retrieval module 503, configured to retrieve a target document slice whose relevance to the user question meets the requirements from a pre-constructed knowledge base, where the knowledge base includes multiple document slices, and the document slices are obtained by segmenting the original document, and the original document is a document corresponding to a business module in the target business system;

[0183] An answer generation module 504 is configured to generate a second prompt instruction prompt from the target document slice and the user question, and input the second prompt instruction prompt into a large model to obtain answer information, where the second prompt instruction prompt is used to prompt the large model to retrieve answer information from the target document slice, and the answer information is used to indicate how to operate on the first target business module to solve the user question.

[0184] In a possible implementation, the above knowledge base is a vector knowledge base, and the document slice is represented as a slice vector in the vector knowledge base.

[0185] Based on this, when the above slice retrieval module retrieves a target document slice whose relevance to the user question meets the requirements from a pre-built knowledge base, it can specifically be used for:

[0186] Process the user question into a question vector;

[0187] Perform similarity matching between the question vector and the slice vectors in the vector knowledge base to obtain at least one slice vector that is most similar to the question vector, and determine the document slices corresponding to the at least one slice vector as the target document slices.

[0188] In a possible implementation, when the above slice retrieval module performs similarity matching between the question vector and the slice vectors in the vector knowledge base to obtain at least one slice vector that is most similar to the question vector, it can specifically be used for:

[0189] Construct a hierarchical navigable node network from the slice vectors in the vector knowledge base by using a preset probability function and a preset connection strategy, where the hierarchical navigable node network includes multiple levels, each level includes n slice vectors, when n>1, each slice vector among the n slice vectors is connected to m slice vectors among the other n-1 slice vectors, 1≤m≤n-1, and both m and n are positive integers;

[0190] Randomly select x slice vectors from the highest level of the hierarchical navigable node network, use the x slice vectors as initial slice vectors respectively, and recursively search for a slice vector that is closest to the question vector and is located in the lowest level starting from the initial slice vectors to find x slice vectors as the at least one slice vector, where x is a positive integer.

[0191] In a possible implementation, the retrieval device provided in this application may further include: a knowledge base construction module.

[0192] The process of the knowledge base construction module constructing the vector knowledge base may include:

[0193] Obtain the original document set corresponding to the target business system, where the original document set includes the original documents corresponding to all business modules;

[0194] For each original document included in the original document set: Process the original document into at least one document slice that is content-independent and semantically complete, and process each document slice in the at least one document slice into a slice vector to obtain the slice vectors corresponding to each original document;

[0195] Construct a vector knowledge base according to the slice vectors respectively corresponding to all the original documents in the original document set.

[0196] In a possible implementation, the retrieval device provided by this application may further include: a knowledge base update module.

[0197] The process of the knowledge base update module updating the vector knowledge base may include:

[0198] Monitor the update event of the original document set;

[0199] When an update event is monitored, determine the event type of the update event;

[0200] If the event type is the original document replacement type, delete the slice vector corresponding to the old document before replacement from the vector knowledge base, and update the slice vector corresponding to the new document after replacement to the vector knowledge base;

[0201] If the event type is the original document addition type, update the slice vector corresponding to the added document to the vector knowledge base;

[0202] If the event type is the original document deletion type, delete the slice vector corresponding to the deleted document from the vector knowledge base.

[0203] In a possible implementation, the retrieval device provided by this application may further include: an information return module.

[0204] The information return module is used to return the answer information and the path link of the first target service module to the user.

[0205] In a possible implementation, when the above information return module returns the answer information and the path link of the first target service module to the user, it may specifically be used for:

[0206] Determine the original document where the target document slice is located as the first original document;

[0207] Obtain the meta information of the first original document, and the meta information includes one or more of the following information: the identity identifier of the first original document, the title of the first original document, the identity identifier of the knowledge base where the first original document is located, and the address of the target front-end interface, where the target front-end interface refers to the front-end interface of the service module corresponding to the first original document;

[0208] Return the answer information, the path link of the first target service module, the target document slice, and the meta information of the first original document to the user.

[0209] In a possible implementation, the retrieval device provided in this application may further include: an intelligent recommendation module.

[0210] The intelligent recommendation module is used to determine the second target service module corresponding to the current display interface of the target service system; query the original document corresponding to the second target service module from the pre-constructed service document mapping relationship as the second original document; obtain the meta information of the second original document; and return the meta information of the second original document to the user.

[0211] The retrieval device provided in the embodiments of this application corresponds to the retrieval method provided above. For details, refer to the above introduction and will not be elaborated here.

[0212] An electronic device is also provided in the embodiments of this application. Refer to Figure 6 As shown, it shows a schematic structural diagram of the electronic device suitable for implementing the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptop computers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), desktop computers, and the like. Figure 6 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.

[0213] As Figure 6 shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage device 608 into the random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through the second bus 604. The input / output (I / O) interface 605 is also connected to the second bus 604.

[0214] Generally, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 can allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 6An electronic device having various devices is shown, but it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.

[0215] An embodiment of the present application also provides a computer program product including computer-readable instructions, which, when running on an electronic device, enable the electronic device to implement any one of the retrieval methods provided by the embodiments of the present application.

[0216] An embodiment of the present application also provides a computer-readable storage medium carrying one or more computer programs, which, when executed by an electronic device, can enable the electronic device to implement any one of the retrieval methods provided by the embodiments of the present application.

[0217] In addition, it should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.

[0218] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be various, such as analog circuits, digital circuits or dedicated circuits. However, for the present application, in more cases, software program implementation is a better implementation manner. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disc of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a training device, or a network device, etc.) to execute the methods described in various embodiments of the present application.

[0219] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.

[0220] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (such as coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a training device or a data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.

Claims

1. A retrieval method, characterized in that, Including: Obtain the user's question and the path information of all business modules included in the target business system, where the user's question is used to inquire about how to use the functions of the target business system, and the path information of any business module is used to describe the operation path from the home interface of the target business system to the front-end interface of this business module; Generate a first prompt instruction prompt from the path information of all business modules and the user's question, and input the first prompt instruction prompt into a pre-configured large model to obtain the path link of the first target business module related to the user's question, where the first prompt instruction prompt is used to prompt the large model to retrieve the path information of the first target business module from the path information of all business modules and convert it into the path link; Retrieve target document slices from a pre-built knowledge base whose relevance to the user's question meets the requirements, where the knowledge base includes multiple document slices, and the document slices are obtained by segmenting the original document, and the original document is the document corresponding to the business module in the target business system; Generate a second prompt instruction prompt from the target document slices and the user's question, and input the second prompt instruction prompt into the large model to obtain answer information, where the second prompt instruction prompt is used to prompt the large model to retrieve the answer information from the target document slices, and the answer information is used to indicate how to operate on the first target business module to solve the user's question.

2. The retrieval method according to claim 1, wherein The knowledge base is a vector knowledge base, and the document slices are represented as slice vectors in the vector knowledge base; The retrieving target document slices from a pre-built knowledge base whose relevance to the user's question meets the requirements includes: Process the user's question into a question vector; Perform similarity matching between the question vector and the slice vectors in the vector knowledge base to obtain at least one slice vector that is most similar to the question vector, and determine the document slices corresponding to the at least one slice vector as the target document slices.

3. The retrieval method according to claim 2, wherein The performing similarity matching between the question vector and the slice vectors in the vector knowledge base to obtain at least one slice vector that is most similar to the question vector includes: Construct a hierarchical navigable node network with the slice vectors in the vector knowledge base by using a preset probability function and a preset connection strategy, where the hierarchical navigable node network includes multiple levels, each level includes n slice vectors, when n>1, each slice vector among the n slice vectors is connected to m slice vectors among the other n-1 slice vectors, 1≤m≤n-1, and both m and n are positive integers; Randomly select x slice vectors from the highest level of the hierarchical navigable node network, use the x slice vectors as initial slice vectors respectively, and recursively search for a slice vector that is closest to the question vector and located in the lowest level starting from the initial slice vectors to find x slice vectors as the at least one slice vector, where x is a positive integer.

4. The retrieval method according to claim 2, wherein The construction process of the vector knowledge base includes: Obtain the original document set corresponding to the target business system, where the original document set includes the original documents corresponding to all business modules; For each original document included in the original document set: perform preliminary segmentation on the original document according to a preset slicing rule to obtain at least one initial slice, process the incomplete sentences in the at least one initial slice into complete sentences to obtain at least one document slice, and process each document slice in the at least one document slice into a slice vector to obtain the slice vector corresponding to each original document; Construct the vector knowledge base according to the slice vectors corresponding to all the original documents in the original document set.

5. The retrieval method according to claim 4, characterized in that, It also includes: Monitor the update event of the original document set; When the update event is monitored, determine the event type of the update event; If the event type is the original document replacement type, delete the slice vector corresponding to the old document before replacement from the vector knowledge base, and update the slice vector corresponding to the new document after replacement to the vector knowledge base; If the event type is the original document addition type, update the slice vector corresponding to the added document to the vector knowledge base; If the event type is the original document deletion type, delete the slice vector corresponding to the deleted document from the vector knowledge base.

6. The retrieval method according to any one of claims 1-5, characterized in that, It also includes: Determine the original document where the target document slice is located as the first original document; Obtain the meta information of the first original document, where the meta information includes one or more of the following information: the identity identifier of the first original document, the title of the first original document, the identity identifier of the knowledge base where the first original document is located, and the address of the target front-end interface, where the target front-end interface refers to the front-end interface of the business module corresponding to the first original document; Return the answer information, the path link of the first target business module, the target document slice, and the meta information of the first original document to the user.

7. A retrieval device, characterized in that, It includes: An information acquisition module, configured to acquire the user's question and the path information of all business modules included in the target business system, where the user's question is used to inquire about how to use the functions of the target business system, and the path information of any business module is used to describe the operation path from the home page of the target business system to the front-end interface of this business module; A link retrieval module, configured to generate a first prompt instruction prompt from the path information of all business modules and the user's question, input the first prompt instruction prompt into a pre-configured large model, and obtain the path link of the first target business module related to the user's question, where the first prompt instruction prompt is used to prompt the large model to retrieve the path information of the first target business module from the path information of all business modules and convert it into the path link; A slice retrieval module, configured to retrieve target document slices from a pre-built knowledge base, where the relevance of the target document slices to the user question meets the requirements. The knowledge base includes a plurality of document slices, which are obtained by segmenting an original document, and the original document is a document corresponding to a business module in the target business system. An answer generation module, configured to generate a second prompt instruction prompt from the target document slice and the user question, and input the second prompt instruction prompt into the large model to obtain answer information. The second prompt instruction prompt is used to prompt the large model to retrieve the answer information from the target document slice, and the answer information is used to indicate how to operate on the first target business module to solve the user question.

8. A computer program product, characterized in that, It includes computer-readable instructions that, when running on an electronic device, cause the electronic device to implement the retrieval method according to any one of claims 1 to 6.

9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, where: The memory is used to store a computer program; The processor is used to execute the computer program so that the electronic device can implement the retrieval method according to any one of claims 1 to 6.

10. A computer storage medium, characterized in that, The storage medium carries one or more computer programs, which, when executed by an electronic device, can cause the electronic device to implement the retrieval method according to any one of claims 1 to 6.