Interaction intention information determination method based on generative pre-trained (GPT) model

Through the multi-encoder structure based on generative pre-trained GPT model, the accuracy of the existing intention recognition model in multiple situations is solved, the accuracy of interactive intent recognition is improved and the flexibility of cross-platform model deployment is realized.

WO2024230736A1PCT designated stage expired Publication Date: 2024-11-14HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD +2

Patent Information

Application Number
PCT/CN2024/091727
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-09
Filing Date
2024-05-08
Publication Date
2024-11-14

AI Technical Summary

Technical Problem

The existing intention recognition model has a single structure and cannot be flexibly adjusted during training, resulting in the inability to accurately identify the user's interaction intentions in multiple situations.

Method used

Adopt the generative pre-trained GPT model, encode and merge the original interaction information through multiple encoders, and generate interactive intention information using the decoder to realize the decoupling structure of local encoder and cloud encoder, supporting cross-platform and cross-architecture model deployment.

Benefits of technology

It improves the accuracy of user interaction intention recognition, enhances the flexibility and ease of use of model deployment, and realizes cross-platform applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024091727_14112024_PF_FP_ABST
    Figure CN2024091727_14112024_PF_FP_ABST
Patent Text Reader

Abstract

An interaction intention information determination method based on a generative pre-trained (GPT) model, relating to the technical field of smart homes. The interaction intention information determination method based on a generative pre-trained (GPT) model comprises: acquiring raw interaction information from when a target object interacts with a smart voice device (S202); inputting the raw interaction information into a target generative pre-trained (GPT) model, and encoding the raw interaction information using each of N encoders in the target generative pre-trained (GPT) model, to obtain N encoded feature vectors (S204); merging the N encoded feature vectors to obtain a merged feature vector (S206); decoding the merged feature vector by means of a decoder in the target generative pre-trained (GPT) model, to obtain a target decoding result (S208); and according to the target decoding result, determining interaction intention information of the target object (S210).
Need to check novelty before this filing date? Find Prior Art

Description

Interaction intention information determination method based on generative pre-training GPT model

[0001] This disclosure claims priority to the Chinese patent application filed with the China Patent Office on May 9, 2023, with application number 202310515860.8 and invention name “Method for determining interactive intention information based on generative pre-trained GPT model”, the entire contents of which are incorporated by reference into this disclosure. Technical Field

[0002] The present disclosure relates to the field of smart home technology, and in particular to a method for determining interaction intention information based on a generative pre-trained GPT model. Background Art

[0003] Currently, with the continuous updating and iteration of IoT technology, more and more connected devices have basically realized the function of interacting with users. With the surge in the types and number of devices, users are facing a wide range of interactive devices and have also put forward higher requirements for the device interaction experience. For example, users hope that the device can more accurately identify the user's intention, which means that the recognition ability of the intent recognition model needs to be improved. However, the current model structure is relatively simple. Generally, the intent recognition model is trained by consuming the computing power of large servers. This single model structure cannot flexibly adjust the training strategy during the training process, resulting in a small recognition range of the model. When interacting with users in multiple scenarios, it cannot accurately identify the user's interaction intention.

[0004] In related technologies, there is a technical problem of how to accurately identify user interaction intentions.

[0005] Regarding the technical problem of how to accurately identify user interaction intentions in related technologies, no effective solution has been proposed yet.

[0006] Summary of the Invention

[0007] The embodiments of the present disclosure provide a method for determining interaction intention information based on a generative pre-trained GPT model, so as to at least solve the technical problem in related technologies of how to accurately identify user interaction intentions.

[0008] According to one embodiment of the present disclosure, a method for determining interaction intention information based on a generative pre-trained GPT model is provided, including: obtaining original interaction information when a target object interacts with an intelligent voice device; inputting the original interaction information into a target generative pre-trained GPT model, and encoding the original interaction information through each of the N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, where N is a positive integer greater than or equal to 2; merging the N encoded feature vectors to obtain a merged feature vector; decoding the merged feature vector through a decoder in the target generative pre-trained GPT model to obtain a target decoding result; and determining the interaction intention information of the target object based on the target decoding result.

[0009] According to another embodiment of the present disclosure, a device for determining interaction intention information based on a generative pre-trained GPT model is also provided, including: an acquisition module, configured to acquire original interaction information when a target object interacts with an intelligent voice device; an encoding module, configured to input the original interaction information into a target generative pre-trained GPT model, and encode the original interaction information through each of the N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, where N is a positive integer greater than or equal to 2; a merging module, configured to merge the N encoded feature vectors to obtain a merged feature vector; an obtaining module, configured to decode the merged feature vector through a decoder in the target generative pre-trained GPT model to obtain a target decoding result; a determination module, configured to determine the interaction intention information of the target object based on the target decoding result.

[0010] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for determining interaction intention information based on the generative pre-trained GPT model during runtime.

[0011] According to another aspect of an embodiment of the present disclosure, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein the processor executes the above-mentioned method for determining interaction intention information based on the generative pre-trained GPT model through the computer program.

[0012] In an embodiment of the present disclosure, the original interaction information when the target object interacts with the intelligent voice device is obtained; the original interaction information is input into a target generative pre-trained GPT model, and the original interaction information is encoded by each of the N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, where N is a positive integer greater than or equal to 2; the N encoded feature vectors are merged to obtain a merged feature vector; the merged feature vector is decoded by a decoder in the target generative pre-trained GPT model to obtain a target decoding result; and the interaction intention information of the target object is determined based on the target decoding result. The above technical solution solves the technical problem of how to accurately identify the user's interaction intention, thereby improving the recognition accuracy of the user's interaction intention; and this composite encoding layer containing N encoders can further realize the decoupling structure of the local encoder and the cloud encoder, that is, the N encoders are deployed on the commercial server and the terminal device respectively, or on the commercial cloud server and the self-used cloud server respectively, to achieve cross-platform and cross-architecture model deployment, greatly improving the flexibility and ease of use of the model deployment. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0014] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0015] FIG1 is a schematic diagram of the hardware environment of a method for determining interaction intent information based on a generative pre-trained GPT model according to an embodiment of the present disclosure;

[0016] FIG2 is a flowchart of a method for determining interaction intent information based on a generative pre-trained GPT model according to an embodiment of the present disclosure;

[0017] FIG3 is a schematic diagram of a scenario for executing a method for determining interaction intention information based on a generative pre-trained GPT model according to an embodiment of the present disclosure;

[0018] FIG4( a ) is a schematic diagram of an encoding process according to an embodiment of the present disclosure;

[0019] FIG4( b ) is a schematic diagram of a decoding process according to an embodiment of the present disclosure;

[0020] FIG5 is a schematic diagram of a process for obtaining a merged feature vector according to an embodiment of the present disclosure;

[0021] FIG6 is a schematic diagram of a coding and decoding process according to an embodiment of the present disclosure;

[0022] Figure 7 is a structural block diagram of a device for determining interaction intention information based on a generative pre-trained GPT model according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] According to one aspect of an embodiment of the present disclosure, a method for determining interaction intention information based on a generative pre-trained GPT model is provided. The method for determining interaction intention information based on a generative pre-trained GPT model is widely used in whole-house intelligent digital control application scenarios such as smart home, smart home, smart home device ecology, and smart residential (Intelligence House) ecology. Optionally, in this embodiment, the above-mentioned method for determining interaction intention information based on a generative pre-trained GPT model can be applied to a hardware environment consisting of a terminal device 102 and a server 104 as shown in Figure 1. As shown in Figure 1, the server 104 is connected to the terminal device 102 via a network, and can be configured to provide services (such as application services, etc.) for the terminal or a client installed on the terminal, a database can be set on the server or independently of the server, and is configured to provide data storage services for the server 104, and cloud computing and / or edge computing services can be configured on the server or independently of the server, and is configured to provide data computing services for the server 104.

