Intention recognition method, intention system construction method and related equipment

Through clustering analysis and adjustment of intent quantity, the problems of manual screening and data annotation in intent recognition are solved, and the automation and accuracy of intent recognition are achieved, and the cost is reduced.

CN119271780AInactive Publication Date: 2025-01-07MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411338549.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In intention recognition, when building a high-quality intention system, manual analysis and screening of unlabeled data is required, resulting in high labor and time costs and it is difficult to accurately extract intentions related to strong scenarios.

Method used

Cluster analysis is carried out through the number of communication rounds based on the basic information of the target scenario and the number of communication data, and the number of intentions is adjusted, the intention is automated and accurate identification is achieved, and the labor and time costs are reduced.

Benefits of technology

It improves the accuracy of intention recognition, makes the identified intention more in line with the target scenario, realizes automatic identification of intentions, and reduces the cost of manpower and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271780A_ABST
    Figure CN119271780A_ABST
Patent Text Reader

Abstract

The invention discloses an intention recognition method, an intention system construction method and related equipment, and the method comprises the steps: determining a first clustering number for clustering the communication data of a to-be-recognized object in a target scene based on the basic information of the target scene; based on the communication round number of the communication data, determining a floating value of the intention number of the to-be-identified object; adjusting the first clustering number based on the floating value to obtain a second clustering number for clustering the communication data; and identifying the intention of the to-be-identified object based on the basic information, the first clustering number, the second clustering number and the communication data to obtain an intention identification result of the to-be-identified object. According to the invention, automatic and accurate identification of the intention can be realized, and the manpower and time cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of intent recognition, and in particular to an intent recognition method, an intent system construction method and related equipment. Background Art

[0002] At present, the theoretical research and model exploration of Natural Language Processing (NLP) have gradually expanded to various fields that are closer to human intelligence. The problems involved have gradually extended from word segmentation, semantic classification and matching, question and answering, and other tasks. Whether in the field of text recognition or text generation, they have shown a trend from easy to difficult. As an important application of NLP, intention recognition plays a vital role in the intelligent application of NLP. Specifically, intention recognition is the intention recognition model corresponding to the scene where the text is generated by the text input. The intention recognition model pre-configures multiple intentions that may be generated by the object that outputs the text in the scene. Then the recognition model parses the input text to determine which of the multiple intentions pre-configured in the model the intention in the text is. It can be seen that in intention recognition, the multiple intentions pre-configured in the recognition model play a vital role in the accuracy of intention recognition. The multiple intentions pre-configured in the recognition model are the intention system in the scene corresponding to the model. Therefore, the construction of the intention system is the primary and basic work of the intention recognition task, and plays a key role in the subsequent data annotation and model result judgment.

[0003] However, when constructing an intent system, the number and meaning of intents in the system are uncertain, and the data used to construct the intent system is also unlabeled data. Therefore, the difficulty in constructing an intent system is to accurately and comprehensively extract intents that are strongly related to the scenario from unlabeled data. Currently, to build a high-quality intent system, experienced personnel are required to analyze the data, extract the various intents contained therein, and screen out intents that are strongly related to the scenario corresponding to the intent system to be established, and then construct the intent system. The overall construction process tends to be manual, with high manpower and time costs. Summary of the invention

[0004] This application provides an intent recognition method, an intent system construction method and related equipment, which can realize automatic and accurate recognition of intent and reduce manpower and time costs.

[0005] In a first aspect, an intent recognition method provided in an embodiment of the present application includes:

[0006] Based on the basic information of the target scenario, determining a first number of clusters for clustering the communication data of the object to be identified in the target scenario;

[0007] Determining a floating value of the number of intentions of the object to be identified based on the number of communication rounds of the communication data;

[0008] adjusting the first number of clusters based on the floating value to obtain a second number of clusters for clustering the communication data;

[0009] The intention of the object to be identified is identified based on the basic information, the first cluster number, the second cluster number, and the communication data to obtain an intention identification result of the object to be identified.

[0010] It can be seen that in this method, since each round of communication may express a new intention during the communication process, the number of intentions that the object to be identified may have in the target scenario can be obtained by statistically analyzing the number of communication rounds of the communication data in the target scenario. Based on this, by analyzing the number of communication rounds of the communication data, the floating value of the number of intentions of the object to be identified can be determined, and then the first number of clusters determined by the basic information in the target scenario is adjusted based on the floating value to obtain a more accurate second number of clusters. Therefore, by constraining the clustering process in intent recognition through basic information, the first number of clusters and the second number of clusters, the accuracy of intent recognition can be improved, making the identified intention more in line with the target scenario. Then, the automatic and accurate recognition of intentions can be achieved, reducing the cost of manpower and time.

[0011] In a second aspect, a method for constructing an intent system provided in an embodiment of the present application includes:

[0012] Acquire the intention of the object to be identified, wherein the intention of the object to be identified is identified by the method designed in the first aspect;

[0013] An intention system is constructed based on the intention of the object to be identified.

[0014] In a third aspect, an intention recognition device provided in an embodiment of the present application includes:

[0015] A processing module, configured to determine, based on basic information of a target scene, a first number of clusters for clustering communication data of an object to be identified in the target scene, determine a floating value of the number of intentions of the object to be identified based on the number of communication rounds of the communication data, adjust the first number of clusters based on the floating value, and obtain a second number of clusters for clustering the communication data;

[0016] An identification module is used to identify the intention of the object to be identified based on the basic information, the first cluster number, the second cluster number and the communication data, and obtain an intention identification result of the object to be identified.

[0017] In a fourth aspect, a conversation recognition device provided in an embodiment of the present application includes:

[0018] An intention recognition module, used to obtain the intention of the object to be recognized, wherein the intention of the object to be recognized is recognized by the method designed in the first aspect;

[0019] A construction module is used to construct an intention system based on the intention of the object to be identified.

[0020] In a fifth aspect, an electronic device provided in an embodiment of the present application comprises a processor, a memory and a computer program or instructions stored on the memory, wherein the processor executes the computer program or instructions to implement the steps in the method designed in the first aspect or the second aspect above.

[0021] In a sixth aspect, a computer-readable storage medium is provided for an embodiment of the present application, wherein a computer program or instruction is stored therein, and when the computer program or instruction is executed, the steps in the method designed in the first aspect or the second aspect are implemented. For example, the computer program or instruction is executed by a processor.

[0022] In a seventh aspect, a computer program product provided by an embodiment of the present application includes a computer program or an instruction, wherein when the computer program or the instruction is executed, the steps in the method designed in the first aspect or the second aspect are executed. For example, the computer program or the instruction is executed by a processor.

[0023] The beneficial effects brought about by the technical solutions of the second to seventh aspects can be referred to the technical effects brought about by the technical solution of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some implementation methods recorded in one or more of the present specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0025] Figure 1 is a schematic diagram of an intention recognition system proposed in an embodiment of the present application;

[0026] Figure 2 A flowchart of an intent recognition method proposed in an embodiment of the present application;

[0027] Figure 3 It is a schematic diagram of determining a floating value proposed in an embodiment of the present application;

[0028] Figure 4 A flowchart of a method for identifying the intention of an object to be identified based on basic information, the number of first clusters, the number of second clusters, and communication data to obtain an intention identification result of the object to be identified, proposed in an embodiment of the present application;

[0029] Figure 5 It is a flowchart of a method for constructing an intent system proposed in an implementation mode of the present application;

