Request intention recognition method and device, equipment, medium and computer program product

By splicing user requests with the target intent recognition text in the historical sample library and identifying them using the trained intent recognition model, the problems of high inference cost and poor accuracy of existing intent recognition methods are solved, and lower inference cost and higher accuracy are achieved.

CN119782827AInactive Publication Date: 2025-04-08LONGSHINE TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510274420.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-04-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing intent recognition methods have high inference costs and poor model output accuracy, making it difficult to adapt to high concurrency scenarios online.

Method used

By converting user requests into request text, the target intent identification text pair is determined, and spliced ​​with the request text to form the sample to be identified, and finally the intent identification model trained based on the historical sample library is used for identification.

Benefits of technology

It reduces the inference cost of intent recognition, improves the accuracy of model output, and is suitable for online high-concurrency scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782827A_ABST
    Figure CN119782827A_ABST
Patent Text Reader

Abstract

The invention relates to the field of intention recognition, and provides a request intention recognition method, device and equipment, a medium and a computer program product, and the method comprises the steps: converting a user request into a request text; determining a target intention recognition text pair based on the request text; the target intention recognition text pair is an intention recognition text pair matched with the request text in a historical sample library; splicing the request text and the target intention recognition text pair to obtain a to-be-recognized sample; determining an intention recognition result of the user request based on the to-be-recognized sample and an intention recognition model; the intention recognition model is obtained by training based on the historical sample library. According to the method, the user request and the historical intention recognition text pairs matched with the user request are spliced, more learning information is provided for the intention recognition model by using a smaller number of samples, and the inference cost of intention recognition is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intent recognition, and in particular to a request intent recognition method, device, equipment, medium and computer program product. Background Art

[0002] In the field of natural language processing, intent recognition is an important task for interactive systems. Existing intent recognition methods use pre-trained large language models combined with prompt engineering to perform intent recognition. However, large-scale model reasoning takes up a lot of computing resources and is not suitable for high-concurrency online scenarios. In addition, intent recognition generally includes business logic, and prompt engineering is difficult to provide accurate prompt instructions, resulting in poor model output accuracy. Summary of the invention

[0003] The present invention provides a request intent recognition method, device, equipment, medium and computer program product to solve the defect of high reasoning cost of existing intent recognition methods and reduce the reasoning cost of intent recognition.

[0004] The present invention provides a request intention recognition method, comprising the following steps: Convert user requests into request text; Determine a target intent recognition text pair based on the request text; the target intent recognition text pair is an intent recognition text pair that matches the request text in a historical sample library; Concatenate the request text with the target intent recognition text pair to obtain a sample to be recognized; Based on the sample to be identified and the intent recognition model, an intent recognition result of the user request is determined; the intent recognition model is trained based on the historical sample library.

[0005] According to a request intent recognition method provided by the present invention, determining a target intent recognition text pair based on the request text includes: Obtaining text length, content attributes, required algorithm information, and processing task information of the request text; Determining a first complexity of the request text based on the text length and the content attribute; Determining a second complexity of the request text based on the demand algorithm information and the processing task information; A target intent recognition text pair is determined based on a request complexity; the request complexity is determined based on the first complexity and the second complexity.

[0006] According to a request intent recognition method provided by the present invention, the determining of a target intent recognition text pair based on the request text further includes: Obtaining the semantic similarity between each intent recognition text pair in the historical sample library and the request text; Determine an intent recognition text pair whose semantic similarity with the request text is greater than or equal to a first threshold as a target intent recognition text pair; Based on the request complexity, the number of text pairs of the target intent recognition text pairs is determined.