[0026] The aforementioned network may include, but is not limited to, at least one of the following: a wired network and a wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, and a local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity) and Bluetooth. The terminal device 102 may be, but is not limited to, a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing machine, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, smart curtains, smart audio and video, a smart socket, a smart speaker, a smart fresh air device, smart kitchen and bathroom equipment, smart bathroom equipment, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purifier, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0027] In this embodiment, a method for determining interaction intent information based on a generative pre-trained GPT model is provided, which is applied to the above-mentioned terminal device. FIG2 is a flowchart of the method for determining interaction intent information based on a generative pre-trained GPT model according to an embodiment of the present disclosure. The process includes the following steps:

[0028] Step S202: obtaining original interaction information when the target object interacts with the intelligent voice device;

[0029] The above-mentioned intelligent voice devices can be understood as terminal devices with voice interaction functions, such as smart refrigerators and smart ovens with voice interaction functions.

[0030] It should be noted that the above-mentioned original interaction information can correspond to a variety of interaction scenarios, such as the homecoming scenario, cooking scenario, entertainment scenario, etc. in a smart home, or the voice interaction scenario in an intelligent car system. The embodiments of this disclosure do not limit this.

[0031] Step S204: inputting the original interaction information into a target generative pre-trained GPT model, and encoding the original interaction information by each of N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, where N is a positive integer greater than or equal to 2;

[0032] It can be understood that each of the N encoders independently encodes the original interactive information to obtain an encoded feature vector encoded by each encoder.

[0033] Among them, the above-mentioned target generative pre-training (GPT) GPT model can be obtained by fine-tuning existing large-scale text pre-training models of language generation, such as GPT-4 (Generative Pre-trained Transformer 4, the 4th generation generative pre-training transformation model), T5 (Transfer Text-to-Text Transformer) model and other large-scale text pre-training models, or it can be a self-developed multi-modal large language model (MLLM). The present disclosure does not limit the method of obtaining the target generative pre-training GPT model.

[0034] The target generative pre-trained GPT model includes a composite coding layer and a decoder, wherein the composite coding layer includes multiple encoders and has multiple encoder deployment schemes, such as being deployed in different locations. In some embodiments, the multiple encoders in the composite coding layer can be deployed on commercial cloud servers and self-used cloud servers respectively to achieve cross-platform and cross-architecture model deployment; or all can be deployed on commercial cloud servers or self-used cloud servers; or, if the terminal device has sufficient local computing power resources, all encoders can be deployed in the terminal device; or they can be distributed and deployed in commercial cloud servers and terminal devices, which is not limited in the embodiments of the present disclosure.

[0035] Step S206, merging the N encoded feature vectors to obtain a merged feature vector;

[0036] In some embodiments, the merging method may include, for example, vector fusion and vector addition, but is not limited thereto.

[0037] Step S208, decoding the merged feature vector by a decoder in the target generative pre-trained GPT model to obtain a target decoding result;

[0038] In some embodiments, the target generative pre-trained GPT model may include multiple layers of decoders, each layer of which can be understood as a Transformer decoder, and may utilize multiple layers of self-attention mechanisms and the feedforward layer corresponding to the forward propagation network to predict the probability distribution of the target word.

[0039] In step S208, the decoder of the target generative pre-trained GPT model can be used to perform layer normalization, MHA (multi-head attention) operation, feedforward processing and other specific operations on the merged feature vector in sequence to obtain the target decoding result.

[0040] Step S210: Determine the interaction intention information of the target object according to the target decoding result.

[0041] In step S210, multiple intention instructions corresponding to the intention entity words contained in the target decoding result can be determined first. For multiple intention instructions that all contain execution locations, the target intention instruction whose execution location is consistent with the interaction location can be determined from the multiple intention instructions, where the execution location represents the location where the user interacts with the intelligent voice device.

[0042] Through the above steps, the original interaction information when the target object interacts with the intelligent voice device is obtained; the original interaction information is input into the target generative pre-trained GPT model, and the original interaction information is encoded by each encoder of the N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, where N is a positive integer greater than or equal to 2; the N encoded feature vectors are merged to obtain a merged feature vector; the merged feature vector is decoded by the decoder in the target generative pre-trained GPT model to obtain a target decoding result; based on the target decoding result, the interaction intention information of the target object is determined, which solves the technical problem of how to accurately identify user interaction intentions in related technologies, thereby improving the recognition accuracy of user interaction intentions; and this composite coding layer containing N encoders can further realize the decoupling structure of local encoders and cloud encoders, that is, the N encoders are deployed locally on commercial servers and terminal devices, or on commercial cloud servers and self-used cloud servers, respectively, to achieve cross-platform and cross-architecture model deployment, greatly improving the flexibility and ease of use of model deployment.

[0043] In an exemplary embodiment, before executing the above-mentioned step S204 to input the original interaction information into the target generative pre-trained GPT model, a scheme for determining the target generative pre-trained GPT model is further proposed, including: Scheme 1, when the original interaction information belongs to a preset interaction information database, obtaining the interaction type of the original interaction information from the preset interaction information database, wherein the preset interaction information database is used to store interaction information of multiple interaction types; determining the GPT model corresponding to the interaction type of the original interaction information as the target generative pre-trained GPT model, wherein different interaction types correspond to different GPT models.

[0044] For example, the original interaction information can be interaction information corresponding to different interaction scenarios. If it is the interaction information between the user and the door lock device when returning home, and the interaction type corresponding to returning home is determined from the preset interaction information database, then the GPT model corresponding to the returning home type can be determined as the above-mentioned target generative pre-trained GPT model.

[0045] Alternatively, the original interaction information can also be interaction information corresponding to different device types. If it is the interaction information of a water heater, the interaction type corresponding to the water heater is determined from the preset interaction information database, and the GPT model corresponding to the interaction type of the water heater is determined as the above-mentioned target generative pre-trained GPT model.

[0046] Solution 2: When the original interaction information does not belong to the preset interaction information database, the original interaction information is processed to obtain target interaction information; when the target interaction information belongs to the preset interaction information database, the GPT model corresponding to the interaction type of the target interaction information is determined as the target generative pre-trained GPT model.

[0047] In an exemplary embodiment, the original interaction information is further processed to obtain the implementation process of the target interaction information, which specifically includes: obtaining a preset interaction information database corresponding to the interaction type of the original interaction information, wherein the preset interaction information database includes a target interaction information set; extracting the target keyword in the original interaction information; determining the interaction information associated with the target keyword in the target interaction information set to obtain a group of interaction information, and obtaining the number of times each interaction information in the group of interaction information appears in the preset interaction information database; and determining the interaction information with the highest number of occurrences in the group of interaction information as the target interaction information.

[0048] For example, in one embodiment, the target keyword is "singing", then the interaction information associated with "singing" is determined in the target interaction information set to obtain a group of interaction information, and the interaction information that appears the highest number of times in this group of interaction information is determined as the target interaction information.

[0049] In an exemplary embodiment, other technical solutions are also proposed to implement the process of processing the original interaction information to obtain target interaction information, including: obtaining a preset interaction information database corresponding to the interaction type of the original interaction information, wherein the preset interaction information database includes a target interaction information set; extracting the original intention information of the original interaction information; determining the interaction information in the target interaction information set that is associated with the intention information and the original intention information to obtain a set of interaction information, and obtaining the number of times each interaction information in the set of interaction information appears in the preset interaction information database; determining the interaction information with the highest number of occurrences in the set of interaction information as the target interaction information; or, determining the interaction information in the target interaction information set that has the highest degree of association with the original intention information to obtain the target interaction information.

[0050] For example, in one embodiment, if the original intent information extracted from the original interaction information is "open a door," then interaction information associated with "open a door" is determined in the target interaction information set to obtain a set of interaction information. For example, each interaction information in the set of interaction information may include "open the door," "open the refrigerator door," "open the wardrobe door," etc. If "open the refrigerator door" appears the most times, then "open the refrigerator door" may be determined as the target interaction information. Alternatively, if it is determined that the intent information "open the door" has the highest degree of association with the original intent information, then "open the door" is determined as the target interaction information.