[0030] Figure 6 This is a functional module block diagram of an intention recognition device proposed in an embodiment of the present application;

[0031] Figure 7 It is a structural schematic diagram of an electronic device proposed in an embodiment of the present application. DETAILED DESCRIPTION

[0032] It should be understood that the terms "first", "second", etc. involved in the embodiments of the present application are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, software, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products, or devices.

[0033] The "implementation method" involved in the embodiments of the present application means that the specific features, structures or characteristics described in conjunction with the implementation method may be included in at least one implementation method of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same implementation method, nor is it an independent or alternative implementation method that is mutually exclusive with other implementation methods. It is explicitly and implicitly understood by those skilled in the art that the implementation methods described herein may be combined with other implementation methods.

[0034] The “and / or” in the implementation manner of the present application describes the association relationship of the associated objects, indicating that three types of relationships may exist.

[0035] In the implementation manner of the present application, the symbol " / " can indicate that the previously associated objects are in an "or" relationship.

[0036] "At least one item" or similar expressions in the embodiments of the present application refers to any combination of these items, including any combination of single items or plural items, and refers to one or more, and multiple refers to two or more.

[0037] In the embodiments of the present application, "higher than" can be expressed as the same concept as "greater than", "lower than" can be expressed as the same concept as "less than", "not lower than" can be expressed as the same concept as "higher than or equal to" or "greater than or equal to", and "not higher than" can be expressed as the same concept as "lower than or equal to" or "less than or equal to". In the present application, for the same scheme, "equal to" can be used in conjunction with "less than", and can also be used in conjunction with "greater than", but not used in conjunction with "less than" and "greater than" at the same time. When "equal to" is used in conjunction with "less than", it is applicable to the technical scheme adopted by "less than". When "equal to" is used in conjunction with "greater than", it is applicable to the technical scheme adopted by "greater than".

[0038] In the embodiments of the present application, the terms "of", "corresponding / relevant", "corresponding", "indicated", "associated", etc. may be used interchangeably.

[0039] In the implementation manner of this application, the words "associated", "corresponding", "corresponding", "is", "of", "for", "belonging to", "as", and "regarded as" may sometimes be used interchangeably.

[0040] The "connection" in the embodiments of the present application refers to various connection methods such as direct connection or indirect connection to achieve communication between devices, and there is no limitation on this.

[0041] The "network" in the implementation manner of the present application can be expressed as the same concept as the "system", and the communication system is the communication network.

[0042] The following is an explanation of the relevant contents, concepts, meanings, technical issues, technical solutions and beneficial effects involved in the implementation of the present application.

[0043] First, see Figure 1 , Figure 1 Schematic diagram of an intention recognition system proposed in the embodiment of the present application. Figure 1 As shown, the intention recognition system may include a recognition device and a database.

[0044] In this embodiment, after receiving the recognition request, the recognition device obtains the basic information of the target scene of the intention recognition and the communication data of the object to be recognized in the target scene from the recognition request. Among them, the basic information may include the scene name, the intention recognition background and the intention recognition purpose, which are used to declare the scene, the recognized object and the recognition purpose of the intention recognition model trained after the intention system is built. The communication data of the object to be recognized in the target scene can be understood as the data of the recognized object declared in the basic information communicating with other objects in the scene, such as call data, text communication data, video communication data, etc. Then, the recognition device determines the first cluster number for clustering the communication data according to the basic information, determines the floating value of the intention number of the object to be recognized according to the number of communication rounds of the communication data, and then adjusts the first cluster number according to the floating value to obtain the second cluster number for clustering the communication data. Finally, the recognition device recognizes the intention of the object to be recognized based on the basic information, the first cluster number, the second cluster number and the communication data, and obtains the intention recognition result of the object to be recognized.

[0045] Understandably, Figure 1 The form and quantity of the identification devices and databases shown in the figure are for example only and do not constitute a limitation on the implementation methods of the present application.

[0046] In this embodiment, the identification device may be a device with a communication function, which may be called a terminal, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal equipment, vehicle-mounted terminal equipment, industrial control terminal equipment, UE unit, UE station, mobile station, remote station, remote terminal equipment, mobile equipment, UE terminal equipment, wireless communication equipment, UE agent or UE device, etc. The terminal equipment may be fixed or mobile. It should be noted that the training device and the terminal equipment may support at least one wireless communication technology, such as LTE, new radio (NR), wideband code division multiple access (WCDMA), etc. For example, the training device and the terminal device may be a mobile phone, a tablet computer (pad), a desktop computer, a laptop computer, an all-in-one computer, a vehicle-mounted terminal, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a wearable device, a terminal device in a future mobile communication network, or a terminal device in a future evolved public mobile land network (PLMN), etc. In some embodiments of the present application, the training device and the terminal device may also be a device with a transceiver function, such as a chip system, wherein the chip system may include a chip and may also include other discrete devices.

[0047] In this embodiment, the training device and the terminal device can also be a server, for example, it can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), as well as basic cloud computing services such as big data and artificial intelligence platforms. This application does not make specific limitations on this.

[0048] In this embodiment, the database may also be a server, or a memory that provides data storage services, such as: a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), a magnetic disk storage medium or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, and this application does not make any specific limitations on this.

[0049] In this embodiment, the database may also be a storage unit integrated in the training device and / or the terminal device, and may be a component of the training device and / or the terminal device.

[0050] See also Figure 2 , Figure 2 A flowchart of an intention recognition method proposed in the embodiment of the present application, which is applied to Figure 1 The intention recognition system shown in the figure can be implemented by a recognition device in the intention recognition system. Figure 2 As shown, the method includes:

[0051] S201: Determine, based on basic information of a target scenario, a first number of clusters for clustering communication data of an object to be identified in the target scenario.

[0052] In this embodiment, the target scene is the scene to which the trained intent recognition model is applied after the intent recognition system is built. The basic information may include the scene name, intent recognition background, and intent recognition purpose, which is used to declare the scene to which the trained intent recognition model is applied after the intent system is built, the object to be recognized, and the purpose of recognition.

[0053] For example, the basic information may be as follows:

[0054] Scenario name: Debt collection scenario;

[0055] Intention recognition background: When collecting debts from borrowers, customers will respond based on their different situations. During this process, it is necessary to accurately identify the repayment intention in the customer's response in order to better guide the customer to repay.

[0056] Purpose of intent identification: to improve the collection rate.

[0057] Among them, the basic information declares that after the intention system is built, the application scenario of the trained intention recognition model is the collection scenario, the object of recognition is the customer being collected, and the purpose of recognition is to recognize the customer's intention to repay, so as to guide the customer to repay and improve the collection rate. It can be seen that the basic information provides a large number of features related to the target scenario.

[0058] In an optional implementation, the basic information may also include a manually written dialogue guidance file for the target scenario, which records the reply words that can be used when the customer expresses a certain intention. Therefore, when the intention is subsequently identified based on the communication data, the previous sentence of the customer service reply, that is, the customer's sentence, can be roughly marked for the intention by matching the words of the customer service reply in the communication data with the words in the dialogue guidance file, so as to improve the efficiency and accuracy of the intention identification.

[0059] In this embodiment, the object to be identified is the object declared in the basic information. For example, in the above example of basic information, the object to be identified is the customer whose debt is being collected, and the object to be identified is the customer whose debt is being collected. Based on this, the communication data of the object to be identified in the target scenario is the communication data between the customer whose debt is being collected and the debt collector in the debt collection scenario, such as: call data of the debt collection phone, text communication data of online debt collection, video communication data, etc.