[0007] According to a request intent recognition method provided by the present invention, the step of obtaining the semantic similarity between each intent recognition text pair in the historical sample library and the request text comprises: In the case where the semantic similarity between each intended recognition text pair in the historical sample library and the request text is less than a first threshold, taking the request text as a sample to be recognized; Alternatively, when the semantic similarity between each intention recognition text pair in the historical sample library and the request text is less than a first threshold, a new request text is obtained; and there is an intention recognition text pair matching the new request text in the historical sample library; Alternatively, when the semantic similarity between each intention recognition text pair in the historical sample library and the request text is less than a first threshold, a new intention recognition text pair is added to the historical sample library; and the new intention recognition text pair is matched with the request text.

[0008] According to a request intent recognition method provided by the present invention, the step of concatenating the request text with the target intent recognition text to obtain a sample to be recognized comprises: When the number of the text pairs is greater than or equal to two, the target intent recognition text pair having the greatest semantic similarity to the request text is concatenated before the request text to obtain a sample to be recognized; When the number of the text pairs is equal to one, the historical intent recognition text pairs matching the request text are added to the historical sample library; and the number of the historical intent recognition text pairs is greater than or equal to one.

[0009] According to a request intent recognition method provided by the present invention, determining the intent recognition result of the user request based on the sample to be recognized and the intent recognition model includes: Determining the sample complexity of the sample to be identified; When the sample complexity is greater than or equal to a second threshold, adjusting the target intent recognition text pair concatenated with the request text to obtain an adjusted sample; When the sample complexity of the adjusted sample is less than the second threshold, the intent recognition result of the user request is determined based on the adjusted sample and the intent recognition model.

[0010] The present invention also provides a request intention recognition device, comprising the following modules: A request text obtaining module is used to convert user requests into request texts; A target intention recognition text pair determination module is used to determine a target intention recognition text pair based on the request text; the target intention recognition text pair is an intention recognition text pair that matches the request text in a historical sample library; A text concatenation module, used for concatenating the request text with the target intent recognition text pair to obtain a sample to be recognized; The request intent recognition module is used to determine the intent recognition result of the user request based on the sample to be recognized and the intent recognition model; the intent recognition model is obtained by training based on the historical sample library.

[0011] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, it implements any of the request intent recognition methods described above.

[0012] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the request intent identification methods described above.

[0013] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the request intent identification method as described above is implemented.

[0014] The request intent recognition method, device, equipment, medium and computer program product provided by the present invention obtain request text by converting user request, extracting target intent recognition text pairs matching the request text in the historical sample library, and then splicing the request text and the target intent recognition text pairs to obtain samples to be recognized; finally, the samples to be recognized are input into the intent recognition model trained based on the historical sample library to obtain the intent recognition results of the user request output by the intent recognition model. This application splices user requests and their matching historical intent recognition text pairs, using a smaller amount of samples to provide more learning information for the intent recognition model, thereby reducing the inference cost of intent recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 This is one of the flow charts of the request intent identification method provided by the present invention.

[0017] Figure 2 This is the second flow chart of the request intent identification method provided by the present invention.

[0018] Figure 3 It is a structural schematic diagram of the request intention recognition device provided by the present invention.

[0019] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] Combine the following Figure 1-Figure 4 The present invention describes a request intent recognition method, apparatus, device, medium and computer program product.

[0022] Figure 1 is one of the flowcharts of the request intent identification method provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 100: Convert the user request into a request text; Step 200: determining a target intention recognition text pair based on the request text; the target intention recognition text pair is an intention recognition text pair that matches the request text in a historical sample library; Specifically, the present invention proposes a dynamic sample recall mechanism, the specific contents of which are as follows: a sample library index system (i.e., the historical sample library in this embodiment) is pre-established, and the historical sample library stores a wealth of intent recognition question-answer pairs (i.e., the intent recognition text pairs in this embodiment). After receiving a user request, the user request is converted into a request text, and based on semantic similarity retrieval, the intent recognition question-answer pairs with the most similar semantics to the request text are recalled from the historical sample library, i.e., the target intent recognition text pairs that match the request text in this embodiment. Use the least samples to provide the intent recognition model with as much learnable information as possible, shorten the context length, and increase the information density.