[0051] Alternatively, if the original intent information extracted from the original interaction information is "ventilation," then interaction information associated with "ventilation" is determined in the target interaction information set to obtain a set of interaction information. For example, each interaction information in a set of interaction information may include "open window for ventilation," "open door for ventilation," "turn on air conditioning for ventilation," "turn on purifier for ventilation," etc. If "turn on purifier for ventilation" appears the most times, then "turn on purifier for ventilation" may be determined as the target interaction information. Alternatively, if it is determined that the intent information "open window for ventilation" has the highest correlation with the original intent information, then "open window for ventilation" is determined as the target interaction information.

[0052] It should be noted that the above-mentioned association degree can be determined based on, for example, the distance between the user and the device, or the interaction time between the user and the device. When the association degree is determined based on the distance between the user and the device, the smaller the distance between the device and the user, the higher the association degree of the interaction information between the device and the user is set. When the association degree is determined based on the interaction time between the user and the device, the closer the interaction time between the device and the user is to the current time, the higher the association degree of the interaction information between the device and the user is set.

[0053] In an exemplary embodiment, the original GPT model can be trained in the following manner to obtain the target generative pre-trained GPT model: the historical interaction information corresponding to the intelligent voice device is determined as a training sample set, wherein the historical interaction information includes i batches of historical interaction statements, and each batch of historical interaction statements in the i batches of historical interaction statements corresponds to a first type of label interaction statement, and / or a second type of label interaction statement, where i is a positive integer; the i-th batch of historical interaction statements in the training sample set is input into the GPT model obtained by the i-1th round of iterative training, and the first type of label interaction statement corresponding to the i-th batch of historical interaction statements is determined as the output result of the GPT model obtained by the i-1th round of iterative training to obtain the target generative pre-trained GPT model; and / or, the i-th batch of historical interaction statements in the training sample set is input into the GPT model obtained by the i-1th round of iterative training, and the second type of label interaction statement corresponding to the i-th batch of historical interaction statements is determined as the output result of the GPT model obtained by the i-1th round of iterative training to obtain the target generative pre-trained GPT model.

[0054] It should be noted that the above-mentioned intelligent voice device can be, for example, a home appliance, a mobile phone, a computer, etc. that supports voice interaction function.

[0055] In an exemplary embodiment, for the technical solution of encoding the original interaction information by each of the N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, the following implementation solution is proposed: Solution 1, determine a first encoder running locally and a second encoder running on a server from the N encoders in the target generative pre-trained GPT model; adjust the first encoding parameter of the first encoder according to the encoder adjustment instruction, control the first encoder to encode the original interaction information according to the adjusted first encoding parameter, and control the second encoder to encode the original interaction information according to the second encoding parameter to obtain the N encoded feature vectors; wherein, the first encoding parameter is an adjustable parameter, and the second encoding parameter is a fixed parameter.

[0056] Solution 1, by implementing a local fine-tunable encoder and a fixed, non-adjustable encoder on the cloud server, can not only meet the large amount of computing power required to run the target generative pre-trained GPT model, but also meet the needs of real-time model adjustment. By fine-tuning the local encoder, the adjustment flexibility of the encoder is improved, and the encoding efficiency of the encoder can be improved without adding too much additional computing resources.

[0057] In an exemplary embodiment, for the technical solution of encoding the original interaction information by each of the N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, the following implementation solution is proposed: Solution 2, determining a first encoder running locally and a second encoder running on a server from the N encoders in the target generative pre-trained GPT model; controlling the first encoder to encode the original interaction information according to a first encoding parameter, and controlling the second encoder to encode the original interaction information according to a second encoding parameter to obtain the N encoded feature vectors; wherein the first encoding parameter is an adjustable parameter and the second encoding parameter is a fixed parameter.

[0058] Through solution 2, the first encoder and the second encoder can be independently controlled to encode the original interactive information, so that the first encoder and the second encoder can encode simultaneously, thereby increasing the encoding speed and further improving the encoding efficiency.

[0059] In an exemplary embodiment, in order to better illustrate the implementation scheme of merging the N coded feature vectors in the above-mentioned step S206 to obtain a merged feature vector, the following implementation steps are specifically proposed: comparing the vector dimension of each of the N coded feature vectors to determine a first coded feature vector with the largest vector dimension; when there is a coded feature vector smaller than the maximum vector dimension among the N coded feature vectors, determining the coded feature vector smaller than the maximum vector dimension as a second coded feature vector; performing a linear transformation on the second coded feature vector to obtain a second coded feature vector after the linear transformation, wherein the vector dimension of the second coded feature vector is equal to the maximum vector dimension; and adding the first coded feature vector and the second coded feature vector to obtain the merged feature vector.

[0060] For example, in one embodiment, N can be 3, and the N encoded feature vectors include vector A, vector B, and vector C. Wherein, the vector dimension of vector A is 4, the vector dimension of vector B is 5, and the vector dimension of vector C (i.e., the first encoded feature vector) is 6. Then, vector A and vector B can be linearly transformed to obtain linearly transformed vectors F and vector D (i.e., the above-mentioned second encoded feature vector), where the vector dimension of vector F and vector D is equal to 6. Then, vector C, vector F, and vector D can be added to obtain a merged feature vector.

[0061] In an exemplary embodiment, further, another technical solution is proposed for merging the N encoded feature vectors to obtain a merged feature vector, specifically including: performing vector concatenation on each of the N encoded feature vectors to obtain the merged feature vector, wherein the vector dimension of the merged feature vector is the sum of the vector dimensions of the N encoded feature vectors.

[0062] The vector splicing method may include horizontal splicing and vertical splicing. This embodiment uses horizontal splicing as an example. For example, if vector a = [1, 2, 3] and vector b = [7, 8, 9], the merged feature vector of the horizontal splicing is [1, 2, 3, 7, 8, 9].

[0063] Furthermore, before implementing vector concatenation, it is necessary to determine whether the relationship between vectors is "OR" or "AND". This can be determined using "interaction features" or "logic regression models". For example, each eigenvalue in different vectors is multiplied one by one and then added to obtain the eigenvalue of the interaction feature. If the eigenvalue of the interaction feature is greater than a preset feature threshold, then the relationship between the different vectors can be determined to be "OR", otherwise, it is "AND". Alternatively, multiple logistic regression models can be used to learn different vector relationships respectively, and the prediction results of multiple logistic regression models can be voted on to determine the vector relationship corresponding to the voting results.

[0064] Through this embodiment, N encoded feature vectors can be directly concatenated without considering whether the vector dimensions of the N encoded feature vectors are consistent, thereby realizing a method for obtaining a merged feature vector, which can enrich the method for obtaining the merged feature vector.

[0065] In an exemplary embodiment, a technical solution is also proposed for obtaining N encoders before encoding the original interaction information through each encoder in the target generative pre-trained GPT model to obtain N encoded feature vectors. The technical solution specifically includes the following steps: responding to an encoder adjustment instruction, determining a first group of encoders to be adjusted as indicated by the encoder adjustment instruction from the N original encoders in the target generative pre-trained GPT model, and adjusting the encoding parameters of each encoder in the first group of encoders according to the encoder adjustment instruction to obtain a second group of encoders; replacing the first group of encoders in the N original encoders with the second group of encoders to obtain the N encoders.

[0066] Through this embodiment, the encoding parameters of the first group of encoders can be adjusted based on the encoder adjustment instruction to achieve real-time adjustment of the encoder, decouple the encoder fine-tuning process and the encoder encoding process, and achieve independent work of fine-tuning and encoding. In this way, the encoder can be directly adjusted without interrupting the operation of the encoder, and the adjusted encoder can be used to continue working, thereby improving the encoding efficiency of the encoder.

[0067] In an exemplary embodiment, the process of determining the first group of encoders adjusted as indicated by the encoder adjustment instruction from the N original encoders in the target generative pre-trained GPT model can be described by the following steps: Step S11, obtaining a preset encoding vector dimension threshold from the encoder adjustment instruction; Step S12, determining the encoders whose encoding vector dimension is less than the encoding vector dimension threshold among the N original encoders to obtain the first group of encoders, wherein the encoding vector dimension of each encoder in the N original encoders represents the number of features in the encoding feature vector output by each encoder.

[0068] It should be noted that the encoding vector dimensions of the above N original encoders are all greater than 0.