[0060] In a possible implementation, the communication data may be communication data within a certain period of time, for example, communication data between a collection customer and a collection officer in a collection scenario within half a year.

[0061] In this embodiment, the data of identifying the intention of the object to be identified in the target scene can be obtained in the historical data through the scene name in the basic information, and then the number of intentions identified each time the intention identification was performed in history is counted. Then the average, mode or median of the number of intentions obtained from these historical intention identifications is used as the first cluster number, and the clustering of communication data in this intention identification process is quantitatively restricted. Among them, if the average of the number of intentions is used as the first cluster number, if the obtained average is an integer, the average can be directly used as the first cluster number; when the obtained average is a non-integer, the average can be rounded down to obtain the first cluster number.

[0062] For example, if we query the historical data based on the scene name in the basic information, we know that there were 4 intent recognitions in this scene before this intent recognition. Among them, the number of intents recognized in the first time was 10, the number of intents recognized in the second time was 8, the number of intents recognized in the third time was 15, and the number of intents recognized in the fourth time was 13. It can be determined that the average number of intents recognized in these 4 intent recognitions is 11.5. Since 11.5 is a non-integer, it is rounded down to the integer 11 as the first cluster number.

[0063] Therefore, through historical experience data, it is possible to preliminarily determine the number of intents that are strongly related to the target scene when performing intent recognition on the object to be recognized in the target scene. Then, when performing subsequent intent clustering, this regular number can be used as the first clustering number to constrain the clustering of communication data in intent recognition. In this way, only clusters equal to the first clustering number will be clustered, thereby reducing the possibility of separately clustering intentions that are weakly related to the target scene or are not in the scene due to noise data, so that the final intent recognition result is more accurate.

[0064] S202: Determine a floating value of the number of intentions of the object to be identified based on the number of communication rounds of the communication data.

[0065] In this embodiment, since each round of communication may express a new intention during the communication process, the number of communication rounds can reflect the number of intentions of the objects to be identified in the target scene to a certain extent. Therefore, by statistically analyzing the number of communication rounds of communication data in the target scene, a floating value related to the number of intentions of the objects to be identified in the target scene can be obtained.

[0066] In this embodiment, the communication data may include multiple sub-data, each of which is complete data of one communication, that is, the communication data is composed of multiple sub-data obtained from multiple communications in this scenario. Based on this, the floating value can be determined by analyzing the number of communication rounds of all sub-data in the communication data.

[0067] Generally speaking, in the communication process, each round of communication may express a new intention. Therefore, by statistically analyzing the number of communication rounds of the communication data in the target scenario, the number of intentions that may be included in the target scenario can also be obtained. Specifically, if the number of communication rounds between the object to be identified and the object it communicates with in one communication is more, it means that the object to be identified has expressed more intentions in the communication. Therefore, by analyzing the number of communication rounds of each sub-data in the communication data, the distribution of the number of intentions expressed by the object to be identified in the target scenario can be determined, and then the floating value can be determined based on the distribution, and the first cluster number can be adjusted to make the first cluster number more accurate.

[0068] The following is an explanation of how to determine the floating value:

[0069] In this embodiment, first, based on the number of communication rounds of each sub-data, the sub-data with the same number of communication rounds can be grouped together to obtain multiple data groups. Then, based on the multiple data groups, the floating value can be determined. Specifically, based on the first number of sub-data contained in each data group, each data group can be arranged in order from small to large according to the first number. Then, in the arrangement, the difference in the first quantity corresponding to each two adjacent data groups is determined to obtain multiple quantity differences. Then, among the multiple quantity differences, the data group with the larger first quantity in the two data groups corresponding to the maximum value is taken as the first data group. Finally, the second number of the data groups corresponding to the first quantity in the multiple data groups is determined to be greater than or equal to the first quantity corresponding to the first data group, and the second number is taken as the floating value.

[0070] Specifically, if Figure 3 As shown, Figure 3 A schematic diagram of determining a floating value is shown. The communication data includes 100 sub-data. After grouping, 7 data groups are obtained, which are:

[0071] Data group 1 [Number of call rounds: 5; First quantity: 9];

[0072] Data group 2 [Number of call rounds: 6; First quantity: 18];

[0073] Data group 3 [Number of call rounds: 8; First quantity: 16];

[0074] Data group 4 [Number of call rounds: 10; First quantity: 17];

[0075] Data group 5 [Number of call rounds: 11; First quantity: 18];

[0076] Data group 6 [Number of call rounds: 12; First quantity: 12];

[0077] Data group 7 [Number of call rounds: 13; First quantity: 10].

[0078] Then, after arranging them in ascending order according to the first quantity, the following sorting can be obtained:

[0079] Data group 1 [Number of call rounds: 5; First quantity: 9];

[0080] Data group 7 [Number of call rounds: 13; First quantity: 10];

[0081] Data group 6 [Number of call rounds: 12; First quantity: 12];

[0082] Data group 3 [Number of call rounds: 8; First quantity: 16];

[0083] Data group 4 [Number of call rounds: 10; First quantity: 17];

[0084] Data group 2 [Number of call rounds: 6; First quantity: 18];

[0085] Data group 5 [Number of call rounds: 11; First quantity: 18];

[0086] Then, the difference of the first quantity of each two adjacent data groups in the sorting is calculated to obtain the following quantity difference:

[0087] The difference between the number of data sets 7 and 1 is 1;

[0088] The difference between the number of data sets 6 and 7 is 2;

[0089] The difference between the number of data sets 3 and 6: 4;

[0090] The difference between the number of data sets 4 and 3 is 1;

[0091] The difference between the number of data sets 2 and 4 is 1;

[0092] The difference in quantity between data set 5 and data set 2: 0.

[0093] Then, according to the maximum value of the quantity difference, the data group with the larger first quantity in the two data groups corresponding to the maximum value is determined as the first data group. In the above example, the maximum value of the quantity difference is 4, and the two data groups corresponding to it are data group 3 and data group 6, among which the first quantity of data group 3 is larger, so data group 3 is the first data group.

[0094] Finally, determine the second number of data groups whose corresponding first number is greater than or equal to the first number corresponding to the first data group in the plurality of data groups, and use the second number as a floating value. In the above example, the data groups whose first number is greater than or equal to the first number corresponding to the first data group are: data group 3, data group 4, data group 2, and data group 5, with a total of 4 1s, and the floating value is 4.

[0095] In this embodiment, a method for determining a floating value is also provided, in which the floating value can be determined based on the number of multiple data groups and a preset first ratio. Specifically, the number of multiple data groups can be multiplied by the preset first ratio. If the result is an integer, the result is used as the floating value; otherwise, the result is rounded down to obtain the floating value. Take the above example: the number of multiple data groups is 7, if the first ratio is 60%, then the two are multiplied to obtain 4.2. Since 4.2 is not an integer, it is rounded down to obtain the integer 4 as the floating value.

[0096] S203: Adjust the first cluster quantity based on the floating value to obtain a second cluster quantity for clustering the communication data.

[0097] In this embodiment, the upper and lower floating range of the first cluster number can be determined according to the floating value, and then after removing the numerical value of the first cluster number itself from the upper and lower floating range, all remaining possible integer values ​​are used as the second cluster number, that is, the number of the second cluster number can be multiple.

