Reply strategy analysis method and device based on multi-round dialogue scenario

By performing vector transformation and semantic encoding on multi-turn dialogue texts in online TCM consultations, and combining intent and scenario categories, a response strategy model is used to detect the final response strategy. This solves the problem of low accuracy in strategy analysis in TCM consultations and achieves more accurate response strategy recognition.

CN115203385BActive Publication Date: 2026-06-19PING AN TECH (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2022-05-12
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Current technologies for online TCM consultations have low accuracy in analyzing multi-round dialogue strategies, failing to consider the patient's specific situation, leading to inaccurate analysis results.

Method used

By acquiring consultation texts from multi-turn dialogue scenarios, vector transformation and semantic encoding are performed using a pre-set vector transformation model. Intent categories are identified and mapped to scenario categories. Semantic encoded vectors, intent categories, and scenario labels are fused, and a trained response strategy recognition model is used to detect the final response strategy.

Benefits of technology

It improves the accuracy of strategy analysis, ensures the recognition of intent and scenario matching of consultation text, and enhances the accuracy of response strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115203385B_ABST
    Figure CN115203385B_ABST
Patent Text Reader

Abstract

This invention relates to the field of intelligent decision-making, and discloses a method for analyzing response strategies in multi-turn dialogue scenarios. The method includes: acquiring consultation text in a multi-turn dialogue scenario; performing vector transformation on the consultation text using a preset vector transformation model to obtain text vectors; semantically encoding the text vectors to obtain semantic encoded vectors; identifying the intent category corresponding to the semantic encoded vectors; mapping the scenario category corresponding to the consultation text based on the intent category; extracting scenario labels for the scenario categories; fusing the semantic encoded vectors, the intent categories, and the scenario labels to obtain a fused vector of the consultation text; and detecting the final response strategy of the fused vector using a trained response strategy recognition model. This invention can improve the accuracy of strategy analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent decision-making, and in particular to a method and apparatus for analyzing response strategies in multi-turn dialogue scenarios. Background Technology

[0002] Multi-turn dialogue is a method in which the terminal, after understanding the user's intent, obtains necessary information to ultimately obtain clear user instructions during the dialogue between the user and the terminal. The multi-turn dialogue mode is usually manifested as a question-and-answer mode, that is, during the dialogue, in addition to answering the user's questions, the terminal can also ask questions to the user in order to gain a more detailed understanding of the user. At present, the main application scenario of multi-turn dialogue is online consultation of traditional Chinese medicine. At present, online consultation of traditional Chinese medicine extracts keywords through multi-turn dialogue for matching, obtains corresponding strategies through keywords and provides feedback. However, the input keywords are not combined with the patient's context, resulting in low accuracy of strategy analysis. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention provides a response strategy analysis method based on multi-turn dialogue scenarios, which can improve the accuracy of strategy analysis.

[0004] In a first aspect, the present invention provides a response strategy analysis method based on multi-turn dialogue scenarios, including:

[0005] Acquire medical consultation text in multi-turn dialogue scenarios;

[0006] The consultation text is transformed into a text vector using a preset vector transformation model to obtain a text vector. The text vector is then semantically encoded to obtain a semantically encoded vector.

[0007] Identify the intent category corresponding to the semantic encoding vector, map the scene category corresponding to the consultation text based on the intent category, and extract the scene label of the scene category;

[0008] The semantic encoding vector, the intent category, and the scene label are fused to obtain the fusion vector of the consultation text. The final response strategy of the fusion vector is detected using a trained response strategy recognition model.

[0009] In one possible implementation of the first aspect, obtaining the consultation text based on a multi-turn dialogue scenario includes:

[0010] Receive multiple rounds of consultation requests from users and extract consultation information for each round of consultation requests;

[0011] Query the response information for each round of the consultation information, and use the consultation information and the response information as the consultation text.

[0012] In one possible implementation of the first aspect, the step of using a preset vector transformation model to perform vector transformation on the consultation text to obtain a text vector includes:

[0013] The consultation text is segmented into characters to obtain consultation characters; the consultation characters are transformed into vectors using a preset vector transformation model to obtain consultation character vectors; the consultation character vectors are combined according to the character order of the consultation text to obtain text vectors.

[0014] In one possible implementation of the first aspect, the step of using a preset vector transformation model to perform vector transformation on the consultation characters to obtain consultation character vectors includes:

[0015] The positional encoding function in the preset vector conversion model is used to perform positional encoding on the consultation characters to obtain consultation coded characters; the vector conversion function in the preset vector conversion model is used to convert the consultation coded character vector to obtain consultation character vector.

[0016] In one possible implementation of the first aspect, identifying the intent category corresponding to the semantic encoding vector includes:

[0017] Obtain the identification information of the semantic encoding vector and calculate the weight value of the identification information;

[0018] The unique identifier of the semantic encoding vector is obtained based on the weight value;

[0019] Based on the unique identifier, the intent category corresponding to the semantic encoding vector is identified.

[0020] In one possible implementation of the first aspect, fusing the semantic encoding vector, the intent category, and the scene label to obtain the fused vector of the consultation text includes:

[0021] Semantic information of the intent category and the scene label are identified respectively to obtain intent semantic information and scene semantic information;

[0022] The intent semantic information and the scene semantic information are respectively converted into intent semantic vectors and scene semantic vectors;

[0023] The semantic encoding vector, the intent semantic vector, and the scene semantic vector are fused to obtain the fused vector of the consultation text.

[0024] In one possible implementation of the first aspect, the step of detecting the final response strategy of the fusion vector using a trained response strategy recognition model includes:

[0025] The fusion vector is used to extract features from the extraction layer in the strategy analysis model to obtain a feature vector.

[0026] The feature vector is pooled using the pooling layer in the strategy analysis model to obtain a pooled vector.

[0027] The strategy category of the pooling vector is output through the fully connected layer in the strategy analysis model, and the final response strategy is obtained through the strategy category.

[0028] Secondly, the present invention provides a response strategy analysis device based on a multi-turn dialogue scenario, the device comprising:

[0029] The text acquisition module is used to acquire consultation texts based on multi-turn dialogue scenarios;

[0030] The vector conversion module is used to convert the consultation text into a vector using a preset vector conversion model to obtain a text vector, and to perform semantic encoding on the text vector to obtain a semantic encoded vector.

[0031] The scene tag extraction module is used to identify the intent category corresponding to the semantic encoding vector, map the scene category corresponding to the consultation text according to the intent category, and extract the scene tag of the scene category;

[0032] The response strategy detection module is used to fuse the semantic encoding vector, the intent category, and the scene label to obtain the fusion vector of the consultation text, and to detect the final response strategy of the fusion vector using a trained response strategy recognition model.

[0033] Thirdly, the present invention provides an electronic device, comprising:

[0034] At least one processor; and a memory communicatively connected to said at least one processor;

[0035] The memory stores a computer program that can be executed by the at least one processor, enabling the at least one processor to execute the response strategy analysis method based on a multi-turn dialogue scenario as described in any of the first aspects above.

[0036] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the response strategy analysis method based on a multi-turn dialogue scenario as described in any one of the first aspects above.

[0037] Compared with existing technologies, the technical principles and beneficial effects of this solution are as follows:

[0038] This solution first acquires the consultation text in a multi-turn dialogue scenario to understand the user's dialogue content. The consultation text is obtained from the dialogue content and the robot's responses, facilitating subsequent vector transformation. Second, a preset vector transformation model is used to transform the consultation text into a text vector. This text vector is then semantically encoded to obtain a semantically encoded vector, enabling subsequent encoding processing and numerical calculation of the consultation text, ensuring the premise of intent recognition. Next, the intent category corresponding to the semantically encoded vector is identified. Based on the intent category, the corresponding scene category of the consultation text is mapped, and scene tags are extracted, providing a guarantee for subsequent mapping of the scene category. Further, the semantically encoded vector, the intent category, and the scene tags are fused to obtain a fused vector of the consultation text. A trained response strategy recognition model is used to detect the final response strategy of the fused vector, facilitating detection by the response strategy recognition model. Therefore, the response strategy analysis method and apparatus based on multi-turn dialogue scenarios proposed in this embodiment can improve the accuracy of strategy analysis. Attached Figure Description

[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart illustrating a response strategy analysis method based on a multi-turn dialogue scenario provided in an embodiment of the present invention.

[0042] Figure 2 As shown in one embodiment of the present invention Figure 1 A flowchart illustrating one step of the provided response strategy analysis method for multi-turn dialogue scenarios;

[0043] Figure 3 As shown in one embodiment of the present invention Figure 1 A flowchart illustrating another step in the provided response strategy analysis method for multi-turn dialogue scenarios;

[0044] Figure 4 This is a schematic diagram of a module for a response strategy analysis device based on a multi-turn dialogue scenario, provided in an embodiment of the present invention.

[0045] Figure 5 This is a schematic diagram of the internal structure of an electronic device that implements a response strategy analysis method based on a multi-turn dialogue scenario, according to an embodiment of the present invention. Detailed Implementation

[0046] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0047] This invention provides a response strategy analysis method based on multi-turn dialogue scenarios. The execution subject of this method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this invention: a server, a terminal, etc. In other words, the response strategy analysis method based on multi-turn dialogue scenarios can be executed by software or hardware installed on a terminal device or a server device. The software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster. The server can be an independent server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0048] See Figure 1 The diagram shown is a flowchart illustrating a response strategy analysis method for multi-turn dialogue scenarios provided by an embodiment of the present invention. Figure 1 The response strategy analysis method described in the text for multi-turn dialogue scenarios includes:

[0049] S1. Obtain the consultation text based on multi-turn dialogue scenarios.

[0050] In this embodiment of the invention, the multi-turn dialogue scenario refers to a scenario where the robot can engage in continuous dialogue with the user based on the context, while also incorporating historical dialogue content to resolve the user's questions. For example, in a medical consultation scenario: User: I've been feeling dizzy and weak these past few days. Robot: Do you have any other symptoms? User: No. Robot: Do you need to make an appointment? User: Please book an appointment with a neurosurgeon. Robot: Which day would you like to book? User: Tomorrow morning at 9:00 AM. Robot: Okay, we've booked an appointment for you with a neurosurgeon for tomorrow morning at 9:00 AM. The consultation text refers to the consultation content sent by the user, such as: User: I've had a headache for several days, and I've been feeling weak lately.

[0051] Furthermore, by acquiring the consultation text in a multi-turn dialogue scenario, this embodiment of the invention can understand the user's dialogue content. The consultation text can be obtained through the dialogue content and the robot's response, so as to facilitate subsequent vector transformation operations on the consultation text.

[0052] As an embodiment of the present invention, the step of obtaining consultation text based on a multi-turn dialogue scenario includes: receiving a multi-turn consultation request issued by a user, extracting consultation information of each round of the consultation request, querying the response information of each round of the consultation information, and using the consultation information and the response information as the consultation text.