[0069] In the above embodiment, a solution is provided for determining a first group of encoders to be adjusted as instructed by the encoder adjustment instruction. By comparing the encoding vector dimensions of the original encoders with a preset encoding vector dimension threshold, encoders having encoding vector dimensions less than the encoding vector dimension threshold are determined as the first group of encoders. The first group of encoders for implementing local fine-tuning can be selected based on the encoding vector dimensions of the encoders. For example, if the preset encoding vector dimension threshold is 8, encoders determined to have encoding vector dimensions less than 8 among the N original encoders can be determined as the first group of encoders.

[0070] In an exemplary embodiment, it is further proposed to adjust the encoding parameters of each encoder in the first group of encoders according to the encoder adjustment instruction to obtain the implementation steps of the second group of encoders, including: step S21, obtaining a preset adjustment amount from the encoder adjustment instruction, wherein the adjustment amount is used to adjust the encoding vector dimension of each encoder in the first group of encoders, wherein the encoding vector dimension of each encoder represents the number of features in the encoding feature vector output by each encoder; step S22, increasing the encoding vector dimension of each encoder in the first group of encoders according to the adjustment amount to obtain the second group of encoders.

[0071] In an exemplary embodiment, further, a process of increasing the encoding vector dimension of each encoder in the first group of encoders according to the adjustment amount to obtain the second group of encoders is specifically described, including the following steps: increasing the encoding vector dimension of each encoder in the first group of encoders by the adjustment amount to obtain the second group of encoders; or multiplying the encoding vector dimension of each encoder in the first group of encoders by the adjustment amount to obtain the second group of encoders.

[0072] In an exemplary embodiment, after obtaining a preset adjustment amount from the encoder adjustment instruction, the encoding vector dimension of each encoder in the first group of encoders may be reduced by the adjustment amount to obtain the second group of encoders.

[0073] Through the above embodiments, a variety of specific implementation schemes for adjusting the encoding parameters of each encoder in the first group of encoders are provided. For example, in the case where the above adjustment amount represents the encoding vector dimension of the encoder, the adjustment amount can be directly added to the encoding vector dimension of each encoder in the first group of encoders. That is, the adjustment amount represents that the encoding vector dimension of the encoder is 2, and the encoding vector dimension of each encoder in the first group of encoders is, for example, 10. If the encoder adjustment instruction indicates that the encoding vector dimension of each encoder is increased, the encoding vector dimension of each encoder in the first group of encoders can be directly adjusted to 12. Alternatively, if the encoder adjustment instruction indicates that the encoding vector dimension of each encoder is decreased, the encoding vector dimension of each encoder in the first group of encoders can be directly adjusted to 8.

[0074] In other embodiments, the adjustment amount may also represent an adjustment multiple of the encoding vector dimension of each encoder in the first group of encoders, that is, based on the encoding vector dimension of each encoder, the encoding vector dimension of each encoder in the first group of encoders is multiplied by the adjustment amount to obtain the second group of encoders. For example, the adjustment amount may be adjusted to 2 times, so the encoding vector dimension of each encoder in the first group of encoders is, for example, 10. If the encoder adjustment instruction indicates to increase the encoding vector dimension of each encoder, the encoding vector dimension of each encoder in the first group of encoders may be directly adjusted to 20. Alternatively, if the encoder adjustment instruction indicates to decrease the encoding vector dimension of each encoder, the encoding vector dimension of each encoder in the first group of encoders may be directly adjusted to 5.

[0075] The above-described embodiments eliminate the single nature of the encoder adjustment process, enrich the methods for adjusting the encoding vector dimensions of each encoder in the first group of encoders, provide more feasible adjustment schemes, expand application scenarios, and further improve the complexity of implementing real-time encoder adjustment. In particular, in encrypted encoding scenarios, the encoder adjustment method can be flexibly adjusted in combination with different encryption algorithms, further improving the encoding security of the encoder.

[0076] In an exemplary embodiment, in order to better understand the implementation process of determining the interaction intention information of the target object based on the target decoding result in the above-mentioned step S210, the following technical solution is proposed: obtaining the intention entity word contained in the target decoding result; determining multiple intention instructions corresponding to the intention entity word, wherein the multiple intention instructions all correspond to the execution location of the intention instruction; determining the target intention instruction from the multiple intention instructions according to the interaction location when the target object interacts with the intelligent voice device, and determining the interaction intention information of the target object based on the target intention instruction, wherein the execution location of the target intention instruction is consistent with the interaction location.

[0077] In this embodiment, for example, if the intent entity word obtained from the target decoding result is "work," then the corresponding multiple intent instructions for "work" may include, for example, "work," "wash clothes," "sweep the floor," "mop the floor," "cook," "tidy up the room," and "take out the trash." Each of these intent instructions corresponds to a different execution location, such as "work in the study," "wash clothes in the bathroom," "cook in the kitchen," and "take out the trash." If the user interacts with the intelligent voice device in the bathroom, the user's interaction intent is determined to be "wash clothes in the bathroom" from the multiple intent instructions.

[0078] In order to better understand the process of the above-mentioned method for determining the interaction intention information based on the generative pre-trained GPT model, the following is an explanation of the implementation method flow of the above-mentioned method for determining the interaction intention information based on the generative pre-trained GPT model in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present disclosure.

[0079] In this embodiment, a method for determining interaction intention information based on a generative pre-trained GPT model is provided. FIG3 is a schematic diagram of a scenario for executing the method for determining interaction intention information based on a generative pre-trained GPT model according to an embodiment of the present disclosure. As shown in FIG3 , during the pre-training process, it is generally necessary to obtain a large amount of intelligent interaction data (i.e., the intelligent interaction information flow of FIG3 , which is equivalent to the above-mentioned original interaction information). The GPT model is trained on the basis of using the GPT model as a priori knowledge language model. Since calling the GPT model requires huge computing power, and commercial GPT resources often have security risks of data outflow, in this embodiment, non-commercial GPT resources are used for training.

[0080] In one embodiment, an encoding process of a single encoder and a decoding process of a single encoder are provided in conjunction with FIG. 4( a ) and FIG. 4 ( b ), respectively. Taking the encoding process of FIG. 4( a ) as an example, the encoding process specifically includes the following steps:

[0081] Step S401: input original interaction information;

[0082] Step S402: performing layer normalization on the original interaction information;

[0083] Step S403: Perform MHA (Multi-Head Attention Operation) on the layer normalization result;

[0084] Step S404: further perform layer normalization on the result of performing the MHA operation;

[0085] Step S405: performing feedforward processing on the layer normalization result of step S404;

[0086] Step S406: Perform a residual connection operation on the result of the feedforward processing to obtain a coded feature vector.

[0087] The decoding process shown in FIG4(b) is similar to the encoding process in FIG4(a), specifically including the following steps:

[0088] Step S407: input the merged feature vector;

[0089] Step S408: performing layer normalization on the merged feature vector;

[0090] Step S409: Perform MHA (Multi-Head Attention Operation) operation on the result of layer normalization;

[0091] Step S410: further perform layer normalization on the result of performing the MHA operation;

[0092] Step S411: performing feedforward processing on the layer normalization result of the above step S410;

[0093] Step S412: Input the result of the feedforward processing into the multi-layer perceptron neural network.

[0094] Step S413: Obtain the decoding result.

[0095] Furthermore, as shown in FIG5 , another encoding structure is proposed, including multiple encoding layers (i.e., N encoders in the target generative pre-trained GPT model). For steps S501 to S506, reference can be made to steps S401 to S406 described above. In step S507, the encoding feature vectors of each encoding layer are merged to obtain a merged feature vector. The merged feature vector can be obtained, for example, by merging the first group of encoding feature vectors and the second group of encoding feature vectors in FIG6 .

[0096] In one embodiment, the specific steps for obtaining and decoding the merged feature vector are as follows:

[0097] Step S601: input original interaction information;

[0098] Step S602: layer normalization;

[0099] Step S603: Execute MHA operation;

[0100] Step S604: layer normalization;

[0101] Step S605: feedforward processing;

[0102] Step S606: Obtain the first set of encoding feature vectors;

[0103] Step S607: Obtain the second set of encoding feature vectors.