[0098] For example, if the floating value is 2, it means that the floating range of the first cluster number is 2, that is, the maximum floating range is 2. If the first cluster number is 5, the maximum floating value is 5+2=7, and the minimum floating value is 5-2=3. The floating range of the first cluster number is [2, 7]. In this range, except for the value of the first cluster number itself, 5, all the remaining possible integer values ​​are: 3, 4, 6 and 7. Therefore, in this case, 4 second cluster numbers will be determined, namely: 3, 4, 6 and 7.

[0099] Based on this, since the floating value is a data value determined based on the number of communication rounds of the communication data, it contains the characteristics of the distribution of the number of intentions in the dimension of the number of communication rounds in the target scenario. Based on this, after adjusting the first cluster number by the floating value, the second cluster number obtained contains both the characteristics of the number of intentions in the dimension of historical experience and the characteristics of the number of intentions in the number of communication rounds, and then the second cluster number is more accurate than the first cluster number.

[0100] S204: Identify the intention of the object to be identified based on the basic information, the number of first clusters, the number of second clusters, and the communication data to obtain an intention recognition result of the object to be identified.

[0101] In this embodiment, refer to Figure 4 , Figure 4 The flowchart of a method for identifying the intention of an object to be identified based on basic information, the number of first clusters, the number of second clusters, and communication data to obtain the intention identification result of the object to be identified is shown. Figure 4 As shown, the method includes:

[0102] S401: performing intention clustering on the communication data based on a first clustering quantity to obtain a plurality of first clusters.

[0103] In this embodiment, when clustering the communication data according to semantic similarity, the number of clusters finally obtained can be specified as the first number of clusters, and then the first number of clusters and the first clusters can be obtained. Specifically, a clustering algorithm that can specify the number of clusters, such as the K-means clustering algorithm, the DBSCAN clustering algorithm, etc., can be used to cluster the communication data with the specified first number of clusters.

[0104] S402: Identify the intent of the object to be identified based on basic information and multiple first clusters to obtain multiple first candidate intents.

[0105] In this embodiment, each first cluster includes a plurality of sample data, and firstly, the basic information can be segmented to obtain a plurality of first segmented words. The segmentation process can refer to the existing segmentation process, and will not be described in detail here.

[0106] Then, determine the semantic distance between each sample data in each first cluster and each first participle in the multiple first participles, and obtain multiple first semantic distances corresponding to each sample data. That is, for each sample data, it is necessary to calculate the semantic distance between it and each first participle. Exemplarily, take the example in which the above basic information includes the scene name, intent recognition background and intent recognition purpose. The texts of the scene name, intent recognition background and intent recognition purpose can be segmented separately to obtain three groups of first participles, and then the semantic distance between each sample data and each first participle in each group of participles is calculated to obtain a set of three groups of first semantic distances. In this embodiment, the multiple first semantic distances corresponding to each sample data can also be put into the clustering result of the first cluster to which the sample data belongs, for easy subsequent calling.

[0107] Then, based on the second semantic distance between each sample data and the central sample data in each first cluster, and the multiple first semantic distances corresponding to each sample data, the comprehensive semantic distance of each sample is determined. Specifically, the mean of the multiple first semantic distances corresponding to each sample data can be determined to obtain the mean distance. Based on the second semantic distance corresponding to each sample data, the mean distance corresponding to each sample data and the preset weight, the second semantic distance and the mean distance are weighted and summed to determine the comprehensive semantic distance of each sample. Exemplarily, the example in which the above basic information includes the scene name, the intent recognition background and the intent recognition purpose is taken as an example. The average values ​​of the second semantic distances in the second semantic distance set corresponding to the scene name, the intent recognition background and the intent recognition purpose can be calculated respectively to obtain three mean distances, and then the three mean distances and the second semantic distance corresponding to the sample data are weighted and summed according to their respective preset weights to obtain the comprehensive semantic distance of the sample data.

[0108] Then, based on the comprehensive semantic distance of the multiple sample data in each first cluster, multiple target sample data are determined in each first cluster. Specifically, the first n sample data can be screened out as the multiple target sample data corresponding to each first cluster according to the order of the comprehensive semantic distance of each sample data from large to small. Where n is an odd number, and its value can be determined by the number of sample data included in each first cluster.

[0109] Exemplarily, for each first cluster, a unified n value can be used to extract target sample data. Exemplarily, the n value can be determined by the minimum value of the number of sample data contained in multiple first clusters, that is, when the minimum value is an odd number, the n value is equal to the minimum value; when the minimum value is an even number, the minimum value minus 1 is used as the n value. For example: if the number of first clusters is 5, after clustering, 5 first clusters are obtained: first cluster A, first cluster B, first cluster C, first cluster D and first cluster E. Among them, the first cluster A contains 50 sample data, the first cluster B contains 30 sample data, the first cluster C contains 20 sample data, the first cluster D contains 15 sample data, and the first cluster E contains 10 sample data. The minimum value of the number of sample data is 10. Since 10 is an even number, it is minus 1 as the n value, that is, the n value is 9. Therefore, for each first cluster, the sample data that meets the number of n values ​​can be taken as the target sample data, so as to achieve fair treatment of each cluster and ensure fairness in intent recognition.

[0110] In addition, for each first cluster, its n value may also be different. Exemplarily, the n value may be determined by the number of sample data contained in each first cluster and a preset second ratio. The second ratio is common to all first clusters, and the number of sample data contained in each first cluster may be multiplied by the second ratio, and the n value is determined according to the result. Specifically, if the result of the multiplication is an odd number, the n value is directly set equal to the result; if the result of the multiplication is an even number, it is subtracted by 1 as the n value; if the result of the multiplication is a non-integer, the result is first rounded down, and then the n value is determined according to the above two rules according to whether the rounded integer is an odd number or an even number. For example: Using the above example, the number of first clusters is 5, and after clustering, 5 first clusters are obtained: first cluster A, first cluster B, first cluster C, first cluster D and first cluster E. Among them, the first cluster A contains 50 sample data, the first cluster B contains 30 sample data, the first cluster C contains 20 sample data, the first cluster D contains 15 sample data, and the first cluster E contains 10 sample data. The preset second ratio is 30%. For the first cluster A, the number of samples 50 is multiplied by the second ratio 30%, and the result is 15. Since 15 is an odd number, the n value of the first cluster A is 15. For the first cluster B, the number of samples 30 is multiplied by the second ratio 30%, and the result is 9. Since 9 is an odd number, the n value of the first cluster B is 9. For the first cluster C, the number of samples 20 is multiplied by the second ratio 30%, and the result is 6. Since 6 is an even number, 6 is subtracted from 1 to obtain an odd number 5 as the n value of the first cluster C. For the first cluster D, the number of samples 15 is multiplied by the second ratio 30%, and the result is 4.5. Since 4.5 is a non-integer, it is first rounded down to an integer 4, and then since 4 is an even number, 4 is subtracted from 1 to obtain an odd number 3 as the n value of the first cluster D. For the first cluster E, the sample size 10 is multiplied by the second proportion 30%, and the result is 3. Since 3 is an odd number, the n value of the first cluster E is 3.

[0111] Finally, multiple target sample data in each first cluster are fused to obtain the third candidate intent corresponding to each first cluster. Then, the name of the object to be identified is determined based on the basic information. Finally, the name of the object to be identified and the third candidate intent are concatenated to obtain the first candidate intent corresponding to each first cluster.