[0053] The multi-round consultation request refers to the instruction sent when the user clicks on the consultation subject. The question text refers to the question text sent to the user, such as: Where are you currently feeling unwell? What kind of question do you need to consult? These are purposeful questions designed to quickly determine the user's intention. The reply information is the corresponding answer based on the consultation information. The consultation text is the final consultation information obtained after processing.

[0054] Furthermore, in an optional embodiment of the present invention, the reception of the multi-turn dialogue request can be implemented on the server side, the question text can be sent through a WebService data exchanger, and the preprocessing of the response text refers to filtering the content of the response text in order to obtain the final consultation text.

[0055] S2. The consultation text is transformed into a text vector using a preset vector transformation model to obtain a text vector. The text vector is then semantically encoded to obtain a semantically encoded vector.

[0056] In this embodiment of the invention, the consultation text is converted into a vector using a preset vector conversion model to facilitate subsequent encoding processing of the consultation text, realize numerical calculation of the consultation text, and ensure the premise of subsequent intent recognition of the consultation text. Here, the text vector refers to a geometric object with size and direction that satisfies the parallelogram law, and expresses the text semantics in the form of a vector.

[0057] As an embodiment of the present invention, see [reference]. Figure 2 As shown, the process of converting the consultation text into a text vector using a preset vector conversion model includes:

[0058] S201. Perform character segmentation on the consultation text to obtain consultation characters;

[0059] S202. The consultation characters are converted into vectors using a preset vector conversion model to obtain consultation character vectors;

[0060] S203. Combine the consultation character vectors according to the character order of the consultation text to obtain a text vector.

[0061] Furthermore, in an optional embodiment of the present invention, the consultation text is segmented into individual characters to facilitate vector transformation of the individual characters, thereby ensuring the acquisition of the text vector. The segmentation of the consultation text can be achieved by a text slicer, which is constructed using a Java program.

[0062] Furthermore, in an optional embodiment of the present invention, the step of using a preset vector conversion model to perform vector conversion on the consultation characters to obtain consultation character vectors includes: using the position encoding function in the preset vector conversion model to perform position encoding on the consultation characters to obtain consultation encoded characters, and using the vector conversion function in the preset vector conversion model to convert the consultation encoded character vector to obtain consultation character vectors.

[0063] Optionally, the position encoding function includes a PE function, and the vector transformation function includes a one-hot function.

[0064] Furthermore, by performing semantic encoding on the text vector, the specific semantic information of the text vector can be understood, so that the intent category corresponding to the semantically encoded vector can be quickly identified subsequently.

[0065] As an embodiment of the present invention, the step of semantically encoding the text vector to obtain a semantic encoded vector includes: performing dimensionality reduction processing on the text vector to obtain a dimensionality-reduced vector of the text vector, identifying the information semantics of the dimensionality-reduced vector, and encoding the information semantics to obtain a semantic encoded vector.

[0066] The dimensionality reduction process refers to the process of transforming the text vector from a high-dimensional vector to a low-dimensional vector. The dimensionality reduction vector is the low-dimensional vector obtained by the dimensionality reduction process. The semantics of the dimensionality reduction vector refers to the meaning represented by the dimensionality reduction vector. The semantic encoding refers to the process of processing the text vector and organizing and summarizing the text vector in its own language form according to the meaning and system classification of the text vector.

[0067] Optionally, the dimensionality reduction of the text vector can be achieved by a dimensionality reduction algorithm, such as a linear mapping dimensionality reduction algorithm. The semantics of the dimensionality-reduced vector can be obtained by a Term Weighting algorithm. The semantic encoding of the dimensionality-reduced vector is achieved by a semantic encoder, which is constructed using the C language.

[0068] S3. Identify the intent category corresponding to the semantic encoding vector, map the scene category corresponding to the consultation text according to the intent category, and extract the scene label of the scene category.

[0069] In this embodiment of the invention, by identifying the intent category corresponding to the semantic encoding vector, a guarantee is provided for subsequently mapping the scene category corresponding to the consultation text, wherein the intent category refers to the scene category of the semantic encoding vector.

[0070] As an embodiment of the present invention, the step of identifying the intent category corresponding to the semantic encoding vector includes: obtaining the identification information of the semantic encoding vector, calculating the weight value of the identification information, obtaining the unique identifier of the semantic encoding vector according to the weight value, and identifying the intent category corresponding to the semantic encoding vector according to the unique identifier.

[0071] The identification information is the feature information of the semantic encoding vector, which facilitates the identification of the semantic encoding vector. The weight value can determine the importance of the feature information. The unique identifier refers to the identifier corresponding to the largest value among the weight values.

[0072] Furthermore, in an optional embodiment of the present invention, the identification information can be obtained using a MATLAB algorithm, and the weight value can be calculated using the analytic hierarchy process.

[0073] Furthermore, as another optional embodiment of the present invention, the step of identifying the intent category corresponding to the semantic encoding vector based on the unique identifier includes: calculating the matching degree between the unique identifier and the intent identifier in the pre-constructed identifier-intent mapping table; when the matching degree is greater than a preset value, the category corresponding to the intent identifier is taken as the intent category corresponding to the semantic encoding vector.

[0074] The pre-built identifier-intent mapping table refers to a pre-built table that maps identifiers to intents. The matching degree refers to the degree of fit between two not completely identical objects under certain classification requirements. The preset value refers to a pre-set standard value that can be used as the basis for judging whether the match is successful. The preset value can be 0.8 or can be set according to the actual business scenario. Furthermore, the matching degree can be calculated using the cosine similarity algorithm.