[0104] For multiple encoders, steps S601 to S605 can be performed independently and simultaneously to obtain multiple encoding feature vectors. In this embodiment, taking two encoders as an example, two groups of encoding feature vectors can be obtained.

[0105] Meanwhile, for the above steps S601 to S605, the specific descriptions may refer to steps S401 to S405, and the present disclosure will not elaborate on them here.

[0106] Next, the decoding process of the decoder can be described in conjunction with steps S608 to S613, as follows:

[0107] Step S608: input the merged feature vector to the decoder;

[0108] Step S609: performing layer normalization on the merged feature vector;

[0109] Step S610: performing an MHA operation on the layer normalization result;

[0110] Step S611: perform layer normalization on the result of the MHA operation;

[0111] Step S612: If there are multiple layer normalization operations, feed-forward processing is performed on the last layer normalization result;

[0112] Step S613: A fully connected multi-layer perceptron neural network is used to perform semantic space conversion and obtain the predicted probability distribution of each candidate word by performing a softmax (probability normalization) operation;

[0113] Step S614: Use a table lookup operation to obtain the words corresponding to the predicted probability distribution of each candidate word, thereby obtaining a decoding result.

[0114] Next, the decoding process of the decoder can be further described in detail in combination with the following steps:

[0115] Step S11: Initialization is performed according to the following formula:

[0116] in, Represents the state value of the Decoder, the superscript j represents the Transformer_Block of the jth layer in the Decoder, and the subscript i represents the process of generating the i-th token, where w i-1 represents the previous word generated (i-1th word), BPE is the encoding method of word vector Byte Pair Encoding, PE represents position information encoding Position Encoding, and all the following formulas are the same.

[0117] Step S12: Perform the first layer normalization Layer_Norm operation on the input query, namely:

[0118] Step S13: Then perform MHA (multi-head attention) operation and use residual connection to obtain Among them, the residual connection can convert the floating point vector into token:

[0119] Step S14: Perform the second Layer_Norm operation:

[0120] Step S15: Perform feedforward processing (implemented using two layers of full connection) and use residual connection to obtain a new Decoder state

[0121] Step S16: Perform Layer_Norm operation on the Transformer_Block output of the last layer, perform semantic space conversion with full connection operation, and perform softmax (probability normalization) operation to obtain the predicted probability distribution y of each candidate word i :

[0122] Step S17: Use table lookup operation to obtain the generated word w i =Lookup(argmax(y i ); VOC)

[0123] Among them, Lookup is a table lookup operation, argmax is the index corresponding to the maximum vector dimension, VOC represents the dictionary used, and the above represents all parameters in Decoder.

[0124] Through the above scheme, the present disclosure provides a more flexible model deployment scheme. On the basis of using the encoder on the cloud server, the local encoder is continuously supervised for iterative learning, and fine-tuning is performed at the same time, which reduces the computing power consumption during model training and greatly improves the flexibility of deployment. This composite model structure can realize the decoupling structure of the local encoder and the cloud encoder. The encoder on the cloud server and the local encoder can be encoded separately to obtain their respective feature encoding vectors, and the merged feature vector is obtained by merging word vectors to complete the encoding layer of the composite model. The merged feature vector is then determined as the input of the decoding layer, and the predicted text sequence is determined based on the decoding result output by the decoding layer.

