Intention recognition method and electronic device
By introducing a feature fusion operator into the intent recognition algorithm and combining the results of word classification and intent classification, the problem of low accuracy in intent recognition is solved, and efficient intent recognition is achieved on devices with limited computing power.
Patent Information
- Application Number
- PCT/CN2025/106981
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-09
- Filing Date
- 2025-07-04
- Publication Date
- 2026-01-15
Smart Images

Figure CN2025106981_15012026_PF_FP_ABST
Abstract
Description
An intent recognition method and electronic device
[0001] This application claims priority to Chinese Patent Application No. 202410922958.X, filed on July 9, 2024, entitled "An Intent Recognition Method and Electronic Device", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computer technology, and in particular to an intent recognition method and electronic device. Background Technology
[0003] With the development of language models, conversational interaction methods relying on natural language understanding technology will better align with user habits. Currently, conversational interaction works as follows: electronic devices first process the acquired user language (e.g., speech, text) using a language model to obtain the corresponding character features. These character features are then processed using intent recognition technology / algorithms to identify the user's intent, and finally, an operation matching the user's intent is executed. Intent recognition algorithms typically employ a two-branch network structure: one branch identifies the category of the user's intent (this branch is used for intent classification), and the other branch extracts key information from the user's language (this branch is used for lexical classification). Because these two branches are independent—intent classification and lexical classification are executed separately—the results of intent classification cannot correspond to the results of lexical classification, leading to a failure to correctly parse the user's intent. This results in low accuracy of intent recognition, causing the electronic device to fail to execute the corresponding operation. Summary of the Invention
[0004] This application discloses an intent recognition method and an electronic device, which can classify intent by combining the results of word classification, establish a connection between word classification and intent classification, so that the results of word classification and intent classification can correspond, thereby correctly parsing the user intent, improving the accuracy of intent recognition, and enabling the electronic device to perform operations that conform to the user intent.
[0005] In a first aspect, embodiments of this application provide an intent recognition method, the method comprising: obtaining a first feature based on acquired user language, the user language including speech or text, the first feature being features of multiple characters in the user language; obtaining a second feature based on the first feature, the second feature being features of multiple key information in the user language; performing feature fusion on the first feature and the second feature according to at least one operator to obtain a third feature, the at least one operator including at least one of a summation operator, an average operator, a maximum value operator, and a concatenation operator; and recognizing the user intent based on the second feature and the third feature.
[0006] In the above method, the electronic device can acquire the user's language and obtain a first feature based on the user's language. The first feature may include features of multiple characters in the user's language (i.e., multiple word features). The electronic device can obtain a second feature based on the first feature. The second feature may include features of multiple key information in the user's language (i.e., multiple key features). Then, the electronic device can perform feature fusion on the first and second features using at least one operator to obtain a fused third feature, and then identify the user's intent based on the second and third features. This method selects to use at least one operator when fusing the first and second features without learning additional parameters. This at least one operator includes at least one of the following: summation operator, average operator, maximum value operator, and concatenation operator. It can be understood that the feature is fused using a simpler algorithm without introducing other parameters (which can be called parameterless feature fusion). This not only effectively solves the problem of low intent recognition accuracy, but also, because the algorithm is simple, the overhead of supporting the algorithm is also small. Therefore, the network structure of this algorithm can be deployed and run on devices with low / limited computing power, expanding the range of available devices.
[0007] In one possible implementation, identifying user intent based on the second feature and the third feature includes: obtaining key information corresponding to the user's language based on the second feature, the key information including slots and slot values, the slots including at least one of keywords, time, location, and type, and the slot values being the information corresponding to the slots; obtaining intent categories based on the third feature; and determining the user intent based on the key information and the intent categories.
[0008] In the above method, the electronic device can obtain key information corresponding to the user's language based on the second feature, obtain the intent category based on the third feature, and identify the user's intent by combining the intent category and the key information. This method can classify intent based on the result of word segment classification (the second feature mentioned above), establishing a connection between word segment classification and intent classification, so that the results of word segment classification and intent classification can correspond, thereby correctly parsing the user's intent, improving the accuracy of intent recognition, and enabling the electronic device to perform operations that conform to the user's intent.
[0009] In one possible implementation, the method is applied to a mobile terminal.
[0010] In the above method, the mobile terminal can be a device with low computing power, such as, but not limited to, mobile phones, tablets, wearable devices, etc. The network structure of this algorithm can be deployed and run on devices with low / limited computing power, thus expanding the range of available devices.
[0011] In one possible implementation, the step of fusing the first feature and the second feature according to at least one operator to obtain the third feature includes: fusing the features of the multiple characters using a first operator to obtain a first sentence feature, wherein the first operator is any one of the summation operator, the average operator, the maximum value operator, and the concatenation operator; fusing the features of the multiple key information items using a second operator to obtain a second sentence feature, wherein the second operator is any one of the summation operator, the average operator, the maximum value operator, and the concatenation operator; and fusing the first sentence feature and the second sentence feature using a third operator to obtain the third feature, wherein the third operator is any one of the summation operator, the average operator, the maximum value operator, and the concatenation operator.
[0012] In one possible implementation, the step of fusing the first feature and the second feature according to at least one operator to obtain the third feature includes: calculating the average of the feature parameters of the features of the multiple characters to obtain the first sentence feature; calculating the average of the feature parameters of the features of the multiple key information to obtain the second sentence feature; and calculating the average of the feature parameters of the first sentence feature and the feature parameters of the second sentence feature to obtain the third feature.
[0013] In one possible implementation, the step of fusing the first feature and the second feature according to at least one operator to obtain a third feature includes: calculating the average of the feature parameters of the features of the multiple characters to obtain the first sentence feature; calculating the average of the feature parameters of the features of the multiple key information to obtain the second sentence feature; if the feature parameter of the first sentence feature is greater than the feature parameter of the second sentence feature, then the first sentence feature is used as the third feature; if the feature parameter of the first sentence feature is less than the feature parameter of the second sentence feature, then the second sentence feature is used as the third feature.
[0014] In one possible implementation, the step of fusing the first feature and the second feature according to at least one operator to obtain a third feature includes: selecting a first feature parameter from the feature parameters of the features of the plurality of characters as the first sentence feature, wherein the first feature parameter is greater than or equal to any one of the feature parameters of the features of the plurality of characters; selecting a second feature parameter from the feature parameters of the features of the plurality of key information as the second sentence feature, wherein the second feature parameter is greater than or equal to any one of the feature parameters of the features of the plurality of key information; and calculating the average value of the feature parameters of the first sentence feature and the feature parameters of the second sentence feature to obtain the third feature.
[0015] In one possible implementation, the step of fusing the first feature and the second feature according to at least one operator to obtain the third feature includes: selecting a first feature parameter from the feature parameters of the features of the plurality of characters as the first sentence feature, wherein the first feature parameter is greater than or equal to any one of the feature parameters of the features of the plurality of characters; selecting a second feature parameter from the feature parameters of the features of the plurality of key information as the second sentence feature, wherein the second feature parameter is greater than or equal to any one of the feature parameters of the features of the plurality of key information; if the feature parameter of the first sentence feature is greater than the feature parameter of the second sentence feature, then the first sentence feature is used as the third feature; if the feature parameter of the first sentence feature is less than the feature parameter of the second sentence feature, then the second sentence feature is used as the third feature.
[0016] In the above methods, these four algorithm schemes are obtained by simplifying and eliminating redundant and complex algorithm schemes. They can ensure the effect of intent recognition while greatly reducing the number of schemes, thereby reducing the computational overhead of electronic devices and enabling the algorithm to be applied to devices with low computing power, further expanding the range of available devices.
[0017] In one possible implementation, obtaining the second feature based on the first feature includes: inputting the first feature into a lexical classifier for processing and outputting the second feature, wherein the second feature is the output of the lexical classification; obtaining the intent category based on the third feature includes: inputting the third feature into an intent classifier for processing and outputting the intent category, wherein the third feature is the input of the intent classification, the third feature is obtained based on the second feature, and the output of the lexical classification is the input of the intent category.
[0018] In the above method, intent classification is performed based on the result of word classification (the second feature mentioned above), establishing a connection between word classification and intent classification. This ensures that the results of word classification and intent classification correspond, thereby correctly parsing the user's intent, improving the accuracy of intent recognition, and enabling electronic devices to perform operations that conform to the user's intent.
[0019] In a second aspect, this application provides an electronic device including a transceiver, a processor, and a memory, wherein the memory is used to store a computer program, and the processor invokes the computer program to execute the intent recognition method in any possible implementation of the first aspect.
[0020] Thirdly, this application provides an electronic device including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, including computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the intent recognition method in any possible implementation of the first aspect described above.
[0021] Fourthly, this application provides a computer storage medium storing a computer program that, when executed by a processor, implements the intent recognition method in any of the possible implementations of any of the above aspects.
[0022] Fifthly, this application provides a computer program product that, when run on an electronic device, causes the electronic device to execute the intent recognition method in any possible implementation of the first aspect described above.
[0023] Sixthly, this application provides an electronic device including the method or apparatus described in any implementation of the first aspect of this application. The electronic device is, for example, a chip. Attached Figure Description
[0024] The following describes the accompanying drawings used in this application.
[0025] Figure 1 is a schematic diagram of a user interface provided in this application;
[0026] Figure 2 is a schematic diagram of the network structure of an intent recognition algorithm provided in this application;
[0027] Figure 3 is a schematic diagram of the network structure of another intent recognition algorithm provided in this application;
[0028] Figure 4 is a schematic diagram of the hardware structure of an electronic device 100 provided in this application;
[0029] Figure 5 is a schematic diagram of the software architecture of an electronic device 100 provided in this application;
[0030] Figure 6 is a structural diagram of an intent recognition network provided in this application;
[0031] Figure 7 is a schematic diagram of yet another user interface provided in this application;
[0032] Figure 8 is a flowchart illustrating an intent recognition method provided in this application;
[0033] Figure 9 is a schematic diagram of feature fusion provided in this application;
[0034] Figure 10 is a schematic diagram of a feature fusion algorithm provided in this application;
[0035] Figure 11 is a schematic diagram of another feature fusion algorithm provided in this application;
[0036] Figure 12 is a schematic diagram of another feature fusion algorithm provided in this application;
[0037] Figure 13 is a schematic diagram of another feature fusion algorithm provided in this application. Detailed Implementation
[0038] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0039] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0040] In this embodiment, intent recognition refers to an electronic device determining the user's intent or purpose expressed by the user's input language (e.g., voice, text, etc.). Intent recognition can include intent classification and lexical classification (also known as slot filling). Intent classification can involve obtaining the intent category to which the user's language belongs, such as classifying the input language into a predefined intent category. Intent categories may include, but are not limited to, tasks, queries, requests, etc. Lexical classification can extract key information from the input language. Key information may include slots and slot values. Slots may include, but are not limited to, keywords, time, location, type, etc., and slot values may be the specific information corresponding to the slot. For example, if the user inputs the voice "Book me a flight from Beijing to Shanghai," intent classification identifies the intent category as "book a flight," lexical classification extracts the slot as "location," and the corresponding slot value is "departure point is Beijing, destination is Shanghai." As another example, if the user inputs the voice "I like watching action movies," intent classification identifies the intent category as "watch movies," lexical classification extracts the slot as "movie type," and the corresponding slot value is "action movie."
[0041] As the functions of electronic devices continue to improve, the operation process based on the user interface becomes increasingly cumbersome and complex, leading to a continuous increase in the learning cost for users. With the development of language models, conversational interaction methods relying on natural language understanding technology will be more in line with user habits. Currently, conversational interaction methods work as follows: electronic devices can first process the acquired user language (such as speech, text, etc.) through a language model to obtain the corresponding character features. Then, these character features are processed through intent recognition technology / algorithms to identify the intent category and key information. Finally, based on the intent category and key information, the user intent is determined, and an operation that conforms to the user intent is executed.
[0042] The following describes the application scenarios involved in the embodiments of this application and the user interface diagrams in these scenarios.
[0043] As shown in Figure 1(A), the electronic device can display a user interface 110 (including the title "My Albums"), which can be a user interface for a gallery application. The user interface 110 can include multiple albums, such as album 111 named "All Photos," album 112 named "Camera," and album 113 named "Collections." The user interface 110 can also include a control 114, which can be used to trigger services using a smart assistant. In one embodiment, the electronic device can display the user interface 120 shown in Figure 1(B) in response to a user action on the control 114 (e.g., a touch action).
[0044] As shown in Figure 1(B), the user interface 120 may include text boxes 121 and 122. Text box 121 displays the characters "Hello, how can I help you?", and text box 122 displays the characters "Enter your request (organize photo album, generate time)". These can be used to receive text information entered by the user. When the electronic device displays the user interface 120 of the intelligent assistant, it can receive user speech input. In one embodiment, the electronic device can receive the user's voice input via a microphone; in another embodiment, the electronic device can receive the user's text input in response to user actions.
[0045] Figure 1 illustrates this using the user's input phrase "Let's make a video using the landscape photos on my phone." The electronic device can recognize the user's intent based on the input phrase; the interface during recognition can be seen in the user interface 130 shown in Figure 1(C).
[0046] As shown in Figure 1(C), the user interface 130 is similar to the user interface 120 shown in Figure 1(B). The difference is that the user interface 130 also includes a text box 131 and a text box 132. The text box 131 can represent the text information corresponding to the above voice input, and the text box 132 displays the characters "...", which can represent that the electronic device is recognizing the user's intention based on the user's language.
[0047] Figure 2 exemplifies the network structure of an intent recognition algorithm. This network structure is a two-branch network structure (e.g., the network structure of jointBERT). One branch is used for intent classification, and the other branch is used for word classification. It can be seen that intent classification and word classification in Figure 2 are two independent branches. That is, intent classification and word classification in this network structure are executed independently, without considering the relationship between the results of word classification and intent classification. For example, the influence of word classification results on intent classification results may lead to a mismatch between the results of intent classification and word classification. This can be understood as the intent category identified by intent classification and the key information extracted by word classification not matching. For example, the intent category is "book a flight," and the key information is "action movie," thus failing to correctly parse the user intent, resulting in low intent recognition accuracy and a poor user experience. Optionally, if the electronic device cannot perform the corresponding operation, it can display the characters "This function is not supported" in the text box 132 of the user interface 130 shown in Figure 1 (C) to prompt the user that the operation matching the user's intent cannot be performed. Optionally, the electronic device may also perform an incorrect operation that does not match the user's intent.
[0048] To address the issue of low accuracy in intent recognition as shown in Figure 2, Figure 3 illustrates the network structure of another intent recognition algorithm.
[0049] As shown in Figure 3, the electronic device can input acquired user input information (e.g., including cherries) into a pre-trained language model, outputting multiple features 1 (e.g., character features or word features, corresponding to the white dashed circles in Figure 3) and features 2 (e.g., reference features, corresponding to the gray dashed circles in Figure 3) corresponding to the user input information. Features 2 are then input into a second intent recognition feedforward network, outputting an intent reference vector. This intent reference vector, along with multiple features 1, is then input into an intent-slot attention network, outputting feature 3 (e.g., the combination of the black solid circles and white dashed circles in Figure 3). Next, feature 3 is input into a slot-filling feedforward network (used for word classification), extracting key information (e.g., represented by feature 4). Then, the electronic device can input the key information output by the word classification and the feature 2 output by the pre-trained language model into the slot-intent attention network to perform feature fusion on feature 4 and feature 2, and input the fused feature (e.g., the combination of gray dashed circle and black solid circle in Figure 3) into the first intent recognition feedforward network (for intent classification), and output the intent category output vector. Finally, the user intent can be determined based on the intent category output vector.
[0050] As can be seen in Figure 3, the result of word classification (feature 4) is processed by the slot-intent attention network, and then the processed feature is used to achieve intent classification. This method uses the result of word classification as the input of intent classification, establishing a connection between word classification and intent classification, so that the results of word classification and intent classification can correspond, thus improving the accuracy of intent recognition. However, this network structure needs to learn additional parameters. For example, when processing feature 4 through the slot-intent attention network, the slot-intent attention network needs to learn additional parameters (such as feature 2). Similarly, when processing multiple features 1 through the intent-slot attention network, the intent-slot attention network also needs to learn additional parameters (such as intent reference vector). It can be understood that it is precisely because this network structure learns more parameters (the network structure is more complex) that it can obtain more accurate features, thereby solving the problem of low accuracy of intent recognition in Figure 2. However, when this network structure is deployed on electronic devices, it increases memory and computing overhead. Furthermore, the longer the character features corresponding to the user input information, the greater the overhead will be (e.g., it grows exponentially). Therefore, this network structure cannot be deployed and run on devices with low / limited computing power (such as mobile terminals such as mobile phones and watches).
[0051] This application proposes an intent recognition method applied to an electronic device. The electronic device can acquire user language and input it into a language model for processing to obtain a first feature. The first feature may include multiple character features corresponding to the user language. Next, the electronic device can input the first feature into a word classifier for processing to obtain a second feature. The second feature may include features of multiple key information corresponding to the user language (referred to as key features). This second feature can be a feature with weights added to the aforementioned character features, which can be understood as a feature incorporating word classification information. The multiple key features correspond one-to-one with the multiple character features. Then, the electronic device can perform feature fusion on the first and second features. For example, a first operator is used to fuse multiple character features in the first feature to obtain a first sentence feature; a second operator is used to fuse multiple key features in the second feature to obtain a second sentence feature; and the first and second sentence features are then fused using a third operator to output a third feature. The electronic device can input the third feature into an intent classifier for processing to obtain an intent category, and combine the aforementioned multiple key features and intent category to identify the user intent, executing an operation consistent with the user intent. This approach classifies intent based on the results of word segment classification (the second feature mentioned above), establishing a connection between word segment classification and intent classification. This ensures that the results of word segment classification and intent classification correspond, thereby correctly parsing the user's intent and improving the accuracy of intent recognition. This allows electronic devices to perform operations that match the user's intent. Furthermore, when fusing the first and second features, the first, second, and third operators are used without learning additional parameters. This can be understood as fusing features using a simpler algorithm without introducing other parameters (which can be called parameterless feature fusion). This not only effectively solves the technical problem shown in Figure 2, but also, due to the simplicity of the algorithm, the overhead of supporting its operation is relatively small. Therefore, the network structure of this algorithm can be deployed and run on devices with low / limited computing power, expanding the range of available devices.
[0052] In this application embodiment, the electronic device may be a device with low computing power, or a mobile terminal, such as, but not limited to, a mobile phone, tablet computer, ultra-mobile personal computer (UMPC), netbook, cellular phone, personal digital assistant (PDA), smart bracelet, smartwatch, smart glasses and other wearable devices.
[0053] The structure of the exemplary electronic device provided in the embodiments of this application will be described below.
[0054] Figure 4 illustrates a schematic diagram of the hardware structure of an electronic device 100.
[0055] As shown in Figure 4, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0056] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0057] Processor 110 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0058] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0059] The processor 110 may also include a memory for storing instructions and data. In one embodiment, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0060] The charging management module 140 receives charging input from the charger. The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In another embodiment, the power management module 141 can also be located in the processor 110. In another embodiment, the power management module 141 and the charging management module 140 can also be located in the same device.
[0061] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0062] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In another embodiment, the antenna can be used in conjunction with a tuning switch.
[0063] The mobile communication module 150 can provide wireless communication solutions for applications on the electronic device 100, including second-generation (2G), third-generation (3G), fourth-generation (4G), fifth-generation (5G), and sixth-generation (6G) mobile communication technologies. The mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In one embodiment, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In another embodiment, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0064] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In one embodiment, the modem processor may be a separate device. In another embodiment, the modem processor may be independent of the processor 110 and housed within the same device as the mobile communication module 150 or other functional modules.
[0065] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0066] In one embodiment, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0067] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0068] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In one embodiment, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.
[0069] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0070] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise, brightness, and color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In one implementation, the ISP can be integrated into the camera 193.
[0071] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In one embodiment, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0072] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0073] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.
[0074] Electronic device 100 can implement audio functions through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0075] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals.
[0076] The loudspeaker 170A, also known as a "loudspeaker", is used to convert audio electrical signals into sound signals.
[0077] The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals.
[0078] The microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals.
[0079] The 170D headphone jack is used to connect wired headphones.
[0080] Pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In one embodiment, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In one embodiment, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands.
[0081] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In one embodiment, the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B.
[0082] The 180C barometric pressure sensor is used to measure barometric pressure.
[0083] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover.
[0084] The accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes).
[0085] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In one embodiment, when shooting a scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0086] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 100 emits infrared light outward through the LED. The electronic device 100 uses the photodiode to detect infrared reflected light from a nearby object. When sufficient reflected light is detected, it can be determined that an object is near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that no object is near the electronic device 100.
[0087] The 180L ambient light sensor is used to detect ambient light intensity.
[0088] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0089] The 180J temperature sensor is used to detect temperature.
[0090] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0091] The bone conduction sensor 180M can acquire vibration signals.
[0092] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0093] Motor 191 can generate vibration alerts. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card.
[0094] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. For example, a layered architecture software system can be the Android system, the Harmony operating system (OS), or other software systems. This application embodiment uses the layered architecture Android system as an example to illustrate the software structure of electronic device 100.
[0095] Figure 5 illustrates a schematic diagram of the software architecture of an electronic device 100.
[0096] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In one implementation, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0097] The application layer can include a series of application packages.
[0098] As shown in Figure 5, the application package may include applications such as camera, gallery, music, calendar, SMS, call, navigation, Bluetooth, browser, and screen mirroring.
[0099] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0100] As shown in Figure 5, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0101] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0102] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0103] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0104] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).
[0105] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0106] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0107] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0108] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0109] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0110] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0111] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0112] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0113] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0114] A 2D graphics engine is a graphics engine for 2D drawing.
[0115] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0116] Figure 6 illustrates an example of the structure of an intent recognition network.
[0117] As shown in Figure 6, the intent recognition network of the electronic device 100 may include a pre-trained language model, a word classifier, a conditional random field, a parameterless feature fusion module, and an intent classifier. The word classifier may also be a module integrating a bidirectional long short-term memory network and a word classifier. The following example, using a picture library scenario, illustrates the working process of each module in the intent recognition network.
[0118] The electronic device can acquire user language (e.g., "search for scenery," corresponding to the three white circles in Figure 6), input this user language into a pre-trained language model for processing, and output a first feature, which includes multiple character features corresponding to the user language (e.g., corresponding to the two white circles in Figure 6). Next, the electronic device inputs the first feature into a word classifier for processing, and outputs a second feature, which includes multiple key features corresponding to the user language (e.g., corresponding to the two black circles in Figure 6), with each key feature corresponding to a character feature. Then, the electronic device inputs the first and second features into a parameterless feature fusion module for feature fusion, outputting a fused feature (e.g., a third feature, not shown in Figure 6), and inputs the third feature into an intent classifier for processing, outputting an intent category (e.g., "search"). The electronic device can also input the second feature into a conditional random field for processing, outputting key information (e.g., slot "keyword," slot value "scenery"), which is the same as the information indicated by the multiple key features. Then, the electronic device can determine the user's intent based on the aforementioned intent categories and multiple key pieces of information, and perform corresponding operations based on the user's intent, such as searching for landscape photos in multiple albums of a gallery application and displaying those landscape photos.
[0119] The difference between the network structure shown in Figure 6 and the network structure shown in Figure 2 is that Figure 6 does not include the slot-intent attention network and the intent-slot attention network, but includes a parameterless feature fusion module. Therefore, when fusing the first feature and the second feature, there is no need to learn additional parameters, that is, no other parameters are introduced. This not only accurately identifies the user's intent, but also makes the feature fusion algorithm simple and computationally inexpensive, thus suitable for mobile terminals with low / limited computing power.
[0120] Understandably, the intent recognition network shown in Figure 6 may include more or fewer modules. Any module in the intent recognition network may be a hardware module or a software module. Any of the above modules may be a separate module, or at least one of the above modules may be integrated together. For example, a bidirectional long short-term memory network and a word classifier may be integrated together. This application does not limit this.
[0121] The following section will illustrate the user interface diagram of this application in the scenario shown in Figure 1.
[0122] The scenario shown in Figure 1 includes: when electronic device 100 displays the user interface 110 of the gallery shown in Figure 1(A), electronic device 100 can respond to user operation to trigger the launch of the intelligent assistant service. When electronic device 100 obtains the user's input language as "Make a video with the landscape photos in my phone", electronic device 100 can display the user interface 130 that recognizes the user's language on the display screen. For specific examples, please refer to Figure 1(A)-Figure 1(C).
[0123] In one implementation, after (C) in Figure 1, the electronic device 100 can identify that the user's intent category is "make video", the key information includes the slot "keyword" and the slot value "scenery", and determine the user intent based on the intent category and key information. The electronic device 100 can then perform corresponding operations based on the identified user intent.
[0124] In some examples, the electronic device 100 can output corresponding prompts based on the recognized user intent. For example, the electronic device 100 can display the user interface 710 shown in Figure 7(A). As shown in Figure 7(A), the user interface 710 is similar to the user interface 130 shown in Figure 1(C), except that the user interface 710 may include a text box 711. The characters displayed in the text box 711 are used to indicate the recognized user intent. For example, the text box 711 may display the characters "I have selected a variety of landscape photos for you and paired them with soothing music to showcase tranquility and beauty".
[0125] In some examples, the electronic device 100 performs the following operation based on the identified user intent: generating a video based on a landscape photo in the electronic device 100. At this time, the electronic device 100 can display the user interface 720 shown in Figure 7(B). The user interface 720 is similar to the user interface 110 shown in Figure 1(A), except that the user interface 720 also includes a video 721, which can instruct the electronic device 100 to generate the video according to the user intent.
[0126] The intent recognition method provided in the embodiments of this application will be introduced next.
[0127] Please refer to Figure 8, which is a flowchart illustrating an intent recognition method provided in an embodiment of this application. This method can be applied to the electronic device 100 shown in Figures 4 and 5. This method can also be applied to the intent recognition network shown in Figure 6. The method may include, but is not limited to, the following steps:
[0128] S101: Electronic device 100 acquires user language.
[0129] In one implementation, the user's language may include, but is not limited to, voice and text. The electronic device 100 may display a first interface that indicates that the electronic device 100 has enabled the function of recognizing the user's language. The first interface may be, for example, the interface of a voice assistant, such as the user interface 120 shown in Figure 1(B).
[0130] In one implementation, the electronic device 100 can acquire user language when on a first interface, for example, by receiving voice input from the user via a microphone, or by receiving text input from the user in response to a user operation (e.g., a touch operation). For a specific example, see Figure 1 for acquiring user language input.
[0131] S102: Electronic device 100 processes the user's language to obtain the first feature.
[0132] In one implementation, the electronic device 100 can input the user's language into a pre-trained language model for processing, such as parsing and encoding the user's language, and outputting a first feature, which may include multiple character features corresponding to the user's language.
[0133] In one implementation, a word feature may correspond to one or more characters in the user's language; that is, a word feature can be a feature of one or more corresponding characters in the user's language. Multiple word features can be features of multiple characters (e.g., all characters) in the user's language.
[0134] S103: Electronic device 100 processes the first feature to obtain the second feature.
[0135] In one implementation, the electronic device 100 can input the first feature into a word classifier for processing and output a second feature. The second feature can be the result of word classification and can include features of multiple key information corresponding to the user's language (i.e., key features). The second feature can be a feature calculated by setting weights on multiple character features in the first feature, which can be understood as a feature that incorporates word classification information. In one implementation, any key feature is a feature calculated by setting weights on the corresponding character features in the first feature. One key feature in the second feature corresponds to one or more character features in the first feature. For example, multiple key features in the second feature correspond one-to-one with multiple character features in the first feature.
[0136] S104: Electronic device 100 processes the second feature to obtain key information.
[0137] In one implementation, the electronic device 100 can input the second feature into a conditional random field for processing and output key information. In another implementation, the key information can be the result of word classification, or it can be information indicated by multiple key features. The key information can include slots and slot values in the user's language, where slots can include, but are not limited to, keywords, time, location, type, etc., and slot values can be the specific information corresponding to the slot. In some examples, the user's language might be, for instance, "Let's make a video using the scenery photos on my phone," and the extracted key information would have a slot for "keyword" and a corresponding slot value for "scenery."
[0138] S105: Electronic device 100 performs feature fusion on the first feature and the second feature to obtain the third feature.
[0139] In one embodiment, the electronic device 100 can input the first feature and the second feature into a parameterless feature fusion module for feature fusion and output a third feature.
[0140] In one embodiment, the electronic device 100 can perform feature fusion on multiple word features in the first feature using a first operator to obtain a first sentence feature, perform feature fusion on multiple key features in the second feature using a second operator to obtain a second sentence feature, and then perform feature fusion on the first sentence feature and the second sentence feature using a third operator to obtain a third feature. The first, second, and third operators can include, but are not limited to, summation, averaging, taking the maximum value, and concatenation. For details, please refer to Figure 9, which will not be elaborated here.
[0141] S106: Electronic device 100 obtains the intent category based on the third feature.
[0142] In one implementation, the electronic device 100 can input a third feature into an intent classifier for processing, for example, classifying the input third feature into a predefined intent category and outputting the intent category. In some examples, the user's language is, for example, "Let's make a video using the landscape photos on my phone," and the intent category is identified as "make a video."
[0143] S107: Electronic device 100 performs a first operation based on key information and intent category.
[0144] In one implementation, the electronic device 100 can determine the user's intent based on key information and intent category, and execute a first operation that conforms to the user's intent. In some examples, the electronic device 100 can parse the user's intent into a standard API call instruction. For example, based on key information (slot is "keyword" and slot value is "scenery") and intent category ("make video"), it can parse the corresponding API call instruction as makeVideo(keyword = scenery) and execute the operation corresponding to the instruction (i.e., the first operation, such as generating a scenery-related video).
[0145] In one embodiment, the electronic device 100 may display a second interface according to a first operation, the second interface being, for example, the user interface 720 shown in Figure 7(B).
[0146] In the method shown in Figure 8, intent classification is performed based on the result of word segment classification (the second feature mentioned above), establishing a connection between word segment classification and intent classification. This ensures that the results of word segment classification and intent classification correspond, improving the accuracy of intent recognition. Specific data examples can be found in Table 1 below. Furthermore, when fusing the first and second features, the first, second, and third operators do not require learning additional parameters. This can be understood as fusing features using a simpler algorithm without introducing other parameters (which can be called parameterless feature fusion), yet still accurately identifying user intent. Because the algorithm is simple, the overhead of running it is also relatively small. Therefore, the network structure of this algorithm can be deployed and run on devices with low / limited computing power, expanding the range of available devices.
[0147] Table 1 provides an example of intent recognition accuracy results on a self-constructed dataset.
[0148] Table 1
[0149] In Table 1, the baseline data can be data obtained without using the method shown in Figure 8, such as data obtained using the network structure shown in Figure 2. The baseline + parameterless feature fusion data in Table 1 can be data obtained using the method shown in Figure 8. The numerical examples in Table 1 show that, on baseline data with high accuracy, the parameterless feature fusion module can further improve the accuracy of intent classification (e.g., a 1.6% improvement compared to baseline data without parameterless feature fusion), thereby improving the accuracy of intent recognition (e.g., a 2.3% improvement compared to baseline data without parameterless feature fusion).
[0150] Figure 9 is a schematic diagram of feature fusion provided in an embodiment of this application.
[0151] As shown in Figure 9, the electronic device 100 can perform feature fusion on multiple word features in the first feature through the first operator to obtain the first sentence feature, and perform feature fusion on multiple key features in the second feature through the second operator to obtain the second sentence feature. Then, it can perform feature fusion on the first sentence feature and the second sentence feature through the third operator to obtain the third feature.
[0152] In one implementation, the first, second, and third operators may include, but are not limited to, a summation operator, an average operator, a maximum value operator, and a concatenation operator. The summation operator can add the feature parameters of multiple character features. The average operator can calculate the average of the feature parameters of multiple character features. The maximum value operator can select the largest feature parameter from the feature parameters of multiple character features. The concatenation operator can concatenate the feature parameters of multiple character features. Concatenation may include, but is not limited to, column concatenation and row concatenation. For example, if the feature parameter of each character feature is a 1×256-dimensional vector, column concatenation of the feature parameters of multiple (e.g., N) character features yields a 1×256N-dimensional vector, and row concatenation of the feature parameters of multiple character features yields an N×256-dimensional vector.
[0153] In one implementation, by arranging and combining the above three operators, 4 can be obtained. 3 = 48 algorithm schemes. In some examples, the summation operator and the average operator can be treated equally, simplifying to 3. 3 =27 algorithm schemes. In some examples, keeping the first and second operators the same simplifies to 3. 2 =9 algorithm schemes, significantly reducing the number of schemes while maintaining the intent recognition effect. In some examples, considering that concatenation would increase the dimensionality of feature parameters, thus increasing the number of parameters processed by the intent classifier, concatenation operators were excluded, ultimately resulting in 2 2 = Four algorithm schemes are built into mobile terminals and other electronic devices to realize intent recognition, reducing storage and computing pressure.
[0154] In one implementation, the four algorithm schemes obtained above can include: Scheme 1: The first, second, and third operators are all average value operators, as shown in Figure 10. Scheme 2: The first and second operators are both average value operators, and the third operator is a maximum value operator, as shown in Figure 11. Scheme 3: The first and second operators are both maximum value operators, and the third operator is an average value operator, as shown in Figure 12. Scheme 4: The first, second, and third operators are all maximum value operators, as shown in Figure 13.
[0155] In one implementation, the first feature is assumed to be represented as Both T and i are positive integers, and i is less than or equal to T. T represents the number of multiple word features in the first feature, and the second feature is represented as... The third feature is represented as f∈R c Then the algorithm formula corresponding to Scheme 1 is as follows (1), the algorithm formula corresponding to Scheme 2 is as follows (2), the algorithm formula corresponding to Scheme 3 is as follows (3), and the algorithm formula corresponding to Scheme 4 is as follows (4):
[0156] Where, x i,j s i,j In this context, j represents the dimension of the feature parameters of the character feature / key feature.
[0157] In the method shown in Figure 9, by simplifying the number of algorithm schemes and eliminating redundant and complex schemes, four feasible schemes are finally obtained, thereby reducing the computational overhead of electronic device 100 and enabling the algorithm to be applied to devices with low computing power, further expanding the range of available devices.
[0158] The methods provided in the embodiments of this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, they 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, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. 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 integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DWD), or a semiconductor medium (e.g., solid-state drive). (disk, SSD, etc.). The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. An intent recognition method, characterized in that, The method includes: A first feature is obtained based on the acquired user language, wherein the user language includes speech or text, and the first feature is the feature of multiple characters in the user language. A second feature is obtained based on the first feature, and the second feature is a feature of multiple key information in the user's language; The first feature and the second feature are fused according to at least one operator to obtain a third feature, wherein the at least one operator includes at least one of a summation operator, an average value operator, a maximum value operator, and a concatenation operator; User intent is identified based on the second feature and the third feature.
2. The method as described in claim 1, characterized in that, The step of identifying user intent based on the second feature and the third feature includes: Based on the second feature, the key information corresponding to the user's language is obtained. The key information includes slots and slot values. The slots include at least one of keywords, time, location, and type. The slot values are the information corresponding to the slots. The intent category is obtained based on the third feature; The user intent is determined based on the key information and the intent category.
3. The method as described in claim 1 or 2, characterized in that, The method is applied to mobile terminals.
4. The method according to any one of claims 1-3, characterized in that, The step of fusing the first feature and the second feature according to at least one operator to obtain the third feature includes: The first sentence features are obtained by fusing the features of the multiple characters using a first operator, wherein the first operator is any one of the summation operator, the average value operator, the maximum value operator, and the concatenation operator. The second sentence features are obtained by fusing the features of the multiple key information by a second operator, wherein the second operator is any one of the summation operator, the average value operator, the maximum value operator, and the concatenation operator; The first sentence feature and the second sentence feature are fused by a third operator to obtain the third feature. The third operator is any one of the summation operator, the average value operator, the maximum value operator, and the concatenation operator.
5. The method according to any one of claims 1-4, characterized in that, The step of fusing the first feature and the second feature according to at least one operator to obtain the third feature includes: The average value of the feature parameters of the multiple characters is calculated to obtain the features of the first sentence; The average value of the feature parameters of the multiple key information features is calculated to obtain the second sentence feature; The third feature is obtained by calculating the average of the feature parameters of the first sentence feature and the feature parameters of the second sentence feature.
6. The method according to any one of claims 1-4, characterized in that, The step of fusing the first feature and the second feature according to at least one operator to obtain the third feature includes: The average value of the feature parameters of the multiple characters is calculated to obtain the features of the first sentence; The average value of the feature parameters of the multiple key information features is calculated to obtain the second sentence feature; If the feature parameter of the first sentence feature is greater than the feature parameter of the second sentence feature, then the first sentence feature is used as the third feature; If the feature parameter of the first sentence feature is less than the feature parameter of the second sentence feature, then the second sentence feature is used as the third feature.
7. The method according to any one of claims 1-4, characterized in that, The step of fusing the first feature and the second feature according to at least one operator to obtain the third feature includes: The first feature parameter among the feature parameters of the multiple characters is selected as the first sentence feature, and the first feature parameter is greater than or equal to any one of the feature parameters of the multiple characters. The second feature parameter among the feature parameters of the multiple key information features is selected as the second sentence feature, and the second feature parameter is greater than or equal to any one of the feature parameters of the multiple key information features. The third feature is obtained by calculating the average of the feature parameters of the first sentence feature and the feature parameters of the second sentence feature.
8. The method according to any one of claims 1-4, characterized in that, The step of fusing the first feature and the second feature according to at least one operator to obtain the third feature includes: The first feature parameter among the feature parameters of the multiple characters is selected as the first sentence feature, and the first feature parameter is greater than or equal to any one of the feature parameters of the multiple characters. The second feature parameter among the feature parameters of the multiple key information features is selected as the second sentence feature, and the second feature parameter is greater than or equal to any one of the feature parameters of the multiple key information features. If the feature parameter of the first sentence feature is greater than the feature parameter of the second sentence feature, then the first sentence feature is used as the third feature; If the feature parameter of the first sentence feature is less than the feature parameter of the second sentence feature, then the second sentence feature is used as the third feature.
9. The method as described in claim 2 or 3, characterized in that, The step of obtaining the second feature based on the first feature includes: The first feature is input into a word classifier for processing, and the second feature is output as the output of word classification. The process of obtaining the intent category based on the third feature includes: The third feature is input into the intent classifier for processing, and the intent category is output. The third feature is the input for intent classification and is obtained based on the second feature. The output of the word classification is the input for the intent category.
10. An electronic device, characterized in that, It includes a transceiver, a processor, and a memory, the memory being used to store a computer program, and the processor calling the computer program to perform the method as described in any one of claims 1-9.
11. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed by a processor, implements the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Semantic parsing method and server
CN110111787A
Intention recognition method and electronic equipment
CN113806473A
Interaction method and device, terminal, electronic equipment and storage medium
CN115578679A
Statement processing and category model training method and device, equipment and medium
CN118132687A
Semantic Parsing Method and Server
US20220208182A1