[0112] Specifically, semantic recognition can be performed on each target sample data to obtain multiple semantic texts. Then, each semantic text is segmented to obtain multiple segmentation groups, wherein each segmentation group includes multiple second segmentations. Finally, the number of repetitions of each second segmentation is determined based on the multiple segmentation groups, and then the second segmentations whose number of repetitions is greater than or equal to the first threshold are spliced ​​to obtain the third candidate intent.

[0113] For example, suppose there are three target sample data. After semantic recognition and word segmentation, the following word groups are obtained respectively:

[0114] Sub-word group 1: salary, unpaid, indicated, unable to, repayment;

[0115] Participle group 2: indicate, unable to, on time, repay;

[0116] Phrase group 3: June 12, salary, indicate, unable to, repay.

[0117] Through statistics, it can be found that the second participle "indicate", "unable to" and "repay" are repeated 3 times, the second participle "salary" is repeated 2 times, and the second participle "on time", "June 12" and "not paid" are repeated once.

[0118] If the first threshold is 3, the second participles that meet the conditions are "indicate", "cannot" and "repay", and after splicing them, the third candidate intent can be obtained: indicating that repayment is impossible.

[0119] If the first threshold is 2, the second participles that meet the conditions are "indicate", "cannot", "repay" and "salary", and after splicing them, the third candidate intention can be obtained: indicating that the salary cannot be repaid.

[0120] If the first threshold is 1, the second participles that meet the conditions are "indicate", "cannot", "repay", "salary", "June 12" and "not paid", and after splicing them, we can get the third candidate intent: the salary has not been paid, indicating that it is impossible to repay on time on June 12.

[0121] In this embodiment, the name of the object to be identified is determined based on the intent recognition background in the basic information. Specifically, the intent recognition background can be segmented and input into the dependency grammar model, for example, the dependency grammar analysis model of paddlepaddle, to identify the named entities in the segmented words. Then, the word frequency of each named entity is calculated, and the named entity with the highest word frequency is used as the name of the object to be identified. Exemplarily, following the example of the intent recognition background above, the intent recognition background is:

[0122] When collecting debts from borrowers, customers will respond based on their different situations. During this process, it is necessary to accurately identify the repayment intention in the customer's response in order to better guide the customer to repay.

[0123] After word segmentation, we can get the following words: loan, customer, collection, self, situation, reply, process, need, precision, repayment, execution, intention, recognition and guidance. After identification by the dependency grammar module, the named entities are: loan, customer, reply and intention. When calculating the word frequency, it is determined that the named entity "customer" has the highest word frequency. Therefore, for this intention recognition context, the corresponding object to be identified is "customer".

[0124] In an optional real-time mode, the above-mentioned word segmentation and named entity recognition operations can also be performed on the scene name and intent recognition purpose in the basic information, and the word frequency of the named entities obtained by the scene name, intent recognition background and intent recognition purpose can be uniformly calculated to determine the named entity with the largest word frequency as the object to be recognized.

[0125] In this embodiment, after obtaining the object to be identified, the name of the object to be identified and the third candidate intent can be concatenated to obtain the first candidate intent corresponding to each first cluster. For example, the object to be identified "customer" in the above example is concatenated with the third candidate intent "indicates inability to repay" to obtain the first candidate intent "customer indicates inability to repay".

[0126] S403: Performing intention clustering on the communication data based on the second cluster quantity to obtain a plurality of second clusters.

[0127] In this embodiment, the method of clustering the communication data based on the second cluster number to obtain multiple second clusters is similar to the method of clustering the communication data based on the first cluster number to obtain multiple first clusters in step S401, and will not be repeated here.

[0128] S404: Identify the intent of the object to be identified based on the basic information and the multiple second clusters to obtain multiple second candidate intents.

[0129] In this embodiment, the method of performing intent recognition based on basic information and each second cluster to obtain multiple second candidate intents is similar to the method of performing intent recognition based on basic information and each first cluster to obtain multiple first candidate intents in step S402, and will not be repeated here.

[0130] S405: Screening multiple first candidate intentions and multiple second candidate intentions to obtain an intention recognition result of the object to be recognized.

[0131] In this embodiment, through the above steps S401-S404, the first candidate intents of the first cluster number and the second candidate intents of the second cluster number can be obtained. Since the above results are obtained by clustering the communication data by the first cluster number and the second cluster number, respectively, there may be candidate intents with similar semantics in the first candidate intent and the second candidate intent. For this reason, it is necessary to screen multiple first candidate intents and multiple second candidate intents so that only the best candidate intent with similar semantics is retained. The following will describe the screening process in detail:

[0132] First, multiple first candidate intents and multiple second candidate intents may be clustered to obtain multiple third clusters, that is, candidate intents with similar semantics are clustered into one third cluster.

[0133] Then, based on the vocabulary in each candidate intent in each third cluster, determine the modifier score of each candidate intent in each third cluster. In the present embodiment, the modifier score is determined by the modifiers contained in each candidate intent. Specifically, the modifier, as a limitation on the object it modifies, plays a role in limiting the semantics expressed by the sentence. The more modifiers a sentence contains, the narrower the scope corresponding to the semantics of the sentence. Therefore, by classifying the modifiers, determining the number of modifiers contained in each third candidate intent, and the category of the modifiers, the corresponding scope of the semantics of each third candidate intent can be determined, and then the third candidate intents with narrow semantic scope and low practicality can be screened out.

[0134] In this regard, in this implementation, the modifier score can be determined in the following manner:

[0135] First, each candidate intent is segmented to obtain multiple words, and then the parts of speech of the multiple words are identified to determine the modifiers contained in each candidate intent. For example, the dependency parsing model of PaddlePaddle can also be used here to identify the modifiers in the vocabulary.

[0136] Then, the modifier score of each candidate intent can be determined according to the number of modifiers included in each candidate intent. Specifically, if the number of modifiers contained in each candidate intent is 0, it indicates that there are no modifiers in the candidate intent, and the semantics of the candidate intent is not limited by the modifiers. Therefore, the modification score of the candidate intent is determined as the maximum value of the modifier score. If the number of modifiers contained in each candidate intent is not 0, the modifier score of each candidate intent is determined according to the modification type of the modifier. Exemplarily, the modification type of the modifier can be divided into cause modifiers and non-cause modifiers, where the cause modification refers to the modifier modifying the modified object by explaining the reason of the modified object, for example: in the intent "unable to repay due to salary not received", the modifier is "due to salary not received", which explains the reason why the modified object "cannot repay", so the modifier is a cause modifier. For example: In the intention “Unable to repay on June 12”, the modifier is “June 12”. This modifier does not explain the reason why the modified object “cannot repay”, and at the same time limits the date to “June 12”. Therefore, this modifier is a non-cause modifier.

[0137] In this embodiment, the score of the cause modifier is greater than the score of the non-cause modifier. When the candidate intent includes modifiers, the average of the scores corresponding to these modifiers is used as the modifier score of the candidate intent.

[0138] Finally, after determining the modifier score of each candidate intent, the candidate intents with the highest modifier scores in each third cluster can be combined into the intent recognition result of the object to be recognized.