[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present disclosure.

[0126] FIG7 is a structural block diagram of a device for determining interaction intent information based on a generative pre-trained GPT model according to an embodiment of the present disclosure; as shown in FIG7 , the device includes:

[0127] An acquisition module 7002 is configured to acquire original interaction information when a target object interacts with an intelligent voice device;

[0128] It should be noted that the above original interaction information can correspond to a variety of interaction scenarios, such as a homecoming scenario, a cooking scenario, an entertainment scenario, and the like.

[0129] an encoding module 7004 configured to input the original interaction information into a target generative pre-trained GPT model, and encode the original interaction information using each of N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, where N is a positive integer greater than or equal to 2;

[0130] It can be understood that each of the N encoders independently encodes the original interactive information to obtain an encoded feature vector encoded by each encoder.

[0131] A merging module 7006 is configured to merge the N encoded feature vectors to obtain a merged feature vector;

[0132] The merging method may include, for example, vector fusion and vector addition, but is not limited thereto.

[0133] Obtaining module 7008, configured to decode the merged feature vector through a decoder in the target generative pre-trained GPT model to obtain a target decoding result;

[0134] The determination module 7010 is configured to determine the interaction intention information of the target object according to the target decoding result.

[0135] Through the above-mentioned device, the original interaction information when the target object interacts with the intelligent voice device is obtained; the original interaction information is input into the target generative pre-trained GPT model, and the original interaction information is encoded by each encoder of the N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, where N is a positive integer greater than or equal to 2; the N encoded feature vectors are merged to obtain a merged feature vector; the merged feature vector is decoded by the decoder in the target generative pre-trained GPT model to obtain a target decoding result; based on the target decoding result, the interaction intention information of the target object is determined, which solves the technical problem of how to accurately identify the user's interaction intention in the related art, thereby improving the recognition accuracy of the user's interaction intention; and this composite coding layer containing N encoders can further realize the decoupling structure of the local encoder and the cloud encoder, that is, the N encoders are deployed locally on the commercial server and the terminal device, or deployed on the commercial cloud server and the self-used cloud server, to realize cross-platform and cross-architecture model deployment, greatly improving the flexibility and ease of use of the model deployment.

[0136] In an exemplary embodiment, the above-mentioned interaction intention information determination device based on the generative pre-trained GPT model also includes a first model acquisition module, which is configured to: when the original interaction information belongs to a preset interaction information database, obtain the interaction type of the original interaction information from the preset interaction information database, wherein the preset interaction information database is used to store interaction information of multiple interaction types; determine the GPT model corresponding to the interaction type of the original interaction information as the target generative pre-trained GPT model, wherein different interaction types correspond to different GPT models.

[0137] For example, the original interaction information can be interaction information corresponding to different interaction scenarios. If it is the interaction information between the user and the door lock device when returning home, and the interaction type corresponding to returning home is determined from the preset interaction information database, then the GPT model corresponding to the returning home type can be determined as the above-mentioned target generative pre-trained GPT model.

[0138] Alternatively, the original interaction information can also be interaction information corresponding to different device types. If it is the interaction information of a water heater, the interaction type corresponding to the water heater is determined from the preset interaction information database, and the GPT model corresponding to the interaction type of the water heater is determined as the above-mentioned target generative pre-trained GPT model.

[0139] In an exemplary embodiment, the above-mentioned interaction intention information determination device based on the generative pre-trained GPT model also includes a second model acquisition module, which is configured to: when the original interaction information does not belong to the preset interaction information database, process the original interaction information to obtain target interaction information; when the target interaction information belongs to the preset interaction information database, determine the GPT model corresponding to the interaction type of the target interaction information as the target generative pre-trained GPT model.

[0140] In an exemplary embodiment, the above-mentioned second model acquisition module also includes a first acquisition unit, which is configured to: obtain a preset interaction information database corresponding to the interaction type of the original interaction information, wherein the preset interaction information database includes a target interaction information set; extract the target keyword in the original interaction information; determine the interaction information associated with the target keyword in the target interaction information set to obtain a group of interaction information, and obtain the number of times each interaction information in the group of interaction information appears in the preset interaction information database; determine the interaction information with the highest number of occurrences in the group of interaction information as the target interaction information.

[0141] For example, in one embodiment, the target keyword is "singing", then the interaction information associated with "singing" is determined in the target interaction information set to obtain a group of interaction information, and the interaction information that appears the highest number of times in this group of interaction information is determined as the target interaction information.

[0142] In an exemplary embodiment, the above-mentioned second model acquisition unit also includes a second acquisition unit, which is configured to: obtain a preset interaction information database corresponding to the interaction type of the original interaction information, wherein the preset interaction information database includes a target interaction information set; extract the original intention information of the original interaction information; determine the interaction information in the target interaction information set that is associated with the original intention information to obtain a set of interaction information, and obtain the number of times each interaction information in the set of interaction information appears in the preset interaction information database; determine the interaction information with the highest number of occurrences in the set of interaction information as the target interaction information; or, determine the interaction information in the target interaction information set that has the highest degree of association with the original intention information to obtain the target interaction information.

[0143] For example, in one embodiment, if the original intent information extracted from the original interaction information is "open a door," then interaction information associated with "open a door" is determined in the target interaction information set to obtain a set of interaction information. For example, each interaction information in the set of interaction information may include "open the door," "open the refrigerator door," "open the wardrobe door," etc. If "open the refrigerator door" appears the most times, then "open the refrigerator door" may be determined as the target interaction information. Alternatively, if it is determined that the intent information "open the door" has the highest degree of association with the original intent information, then "open the door" is determined as the target interaction information.

[0144] Alternatively, if the original intent information extracted from the original interaction information is "ventilation," then interaction information associated with "ventilation" is determined in the target interaction information set to obtain a set of interaction information. For example, each interaction information in a set of interaction information may include "open window for ventilation," "open door for ventilation," "turn on air conditioning for ventilation," "turn on purifier for ventilation," etc. If "turn on purifier for ventilation" appears the most times, then "turn on purifier for ventilation" may be determined as the target interaction information. Alternatively, if it is determined that the intent information "open window for ventilation" has the highest correlation with the original intent information, then "open window for ventilation" is determined as the target interaction information.

[0145] It should be noted that the above-mentioned association degree can be determined based on, for example, the distance between the user and the device, or the interaction time between the user and the device. When the association degree is determined based on the distance between the user and the device, the smaller the distance between the device and the user, the higher the association degree of the interaction information between the device and the user is set. When the association degree is determined based on the interaction time between the user and the device, the closer the interaction time between the device and the user is to the current time, the higher the association degree of the interaction information between the device and the user is set.

[0146] In an exemplary embodiment, the above-mentioned interaction intention information determination device based on the generative pre-trained GPT model also includes a training module, which is configured to: the original GPT model can be trained in the following manner to obtain the target generative pre-trained GPT model: the historical interaction information corresponding to the intelligent voice device is determined as a training sample set, wherein the historical interaction information includes i batches of historical interaction sentences, and each batch of historical interaction sentences in the i batches of historical interaction sentences corresponds to a first type of label interaction sentence and / or a second type of label interaction sentence, and i is a positive integer; the i-th batch of historical interaction sentences in the training sample set is used as the training sample set. The interaction statements are input into the GPT model obtained by the i-1th round of iterative training, and the first type of label interaction statements corresponding to the i-th batch of historical interaction statements are determined as the output results of the GPT model obtained by the i-1th round of iterative training to obtain the target generative pre-trained GPT model; and / or, the i-th batch of historical interaction statements in the training sample set are input into the GPT model obtained by the i-1th round of iterative training, and the second type of label interaction statements corresponding to the i-th batch of historical interaction statements are determined as the output results of the GPT model obtained by the i-1th round of iterative training to obtain the target generative pre-trained GPT model.

[0147] It should be noted that the above-mentioned intelligent voice device can be, for example, a home appliance, a mobile phone, a computer, etc. that supports voice interaction function.

[0148] In an exemplary embodiment, the above-mentioned encoding module also includes a first encoding unit, which is configured to: determine a first encoder running locally and a second encoder running on a server from the N encoders in the target generative pre-trained GPT model; adjust the first encoding parameter of the first encoder according to the encoder adjustment instruction, control the first encoder to encode the original interaction information according to the adjusted first encoding parameter, and control the second encoder to encode the original interaction information according to the second encoding parameter to obtain the N encoding feature vectors; wherein the first encoding parameter is an adjustable parameter and the second encoding parameter is a fixed parameter.

[0149] Solution 1, by implementing a local fine-tunable encoder and a fixed, non-adjustable encoder on the cloud server, can not only meet the large amount of computing power required to run the target generative pre-trained GPT model, but also meet the needs of real-time model adjustment. By fine-tuning the local encoder, the adjustment flexibility of the encoder is improved, and the encoding efficiency of the encoder can be improved without adding too much additional computing resources.

[0150] In an exemplary embodiment, the above-mentioned encoding module also includes a second encoding unit, which is configured to: determine a first encoder running locally and a second encoder running on the server from the N encoders in the target generative pre-trained GPT model; control the first encoder to encode the original interaction information according to a first encoding parameter, and control the second encoder to encode the original interaction information according to a second encoding parameter to obtain the N encoding feature vectors; wherein the first encoding parameter is an adjustable parameter and the second encoding parameter is a fixed parameter.

[0151] Through solution 2, the first encoder and the second encoder can be independently controlled to encode the original interactive information, so that the first encoder and the second encoder can encode simultaneously, thereby increasing the encoding speed and further improving the encoding efficiency.

[0152] In an exemplary embodiment, the merging module further includes a first merging unit, which is configured to: in order to better illustrate the implementation scheme of merging the N coded feature vectors in the above-mentioned step S206 to obtain a merged feature vector, the following implementation steps are specifically proposed: comparing the vector dimension of each of the N coded feature vectors to determine a first coded feature vector with a maximum vector dimension; when there is a coded feature vector smaller than the maximum vector dimension among the N coded feature vectors, determining the coded feature vector smaller than the maximum vector dimension as a second coded feature vector; performing a linear transformation on the second coded feature vector to obtain a second coded feature vector after the linear transformation, wherein the vector dimension of the second coded feature vector is equal to the maximum vector dimension; and adding the first coded feature vector and the second coded feature vector to obtain the merged feature vector.

[0153] For example, in one embodiment, N can be 3, and the N encoded feature vectors include vector A, vector B, and vector C. Wherein, the vector dimension of vector A is 4, the vector dimension of vector B is 5, and the vector dimension of vector C (i.e., the first encoded feature vector) is 6. Then, vector A and vector B can be linearly transformed to obtain linearly transformed vectors F and vector D (i.e., the above-mentioned second encoded feature vector), where the vector dimension of vector F and vector D is equal to 6. Then, vector C, vector F, and vector D can be added to obtain a merged feature vector.

[0154] In an exemplary embodiment, further, the above-mentioned merging module also includes a second merging unit, which is configured to: perform vector splicing on each of the N encoded feature vectors to obtain the merged feature vector, wherein the vector dimension of the merged feature vector is the sum of the vector dimensions of the N encoded feature vectors.

[0155] Through this embodiment, N encoded feature vectors can be directly concatenated without considering whether the vector dimensions of the N encoded feature vectors are consistent, thereby realizing a method for obtaining a merged feature vector, which can enrich the method for obtaining the merged feature vector.

[0156] In an exemplary embodiment, the above-mentioned interactive intention information determination device based on the generative pre-trained GPT model also includes an adjustment module, which is configured to: respond to an encoder adjustment instruction, determine a first group of encoders to be adjusted as indicated by the encoder adjustment instruction from the N original encoders in the target generative pre-trained GPT model, and adjust the encoding parameters of each encoder in the first group of encoders according to the encoder adjustment instruction to obtain a second group of encoders; replace the first group of encoders in the N original encoders with the second group of encoders to obtain the N encoders.

[0157] Through this embodiment, the encoding parameters of the first group of encoders can be adjusted based on the encoder adjustment instruction to achieve real-time adjustment of the encoder, decouple the encoder fine-tuning process and the encoder encoding process, and achieve independent work of fine-tuning and encoding. In this way, the encoder can be directly adjusted without interrupting the operation of the encoder, and the adjusted encoder can be used to continue working, thereby improving the encoding efficiency of the encoder.

[0158] In an exemplary embodiment, the above-mentioned adjustment module also includes: a first encoder obtaining unit, configured to perform the following steps: step S11, obtaining a preset encoding vector dimension threshold from the encoder adjustment instruction; step S12, determining an encoder whose encoding vector dimension is less than the encoding vector dimension threshold among the N original encoders, and obtaining the first group of encoders, wherein the encoding vector dimension of each encoder in the N original encoders represents the number of features in the encoding feature vector output by each encoder.

[0159] It should be noted that the encoding vector dimensions of the above N original encoders are all greater than 0.

[0160] In the above embodiment, a solution is provided for determining a first group of encoders to be adjusted as instructed by the encoder adjustment instruction. By comparing the encoding vector dimensions of the original encoders with a preset encoding vector dimension threshold, encoders having encoding vector dimensions less than the encoding vector dimension threshold are determined as the first group of encoders. The first group of encoders for implementing local fine-tuning can be selected based on the encoding vector dimensions of the encoders. For example, if the preset encoding vector dimension threshold is 8, encoders determined to have encoding vector dimensions less than 8 among the N original encoders can be determined as the first group of encoders.

[0161] In an exemplary embodiment, the above-mentioned adjustment module also includes: a second encoder obtaining unit, configured to perform the following steps: step S21, obtaining a preset adjustment amount from the encoder adjustment instruction, wherein the adjustment amount is used to adjust the encoding vector dimension of each encoder in the first group of encoders, wherein the encoding vector dimension of each encoder represents the number of features in the encoding feature vector output by each encoder; step S22, increasing the encoding vector dimension of each encoder in the first group of encoders according to the adjustment amount to obtain the second group of encoders.

[0162] In an exemplary embodiment, further, the above-mentioned second encoder obtaining unit is also configured to: increase the encoding vector dimension of each encoder in the first group of encoders by the adjustment amount to obtain the second group of encoders; or multiply the encoding vector dimension of each encoder in the first group of encoders by the adjustment amount to obtain the second group of encoders.

[0163] In an exemplary embodiment, the second encoder obtaining unit is further configured to: reduce the encoding vector dimension of each encoder in the first group of encoders by the adjustment amount to obtain the second group of encoders.

[0164] Through the above embodiments, a variety of specific implementation schemes for adjusting the encoding parameters of each encoder in the first group of encoders are provided. For example, in the case where the above adjustment amount represents the encoding vector dimension of the encoder, the adjustment amount can be directly added to the encoding vector dimension of each encoder in the first group of encoders. That is, the adjustment amount represents that the encoding vector dimension of the encoder is 2, and the encoding vector dimension of each encoder in the first group of encoders is, for example, 10. If the encoder adjustment instruction indicates that the encoding vector dimension of each encoder is increased, the encoding vector dimension of each encoder in the first group of encoders can be directly adjusted to 12. Alternatively, if the encoder adjustment instruction indicates that the encoding vector dimension of each encoder is decreased, the encoding vector dimension of each encoder in the first group of encoders can be directly adjusted to 8.

[0165] In other embodiments, the adjustment amount may also represent, for example, an adjustment multiple of the encoding vector dimension of each encoder in the first group of encoders, that is, based on the encoding vector dimension of each encoder, the encoding vector dimension of each encoder in the first group of encoders is multiplied by the adjustment amount to obtain the second group of encoders. For example, the adjustment amount may be adjusted to 2 times, so that the encoding vector dimension of each encoder in the first group of encoders is, for example, 10. If the encoder adjustment instruction indicates to increase the encoding vector dimension of each encoder, the encoding vector dimension of each encoder in the first group of encoders may be directly adjusted to 20. Alternatively, if the encoder adjustment instruction indicates to decrease the encoding vector dimension of each encoder, the encoding vector dimension of each encoder in the first group of encoders may be directly adjusted to 5.

[0166] The above-described embodiments eliminate the single nature of the encoder adjustment process, enrich the methods for adjusting the encoding vector dimensions of each encoder in the first group of encoders, provide more feasible adjustment schemes, expand application scenarios, and further improve the complexity of implementing real-time encoder adjustment. In particular, in encrypted encoding scenarios, the encoder adjustment method can be flexibly adjusted in combination with different encryption algorithms, further improving the encoding security of the encoder.

[0167] In an exemplary embodiment, the above-mentioned determination module is also configured to obtain the intention entity word contained in the target decoding result; determine multiple intention instructions corresponding to the intention entity word, wherein the multiple intention instructions all correspond to the execution location of the intention instruction; determine the target intention instruction from the multiple intention instructions according to the interaction location when the target object interacts with the intelligent voice device, and determine the interaction intention information of the target object based on the target intention instruction, wherein the execution location of the target intention instruction is consistent with the interaction location.

[0168] In this embodiment, for example, if the intent entity word obtained from the target decoding result is "work," then the corresponding multiple intent instructions for "work" may include, for example, "work," "wash clothes," "sweep the floor," "mop the floor," "cook," "tidy up the room," and "take out the trash." Each of these intent instructions corresponds to a different execution location, such as "work in the study," "wash clothes in the bathroom," "cook in the kitchen," and "take out the trash." If the user interacts with the intelligent voice device in the bathroom, the user's interaction intent is determined to be "wash clothes in the bathroom" from the multiple intent instructions.

[0169] An embodiment of the present disclosure further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.

[0170] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0171] S1, obtain the original interaction information when the target object interacts with the intelligent voice device;