[0023] Step 300: concatenate the request text with the target intent recognition text pair to obtain a sample to be recognized; Specifically, the present invention also proposes an optimized splicing strategy. Based on the splicing rules, the target intent recognition text pair recalled from the historical sample library is spliced ​​with the request text. The splicing operation includes adjusting the text splicing order, controlling the number of samples, and other operations. Through the characteristics of large language model (LLM) context learning, the text pair with the most similar semantics in the target intent recognition text pair is placed at the end of the request text. According to the complexity of the request text, the number of recalled samples is controlled to avoid the context being too long. The request text and the target intent recognition text pair are spliced ​​to obtain the sample to be recognized.

[0024] Step 400: Determine the intent recognition result of the user request based on the sample to be recognized and the intent recognition model; the intent recognition model is trained based on the historical sample library.

[0025] Specifically, the present invention uses a small amount of high-quality vertical domain data for intent recognition, and fine-tunes the LLM with a small amount of parameters, so that the intent recognition model has basic intent recognition capabilities and reduces the cost of model training and reasoning. Relying on an external historical sample library, the intent recognition text pairs are dynamically recalled, so that the intent recognition model has generalization on the basis of basic capabilities. The model and database are decoupled, taking into account both recognition effect and flexibility, and improving maintainability. The main function of the historical sample library is to provide the intent recognition model with samples that deviate from the distribution of training data, so as to improve the generalization ability of the intent recognition model on unprocessed samples.

[0026] This embodiment converts the user request to obtain the request text, extracts the target intent recognition text pair that matches the request text in the historical sample library, and then splices the request text and the target intent recognition text pair to obtain the sample to be recognized; finally, the sample to be recognized is input into the intent recognition model trained based on the historical sample library to obtain the intent recognition result of the user request output by the intent recognition model. This application splices the user request and its matching historical intent recognition text pairs, using a smaller amount of samples to provide more learning information for the intent recognition model, thereby reducing the inference cost of intent recognition.

[0027] Figure 2 This is the second flow chart of the request intention recognition method provided by the present invention. Figure 2 As shown, the method may also include: Step 210: Obtain the text length, content attributes, required algorithm information and processing task information of the request text; Step 220: Determine a first complexity of the request text based on the text length and the content attribute; Step 230: Determine a second complexity of the request text based on the demand algorithm information and the processing task information; Step 240: determine a target intent recognition text pair based on request complexity; the request complexity is determined based on the first complexity and the second complexity.

[0028] Specifically, the number of intent recognition text pairs that match the request text in the dynamic recall history sample library depends on the complexity of the user's request. The text length, content attributes, required algorithm information, and processing task information of the request text are obtained. These are the factors that affect the complexity of the request, mainly including time complexity and space complexity. The factors that affect the complexity of the request specifically include data scale (which can be determined by the text length in this embodiment), request type (including data query and data calculation, which can be determined by the content attributes in this embodiment), the algorithm required for the request (which can be determined by the required algorithm information in this embodiment), and the task type to which the request belongs (which can be determined by the processing task information in this embodiment).

[0029] The first complexity of the request text is determined by the text length and content attributes; the second complexity of the request text is determined by the required algorithm information and the processing task information. The request complexity for determining the target intent recognition text pair matching the request text in the historical sample library can be obtained by weighted calculation of the first complexity and the second complexity.

[0030] This embodiment determines the number of text pairs to be dynamically recalled for historical intent recognition by the complexity of the user request, and flexibly adjusts the size of the samples to be recognized based on the complexity of the user request.

[0031] In one embodiment, the request intent identification method provided in the embodiment of the present application may also include: Step 250: Obtain the semantic similarity between each intention recognition text pair in the historical sample library and the request text; Step 260: Determine an intention recognition text pair whose semantic similarity with the request text is greater than or equal to a first threshold as a target intention recognition text pair; Step 270: Determine the number of text pairs of the target intent recognition text pairs based on the request complexity.