[0075] Furthermore, in this embodiment of the invention, the scene category refers to the background corresponding to when the consultation text occurs, and the scene tag refers to the category tag corresponding to the scene, such as the registration tag, consultation tag, etc. Furthermore, the scene category corresponding to the consultation text can be implemented by a mapping function, the mapping function includes a single mapping function, and the extraction of the scene tag can be implemented by a Python programming algorithm.

[0076] S4. The semantic encoding vector, the intent category, and the scene label are fused to obtain the fusion vector of the consultation text. The final response strategy of the fusion vector is detected using the trained response strategy recognition model.

[0077] In this embodiment of the invention, by fusing the semantic encoding vector, the intent category, and the scene label, the response strategy recognition model can be facilitated to perform detection. The fusion of the semantic encoding vector, the intent category, and the scene label can be achieved through the cross function.

[0078] Furthermore, as an embodiment of the present invention, see [reference needed]. Figure 3 As shown, fusing the semantic encoding vector, the intent category, and the scene label to obtain the fused vector of the consultation text includes:

[0079] S301. Identify the semantic information of the intent category and the scene label respectively to obtain intent semantic information and scene semantic information;

[0080] S302. Convert the intent semantic information and the scene semantic information into intent semantic vectors and scene semantic vectors, respectively.

[0081] S303. The semantic encoding vector, the intent semantic vector, and the scene semantic vector are fused to obtain the fused vector of the consultation text.

[0082] Furthermore, in this embodiment of the invention, by using a trained response strategy analysis model to perform response strategy analysis on the fusion vector, the analysis of response strategies can be combined with previous relevant data to improve the accuracy of strategy analysis. The trained response strategy analysis model includes the BERT model.

[0083] As an embodiment of the present invention, the step of detecting the final response strategy of the fusion vector using the trained response strategy recognition model includes: extracting features from the fusion vector using the extraction layer in the strategy analysis model to obtain a feature vector; pooling the feature vector using the pooling layer in the strategy analysis model to obtain a pooled vector; outputting the strategy category of the pooled vector through the fully connected layer in the strategy analysis model; and obtaining the final response strategy through the strategy category.

[0084] In this model, the extraction layer in the response strategy recognition model extracts features from the fusion vector; the pooling layer in the strategy analysis model performs dimensionality reduction on the feature vector; and the fully connected layer in the strategy analysis model outputs the strategy category corresponding to the pooled vector. Furthermore, the feature extraction of the fusion vector can be achieved using the Fourier transform method, the pooling of the feature vector can be achieved using the MaxPoo function, and the output of the strategy category corresponding to the pooled vector can be achieved using an activation function, including the Sigmoid function.

[0085] As can be seen, this solution first obtains the consultation text in a multi-turn dialogue scenario to understand the user's dialogue content. The consultation text is obtained from the dialogue content and the robot's responses, facilitating subsequent vector transformation. Secondly, a preset vector transformation model is used to transform the consultation text into a text vector. This text vector is then semantically encoded to obtain a semantically encoded vector, enabling subsequent encoding processing and numerical calculation of the consultation text, ensuring the premise for subsequent intent recognition. Next, the intent category corresponding to the semantically encoded vector is identified. Based on the intent category, the scene category corresponding to the consultation text is mapped, and scene tags are extracted, providing a guarantee for subsequent mapping of the scene category. Furthermore, the semantically encoded vector, the intent category, and the scene tags are fused to obtain a fused vector of the consultation text. A trained response strategy recognition model is used to detect the final response strategy of the fused vector, facilitating detection by the response strategy recognition model. Therefore, the response strategy analysis method and apparatus based on a multi-turn dialogue scenario proposed in this embodiment can improve the accuracy of strategy analysis. Therefore, the response strategy analysis method and apparatus based on multi-turn dialogue scenarios proposed in this invention can improve the accuracy of strategy analysis.

[0086] like Figure 4 The diagram shown is a functional block diagram of the response strategy analysis device for multi-turn dialogue scenarios according to the present invention.