[0172] S2, inputting the original interaction information into a target generative pre-trained GPT model, and encoding the original interaction information by each of N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, where N is a positive integer greater than or equal to 2;

[0173] S3, merging the N encoded feature vectors to obtain a merged feature vector;

[0174] S4, decoding the merged feature vector by a decoder in the target generative pre-trained GPT model to obtain a target decoding result;

[0175] S5. Determine the interaction intention information of the target object according to the target decoding result.

[0176] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0177] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0178] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0179] S1, obtain the original interaction information when the target object interacts with the intelligent voice device;

[0180] S2, inputting the original interaction information into a target generative pre-trained GPT model, and encoding the original interaction information by each of N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, where N is a positive integer greater than or equal to 2;

[0181] S3, merging the N encoded feature vectors to obtain a merged feature vector;

[0182] S4, decoding the merged feature vector by a decoder in the target generative pre-trained GPT model to obtain a target decoding result;

[0183] S5. Determine the interaction intention information of the target object according to the target decoding result.

[0184] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0185] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0186] Obviously, those skilled in the art should understand that the modules or steps of the present disclosure described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present disclosure is not limited to any particular combination of hardware and software.

[0187] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure.

Claims

1. A method for determining interaction intention information based on a generative pre-trained GPT model, comprising: Obtain the original interaction information when the target object interacts with the intelligent voice device; Inputting the original interaction information into a target generative pre-trained GPT model, and encoding the original interaction information by each of N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, where N is a positive integer greater than or equal to 2; Merging the N encoded feature vectors to obtain a merged feature vector; Decoding the merged feature vector by a decoder in the target generative pre-trained GPT model to obtain a target decoding result; Determine the interaction intention information of the target object according to the target decoding result.

2. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 1, wherein: Before inputting the original interaction information into the target generative pre-trained GPT model, the method further includes: In a case where the original interaction information belongs to a preset interaction information database, acquiring the interaction type of the original interaction information from the preset interaction information database, wherein the preset interaction information database is used to store interaction information of multiple interaction types; The GPT model corresponding to the interaction type of the original interaction information is determined as the target generative pre-trained GPT model, wherein different interaction types correspond to different GPT models.

3. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 1, wherein: Before inputting the original interaction information into the target generative pre-trained GPT model, the method further includes: In a case where the original interaction information does not belong to a preset interaction information database, processing the original interaction information to obtain target interaction information; In a case where the target interaction information belongs to the preset interaction information database, a GPT model corresponding to the interaction type of the target interaction information is determined as the target generative pre-trained GPT model.

4. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 3, wherein: The processing of the original interaction information to obtain target interaction information includes: Acquire a preset interaction information database corresponding to the interaction type of the original interaction information, wherein the preset interaction information database includes a target interaction information set; Extracting target keywords from the original interactive information; Determining the interaction information associated with the target keyword in the target interaction information set to obtain a group of interaction information, and obtaining the number of times each interaction information in the group of interaction information appears in the preset interaction information database; The interaction information that appears the highest number of times in the group of interaction information is determined as the target interaction information.

5. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 3, wherein: The processing of the original interaction information to obtain target interaction information includes: Acquire a preset interaction information database corresponding to the interaction type of the original interaction information, wherein the preset interaction information database includes a target interaction information set; Extracting original intention information of the original interaction information; Determine, in the target interaction information set, interaction information associated with the original interaction information, obtain a set of interaction information, and obtain the number of times each interaction information in the set of interaction information appears in the preset interaction information database; Determine the interaction information with the highest number of occurrences in the set of interaction information as the target interaction information; or determine the interaction information with the highest degree of correlation between intent information and the original intent information in the target interaction information set to obtain the target interaction information.