[0139] In summary, since each round of communication may express a new intention in the communication process, the number of intentions that the object to be identified may have in the target scene can be obtained by statistically analyzing the number of communication rounds of communication data in the target scene. Based on this, this method can determine the floating value of the number of intentions of the object to be identified by analyzing the number of communication rounds of communication data, and then adjust the first number of clusters determined by the basic information in the target scene based on the floating value to obtain a more accurate second number of clusters. Then, through the first number of clusters and the second number of clusters, the clustering process in intent recognition is constrained to improve the accuracy of intent recognition to obtain a more reasonable clustering result. At the same time, based on the basic information of the target scene and the reasonable clustering results, the intention of the object to be identified is determined, and the characteristics of the target scene are integrated into the intention recognition process to make the identified intention more in line with the target scene. In this way, the automatic and accurate recognition of intentions is achieved, reducing the cost of manpower and time.

[0140] Corresponding to the above Figures 1 to 4The described intent recognition method is based on the same technical concept. The implementation method of the present application also provides an intent system construction method to construct an intent system corresponding to the target scenario, preparing for the training of subsequent intent recognition models in the scenario. Figure 5 A flowchart of a method for constructing an intent system provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, the method includes:

[0141] S501: Acquire the intention of the object to be identified.

[0142] S502: Construct an intention system based on the intention of the object to be identified.

[0143] The process and effect of obtaining the intention of the object to be identified in step S501 can be found in the above Figures 1 to 4 The method for constructing an intention system based on the intention of the object to be identified in step S502 can refer to the existing intention system construction method, which is not described here.

[0144] In the intent system construction method in the embodiment of the present application, since the characteristics of two dimensions, namely the number of communication data call rounds and the basic information of the target scene, are integrated into the process of obtaining the intent of the object to be identified, the number and meaning of the identified intents are more in line with the target scene and identification requirements. Then, based on the intent, the intent system is established, so that the obtained intent system is also more in line with the target scene and identification requirements, which can effectively improve the accuracy of the subsequent intent recognition model.

[0145] The above mainly introduces the scheme of the implementation mode of the present application from the perspective of the method side. It is understandable that in order to realize the above functions, the training device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the implementation mode disclosed in this article, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0146] The implementation method of the present application can divide the functional units of the terminal device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one functional module. The above integrated module can be implemented in the form of hardware or in the form of a software program module. It should be noted that the division of modules in the implementation method of the present application is schematic and is only a logical function division, and there may be other division methods in actual implementation.

[0147] In the case of integrated modules, Figure 6 6 is a functional module block diagram of an intention recognition device proposed in an embodiment of the present application. The intention recognition device 600 includes a processing module 601 and a recognition module 602.

[0148] In this implementation, the processing module 601 and the identification module 602 may be a module for receiving and processing signals, information, etc. or determining a monitoring mechanism, and there is no specific limitation on this.

[0149] In this embodiment, the intention recognition device 600 may further include a storage module for computer program codes or instructions executed by the intention recognition device 600. The storage module may be a memory.

[0150] In this embodiment, the intention recognition device 600 may be a chip or a chip module.

[0151] In this embodiment, the processing module 601 and the identification module 602 may be integrated into a communication module, wherein the communication module may be a communication interface, a transceiver, a transceiver circuit, and the like.

[0152] In this implementation, the processing module 601 and the identification module 602 may be integrated into a processor.

[0153] It should be noted that the processor can be a baseband processor, a baseband chip, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processing module can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of DSPs and microprocessors, etc.

[0154] In this embodiment, the intention recognition device 600 is used to execute any step performed by the terminal device / chip / chip module, etc. in the above method implementation.

[0155] In specific implementation, the processing module 601 and the identification module 602 are used to execute any step in the above method implementation, and when executing actions such as sending, other modules can be selectively called to complete corresponding operations.

[0156] Processing module 601, used to determine, based on basic information of a target scene, a first number of clusters for clustering communication data of an object to be identified in the target scene, determine a floating value of the number of intentions of the object to be identified based on the number of communication rounds of the communication data, adjust the first number of clusters based on the floating value, and obtain a second number of clusters for clustering the communication data;

[0157] The identification module 602 is used to identify the intention of the object to be identified based on the basic information, the first cluster number, the second cluster number and the communication data, and obtain an intention identification result of the object to be identified.

[0158] In this implementation, in the aspect of identifying the intention of the object to be identified based on the basic information, the first number of clusters, the second number of clusters, and the communication data to obtain the intention identification result of the object to be identified, the identification module 602 is specifically used to:

[0159] Performing intention clustering on the communication data based on the first number of clusters to obtain a plurality of first clusters;

[0160] Identify the intent of the object to be identified based on the basic information and the multiple first clusters to obtain multiple first candidate intents;

[0161] Performing intention clustering on the communication data based on the second number of clusters to obtain a plurality of second clusters;

[0162] Identify the intent of the object to be identified based on the basic information and the multiple second clusters to obtain multiple second candidate intents;

[0163] The multiple first candidate intentions and the multiple second candidate intentions are screened to obtain an intention recognition result of the object to be recognized.

[0164] In this embodiment, each first cluster includes multiple sample data. Based on this, in the aspect of identifying the intention of the object to be identified based on the basic information and the multiple first clusters to obtain multiple first candidate intentions, the identification module 602 is specifically used to:

[0165] Performing word segmentation processing on the basic information to obtain a plurality of first word segmentations;

[0166] Determine the semantic distance between each sample data in each first cluster and each first word in the plurality of first word segments, and obtain a plurality of first semantic distances corresponding to each sample data;

[0167] Determine a comprehensive semantic distance of each sample data based on the second semantic distance between each sample data and the central sample data in each first cluster, and a plurality of first semantic distances corresponding to each sample data;

[0168] Based on the comprehensive semantic distance of multiple sample data in each first cluster, the first candidate intent corresponding to each first cluster is determined to obtain the multiple first candidate intents.

[0169] In this embodiment, in determining the comprehensive semantic distance of each sample data based on the second semantic distance between each sample data and the central sample data in each first cluster, and the multiple first semantic distances corresponding to each sample data, the identification module 602 is specifically used to:

[0170] Determine the mean of multiple first semantic distances corresponding to each sample data to obtain the mean distance;

[0171] Based on the second semantic distance corresponding to each sample data, the mean distance corresponding to each sample data, and the distance weight, the comprehensive semantic distance of each sample data is determined.

[0172] In this implementation, in determining the first candidate intent corresponding to each first cluster based on the comprehensive semantic distance of the multiple sample data in each first cluster, and obtaining the multiple first candidate intents, the identification module 602 is specifically used to:

[0173] Based on the comprehensive semantic distance of the plurality of sample data in each of the first clusters, determining a plurality of target sample data in each of the first clusters; performing semantic fusion on the plurality of target sample data in each of the first clusters to obtain a third candidate intent;

[0174] Determine the name of the object to be identified based on the basic information;

[0175] The name of the object to be identified and the third candidate intent are concatenated to obtain the first candidate intent corresponding to each first cluster.

[0176] In this implementation, in the aspect of performing semantic fusion on the plurality of target sample data in each of the first clusters to obtain the third candidate intent, the identification module 602 is specifically configured to:

[0177] Perform semantic recognition on each target sample data to obtain multiple semantic texts;

[0178] Segment each semantic text to obtain a plurality of segmented word groups, wherein each segmented word group includes a plurality of second segmented words;

[0179] Determining the number of repetitions of each second participle based on the plurality of participle groups;

[0180] The second participles whose repetition times are greater than or equal to the first threshold are concatenated to obtain the third candidate intent.

