Information acquisition method and related device
By having conversations with target users to obtain dialogue text and using large language models to extract information, the problem of difficulty in collecting user information in the existing technology is solved, and efficient and automated information collection effect is achieved.
Patent Information
- Application Number
- CN202510126037.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-27
- Publication Date
- 2025-05-30
AI Technical Summary
The prior art is difficult to automatically collect user intention information, feedback information and personal information.
The target dialogue text is obtained by talking to the target user, and a prompt word is generated based on the target dialogue text and preset information extraction requirements, and the prompt word is input into the large language model to automatically extract user information that meets the information extraction requirements.
It realizes the automatic collection of user information by large language models, has strong understanding, expression and generalization capabilities, and is easy to expand and maintain.
Smart Images

Figure CN120067254A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of information collection, and in particular, to an information collection method and related devices. Background Art
[0002] In recent years, with the booming development of artificial intelligence technology, natural language understanding technology has made great breakthroughs. Natural language understanding technology enables computers to effectively interact and communicate with humans through natural language.
[0003] Intelligent chatbots, intelligent customer services, question-and-answer systems, etc. centered on natural language understanding have been widely applied in many fields such as e-commerce live broadcasts, finance, and healthcare. Intelligent chatbots, intelligent customer services, question-and-answer systems, etc. can provide users with the required information.
[0004] Sometimes, in addition to providing users with the required information, it is also necessary to collect users' information (such as users' intention information, feedback information, personal information, etc.). How to automatically collect the required users' information is an urgent problem to be solved at present. Summary of the Invention
[0005] In view of this, this application provides an information collection method and related devices for automatically collecting the required users' information. The technical solutions are as follows:
[0006] The first aspect of this application provides an information collection method, including:
[0007] Obtaining target dialogue text by having a conversation with a target user according to information collection requirements;
[0008] Generating a prompt word according to the target dialogue text and a preset information extraction requirement, where the prompt word is used to prompt a large language model to extract information from the target user's utterance text in the target dialogue text according to the information extraction requirement;
[0009] Inputting the prompt word into the large language model to obtain the user information output by the large language model that meets the information extraction requirement.
[0010] In a possible implementation manner, the obtaining target dialogue text by having a conversation with a target user according to information collection requirements includes:
[0011] Having a voice conversation with a target user according to a conversation script designed according to information collection requirements;
[0012] Obtaining the speech recognition result of the target user's speech to obtain the target user's utterance text;
[0013] The target dialogue text is composed of the machine's utterance text and the target user's utterance text in the dialogue script.
[0014] In a possible implementation, the information collection method further includes:
[0015] Obtain the user profile of the target user;
[0016] The generating of the prompt according to the target dialogue text and the preset information extraction requirements includes:
[0017] Generate a prompt according to the target dialogue text, the preset information extraction requirements, and the user profile of the target user, where the prompt is used to prompt the large language model to extract information from the utterance text of the target user in the target dialogue text according to the information extraction requirements and the user profile of the target user.
[0018] In a possible implementation, the information extraction requirements include information content extraction requirements and information output format requirements;
[0019] The inputting of the prompt into the large language model to obtain the user information that meets the information extraction requirements includes:
[0020] Input the prompt into the large language model to obtain structured user information whose content meets the information content extraction requirements and whose format meets the information output format requirements.
[0021] In a possible implementation, the information content extraction requirements include one or more of the following types of extraction requirements: intention type extraction requirements, key information type extraction requirements, professional knowledge judgment type extraction requirements; where:
[0022] The intention type extraction requirements are used to indicate that, according to the utterance text of the target user in the target dialogue text, select a target option from a given number of options;
[0023] The key information type extraction requirements are used to indicate extracting key information from the utterance text of the target user in the target dialogue text and regularizing the extracted key information;
[0024] The professional knowledge judgment type extraction requirements are used to indicate performing logical reasoning and professional knowledge judgment according to the utterance text of the target user in the target dialogue text.
[0025] In a possible implementation, the large language model is obtained by fine-tuning the pre-trained large language model using the training data in the training dataset;
[0026] Each piece of training data in the training dataset includes a dialogue text sample and the information collection result corresponding to the dialogue text sample;
[0027] The process of obtaining the dialogue text sample and the information collection result corresponding to the dialogue text sample includes:
[0028] Generating a dialogue text based on a preset question as the dialogue text sample;
[0029] Extracting information that meets the information extraction requirements from the user's utterance text in the dialogue text sample to obtain the information collection result corresponding to the dialogue text sample.
[0030] In a possible implementation, the generating a dialogue text based on a preset question as the dialogue text sample includes:
[0031] Using an open-source dialogue system to generate a single-round dialogue text based on a preset first question as the dialogue text sample;
[0032] And / or, using a generation rule constructed based on expert knowledge and experience to generate a single-round dialogue text based on a preset first question as the dialogue text sample;
[0033] And / or, using an open-source dialogue system to generate a multi-round dialogue text based on a preset second question as the dialogue text sample.
[0034] In a possible implementation, the using an open-source dialogue system to generate a single-round dialogue text based on a preset first question includes:
[0035] Constructing a first instruction including the preset first question, where the first instruction is used to instruct the open-source dialogue system to simulate the user to generate an answer corresponding to the first question;
[0036] Inputting the first instruction into the open-source dialogue system to obtain the answer corresponding to the first question output by the open-source dialogue system;
[0037] Composing a single-round dialogue text from the first question and the answer corresponding to the first question.
[0038] In a possible implementation, the using an open-source dialogue system to generate a multi-round dialogue text based on a preset second question includes:
[0039] Constructing a second instruction including the preset second question, where the second instruction is used to instruct the open-source dialogue system to simulate a dialogue between a machine and a user to generate a multi-round dialogue text involving the second question;
[0040] Input the second instruction into an open-source dialogue system to obtain multi-turn dialogue text output by the open-source dialogue system.
[0041] In a possible implementation, extracting information that meets the information extraction requirements from the utterance text of the user in the dialogue text sample to obtain the information collection result corresponding to the dialogue text sample includes:
[0042] Generating a prompt sample according to the dialogue text sample and the information extraction requirements;
[0043] Input the prompt sample into an open-source large language model to obtain the information collection result corresponding to the dialogue text sample output by the open-source large language model.
[0044] In a possible implementation, extracting information that meets the information extraction requirements from the utterance text of the user in the dialogue text sample to obtain the information collection result corresponding to the dialogue text sample includes:
[0045] If the information extraction requirements include intention type extraction requirements, input the utterance text of the user in the dialogue text sample into a pre-trained intention classification model to obtain the information collection result that meets the intention type extraction requirements output by the intention classification model;
[0046] If the information extraction requirements include key information type extraction requirements, retrieve the text that matches the utterance text of the user in the dialogue text sample from a pre-constructed text database, and determine the key information corresponding to the text that matches the utterance text of the user in the dialogue text sample as the information collection result that meets the key information type extraction requirements, where any text in the text database corresponds to the key information in the text;
[0047] If the information extraction requirements include professional knowledge judgment type extraction requirements, use the inference and judgment rules constructed based on expert knowledge and experience to perform logical reasoning and professional knowledge judgment on the utterance text of the user in the dialogue text sample to obtain the information collection result that meets the professional knowledge judgment type extraction requirements.
[0048] The second aspect of this application provides an information collection device, including: a dialogue interaction module, a dialogue text acquisition module, and an information collection module;
[0049] The dialogue interaction module is used to have a dialogue with the target user according to the information collection requirements;
[0050] The dialogue text acquisition module is used to acquire the dialogue text of the dialogue to obtain the target dialogue text;
[0051] The information collection module is used to generate a prompt word according to the target dialogue text and a preset information extraction requirement, input the prompt word into a large language model, and obtain user information that meets the information extraction requirement and is output by the large language model. Wherein, the prompt word is used to prompt the large language model to extract information from the speech text of the target user in the target dialogue text according to the information extraction requirement.
[0052] A third aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0053] The memory is used to store a computer program;
[0054] The processor is used to execute the computer program so that the electronic device can implement the steps of any one of the above information collection methods.
[0055] A fourth aspect of this application provides a computer storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the steps of any one of the above information collection methods.
[0056] A fifth aspect of this application provides a computer program product, including computer-readable instructions. When the computer-readable instructions run on an electronic device, the electronic device can implement the steps of any one of the above information collection methods.
[0057] By means of the above technical solutions, the information collection method provided by this application first obtains a target dialogue text by having a conversation with the target user according to the information collection requirements, then generates a prompt word according to the target dialogue text and a preset information extraction requirement, which is used to prompt the large language model to extract information from the speech text of the target user in the target dialogue text according to the information extraction requirement. Finally, the prompt word is input into the large language model, and user information that meets the information extraction requirement and is output by the large language model is obtained. The information collection method provided by this application can automatically collect user information that meets the information extraction requirement by using the large language model. Since the large language model has strong understanding ability, expression ability and generalization ability, and is easy to expand and maintain, therefore, the information collection method based on the large language model provided by this application has a good information collection effect, and this method has good generalization and practicability. Description of the Drawings
[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.
[0059] Figure 1 Schematic diagram of a system architecture related to this application;
[0060] Figure 2 Schematic diagram of a hardware structure of a terminal provided by an embodiment of this application;
[0061] Figure 3 Schematic diagram of a hardware structure of a server provided by an embodiment of this application;
[0062] Figure 4 Schematic flowchart of an information collection method provided by an embodiment of this application;
[0063] Figure 5 Schematic diagram of an information collection process provided by an embodiment of this application;
[0064] Figure 6 Schematic diagram of the structure of an information collection device provided by an embodiment of this application. Detailed implementation manners
[0065] The following describes the embodiments of this application in conjunction with the drawings in the embodiments of this application. The terms used in the implementation part of this application are only used to explain the specific embodiments of this application, and are not intended to limit this application.
[0066] The following describes the embodiments of this application in conjunction with the drawings. Those of ordinary skill in the art know that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0067] The terms "first", "second", etc. in the specification, claims and drawings of this application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances. This is only a way of distinguishing when describing objects with the same attributes in the embodiments of this application. In addition, the terms "include" and "have" 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.
[0068] It is understandable that before using the technical solutions disclosed in the embodiments of the present invention, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present invention should be informed to users in an appropriate manner and the authorization of users should be obtained in accordance with relevant laws and regulations.
[0069] It is understandable that the data involved in the present technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the corresponding laws, regulations and related provisions.
[0070] In a possible implementation manner, as Figure 1 shown, the system architecture involved in the present application may include a terminal 101 and a server 102. The terminal 101 can interact with the server 102 through a network (wired network or wireless network). Among them, the server 102 may include one or more servers ( Figure 1 including one server as an example for illustration). The terminal and the server cooperate to implement information collection.
[0071] In another possible implementation manner, the system architecture involved in the present application may include a terminal. The terminal has strong data processing capabilities and can implement information collection.
[0072] Next, the product form of the above terminal will be described.
[0073] The above terminal may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, a robot, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiments of the present application do not make any restrictions on this.
[0074] Figure 2 Shows an optional schematic diagram of the hardware structure of the terminal.
[0075] Refer to Figure 2 shown, the terminal may include a radio frequency unit 210, a memory 220, an input unit 230, a display unit 240, a camera 250 (optional), an audio circuit 260 (optional), a speaker 261 (optional), a microphone 262 (optional), a headphone jack 263 (optional), a processor 270, an external interface 280, a power supply 290, etc. Those skilled in the art can understand that Figure 2 This is only an example of the terminal and does not constitute a limitation on the terminal. It may include more or fewer components than shown in the figure, or combine some components, or different components.
[0076] The input unit 230 can be used to receive input numerical or character information and generate key signal inputs related to the user settings and function control of the terminal. Specifically, the input unit 230 may include a touch screen 231 (optional) and / or other input devices 232. The touch screen 231 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 the corresponding connection device 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 processor 270, and can receive and execute the command sent by the processor 270; the touch signal at least includes contact coordinate information. The touch screen 231 can provide an input interface and an output interface between the terminal 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 231, the input unit 230 may further include other input devices. Specifically, the other input devices 232 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0077] The display unit 240 can be used to display information input by the user or information provided to the user, various menus of the terminal, an interactive interface, file display, and / or the playback of any multimedia file.
[0078] The memory 220 can be used to store instructions and data. The memory 220 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, or their subsets or extended sets. It may also include a non-volatile random access memory; it provides for the processor 270 to manage the hardware, software, and data resources in the computing processing device, support control software and applications. It is also used for the storage of multimedia files and the storage of running programs and applications.
[0079] The processor 270 is the control center of the terminal, connecting various parts of the entire terminal through various interfaces and circuits. By running or executing instructions stored in the memory 220 and invoking data stored in the memory 220, it executes various functions of the terminal and processes data, thereby exercising overall control over the terminal. Optionally, the processor 270 may include one or more processing units; preferably, the processor 270 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 processor 270 either. In some embodiments, the processor and the memory can be implemented on a single chip, and in some embodiments, they can also be separately implemented on independent chips. The processor 270 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 the data and programs in the memory 220, so that each functional module therein executes corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.
[0080] Among them, the memory 220 can be used to store software codes related to the information collection method. The processor 270 can execute the software codes in the memory 220 or can also schedule other units (such as the above-mentioned input unit 230 and display unit 240) to implement corresponding functions.
[0081] The radio frequency unit 210 (optional) can be used for receiving and sending information or signals during a call. For example, after receiving the downlink information of the base station, it is given to the processor 270 for processing; in addition, it sends the designed uplink data to the base station. Generally, the radio frequency unit 210 includes but is not limited to antennas, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the radio frequency unit 210 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 the 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.
[0082] Among them, in the embodiments of the present application, the radio frequency unit 210 can send data to other devices and can also receive data sent by other devices. It should be understood that the radio frequency unit 210 is optional and can be replaced by other communication interfaces, such as a network interface.
[0083] The terminal further includes a power supply 290 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 270 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system.
[0084] The terminal further includes an external interface 280. The external interface can be a standard Micro USB interface or a multi-pin connector, and can be used to connect the terminal to other devices for communication and can also be used to connect a charger to charge the terminal.
[0085] Although not shown, the terminal may further include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which will not be elaborated here.
[0086] Next, the product form of the above server will be described.
[0087] Figure 3 A schematic structural diagram of the above server is provided, as Figure 3 shown, the server may include a bus 301, a processor 302, a communication interface 303, and a memory 304. The processor 302, the memory 304, and the communication interface 303 communicate through the bus 301.
[0088] The bus 301 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 3 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.
[0089] The processor 302 can be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc.
[0090] The memory 304 may include a volatile memory, such as a random access memory (RAM). The memory 304 may 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).
[0091] The memory 304 can be used to store software code related to the information collection method. The processor 302 can call the software code stored in the memory 304 and can also schedule other units to implement corresponding functions.
[0092] The processors in the above terminal and server (such as the processor 270 and the processor 302) can be hardware circuits (such as an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with the function of executing instructions, such as a CPU, a DSP, etc., or a hardware system without the function of executing instructions, such as an ASIC, an FPGA, etc., or a combination of the above hardware system without the function of executing instructions and the hardware system with the function of executing instructions.
[0093] In order to be able to automatically collect the required user information, the inventors of this case conducted research. The initial idea was to obtain the target dialogue text by having a conversation with the target user according to the information collection requirements, and to extract the required user information from the target dialogue text using a rule-based information extraction method, that is, to identify and extract the required user information through rules pre-designed by experts. For example, regular expressions are used to match and extract information in a specific format, such as dates, phone numbers, email addresses, etc.
[0094] In the research on the rule-based information extraction method, the inventors of this case found that although the rule-based information extraction method can automatically collect the required user information, it is difficult to expand and maintain, and its generalization ability is limited. In view of the above defects of the rule-based information extraction method, the inventors of this case continued their research and came up with an information extraction method based on a small-scale deep learning model during the research process, that is, training a small-scale deep learning model with training data in advance to enable it to have the ability of information extraction. When performing information extraction, obtain the target dialogue text by having a conversation with the target user according to the information collection requirements, and use the trained model to extract the required user information from the target dialogue text.
[0095] In the research on the information extraction method based on a small-scale deep learning model, the inventors of this case found that: small-scale deep learning models are prone to overfitting on training data, especially when the training data is scarce. Usually, they will show poor generalization ability when facing data with a distribution different from the training data set; small-scale deep learning models cannot process long texts; a small-scale deep learning model usually can only handle one type of task. When the types of information to be extracted are numerous and complex, different models need to be customized for information extraction; as time changes, the requirements for information extraction may change. When the information extraction requirements change, the model needs to be retrained.
[0096] In view of the many problems existing in the above information extraction method based on a small-scale deep learning model, the inventors of this case continued their research and found during the research process that the large language model technology has developed rapidly in recent years. Compared with small-scale deep learning models, large language models have many advantages: large language models have stronger understanding ability, expression ability and generalization ability, and are easy to expand and maintain; large language models can learn and execute multiple tasks within a single framework without training a dedicated model for each task; large models usually perform better in few-shot learning and can effectively learn even with only a very small number of samples; large language models have the ability to store and remember more knowledge information. They can be trained to remember a large amount of text data, so as to be able to obtain and use more world knowledge; large language models can process long texts; large models are often more robust to input noise and can better handle spelling mistakes, grammar mistakes and non-standard usages. In view of the many advantages of large language models, the inventors of this case thought of using large language models to achieve information collection. Continuing the research along this line of thought, a method for information collection based on a large language model was finally proposed.
[0097] Next, the information collection method provided by this application will be introduced through the following embodiments.
[0098] Please refer to Figure 4, showing a schematic flow chart of the information collection method provided by the embodiments of the present application. The information collection method may include:
[0099] Step S401: Obtain target dialogue text by having a conversation with the target user according to the information collection requirements.
[0100] It is possible to have a conversation with the target user according to the information collection requirements, and then obtain the dialogue text of the conversation with the target user, that is, the target dialogue text.
[0101] In a possible implementation manner, it is possible to obtain the target dialogue text by having a voice conversation with the target user according to the information collection requirements. That is, it is possible to have a voice conversation with the target user according to the information collection requirements, and then obtain the dialogue text of the voice conversation, that is, the target dialogue text (for example, the target dialogue text may be the dialogue text generated by the machine having a voice conversation with the user in an intelligent outbound call scenario).
[0102] In another possible implementation manner, it is possible to obtain the target dialogue text by having a text conversation with the target user according to the information collection requirements. That is, it is possible to have a text conversation with the target user according to the information collection requirements, and then obtain the target dialogue text.
[0103] Step S402: Generate a prompt word according to the target dialogue text and the preset information extraction requirements.
[0104] Among them, the prompt word is used to prompt the large language model to extract information from the speech text of the target user in the target dialogue text according to the information extraction requirements.
[0105] Optionally, in addition to obtaining the target dialogue text, it is also possible to obtain the user profile of the target user. Furthermore, it is possible to generate a prompt word for information extraction according to the target dialogue text, the preset information extraction requirements, and the user profile of the target user. The introduction of the user profile can improve the accuracy of the collected information.
[0106] Step S403: Input the prompt word into the large language model to obtain the user information output by the large language model that meets the information extraction requirements.
[0107] Input the prompt word for information extraction into the large language model. The large language model extracts information from the speech text of the target user in the target dialogue text according to the information extraction requirements and the user profile of the target user (optional), and outputs the information extraction result, that is, the user information that meets the information extraction requirements (such as user intention information, user feedback information, user personal information, etc.).
[0108] The information collection method provided by the embodiment of the present application first obtains the target dialogue text by having a conversation with the target user according to the information collection requirements, then generates a prompt word for prompting the large language model to extract information from the speech text of the target user in the target dialogue text according to the target dialogue text and the preset information extraction requirements, and finally inputs the prompt word into the large language model to obtain the user information that meets the information extraction requirements output by the large language model. The information collection method provided by the embodiment of the present application can automatically collect user information that meets the information extraction requirements by using the large language model. Since the large language model has strong understanding ability, expression ability and generalization ability, and is easy to expand and maintain, therefore, the information collection method based on the large language model provided by the embodiment of the present application has a good information collection effect, and this method has good generalization and practicability.
[0109] In another embodiment of the present application, the specific process of "step S401: obtaining the target dialogue text by having a conversation with the target user according to the information collection requirements" is introduced.
[0110] As mentioned in the above embodiment, the target dialogue text can be obtained by having a voice conversation with the target user according to the information collection requirements. This embodiment focuses on introducing this process.
[0111] The implementation process of obtaining the target dialogue text by having a voice conversation with the target user according to the information collection requirements may include: having a voice conversation with the target user according to the dialogue script designed according to the information collection requirements; obtaining the speech recognition result of the voice of the target user to obtain the speech text of the target user; and forming the target dialogue text by the speech text of the machine in the dialogue script and the speech text of the target user.
[0112] The following shows an example of the target dialogue text:
[0113] Medical robot: Hello, I am a follow-up staff from ** City ** Hospital. Are you Li xx?
[0114] User: Cold.
[0115] Medical robot: I am a follow-up staff from Lvliang People's Hospital. Are you Li xx himself?
[0116] User: Oh, what's wrong?
[0117] Medical robot: Okay, it's like this. You were hospitalized in our hospital due to cerebral infarction before. Now we want to know whether you are recuperating at home or going to work normally?
[0118] User: Recuperating at home.
[0119] Medical robot: Okay, since your discharge, have you been hospitalized again due to any other diseases?
[0120] User: Um.
[0121] Medical robot: Then what disease caused you to be hospitalized again?
[0122] User: Dizziness.
[0123] Medical robot: Okay, specifically when were you hospitalized again?
[0124] User: Yesterday.
[0125] Medical robot: Okay, can you walk by yourself now?
[0126] User: Yes.
[0127] Medical robot: May I ask if you can take care of your daily activities at home?
[0128] User: Yes.
[0129] Medical robot: Then are there any other uncomfortable parts of your body now, or any sequelae?
[0130] User: Still dizzy occasionally.
[0131] Medical robot: Okay. May I ask if your blood pressure measured recently is normal?
[0132] User: Systolic pressure is 160.
[0133] Medical robot: Then do you usually take medicine regularly?
[0134] User: Yes.
[0135] Medical robot: Okay, I understand your situation. Please pay attention to rest, have a reasonable diet, and go to the hospital for a follow-up visit on time. Thank you for answering the call. Wish you and your family good health. Goodbye.
[0136] It should be noted that the above information collection requirements are used to indicate what information needs to be collected. For example, user personal information, user intention information, user feedback information, etc. The dialogue script is designed based on the information collection requirements, and it can but is not limited to including opening remarks, asking questions, etc. The conversation with the target user is carried out based on the dialogue script. Such as Figure 5As shown, the conversation with the target user can be implemented based on a speech recognition module, a natural language processing module, and a text-to-speech module. Among them, the text-to-speech module is used to convert the text in the conversation script into speech for interaction with the target user. The speech recognition module is used to perform speech recognition on the speech of the target user to obtain the speech text of the target user. The natural language processing module is used to perform semantic understanding on the speech text of the target user to determine whether the answer of the target user meets the expectation and whether further questions need to be asked.
[0137] In another embodiment of the present application, the specific implementation process of "step S402: Generate a prompt word according to the target dialogue text and the preset information extraction requirements" is introduced.
[0138] Before introducing the specific implementation process of generating a prompt word according to the target dialogue text and the preset information extraction requirements, the preset information extraction requirements are introduced first.
[0139] The information extraction requirements in this embodiment are set according to the information collection requirements. In a possible implementation manner, the information extraction requirements in this embodiment may include information content extraction requirements and information output format requirements. Among them, the information content collection requirements are used to indicate what kind of information to extract, and the information output format requirements are used to indicate in what form the extracted information will be output.
[0140] In a possible implementation manner, the information content extraction requirements may include one or more of the following types of extraction requirements: intention type extraction requirements, key information type extraction requirements, and professional knowledge judgment type extraction requirements.
[0141] Among them, the intention type extraction requirements are used to indicate that, according to the speech text of the target user in the target dialogue text, select the target option from a given number of options. For example, when asking whether it is the patient himself / herself answering the phone, and the given number of options are family member / self / deceased / not self / irrelevant answer, it is required to select the target option from the given options family member / self / deceased / not self / irrelevant answer according to the answer of the target user.
[0142] Among them, the extraction requirements for key information types are used to indicate extracting key information from the speech text of the target user in the target dialogue text and regularizing the extracted key information. For example, when asking whether there are sequelae, and the target user's answer is "I feel a bit dizzy in the head", it is required to extract the key information "a bit dizzy in the head" from the target user's answer and regularize "a bit dizzy in the head" to "dizzy" in combination with the standard terminology library. Another example, when asking for suggestions from the target user, it is required to extract the suggestions from the target user's answer and regularize the extracted suggestions (such as oral language regularization, typo correction, etc.). Another example, when asking about the exercise duration of the target user, it is required to extract the duration information from the target user's answer and regularize the extracted duration information into a specified unit, such as hours / day.
[0143] Among them, the extraction requirements for professional knowledge judgment are used to indicate logical reasoning and professional knowledge judgment based on the speech text of the target user in the target dialogue text. For example, when asking whether the blood pressure of the target user is normal, and the target user's answer is "The systolic blood pressure is 160", it is required to make inferences and judgments based on the target user's answer and give the judgment result "abnormal". Another example, when asking the target user when to go to the hospital again, and the target user's answer is "yesterday", it is required to infer the standard output of xx year xx month xx day based on the target user's answer and the dialogue time of xx year xx month xx day this time.
[0144] In addition to the extraction requirements for information content, the information extraction requirements can also include the requirements for the output format of the extracted information, that is, the information output format requirements. The information output format requirements are used to indicate in what form the extracted information is output, such as json, table, etc.
[0145] The information in json format is as follows:
[0146] {"symptom":"asymptomatic","bloodPressure":"abnormal","diastolicPressure":160,
[0147] "medicationCompliance":"regular","medicationName":""}.
[0148] The information in table form is as follows:
[0149] Symptom bloodPressure diastolicPressure medicationCompliance medicationName Asymptomatic Abnormal 160 Regular None
[0150] Next, the specific implementation process of generating prompt words according to the target dialogue text and the preset information extraction requirements will be introduced.
[0151] According to the target dialogue text and the preset information extraction requirements, the specific implementation process of generating the prompt can include: obtaining the preset prompt template (i.e., the Prompt template), which includes a dialogue information slot and a requirement information slot; filling the target dialogue text into the dialogue information slot of the prompt template, and filling the information extraction requirements into the requirement information slot of the prompt template, so as to obtain the prompt for information extraction (i.e., the Prompt for information extraction).
[0152] As mentioned in the above embodiment, in order to improve the information collection effect, the user portrait of the user can be introduced. An example of the user portrait is shown below:
[0153] Name: Li xx
[0154] Age: 28
[0155] Gender: Male
[0156] Medical visit time: xx year xx month xx day
[0157] Medical visit hospital: xx Hospital
[0158] System call time: xx year xx month xx day.
[0159] If the user portrait is introduced, in addition to the dialogue information slot and the requirement information slot, the preset prompt template also includes a user portrait information slot. When generating the prompt for information extraction, in addition to filling the target dialogue text into the dialogue information slot of the prompt template and filling the information extraction requirements into the requirement information slot of the prompt template, it is also necessary to fill the user portrait of the target user into the user portrait information slot of the prompt template.
[0160] It should be noted that if the information extraction requirements include intention type extraction requirements, the prompt is used to prompt the large language model to select the target option from a given number of options according to the utterance text of the target user in the target dialogue text. If the information extraction requirements include key information type extraction requirements, the prompt is used to prompt the large language model to extract key information from the utterance text of the target user in the target dialogue text and regularize the extracted key information. If the information extraction requirements include professional knowledge judgment type extraction requirements, the prompt is used to prompt the large language model to perform logical reasoning and professional knowledge judgment according to the utterance text of the target user in the target dialogue text.
[0161] Next, the "Step S403 in the above embodiment: Input the prompt into the large language model to obtain the user information that meets the information extraction requirements output by the large language model" will be introduced.
[0162] The process of inputting a prompt into a large language model to obtain user information that meets the information extraction requirements output by the large language model may include: inputting the prompt into the large language model to obtain structured user information whose content meets the information content extraction requirements and whose format meets the information output format requirements.
[0163] As mentioned in the above embodiments, the information extraction requirements may include information content extraction requirements and information output format requirements. After generating a prompt based on the target dialogue text, the information extraction requirements, and the user profile of the target user (optional), the generated prompt is input into the large language model. The large language model extracts information from the utterance text of the target user in the target dialogue text according to the information content extraction requirements and the user profile of the target user (optional) to obtain user information that meets the information content extraction requirements, and processes the user information that meets the information content extraction requirements into structured information that meets the information output format requirements and outputs it.
[0164] In a possible implementation manner, the large language model in the above embodiments is obtained by fine-tuning a pre-trained large language model (such as llama, etc.) using the training data in the training dataset. Each piece of training data in the training dataset includes a dialogue text sample and the information collection result corresponding to the dialogue text sample.
[0165] Next, the process of obtaining the training data in the training dataset will be introduced.
[0166] In a possible implementation manner, the process of obtaining training data includes:
[0167] Step a1: Generate a dialogue text based on a preset question as a dialogue text sample.
[0168] There are multiple implementation manners for step a1. The following implementation manners are provided in this embodiment.
[0169] The first implementation manner: Use an open-source dialogue system to generate a single-round dialogue text based on a preset first question as a dialogue text sample.
[0170] Specifically, the process of using an open-source dialogue system to generate a single-round dialogue text based on a preset first question may include:
[0171] Step a1-1-1: Construct a first instruction including the preset first question.
[0172] The first instruction is used to instruct the open-source dialogue system to simulate the user to generate an answer corresponding to the preset first question. An example of the first instruction is shown below:
[0173] "According to the following question, simulate the user to generate an answer related to 'having sequelae'. The question is:
[0174] Intelligent robot: Do you have any sequelae recently?
[0175] User: ”.
[0176] Step a1-1-2: Input the first instruction into the open-source dialogue system to obtain the answer corresponding to the preset first question output by the open-source dialogue system.
[0177] Input the first instruction into the open-source dialogue system, and the open-source dialogue system generates and outputs the answer corresponding to the preset first question according to the instruction
[0178] Step a1-1-3: Compose a single-round dialogue text from the preset first question and the answer corresponding to the preset first question.
[0179] The second implementation method: Use the generation rules constructed based on expert experience and knowledge to generate a single-round dialogue text according to the preset first question as the dialogue text sample.
[0180] Specifically, the process of using the generation rules constructed based on expert experience and knowledge to generate a single-round dialogue text according to the preset first question includes:
[0181] Step a1-2-1: Use the generation rules constructed based on expert experience and knowledge to generate the answer corresponding to the preset first question.
[0182] Step a1-2-2: Compose a single-round dialogue text from the preset first question and the answer corresponding to the preset first question.
[0183] The third implementation method: Use the open-source dialogue system to generate a multi-round dialogue text according to the preset second question as the dialogue text sample.
[0184] Specifically, the process of using the open-source dialogue system to generate a multi-round dialogue text according to the preset second question includes:
[0185] Step a1-3-1: Construct a second instruction including the preset second question.
[0186] Among them, the second instruction is used to instruct the open-source dialogue system to simulate the dialogue between the machine and the user and generate a multi-round dialogue text involving the preset second question. An example of the second instruction is shown below:
[0187] “This is an intelligent outbound call scenario. Please simulate the dialogue between the intelligent robot and the user and generate a multi-round interaction process.
[0188] The information involved is:
[0189] Is the blood pressure normal:
[0190] Symptom presence: Yes / No / Uncertain
[0191] Is the medication taken regularly: ".
[0192] Step a1-3-2: Input the second instruction into an open-source dialogue system to obtain the multi-turn dialogue text output by the open-source dialogue system.
[0193] Input the second instruction into an open-source dialogue system. The open-source dialogue system generates multi-turn dialogue text according to the preset second question and outputs it.
[0194] Any one or more of the above three implementation methods can be used to obtain dialogue text samples. To enable the large language model to have better performance, it is preferred to use the above three implementation methods to obtain dialogue text samples.
[0195] Step a2: Extract the information that meets the information extraction requirements from the dialogue text sample to obtain the information collection result corresponding to the dialogue text sample.
[0196] There are multiple implementation methods for step a2. This embodiment provides the following two implementation methods.
[0197] The first implementation method: Generate a prompt word sample according to the dialogue text sample and the information extraction requirements, and input the prompt word sample into an open-source large language model to obtain the information collection result corresponding to the dialogue text sample output by the open-source large language model.
[0198] Optionally, a user portrait sample (the user portrait of the user involved in the dialogue text sample) can be obtained. Generate a prompt word sample according to the dialogue text sample, the information extraction requirements, and the user portrait sample, and then input the prompt word sample into an open-source large language model to obtain the information collection result corresponding to the dialogue text sample.
[0199] The second implementation method: If the information extraction requirements include intention type extraction requirements, input the utterance text of the user in the dialogue text sample into a pre-trained intention classification model to obtain the information collection result that meets the intention type extraction requirements output by the intention classification model; if the information extraction requirements include key information type extraction requirements, retrieve the text that matches the utterance text of the user in the dialogue text sample from a pre-constructed text database, and use the key information corresponding to the text that matches the utterance text of the user in the dialogue text sample as the information collection result that meets the key information type extraction requirements, where any text in the text database corresponds to the key information in that text; if the information extraction requirements sample includes professional knowledge judgment type extraction requirements, use the inference and judgment rules constructed based on expert experience and knowledge to perform inference and judgment on the utterance text of the user in the dialogue text sample to obtain the information collection result that meets the professional knowledge judgment type extraction requirements.
[0200] It should be noted that for any dialogue text sample x, either of the above two methods can be used to obtain the information collection result y corresponding to the dialogue text sample x, or the above two methods can be used to separately obtain the information collection results y1 and y2 corresponding to the dialogue text sample. After obtaining y1 and y2, in one possible implementation, a training data can be composed of x and y1, and a training data can be composed of x and y2. In another possible implementation, the better information collection result can be selected from y1 and y2, and a training data can be composed of the dialogue text sample x and the better information collection result. In yet another possible implementation, one information collection result can be referred to for adjusting the other information collection result, and a training data can be composed of the dialogue text sample x and the adjusted information collection result.
[0201] In addition, it should be noted that after obtaining multiple dialogue text samples by using the above-provided dialogue text sample acquisition method, in one possible implementation, the above information collection result acquisition method can be used to obtain the information collection results respectively corresponding to all the dialogue text samples. In another possible implementation, for some of the dialogue text samples, the above method can be used to obtain the information collection results, and for another part of the dialogue text samples, the corresponding information collection results can be constructed by using the manual construction method.
[0202] After obtaining multiple training data through the above implementation methods, the pre-trained large language model (such as llama, etc.) can be fine-tuned using the multiple training data. The fine-tuned large language model is the final large language model used to extract the required information from the target dialogue text.
[0203] In addition, it should be noted that when the information extraction requirements change (such as adding some requirements), there is no need to train the large language model. When performing information extraction, only a prompt word needs to be generated according to the dialogue text of the information to be extracted and the new information extraction requirements, and then the prompt word generated according to the new information extraction requirements is input into the large language model, and the information that meets the new information extraction requirements can be obtained.
[0204] For example, if the original information extraction requirements are "whether there are symptoms, asking whether the blood pressure is normal, when to be hospitalized again", and the new extraction requirement "whether able to walk" is added, then only a prompt word needs to be generated according to the dialogue text of the information to be extracted and the new information extraction requirements "whether there are symptoms, asking whether the blood pressure is normal, when to be hospitalized again, whether able to walk", and then the prompt word generated according to the new information extraction requirements is input into the large language model, without retraining the large language model.
[0205] The above introduces the information collection method provided by the embodiments of the present application. The following will introduce the device corresponding to the above information collection method.
[0206] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of an information collection device provided by an embodiment of the present application. The information collection device may include: a dialogue interaction module 601, a dialogue text acquisition module 602, and an information collection module 603.
[0207] The dialogue interaction module 601 is used to have a dialogue with the target user according to the information collection requirements.
[0208] The dialogue text acquisition module 602 is used to acquire the dialogue text of the dialogue with the target user to obtain the target dialogue text.
[0209] The information collection module 603 is used to generate a prompt word according to the target dialogue text and the preset information extraction requirements, input the prompt word into the large language model, and obtain the user information that meets the information extraction requirements output by the large language model.
[0210] Among them, the prompt word is used to prompt the large language model to extract information from the speech text of the target user in the target dialogue text according to the information extraction requirements.
[0211] In a possible implementation manner, when the dialogue interaction module 601 has a dialogue with the target user according to the information collection requirements, it is specifically used to have a voice dialogue with the target user according to the dialogue script designed according to the information collection requirements.
[0212] When the dialogue text acquisition module 602 acquires the dialogue text of the dialogue with the target user, it is specifically used for:
[0213] acquiring the speech recognition result of the target user's speech to obtain the speech text of the target user;
[0214] forming the target dialogue text from the machine's speech text and the target user's speech text in the dialogue script.
[0215] In a possible implementation manner, the dialogue interaction module 601 may include: a speech recognition module, a natural language processing module, and a text-to-speech module.
[0216] The text-to-speech module is used to convert the text in the dialogue script into speech for interaction with the target user.
[0217] The speech recognition module is used to perform speech recognition on the target user's speech to obtain the speech text of the target user.
[0218] The natural language processing module is used to perform semantic understanding on the speech text of the target user, judge whether the target user's answer meets the expectation, and whether further questions need to be asked.
[0219] In a possible implementation, the information collection device may further include: a user profile acquisition module.
[0220] The user profile acquisition module is used to acquire the user profile of the target user.
[0221] When generating a prompt word according to the target dialogue text and the preset information extraction requirements, the information collection module 603 is specifically used for:
[0222] Generating a prompt word according to the target dialogue text, the preset information extraction requirements, and the user profile of the target user. The prompt word is used to prompt the large language model to extract information from the utterance text of the target user in the target dialogue text according to the information extraction requirements and the user profile of the target user.
[0223] In a possible implementation, the information extraction requirements include information content extraction requirements and information output format requirements.
[0224] When the information collection module 603 inputs the prompt word into the large language model and obtains the user information that meets the information extraction requirements output by the large language model, it is specifically used for:
[0225] Inputting the prompt word into the large language model to obtain structured user information whose content meets the information content extraction requirements and whose format meets the information output format requirements.
[0226] In a possible implementation, the information content extraction requirements include one or more of the following types of extraction requirements: intention type extraction requirements, key information type extraction requirements, professional knowledge judgment type extraction requirements.
[0227] The intention type extraction requirements are used to indicate that, according to the utterance text of the target user in the target dialogue text, select the target option from a given number of options; the key information type extraction requirements are used to indicate extracting key information from the utterance text of the target user in the target dialogue text and regularizing the extracted key information; the professional knowledge judgment type extraction requirements are used to indicate performing logical reasoning and professional knowledge judgment according to the utterance text of the target user in the target dialogue text.
[0228] In a possible implementation, the large language model is obtained by fine-tuning and training the pre-trained large language model using the training data in the training dataset. Each piece of training data in the training dataset includes a dialogue text sample and the information collection result corresponding to the dialogue text sample.
[0229] The information collection method may further include: a training data acquisition module.
[0230] The training data acquisition module is used for:
[0231] Generate dialogue text according to a preset question as a dialogue text sample;
[0232] Extract information that meets the information extraction requirements from the user's utterance text in the dialogue text sample to obtain the information collection result corresponding to the dialogue text sample.
[0233] In a possible implementation, when the training data acquisition module generates dialogue text according to a preset question as a dialogue text sample, it is specifically used for:
[0234] Use an open-source dialogue system to generate a single-round dialogue text according to a preset first question as a dialogue text sample;
[0235] And / or, use the generation rules constructed based on expert knowledge and experience to generate a single-round dialogue text according to a preset first question as a dialogue text sample;
[0236] And / or, use an open-source dialogue system to generate a multi-round dialogue text according to a preset second question as a dialogue text sample.
[0237] In a possible implementation, when the training data acquisition module uses an open-source dialogue system to generate a single-round dialogue text according to a preset first question, it is specifically used for:
[0238] Construct a first instruction including the preset first question, where the first instruction is used to instruct the open-source dialogue system to simulate the user to generate an answer corresponding to the first question;
[0239] Input the first instruction into the open-source dialogue system to obtain the answer corresponding to the first question output by the open-source dialogue system;
[0240] Form a single-round dialogue text from the first question and the answer corresponding to the first question.
[0241] In a possible implementation, when the training data acquisition module uses an open-source dialogue system to generate a multi-round dialogue text according to a preset second question, it is specifically used for:
[0242] Construct a second instruction including the preset second question, where the second instruction is used to instruct the open-source dialogue system to simulate the dialogue between the machine and the user to generate a multi-round dialogue text involving the second question;
[0243] Input the second instruction into the open-source dialogue system to obtain the multi-round dialogue text output by the open-source dialogue system.
[0244] In a possible implementation, when the training data acquisition module extracts information that meets the information extraction requirements from the user's utterance text in the dialogue text sample to obtain the information collection result corresponding to the dialogue text sample, it is specifically used for:
[0245] Generate a prompt sample according to the dialogue text sample and the information extraction requirements;
[0246] Input the prompt sample into an open-source large language model to obtain the information collection result corresponding to the dialogue text sample output by the open-source large language model.
[0247] In a possible implementation, when the training data acquisition module extracts information that meets the information extraction requirements from the user's utterance text in the dialogue text sample to obtain the information collection result corresponding to the dialogue text sample, it is specifically used for:
[0248] If the information extraction requirements include intention type extraction requirements, input the user's utterance text in the dialogue text sample into a pre-trained intention classification model to obtain the information collection result that meets the intention type extraction requirements output by the intention classification model;
[0249] If the information extraction requirements include key information type extraction requirements, retrieve the text that matches the user's utterance text in the dialogue text sample from a pre-constructed text database, and determine the key information corresponding to the text that matches the user's utterance text in the dialogue text sample as the information collection result that meets the key information type extraction requirements, where any text in the text database corresponds to the key information in that text;
[0250] If the information extraction requirements include professional knowledge judgment type extraction requirements, use the reasoning and judgment rules constructed based on expert knowledge and experience to perform logical reasoning and professional knowledge judgment on the user's utterance text in the dialogue text sample to obtain the information collection result that meets the professional knowledge judgment type extraction requirements.
[0251] The information collection device provided by the embodiment of the present application first obtains the target dialogue text by having a conversation with the target user according to the information collection requirements, then generates a prompt word for prompting the large language model to extract information from the speech text of the target user in the target dialogue text according to the target dialogue text and the preset information extraction requirements, and finally inputs the prompt word into the large language model to obtain the user information that meets the information extraction requirements output by the large language model. The information collection device provided by the embodiment of the present application can automatically collect the user information that meets the information extraction requirements by using the large language model. Since the large language model has strong understanding ability, expression ability and generalization ability, and is easy to expand and maintain, therefore, the information collection device based on the large language model provided by the embodiment of the present application has a good information collection effect, and has good generalization and practicability.
[0252] The embodiment of the present application also provides an electronic device, which may include: at least one processor, at least one communication interface, at least one memory and at least one communication bus.
[0253] In the embodiment of the present application, the number of the processor, the communication interface, the memory and the communication bus is at least one, and the processor, the communication interface and the memory complete mutual communication through the communication bus;
[0254] The processor may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiment of the present application, etc.;
[0255] The memory may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;
[0256] Wherein, the memory stores a program, and the processor can call the program stored in the memory, and the program is used to implement the steps of the information collection method provided in the above embodiment.
[0257] The embodiment of the present application also provides a computer storage medium, which carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can be enabled to implement the steps of the information collection method provided in the above embodiment.
[0258] The 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 the steps of the information collection method provided in the above embodiment.
[0259] 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 attached drawings of the device embodiments provided in this application, the connection relationships between the modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
[0260] Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by dedicated hardware including application-specific 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 used to implement the same function can also be various, such as analog circuits, digital circuits or dedicated circuits. However, for this application, in more cases, software program implementation is a better implementation method. Based on such an understanding, the technical solution of this 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 to enable a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in various embodiments of this application.
[0261] 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.
[0262] 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, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or 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)).
Claims
1. An information collection method, characterized in that: include: Obtain the target conversation text by communicating with the target user according to the information collection requirements; Generate prompt words according to the target conversation text and preset information extraction requirements, wherein the prompt words are used to prompt the large language model to extract information from the speech text of the target user in the target conversation text according to the information extraction requirements; The prompt word is input into a large language model to obtain user information output by the large language model that meets the information extraction requirement.
2. The information collection method according to claim 1, characterized in that: The step of acquiring the target conversation text by having a conversation with the target user according to the information collection requirements includes: Conduct voice conversations with target users based on conversation scripts designed according to information collection requirements; Acquire a speech recognition result of the target user's speech to obtain the target user's utterance text; The target dialogue text is composed of the speech text of the machine in the dialogue script and the speech text of the target user.
3. The information collection method according to claim 1, characterized in that: Also includes: Obtaining a user profile of the target user; The step of generating prompt words according to the target dialogue text and preset information extraction requirements includes: Prompt words are generated according to the target conversation text, preset information extraction requirements and the user portrait of the target user, wherein the prompt words are used to prompt the large language model to extract information from the speech text of the target user in the target conversation text according to the information extraction requirements and the user portrait of the target user.
4. The information collection method according to claim 1, characterized in that: The information extraction requirements include information content extraction requirements and information output format requirements; The step of inputting the prompt word into a large language model to obtain user information output by the large language model that meets the information extraction requirement includes: The prompt word is input into a large language model to obtain structured user information output by the large language model, the content of which meets the information content extraction requirement and the format of which meets the information output format requirement.
5. The information collection method according to claim 4, characterized in that: The information content extraction requirements include one or more of the following types of extraction requirements: intention extraction requirements, key information extraction requirements, and professional knowledge judgment extraction requirements; among which: The intention class extraction requirement is used to indicate that a target option is selected from a given number of options according to the speech text of the target user in the target dialogue text; The key information extraction requirement is used to instruct to extract key information from the speech text of the target user in the target conversation text, and to regularize the extracted key information; The professional knowledge judgment extraction requirement is used to instruct to perform logical reasoning and professional knowledge judgment based on the speech text of the target user in the target dialogue text.
6. The information collection method according to any one of claims 1 to 5, characterized in that: The large language model is obtained by fine-tuning a pre-trained large language model using training data in the training data set; Each piece of training data in the training data set includes a conversation text sample and an information collection result corresponding to the conversation text sample; The process of acquiring the dialogue text sample and the information collection result corresponding to the dialogue text sample includes: Generate a dialogue text as a dialogue text sample according to the preset questions; Information that meets information extraction requirements is extracted from the user's speech text in the dialogue text sample to obtain an information collection result corresponding to the dialogue text sample.
7. The information collection method according to claim 6, characterized in that: The step of generating a dialogue text based on the preset question as a dialogue text sample includes: Using an open source dialogue system, a single-round dialogue text is generated according to the preset first question as a dialogue text sample; and / or, using generation rules constructed based on expert knowledge and experience, generating a single-round dialogue text according to a preset first question as a dialogue text sample; And / or, using an open source dialogue system, based on a preset second question, generate multiple rounds of dialogue texts as dialogue text samples.
8. The information collection method according to claim 7, characterized in that: The method of using an open source dialogue system to generate a single-round dialogue text according to a preset first question includes: Constructing a first instruction including a preset first question, wherein the first instruction is used to instruct the open source dialogue system to simulate a user to generate an answer corresponding to the first question; Inputting the first instruction into an open source dialogue system, and obtaining an answer corresponding to the first question output by the open source dialogue system; A single-round dialogue text is composed of the first question and the answer corresponding to the first question.
9. The information collection method according to claim 7, characterized in that: The open source dialogue system is used to generate multiple rounds of dialogue texts according to the preset second question, including: Constructing a second instruction including a preset second question, wherein the second instruction is used to instruct the open source dialogue system to simulate a dialogue between the machine and the user, and generate a multi-round dialogue text involving the second question; The second instruction is input into an open source dialogue system to obtain a multi-round dialogue text output by the open source dialogue system.
10. The information collection method according to claim 6, characterized in that: The extracting information satisfying the information extraction requirement from the user's speech text in the conversation text sample to obtain the information collection result corresponding to the conversation text sample includes: Generate a prompt word sample according to the dialogue text sample and information extraction requirements; The prompt word sample is input into an open source large language model to obtain an information collection result corresponding to the dialogue text sample output by the open source large language model.
11. The information collection method according to claim 6, characterized in that: The extracting information satisfying the information extraction requirement from the user's speech text in the conversation text sample to obtain the information collection result corresponding to the conversation text sample includes: If the information extraction requirement includes an intent class extraction requirement, inputting the user's speech text in the conversation text sample into a pre-trained intent classification model to obtain an information collection result output by the intent classification model that meets the intent class extraction requirement; If the information extraction requirement includes a key information extraction requirement, a text matching the user's speech text in the conversation text sample is retrieved from a pre-constructed text database, and key information corresponding to the text matching the user's speech text in the conversation text sample is determined as an information collection result that meets the key information extraction requirement, wherein any text in the text database corresponds to the key information in the text; If the information extraction requirements include professional knowledge judgment type extraction requirements, the inference and judgment rules constructed based on expert knowledge and experience are used to perform logical reasoning and professional knowledge judgment on the user's speech text in the dialogue text sample to obtain information collection results that meet the professional knowledge judgment type extraction requirements.
12. An information collection device, characterized in that: include: Dialogue interaction module, dialogue text acquisition module and information collection module; The dialogue interaction module is used to conduct dialogue with the target user according to the information collection requirements; The dialogue text acquisition module is used to acquire the dialogue text of the dialogue to obtain the target dialogue text; The information collection module is used to generate prompt words according to the target dialogue text and preset information extraction requirements, input the prompt words into the large language model, and obtain user information that meets the information extraction requirements output by the large language model, wherein the prompt words are used to prompt the large language model to extract information from the speech text of the target user in the target dialogue text according to the information extraction requirements.
13. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the steps of the information collection method according to any one of claims 1 to 11.
14. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the steps of the information collection method as described in any one of claims 1 to 11.
15. A computer program product, characterized in that The method comprises computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the steps of the information collection method according to any one of claims 1 to 11.