[0087] The response strategy analysis device 400 based on multi-turn dialogue scenarios described in this invention can be installed in an electronic device. Depending on the functions implemented, the response strategy analysis device based on multi-turn dialogue scenarios may include a text acquisition module 401, a vector conversion module 402, a scene tag extraction module 403, and a response strategy detection module 404. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.

[0088] In this embodiment of the invention, the functions of each module / unit are as follows:

[0089] The text acquisition module 401 is used to acquire consultation text based on a multi-turn dialogue scenario;

[0090] The vector conversion module 402 is used to convert the consultation text into a text vector using a preset vector conversion model, and to perform semantic encoding on the text vector to obtain a semantic encoded vector.

[0091] The scene tag extraction module 403 is used to identify the intent category corresponding to the semantic encoding vector, map the scene category corresponding to the consultation text according to the intent category, and extract the scene tag of the scene category;

[0092] The response strategy detection module 404 is used to fuse the semantic encoding vector, the intent category, and the scene label to obtain the fusion vector of the consultation text, and to detect the final response strategy of the fusion vector using a trained response strategy recognition model.

[0093] In detail, the modules in the response strategy analysis device 400 based on multi-turn dialogue scenarios described in this embodiment of the invention employ the same methods as described above when in use. Figures 1 to 3 The method used here is the same as the response strategy analysis method in the multi-turn dialogue scenario described above, and it can produce the same technical effect, so it will not be elaborated here.

[0094] like Figure 5 The diagram shown is a structural schematic of an electronic device that implements the response strategy analysis method based on a multi-turn dialogue scenario according to the present invention.

[0095] The electronic device may include a processor 50, a memory 51, a communication bus 52, and a communication interface 53. It may also include a computer program stored in the memory 51 and capable of running on the processor 50, such as a response strategy analysis program based on a multi-turn dialogue scenario.

[0096] In some embodiments, the processor 50 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 50 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 51 (e.g., executing a response strategy analysis program based on a multi-turn dialogue scenario) and calls data stored in the memory 51 to perform various functions of the electronic device and process data.

[0097] The memory 51 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 51 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 51 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 51 can include both internal and external storage units of the electronic device. The memory 51 can be used not only to store application software and various types of data installed on the electronic device, such as code for a response strategy analysis program based on a multi-turn dialogue scenario, but also to temporarily store data that has been output or will be output.

[0098] The communication bus 52 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 51 and at least one processor 50, etc.

[0099] The communication interface 53 is used for communication between the aforementioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.

[0100] Figure 5 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 5 The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0101] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 50 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0102] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in terms of the scope of the patent invention.

[0103] The response strategy analysis program based on multi-turn dialogue scenarios stored in the memory 51 of the electronic device is a combination of multiple computer programs. When run in the processor 50, it can achieve the following:

[0104] Acquire medical consultation text in multi-turn dialogue scenarios;

[0105] The consultation text is transformed into a text vector using a preset vector transformation model to obtain a text vector. The text vector is then semantically encoded to obtain a semantically encoded vector.

[0106] Identify the intent category corresponding to the semantic encoding vector, map the scene category corresponding to the consultation text based on the intent category, and extract the scene label of the scene category;

[0107] The semantic encoding vector, the intent category, and the scene label are fused to obtain the fusion vector of the consultation text. The final response strategy of the fusion vector is detected using a trained response strategy recognition model.

[0108] Specifically, the specific implementation method of the above-mentioned computer program by the processor 50 can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0109] Furthermore, if the modules / units integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).

[0110] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0111] Acquire medical consultation text in multi-turn dialogue scenarios;

[0112] The consultation text is transformed into a text vector using a preset vector transformation model to obtain a text vector. The text vector is then semantically encoded to obtain a semantically encoded vector.

[0113] Identify the intent category corresponding to the semantic encoding vector, map the scene category corresponding to the consultation text based on the intent category, and extract the scene label of the scene category;

[0114] The semantic encoding vector, the intent category, and the scene label are fused to obtain the fusion vector of the consultation text. The final response strategy of the fusion vector is detected using a trained response strategy recognition model.