[0181] In this embodiment, in the aspect of screening the plurality of first candidate intentions and the plurality of second candidate intentions to obtain the intention recognition result of the object to be recognized, the recognition module 602 is specifically used to:

[0182] Performing intent clustering on the multiple first candidate intents and the multiple second candidate intents to obtain multiple third clusters;

[0183] Determining a modifier score for each candidate intent in each third cluster based on the vocabulary in each candidate intent in each third cluster;

[0184] The candidate intent with the highest modifier score in each third cluster is used as the intent recognition result of the object to be recognized.

[0185] In this embodiment, in determining the modifier score of each candidate intent in each third cluster based on the vocabulary in each candidate intent in each third cluster, the identification module 602 is specifically configured to:

[0186] Segment each candidate intent to obtain multiple words;

[0187] Identify the parts of speech of the multiple words to determine the modifiers included in each candidate intent;

[0188] If the number of modifiers included in each candidate intent is 0, determining the modifier score of each candidate intent to be a preset maximum modifier score;

[0189] If the number of modifiers included in each candidate intent is not 0, the modifier score of each candidate intent is determined according to the modification type of the modifiers included in each candidate intent.

[0190] In this embodiment, the communication data includes a plurality of sub-data. Based on this, in determining the floating value of the number of intentions of the object to be identified based on the number of communication rounds of the communication data, the processing module 601 is specifically used to:

[0191] Based on the number of communication rounds of each sub-data in the communication data, the sub-data with the same number of communication rounds are grouped together to obtain multiple data groups;

[0192] The float value is determined based on the plurality of data sets.

[0193] In this implementation, in determining the floating value based on the multiple data groups, the processing module 601 is specifically configured to:

[0194] Based on a first number of sub-data contained in each of the plurality of data groups, arranging the plurality of data groups in ascending order of the first number;

[0195] In the arrangement, determining a difference in the first quantity between every two adjacent data groups to obtain a plurality of quantity differences;

[0196] The data group with the larger first quantity among the two data groups corresponding to the maximum value among the plurality of quantity differences is used as the first data group;

[0197] Determine a second number of data groups in the plurality of data groups whose corresponding first number is greater than or equal to the first number corresponding to the first data group, and use the second number as the floating value.

[0198] In this implementation, in determining the floating value based on the multiple data groups, the processing module 601 is specifically configured to:

[0199] The floating value is determined based on the number of the plurality of data groups and a preset first ratio.

[0200] Corresponding to the above Figure 5 The described intent system construction method is based on the same technical concept. The embodiment of the present application also provides an intent system construction device, which includes:

[0201] An intention recognition module, used to obtain the intention of the object to be recognized;

[0202] A construction module is used to construct an intention system based on the intention of the object to be identified.

[0203] In this embodiment, the method for the intention recognition module to obtain the intention of the object to be recognized is based on the above Figures 1 to 4 The specific implementation process and effect of the recognition process can be found in the above Figures 1 to 4 Describe the intent recognition method and Figure 5 The method of constructing the expression intention system will not be elaborated here.

[0204] It should be noted that the implementation of the intent system construction device in the present application and the implementation of the intent recognition method in the present application are based on the same inventive concept. Therefore, the specific implementation of this implementation can refer to the implementation of the corresponding intent recognition method mentioned above, and the repeated parts will not be repeated.

[0205] See also Figure 7 , Figure 7 7 is a schematic diagram of a structure of an electronic device proposed in an embodiment of the present application. The electronic device 700 may include a processor 710, a memory 720, and a communication bus for connecting the processor 710 and the memory 720.

[0206] Optionally, the memory 720 includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or portable read-only memory (CD-ROM), and the memory 720 is used to store the program code executed by the electronic device 700 and the transmitted data.

[0207] In this embodiment, the electronic device 700 further includes a communication interface for receiving and sending data.

[0208] In this implementation, the processor 710 may be one or more CPUs. When the processor 710 is a CPU, the CPU may be a single-core CPU or a multi-core CPU.

[0209] In this embodiment, the processor 710 can be a baseband chip, a chip, a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA or other programmable logic devices, transistor logic devices, hardware components or any combination thereof.

[0210] In a specific implementation, the processor 710 in the electronic device 700 is used to execute the computer program or instruction 721 stored in the memory 720 to perform the following operations:

[0211] Based on the basic information of the target scenario, determining a first number of clusters for clustering the communication data of the object to be identified in the target scenario;

[0212] Determining a floating value of the number of intentions of the object to be identified based on the number of communication rounds of the communication data;

[0213] adjusting the first number of clusters based on the floating value to obtain a second number of clusters for clustering the communication data;

[0214] The intention of the object to be identified is identified based on the basic information, the first cluster number, the second cluster number, and the communication data to obtain an intention identification result of the object to be identified.

[0215] Alternatively, in a specific implementation, the processor 710 in the electronic device 700 is used to execute the computer program or instruction 721 stored in the memory 720 to perform the following operations:

[0216] Get the intent of the object to be recognized.

[0217] Build an intent system based on the intent of the object to be identified.

[0218] It should be noted that Figure 7 The specific implementation of each operation in the implementation method can be found in the description of the method implementation method shown above, and will not be described in detail here.

[0219] The present application also provides a computer-readable storage medium storing a computer program or instructions, which implements the steps described in the above method implementation when executed.

[0220] The embodiment of the present application also provides a computer program product, including a computer program or instructions, which implement the steps described in the above method embodiment when executed.

[0221] It should be noted that, for the above-mentioned various embodiments, for the sake of simple description, they are all expressed as a series of action combinations. Those skilled in the art should be aware that the present application is not limited by the described order of actions, because some steps in the embodiments of the present application can be performed in other orders or simultaneously. In addition, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions, steps, modules or units involved are not necessarily required for the embodiments of the present application.

[0222] In the above-mentioned embodiments, the description of each embodiment of the present application has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0223] The steps of the method or algorithm described in the embodiments of the present application can be implemented in hardware or by executing software instructions by a processor. The software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (electrically EPROM, EEPROM), registers, hard disks, mobile hard disks, read-only compact disks (CD-ROMs) or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a terminal device or a management device. Of course, the processor and the storage medium can also be present in a terminal device or a management device as discrete components.

[0224] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiments of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0225] The modules / units included in the devices and products described in the above embodiments may be software modules / units or hardware modules / units, or may be partially software modules / units and partially hardware modules / units. For example, for the devices and products applied to or integrated in the chip, the modules / units included therein may all be implemented in the form of hardware such as circuits, or at least some of the modules / units may be implemented in the form of software programs, which run on the processor integrated inside the chip, and the remaining (if any) modules / units may be implemented in the form of hardware such as circuits; for the devices and products applied to or integrated in the chip module, the modules / units included therein may all be implemented in the form of hardware such as circuits, and different modules / units may be located in the same component (such as a chip, circuit module, etc.) or in different components of the chip module, or at least some of the modules / units may be implemented in the form of software programs. The software programs run on the processor integrated inside the chip, and the remaining (if any) modules / units may be implemented in the form of hardware such as circuits. It is implemented in the form of a software program, which runs on a processor integrated inside the chip module, and the remaining (if any) modules / units can be implemented in hardware such as circuits; for various devices and products applied to or integrated in the terminal equipment, the various modules / units contained therein can be implemented in hardware such as circuits, and different modules / units can be located in the same component (for example, chip, circuit module, etc.) or in different components in the terminal equipment, or, at least some modules / units can be implemented in the form of a software program, which runs on a processor integrated inside the terminal equipment, and the remaining (if any) modules / units can be implemented in hardware such as circuits.