[0032] Specifically, when extracting the target intent recognition text pairs that match the request text in the historical sample library, the target intent recognition text pairs in the historical sample library are extracted through semantic similarity retrieval. Semantic similarity retrieval specifically includes: calculating the semantic similarity between each intent recognition text pair in the historical sample library and the request text. When there are n (a positive integer greater than 1) intent recognition text pairs in the historical sample library, the semantic similarity retrieval will obtain n semantic similarities. The intent recognition text pairs corresponding to the semantic similarities greater than or equal to a threshold among these n semantic similarities are taken as the target intent recognition text pairs that match the request text.

[0033] After extracting the target intent recognition text pairs that match the request text in the historical sample library, the number of target intent recognition text pairs, that is, the number of text pairs in this embodiment, is determined by the request complexity of the request text. In the case of low request complexity, it is determined that the number of target intent recognition text pairs used in subsequent splicing is small; in the case of high request complexity, it is determined that the number of target intent recognition text pairs used in splicing is large.

[0034] This embodiment determines the number of target intent recognition text pairs used for splicing through semantic similarity retrieval and request complexity calculation, thereby achieving flexible and accurate recall of historical intent recognition text pairs.

[0035] In one embodiment, the request intent identification method provided in the embodiment of the present application may also include: Step 280: When the semantic similarity between each intended recognition text pair in the historical sample library and the request text is less than a first threshold, the request text is used as a sample to be recognized; Alternatively, when the semantic similarity between each intention recognition text pair in the historical sample library and the request text is less than a first threshold, a new request text is obtained; and there is an intention recognition text pair matching the new request text in the historical sample library; Alternatively, when the semantic similarity between each intention recognition text pair in the historical sample library and the request text is less than a first threshold, a new intention recognition text pair is added to the historical sample library; and the new intention recognition text pair is matched with the request text.

[0036] Specifically, according to the above content, it can be seen that the number of target intent recognition text pairs matching the request text in the historical sample library may be small or zero, that is, the semantic similarity between each intent recognition text pair in the historical sample library and the request text is less than the first threshold. In this case, the request text can be directly used as a sample to be recognized for intent recognition.

[0037] Alternatively, obtain the user's new request, that is, obtain the new request text, and ensure that the obtained new request text has a matching intent recognition text pair in the historical sample library. If the obtained new request text does not have a matching intent recognition text pair in the historical sample library, re-obtain a new request until the obtained new request text has a matching intent recognition text pair in the historical sample library.

[0038] Alternatively, the acquired new historical intent recognition text pair is added to the historical sample library to ensure that the new historical intent recognition text pair matches the requested text. Similarly, if the new historical intent recognition text pair does not match the requested text, a new historical intent recognition text pair is acquired again until the new historical intent recognition text pair matches the requested text.

[0039] The operations of obtaining new request text and obtaining new historical intent recognition text pairs can be performed simultaneously, while ensuring that the obtained new request text has a matching intent recognition text pair in the historical sample library, and the new historical intent recognition text pair matches the request text.

[0040] This embodiment ensures the semantic similarity between the request text and the target intent recognition text pair by matching and amplifying the request text and the historical intent recognition text pair, thereby providing more learning information for the intent recognition model.

[0041] In one embodiment, the request intent identification method provided in the embodiment of the present application may also include: Step 310: When the number of the text pairs is greater than or equal to two, the target intent recognition text pair having the greatest semantic similarity to the request text is concatenated before the request text to obtain a sample to be recognized; Step 320: When the number of the text pairs is equal to one, add the historical intent recognition text pairs matching the request text to the historical sample library; the number of the historical intent recognition text pairs is greater than or equal to one.