[0115] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0116] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0117] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0118] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0119] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0120] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0121] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.

Claims

1. A reply strategy analysis method based on multi-round dialogue scenarios, characterized in that, The method includes: Acquire medical consultation text in multi-turn dialogue scenarios; The consultation text is transformed into a text vector using a preset vector transformation model. The text vector is then reduced in dimensionality to obtain a reduced-dimensional vector. The semantic information of the reduced-dimensional vector is identified, and the semantic information is encoded to obtain a semantic encoding vector. Obtain the identification information of the semantic encoding vector, determine the unique identifier of the semantic encoding vector according to the weight value of the identification information, match the intent category corresponding to the semantic encoding vector from the pre-constructed identifier-intent mapping table according to the unique identifier, map the scene category corresponding to the consultation text according to the intent category, and extract the scene label of the scene category; The semantic encoding vector, the intent category, and the scene label are fused to obtain the fusion vector of the consultation text. The final response strategy of the fusion vector is detected using a trained response strategy recognition model.

2. The method of claim 1, wherein, The acquisition of consultation text based on multi-turn dialogue scenarios includes: Receive multiple rounds of consultation requests from users and extract consultation information for each round of consultation requests; Query the response information for each round of the consultation information, and use the consultation information and the response information as the consultation text.

3. The method according to claim 1, characterized in that, The step of using a preset vector transformation model to transform the consultation text into a text vector includes: The consultation text is segmented into characters to obtain consultation characters; The consultation characters are transformed into vectors using a preset vector transformation model to obtain consultation character vectors; The consultation character vectors are combined according to the character order of the consultation text to obtain a text vector.

4. The method according to claim 3, characterized in that, The step of using a preset vector conversion model to convert the consultation characters into vectors to obtain consultation character vectors includes: The position encoding function in the preset vector transformation model is used to perform position encoding on the consultation characters to obtain consultation encoded characters; The diagnostic character vector is transformed using the vector transformation function in the preset vector transformation model to obtain the diagnostic character vector.

5. The method according to any one of claims 1 to 4, characterized in that, The step of fusing the semantic encoding vector, the intent category, and the scene label to obtain the fused vector of the consultation text includes: Semantic information of the intent category and the scene label are identified respectively to obtain intent semantic information and scene semantic information; The intent semantic information and the scene semantic information are respectively converted into intent semantic vectors and scene semantic vectors; The semantic encoding vector, the intent semantic vector, and the scene semantic vector are fused to obtain the fused vector of the consultation text.

6. The method according to claim 1, characterized in that, The final response strategy for detecting the fused vector using the trained response strategy recognition model includes: The fusion vector is used to extract features from the extraction layer in the strategy analysis model to obtain a feature vector; The feature vector is pooled using the pooling layer in the strategy analysis model to obtain a pooled vector. The strategy category of the pooling vector is output through the fully connected layer in the strategy analysis model, and the final response strategy is obtained through the strategy category.

7. A response strategy analysis device based on multi-turn dialogue scenarios, characterized in that, The device includes: The text acquisition module is used to acquire consultation texts based on multi-turn dialogue scenarios; The vector transformation module is used to transform the consultation text into a vector using a preset vector transformation model to obtain a text vector, perform dimensionality reduction processing on the text vector to obtain a dimensionality-reduced vector of the text vector, identify the information semantics of the dimensionality-reduced vector, and encode the information semantics to obtain a semantic encoding vector. The scene tag extraction module is used to obtain the identification information of the semantic encoding vector, determine the unique identifier of the semantic encoding vector according to the weight value of the identification information, match the intent category corresponding to the semantic encoding vector from the pre-built identifier-intent mapping table according to the unique identifier, map the scene category corresponding to the consultation text according to the intent category, and extract the scene tag of the scene category. The response strategy detection module is used to fuse the semantic encoding vector, the intent category, and the scene label to obtain the fusion vector of the consultation text, and to detect the final response strategy of the fusion vector using a trained response strategy recognition model.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the response strategy analysis method based on a multi-turn dialogue scenario as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the response strategy analysis method based on a multi-turn dialogue scenario as described in any one of claims 1 to 6.