[0226] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the implementation methods of the present application. It should be understood that the above description is only the specific implementation method of the implementation method of the present application and is not intended to limit the protection scope of the implementation method of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the implementation methods of the present application should be included in the protection scope of the implementation methods of the present application.

Claims

1. A method for intention recognition, characterized in that: The method comprises: Based on the basic information of the target scenario, determining a first number of clusters for clustering the communication data of the object to be identified in the target scenario; Determining a floating value of the number of intentions of the object to be identified based on the number of communication rounds of the communication data; adjusting the first number of clusters based on the floating value to obtain a second number of clusters for clustering the communication data; The intention of the object to be identified is identified based on the basic information, the first cluster number, the second cluster number, and the communication data to obtain an intention identification result of the object to be identified.

2. The method according to claim 1, characterized in that: The identifying the intention of the object to be identified based on the basic information, the first number of clusters, the second number of clusters, and the communication data to obtain the intention identification result of the object to be identified includes: Performing intention clustering on the communication data based on the first number of clusters to obtain a plurality of first clusters; Identify the intent of the object to be identified based on the basic information and the multiple first clusters to obtain multiple first candidate intents; Performing intention clustering on the communication data based on the second number of clusters to obtain a plurality of second clusters; Identify the intent of the object to be identified based on the basic information and the multiple second clusters to obtain multiple second candidate intents; The multiple first candidate intentions and the multiple second candidate intentions are screened to obtain an intention recognition result of the object to be recognized.

3. The method according to claim 2, characterized in that Each first cluster includes a plurality of sample data, and the intention of the object to be identified is identified based on the basic information and the plurality of first clusters to obtain a plurality of first candidate intentions, including: Performing word segmentation processing on the basic information to obtain a plurality of first word segmentations; Determine the semantic distance between each sample data in each first cluster and each first word in the plurality of first word segments, and obtain a plurality of first semantic distances corresponding to each sample data; Determine a comprehensive semantic distance of each sample data based on the second semantic distance between each sample data and the central sample data in each first cluster, and a plurality of first semantic distances corresponding to each sample data; Based on the comprehensive semantic distance of multiple sample data in each first cluster, the first candidate intent corresponding to each first cluster is determined to obtain the multiple first candidate intents.

4. The method according to claim 3, characterized in that The determining the comprehensive semantic distance of each sample data based on the second semantic distance between each sample data and the central sample data in each first cluster and the multiple first semantic distances corresponding to each sample data includes: Determine the mean of multiple first semantic distances corresponding to each sample data to obtain the mean distance; Based on the second semantic distance corresponding to each sample data, the mean distance corresponding to each sample data, and the distance weight, the comprehensive semantic distance of each sample data is determined.

5. The method according to claim 3 or 4, characterized in that: The determining, based on the comprehensive semantic distance of the plurality of sample data in each first cluster, the first candidate intent corresponding to each first cluster to obtain the plurality of first candidate intents comprises: Based on the comprehensive semantic distance of the plurality of sample data in each of the first clusters, determining a plurality of target sample data in each of the first clusters; performing semantic fusion on the plurality of target sample data in each of the first clusters to obtain a third candidate intent; Determine the name of the object to be identified based on the basic information; The name of the object to be identified and the third candidate intent are concatenated to obtain the first candidate intent corresponding to each first cluster.

6. The method according to claim 5, characterized in that The performing semantic fusion on the plurality of target sample data in each of the first clusters to obtain a third candidate intent includes: Perform semantic recognition on each target sample data to obtain multiple semantic texts; Segment each semantic text to obtain a plurality of segmented word groups, wherein each segmented word group includes a plurality of second segmented words; Determining the number of repetitions of each second participle based on the plurality of participle groups; The second participles whose repetition times are greater than or equal to the first threshold are concatenated to obtain the third candidate intent.

7. The method according to any one of claims 2 to 6, characterized in that: The screening of the plurality of first candidate intentions and the plurality of second candidate intentions to obtain the intention of the object to be identified includes: Performing intent clustering on the multiple first candidate intents and the multiple second candidate intents to obtain multiple third clusters; Determining a modifier score for each candidate intent in each third cluster based on the vocabulary in each candidate intent in each third cluster; The candidate intent with the highest modifier score in each third cluster is used as the intent of the object to be identified.

8. The method according to claim 7, characterized in that The step of determining the modifier score of each candidate intent in each third cluster based on the vocabulary in each candidate intent in each third cluster includes: Segment each candidate intent to obtain multiple words; Identify the parts of speech of the multiple words to determine the modifiers included in each candidate intent; If the number of modifiers included in each candidate intent is 0, determining the modifier score of each candidate intent to be a preset maximum modifier score; If the number of modifiers included in each candidate intent is not 0, the modifier score of each candidate intent is determined according to the modification type of the modifiers included in each candidate intent.

9. The method according to any one of claims 2 to 8, characterized in that: The communication data includes a plurality of sub-data, and the determining of the floating value of the number of intentions of the object to be identified based on the number of communication rounds of the communication data includes: Based on the number of communication rounds of each sub-data in the communication data, the sub-data with the same number of communication rounds are grouped together to obtain multiple data groups; The float value is determined based on the plurality of data sets.

10. The method according to claim 9, characterized in that The determining the floating value based on the plurality of data groups comprises: Based on a first number of sub-data contained in each of the plurality of data groups, arranging the plurality of data groups in ascending order of the first number; In the arrangement, determining a difference in the first quantity between every two adjacent data groups to obtain a plurality of quantity differences; The data group with the larger first quantity among the two data groups corresponding to the maximum value among the plurality of quantity differences is used as the first data group; Determine a second number of data groups in the plurality of data groups whose corresponding first number is greater than or equal to the first number corresponding to the first data group, and use the second number as the floating value.

11. The method according to claim 9, characterized in that The determining the floating value based on the plurality of data groups comprises: The floating value is determined based on the number of the plurality of data groups and a preset first ratio.

12. A method for constructing an intention system, characterized in that: The method comprises: Acquire the intention of the object to be identified, wherein the intention of the object to be identified is identified by the intention identification method described in any one of claims 1 to 11; An intention system is constructed based on the intention of the object to be identified.

13. An intention recognition device, characterized in that: The device comprises: A processing module, configured to determine, based on basic information of a target scene, a first number of clusters for clustering communication data of an object to be identified in the target scene, determine a floating value of the number of intentions of the object to be identified based on the number of communication rounds of the communication data, adjust the first number of clusters based on the floating value, and obtain a second number of clusters for clustering the communication data; An identification module is used to identify the intention of the object to be identified based on the basic information, the first cluster number, the second cluster number and the communication data, and obtain an intention identification result of the object to be identified.

14. An intention system construction device, characterized in that: The device comprises: An intention recognition module, used to obtain the intention of an object to be recognized, wherein the intention of the object to be recognized is recognized by the intention recognition method according to any one of claims 1 to 11; A construction module is used to construct an intention system based on the intention of the object to be identified.

15. An electronic device comprising a processor, a memory and a computer program or instruction stored in the memory, characterized in that: The processor executes the computer program or instructions to implement the steps of any one of claims 1 to 11 or the method of claim 12.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instructions, and when the computer program or instructions are executed, the steps of the method described in any one of claims 1 to 11 or claim 12 are performed.