[0042] Specifically, when the number of text pairs is greater than or equal to two, it is determined that there are multiple target intent recognition text pairs that match the request text. When the request text is spliced ​​with the target intent recognition text pair, the target intent recognition text pair with the highest semantic similarity to the request text among the multiple target intent recognition text pairs can be spliced ​​to the front of the request text, close to the request text, so as to utilize the context learning characteristics of the intent recognition model. The remaining target intent recognition text pairs can be spliced ​​with the request text as needed.

[0043] When the number of text pairs is equal to one, the target intent recognition text pair that matches the request text can be spliced ​​to the front of the request text; or, the historical sample library is expanded, and new historical intent recognition text pairs that match the request text are directly added to the historical sample library, and the number of historical intent recognition text pairs added to the historical sample library is greater than or equal to one, so that the number of text pairs is greater than or equal to two. The purpose of this is to increase the number of matching intent recognition text pairs that can be recalled when there are fewer of them, so as to enhance the contextual learning content of the model.

[0044] This embodiment concatenates request text and matching target intent recognition text pairs, thereby providing more learning information for the intent recognition model and reducing the inference cost of intent recognition while using a smaller number of samples.

[0045] In one embodiment, the request intent identification method provided in the embodiment of the present application may also include: Step 410: determining the sample complexity of the sample to be identified; Step 420: When the sample complexity is greater than or equal to a second threshold, adjust the target intent recognition text pair concatenated with the request text to obtain an adjusted sample; Step 430: When the sample complexity of the adjusted sample is less than the second threshold, determine the intent recognition result of the user request based on the adjusted sample and the intent recognition model.

[0046] Specifically, after the request text and the target intent recognition text pair are spliced ​​to obtain the sample to be recognized, the sample complexity of the sample to be recognized can be calculated and the spliced ​​sample can be adjusted according to the sample complexity. That is, when the sample complexity of the sample to be recognized is greater than or equal to the second threshold, it is determined that the sample complexity of the sample to be recognized is high, which makes the context of the request text too long, which is not conducive to model recognition. In this case, the target intent recognition text pair spliced ​​with the request text is adjusted to obtain the adjusted sample. The adjustment operation can be deletion, or adjustment of the splicing order after deletion.

[0047] The sample complexity is recalculated after adjustment, and when the sample complexity of the adjusted sample is less than the second threshold, the intent recognition result requested by the user is determined based on the adjusted sample and the intent recognition model.

[0048] This embodiment adjusts the sample to be recognized by using sample complexity to prevent the context of the request text from being too long, which is not conducive to model recognition.

[0049] The request intention recognition device provided by the present invention is described below. The request intention recognition device described below and the request intention recognition method described above can be referenced to each other.

[0050] Please refer to Figure 3 The present invention also provides a request intention recognition device, comprising: The request text obtaining module 301 is used to convert the user request into a request text; A target intention recognition text pair determination module 302 is used to determine a target intention recognition text pair based on the request text; the target intention recognition text pair is an intention recognition text pair that matches the request text in a historical sample library; A text concatenation module 303 is used to concatenate the request text with the target intent recognition text pair to obtain a sample to be recognized; The request intention recognition module 304 is used to determine the intention recognition result of the user request based on the sample to be recognized and the intention recognition model; the intention recognition model is obtained by training based on the historical sample library.

[0051] Optionally, the target intention recognition text pair determination module includes: An acquisition unit, used to acquire the text length, content attributes, required algorithm information and processing task information of the request text; A first complexity determining unit, configured to determine a first complexity of the request text based on the text length and the content attribute; A second complexity determining unit, configured to determine a second complexity of the request text based on the required algorithm information and the processing task information; A target intent recognition text pair determination unit is used to determine a target intent recognition text pair based on a request complexity; the request complexity is determined based on the first complexity and the second complexity.

[0052] Optionally, the target intention recognition text pair determination module further includes: A semantic similarity acquisition unit, used to obtain the semantic similarity between each intention recognition text pair in the historical sample library and the request text; A first determining unit, configured to determine an intention recognition text pair having a semantic similarity with the request text greater than or equal to a first threshold as a target intention recognition text pair; A text pair quantity determination unit is used to determine the number of text pairs of the target intent recognition text pairs based on the request complexity.