6. The method for determining interaction intention information based on a generative pre-trained GPT model according to any one of claims 1 to 5, wherein: The original GPT model is trained in the following way to obtain the target generative pre-trained GPT model: Determine the historical interaction information corresponding to the intelligent voice device as a training sample set, wherein the historical interaction information includes i batches of historical interaction statements, each batch of historical interaction statements in the i batches of historical interaction statements corresponds to a first type of label interaction statement and / or a second type of label interaction statement, and i is a positive integer; The i-th batch of historical interaction sentences in the training sample set is input into the GPT model obtained by the i-1th round of iterative training, and the first type of label interaction sentences corresponding to the i-th batch of historical interaction sentences are determined as the output result of the GPT model obtained by the i-1th round of iterative training, so as to obtain the target generative pre-trained GPT model; and / or, the i-th batch of historical interaction sentences in the training sample set is input into the GPT model obtained by the i-1th round of iterative training, and the second type of label interaction sentences corresponding to the i-th batch of historical interaction sentences are determined as the output result of the GPT model obtained by the i-1th round of iterative training, so as to obtain the target generative pre-trained GPT model.

7. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 1, wherein: The original interaction information is encoded by each of the N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, including: Determine, from the N encoders in the target generative pre-trained GPT model, a first encoder running locally and a second encoder running on the server; Adjust the first encoding parameter of the first encoder according to the encoder adjustment instruction, control the first encoder to encode the original interaction information according to the adjusted first encoding parameter, and control the second encoder to encode the original interaction information according to the second encoding parameter to obtain the N encoding feature vectors; wherein the first encoding parameter is an adjustable parameter and the second encoding parameter is a fixed parameter.

8. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 1, wherein: The original interaction information is encoded by each of the N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, including: Determine, from the N encoders in the target generative pre-trained GPT model, a first encoder running locally and a second encoder running on the server; Controlling the first encoder to encode the original interaction information according to a first encoding parameter, and controlling the second encoder to encode the original interaction information according to a second encoding parameter, to obtain the N encoding feature vectors; The first encoding parameter is an adjustable parameter, and the second encoding parameter is a fixed parameter.

9. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 1, wherein: The step of merging the N encoded feature vectors to obtain a merged feature vector includes: Comparing the vector dimension of each of the N coded feature vectors, and determining a first coded feature vector having a maximum vector dimension; In the case that there is a coding feature vector with a dimension smaller than the maximum vector among the N coding feature vectors, determining the coding feature vector with a dimension smaller than the maximum vector as a second coding feature vector; Performing a linear transformation on the second encoded feature vector to obtain a second encoded feature vector after the linear transformation, wherein the vector dimension of the second encoded feature vector is equal to the maximum vector dimension; The first encoded feature vector and the second encoded feature vector are added to obtain the combined feature vector.

10. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 1, wherein: The step of merging the N encoded feature vectors to obtain a merged feature vector includes: Perform vector concatenation on each of the N encoded feature vectors to obtain the merged feature vector, wherein the vector dimension of the merged feature vector is the sum of the vector dimensions of the N encoded feature vectors.

11. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 1, wherein: Before encoding the original interaction information by each of the N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, the method further includes: In response to the encoder adjustment instruction, determine a first group of encoders to be adjusted as instructed by the encoder adjustment instruction from the N original encoders in the target generative pre-trained GPT model, and adjust encoding parameters of each encoder in the first group of encoders according to the encoder adjustment instruction to obtain a second group of encoders; The first group of encoders among the N original encoders are replaced with the second group of encoders to obtain the N encoders.

12. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 11, wherein: The step of determining, from the N original encoders in the target generative pre-trained GPT model, a first group of encoders adjusted as indicated by the encoder adjustment instruction comprises: Obtaining a preset encoding vector dimension threshold from the encoder adjustment instruction; Determine, among the N original encoders, an encoder whose encoding vector dimension is less than the encoding vector dimension threshold, to obtain the first group of encoders, wherein the encoding vector dimension of each encoder among the N original encoders represents the number of features in the encoding feature vector output by each encoder.

13. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 11, wherein: The step of adjusting encoding parameters of each encoder in the first group of encoders according to the encoder adjustment instruction to obtain a second group of encoders includes: Obtaining a preset adjustment amount from the encoder adjustment instruction, wherein the adjustment amount is used to adjust the encoding vector dimension of each encoder in the first group of encoders, wherein the encoding vector dimension of each encoder represents the number of features in the encoding feature vector output by each encoder; According to the adjustment amount, the encoding vector dimension of each encoder in the first group of encoders is increased to obtain the second group of encoders.

14. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 13, wherein: The step of increasing the encoding vector dimension of each encoder in the first group of encoders according to the adjustment amount to obtain the second group of encoders includes: The encoding vector dimension of each encoder in the first group of encoders is increased by the adjustment amount to obtain the second group of encoders; or, The encoding vector dimension of each encoder in the first group of encoders is multiplied by the adjustment amount to obtain the second group of encoders.

15. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 14, wherein: After obtaining a preset adjustment amount from the encoder adjustment instruction, the method further includes: The encoding vector dimension of each encoder in the first group of encoders is reduced by the adjustment amount to obtain the second group of encoders.

16. The method for determining interaction intention information based on a generative pre-trained GPT model according to claim 1, wherein: The determining, according to the target decoding result, the interaction intention information of the target object includes: Obtaining the intended entity word contained in the target decoding result; Determine a plurality of intention instructions corresponding to the intention entity word, wherein the plurality of intention instructions all correspond to execution locations of the intention instructions; Determine a target intention instruction from the multiple intention instructions according to the interaction location when the target object interacts with the intelligent voice device, and determine the interaction intention information of the target object based on the target intention instruction, wherein the execution location of the target intention instruction is consistent with the interaction location.

17. A device for determining interaction intention information based on a generative pre-trained GPT model, comprising: An acquisition module, configured to acquire original interaction information when a target object interacts with an intelligent voice device; An encoding module, configured to input the original interaction information into a target generative pre-trained GPT model, and encode the original interaction information through each of N encoders in the target generative pre-trained GPT model to obtain N encoded feature vectors, where N is a positive integer greater than or equal to 2; A merging module, configured to merge the N encoded feature vectors to obtain a merged feature vector; An obtaining module is configured to decode the merged feature vector through a decoder in the target generative pre-trained GPT model to obtain a target decoding result; The determination module is configured to determine the interaction intention information of the target object according to the target decoding result.

18. The device for determining interaction intention information based on a generative pre-trained GPT model according to claim 17, wherein: The encoding module further includes: The first encoding unit is configured to determine a first encoder running locally and a second encoder running on a server from the N encoders in the target generative pre-trained GPT model; adjust a first encoding parameter of the first encoder according to a response encoder adjustment instruction of the target object, control the first encoder to encode the original interaction information according to the adjusted first encoding parameter, and control the second encoder to encode the original interaction information according to the second encoding parameter to obtain the N encoding feature vectors; wherein the first encoding parameter is an adjustable parameter and the second encoding parameter is a fixed parameter.

19. A computer-readable storage medium, the computer-readable storage medium comprising a stored program, wherein: When the program is executed, the method described in any one of claims 1 to 16 is executed.

20. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the method according to any one of claims 1 to 16 through the computer program.

Citation Information

Patent Citations

  • Intention recognition method based on deep learning network

    CN110232439A

  • Instruction generation method, system and equipment and medium

    CN110909541A

  • Session intention recognition method and device based on prompt learning and electronic equipment

    CN114330371A

  • Interaction intention information determination method based on generative pre-training GPT model

    CN116229955A

  • Program, device, and method for interacting in small-talk style by using multi-modal knowledge graph

    JP2022135734A

Cited By

  • Equipment control method and device, storage medium and electronic device

    CN120895031A

  • Information storage method and device, storage medium and electronic equipment

    CN121478852A