[0053] Optionally, the request intention identification device further includes: A sample library updating module, configured to use the request text as a sample to be recognized when the semantic similarity between each intended recognition text pair in the historical sample library and the request text is less than a first threshold; Alternatively, when the semantic similarity between each intention recognition text pair in the historical sample library and the request text is less than a first threshold, a new request text is obtained; and there is an intention recognition text pair matching the new request text in the historical sample library; Alternatively, when the semantic similarity between each intention recognition text pair in the historical sample library and the request text is less than a first threshold, a new intention recognition text pair is added to the historical sample library; and the new intention recognition text pair is matched with the request text.

[0054] Optionally, the text splicing module includes: A sample-to-be-recognized determination unit, configured to, when the number of text pairs is greater than or equal to two, splice the target intent recognition text pair with the greatest semantic similarity to the request text before the request text to obtain a sample to be recognized; The historical sample library updating unit is used to add the historical intention recognition text pairs matching the request text to the historical sample library when the number of the text pairs is equal to one; the number of the historical intention recognition text pairs is greater than or equal to one.

[0055] Optionally, the request intention identification module includes: A sample complexity determination unit, used to determine the sample complexity of the sample to be identified; A sample adjustment unit, configured to adjust a target intent recognition text pair concatenated with the request text to obtain an adjusted sample when the sample complexity is greater than or equal to a second threshold; An intent recognition result determination unit is used to determine the intent recognition result of the user request based on the adjusted sample and the intent recognition model when the sample complexity of the adjusted sample is less than the second threshold.

[0056] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the request intention recognition method, which includes: converting the user request into a request text; determining a target intention recognition text pair based on the request text; the target intention recognition text pair is an intention recognition text pair that matches the request text in the historical sample library; splicing the request text with the target intention recognition text pair to obtain a sample to be recognized; determining the intention recognition result of the user request based on the sample to be recognized and the intention recognition model; the intention recognition model is obtained by training based on the historical sample library.

[0057] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0058] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the request intent recognition method provided by the above methods, which includes: converting a user request into a request text; determining a target intent recognition text pair based on the request text; the target intent recognition text pair is an intent recognition text pair that matches the request text in a historical sample library; concatenating the request text with the target intent recognition text pair to obtain a sample to be recognized; determining the intent recognition result of the user request based on the sample to be recognized and an intent recognition model; the intent recognition model is obtained by training based on the historical sample library.

[0059] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the request intent recognition method provided by the above-mentioned methods, the method comprising: converting a user request into a request text; determining a target intent recognition text pair based on the request text; the target intent recognition text pair is an intent recognition text pair that matches the request text in a historical sample library; concatenating the request text with the target intent recognition text pair to obtain a sample to be recognized; determining the intent recognition result of the user request based on the sample to be recognized and an intent recognition model; the intent recognition model is obtained by training based on the historical sample library.

[0060] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0061] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A request intention recognition method, characterized in that: include: Convert user requests into request text; Determining a target intent recognition text pair based on the request text; The target intent recognition text pair is an intent recognition text pair that matches the request text in the historical sample library; Concatenate the request text with the target intent recognition text pair to obtain a sample to be recognized; Determine the intent recognition result of the user request based on the sample to be recognized and the intent recognition model; The intention recognition model is obtained by training based on the historical sample library; The determining of the target intent recognition text pair based on the request text comprises: Obtaining text length, content attributes, required algorithm information, and processing task information of the request text; Determining a first complexity of the request text based on the text length and the content attribute; Determining a second complexity of the request text based on the demand algorithm information and the processing task information; Determining a target intent recognition text pair based on a request complexity; the request complexity is determined based on the first complexity and the second complexity; The determining of the target intention recognition text pair based on the request text further includes: Obtaining the semantic similarity between each intent recognition text pair in the historical sample library and the request text; Determine an intent recognition text pair whose semantic similarity with the request text is greater than or equal to a first threshold as a target intent recognition text pair; Based on the request complexity, the number of text pairs of the target intent recognition text pairs is determined.

2. The request intention recognition method according to claim 1, characterized in that: The step of obtaining the semantic similarity between each intention recognition text pair in the historical sample library and the request text comprises: In the case where the semantic similarity between each intended recognition text pair in the historical sample library and the request text is less than a first threshold, taking the request text as a sample to be recognized; Alternatively, when the semantic similarity between each intention recognition text pair in the historical sample library and the request text is less than a first threshold, a new request text is obtained; and there is an intention recognition text pair matching the new request text in the historical sample library; Alternatively, when the semantic similarity between each intention recognition text pair in the historical sample library and the request text is less than a first threshold, a new intention recognition text pair is added to the historical sample library; and the new intention recognition text pair is matched with the request text.

3. The request intention recognition method according to claim 1, characterized in that: The step of concatenating the request text with the target intent recognition text to obtain a sample to be recognized comprises: When the number of the text pairs is greater than or equal to two, the target intent recognition text pair having the greatest semantic similarity to the request text is concatenated before the request text to obtain a sample to be recognized; When the number of the text pairs is equal to one, the historical intent recognition text pairs matching the request text are added to the historical sample library; and the number of the historical intent recognition text pairs is greater than or equal to one.

4. The request intention recognition method according to claim 1, characterized in that: The determining, based on the sample to be identified and the intent recognition model, the intent recognition result of the user request includes: Determining the sample complexity of the sample to be identified; When the sample complexity is greater than or equal to a second threshold, adjusting the target intent recognition text pair concatenated with the request text to obtain an adjusted sample; When the sample complexity of the adjusted sample is less than the second threshold, the intent recognition result of the user request is determined based on the adjusted sample and the intent recognition model.

5. A request intention recognition device, characterized in that: include: A request text obtaining module is used to convert user requests into request texts; A target intention recognition text pair determination module is used to determine a target intention recognition text pair based on the request text; the target intention recognition text pair is an intention recognition text pair that matches the request text in a historical sample library; A text concatenation module, used for concatenating the request text with the target intent recognition text pair to obtain a sample to be recognized; A request intent recognition module, used to determine the intent recognition result of the user request based on the sample to be recognized and the intent recognition model; The intention recognition model is obtained by training based on the historical sample library; The target intention recognition text pair determination module includes: An acquisition unit, used to acquire the text length, content attributes, required algorithm information and processing task information of the request text; A first complexity determining unit, configured to determine a first complexity of the request text based on the text length and the content attribute; A second complexity determining unit, configured to determine a second complexity of the request text based on the required algorithm information and the processing task information; a target intention recognition text pair determination unit, configured to determine a target intention recognition text pair based on a request complexity; the request complexity being determined based on the first complexity and the second complexity; The target intention recognition text pair determination module also includes: A semantic similarity acquisition unit, used to obtain the semantic similarity between each intention recognition text pair in the historical sample library and the request text; A first determining unit, configured to determine an intention recognition text pair having a semantic similarity with the request text greater than or equal to a first threshold as a target intention recognition text pair; A text pair quantity determination unit is used to determine the number of text pairs of the target intent recognition text pairs based on the request complexity.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, it implements the request intention recognition method as described in any one of claims 1 to 4.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the request intention recognition method as described in any one of claims 1 to 4 is implemented.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the request intention recognition method as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Method and device for obtaining response verbal skill, computer equipment and storage medium

    CN110765244A

  • Semantic recognition method and device, computer equipment and storage medium

    CN112149410A

  • Text updating method and system, electronic device and storage medium

    CN113434655A

  • Financial service application intention recognition method and device, equipment and storage medium

    CN119166744A

  • Generative model-based intention recognition method and system, and storage medium

    CN119443113A