Human-computer interaction methods, electronic devices, and storage media based on life support

By training the GPT2 model through autoregression and designing the interface, the human-computer interaction problem in life support scenarios was solved, enabling convenient services for users such as the elderly, and providing intelligent dialogue, emergency contact and transaction management functions.

CN116186208BActive Publication Date: 2026-04-03CHONGQING UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-12
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies cannot be effectively applied to human-computer interaction in life support scenarios, and cannot meet the convenient service needs of the elderly and other people living alone.

Method used

The GPT2 model is trained using autoregressive data from multiple corpora based on life support scenarios. The trained GPT2 model is then used for human-computer interaction, outputting interaction results through voice or text data. Combined with interface navigation and function design, it provides intelligent dialogue, address book, and memo functions.

Benefits of technology

It enables effective human-computer interaction in life support scenarios, improves the convenient service experience for users such as the elderly, and provides intelligent dialogue, emergency contact and task management functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116186208B_ABST
    Figure CN116186208B_ABST
Patent Text Reader

Abstract

This application provides a human-computer interaction method, electronic device, and storage medium based on life support. The method includes: acquiring a training dataset comprising multiple corpus data points based on life support scenarios, each corpus data point including at least two concatenated related corpus content; performing autoregressive training on a GPT2 model using the corpus data in the training dataset to obtain a trained GPT2 model; acquiring the user's voice or text data through the electronic device as the corpus to be recognized; inputting the corpus to be recognized into the trained GPT2 model in an application of the electronic device to obtain the interaction result output by the trained GPT2 model, the interaction result including response content corresponding to the corpus to be recognized. Thus, human-computer interaction can be performed according to life support scenarios, and can be applied to life support for the elderly to provide convenient services to users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to a human-computer interaction method, electronic device, and storage medium based on life support. Background Technology

[0002] Since the beginning of the 21st century, population aging has become a significant social issue facing major countries worldwide. Statistics show that with improved healthcare, accelerated urbanization, and smaller family sizes, an increasing number of elderly people will face the challenge of living alone. Currently, while there is considerable research on intent recognition and dialogue generation technologies, research on their application in life support scenarios is scarce, hindering effective human-computer interaction in such situations. Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a human-computer interaction method, electronic device and storage medium based on life support, which can improve the problem of not being able to effectively carry out human-computer interaction based on life support scenarios.

[0004] To achieve the above technical objectives, the technical solution adopted in this application is as follows:

[0005] In a first aspect, embodiments of this application provide a human-computer interaction method based on life support, the method comprising:

[0006] Obtain a training dataset, which includes multiple corpus data based on life support scenarios, and each corpus data includes at least two related corpus contents spliced ​​together;

[0007] Using the corpus data in the training dataset, the GPT2 model is trained autoregressively to obtain the trained GPT2 model.

[0008] Acquire users’ voice or text data through electronic devices as corpus to be recognized;

[0009] The text to be identified is input into the trained GPT2 model in the application of the electronic device to obtain the interaction result output by the trained GPT2 model, the interaction result including the response content corresponding to the text to be identified.

[0010] In conjunction with the first aspect, in some optional implementations, the corpus to be recognized is input into the trained GPT2 model in the application of the electronic device to obtain the interaction result output by the trained GPT2 model, including:

[0011] If the text in the corpus to be identified contains unlabeled text, each word in the unlabeled text is represented as u.i All unlabeled text in the corpus to be identified is represented as U = {u1, u2, ..., u}. n};

[0012] Based on the first objective function of the prediction subtask of the trained GPT2 model in the application of the electronic device, predict the words corresponding to all unlabeled text U, whereby the first objective function is:

[0013]

[0014] Wherein, the first objective function is used to predict the probability of the next word appearing after k words; k refers to the context window size; Θ refers to the standard language model, and the decoder of Θ is a Transformer, the first layer input of which is represented as:

[0015] h0=UW e +W p

[0016] Among them, W e Word embedding projection, W p This refers to the encoding of positional information. The Transformer's block structure has n layers, so the input vector h of the l-th layer... l Represented as:

[0017] h l =transformer_block(h l-1 V i ∈[1, n]

[0018] Where n is an integer greater than 1, and l is any integer from 1 to n; transformer_block refers to using the output of the previous layer as the input of this layer; the projection of the last output in the Transformer is expressed as:

[0019]

[0020] If the text in the corpus to be identified contains labeled text, then the labeled text is represented as: a sequence x of length m. 1 x 2 , ..., x m The label is y, and m is an integer greater than or equal to 1;

[0021] Based on the second objective function of the classification subtask of the trained GPT2 model, predict the word corresponding to the labeled text. The second objective function is expressed as:

[0022]

[0023] Wherein, the second objective function is used to, given x 1 x 2 , ..., x m Then, predict the probability of y; W represents the output of a sequence of length m after a Transformer block of length l; y This represents the classification label obtained by putting the sequence into the trained GPT2 model, wherein the classification accuracy of the trained GPT2 model is expressed as:

[0024]

[0025] The interaction result of the corpus to be identified is determined by using the overall objective function of the trained GPT2 model, wherein the overall objective function is expressed as: L3(C)=L2(C)+λL1(C).

[0026] In conjunction with the first aspect, in some alternative implementations, the method further includes:

[0027] Upon receiving a screen navigation command, the current first screen is navigated to a second screen corresponding to the screen navigation command, based on a pre-created mapping relationship for screen navigation.

[0028] In conjunction with the first aspect, in some optional implementations, the method further includes, before receiving the interface jump instruction:

[0029] Create a mapping relationship between the first interface and the second interface.

[0030] In conjunction with the first aspect, in some alternative implementations, the method further includes, prior to acquiring the user's voice or text data via an electronic device as corpus to be recognized:

[0031] Create a user interface for logging into the application, the user interface including a first virtual button for user login and user registration.

[0032] In conjunction with the first aspect, in some alternative implementations, the method further includes:

[0033] Create a second virtual button in the user interface for adding contacts to the address book.

[0034] In conjunction with the first aspect, in some alternative implementations, the method further includes:

[0035] Create a third virtual button in the user interface to serve as a memo.

[0036] In conjunction with the first aspect, in some alternative implementations, the method further includes:

[0037] The text of the interaction result is converted into speech output.

[0038] Secondly, this application also provides an electronic device, which includes a processor and a memory coupled to each other, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device performs the above-described method.

[0039] Thirdly, this application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the above-described method.

[0040] The invention employing the above technical solution has the following advantages:

[0041] The technical solution provided in this application utilizes multiple corpora based on life support scenarios as training datasets to perform autoregressive training on the GPT2 model. This enables the trained GPT2 model to effectively perform human-computer interaction based on life support scenarios. Specifically, the trained GPT2 model can use the user's speech or text data as the corpus to be recognized and output the corresponding interaction results. Thus, human-computer interaction can be performed according to life support scenarios, which can be applied to life support for the elderly to provide convenient services to users. Attached Figure Description

[0042] This application can be further illustrated by the non-limiting embodiments given in the accompanying drawings. It should be understood that the following drawings only illustrate some embodiments of this application and should not be considered as limiting the scope. For those skilled in the art, other related drawings can be obtained from these drawings without any inventive effort.

[0043] Figure 1 This is a flowchart illustrating a human-computer interaction method based on life support provided in an embodiment of this application.

[0044] Figure 2 This is a schematic diagram of the framework of functional controls in the application provided in the embodiments of this application.

[0045] Figure 3 This is a schematic diagram of the main interface of the application provided in an embodiment of this application.

[0046] Figure 4 This is a schematic diagram of the login / registration interface of the application provided in this embodiment of the application.

[0047] Figure 5This is a schematic diagram of the contact list function interface of the application provided in this embodiment of the application.

[0048] Figure 6 A schematic diagram of the memo function interface of the application provided in this embodiment of the application. Detailed Implementation

[0049] The present application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that similar or identical parts are referred to by the same reference numerals in the drawings or description. Implementations not shown or described in the drawings are forms known to those skilled in the art. In the description of this application, terms such as "first" and "second" are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0050] This application provides an electronic device that may include a processing module and a storage module. The storage module stores a computer program, which, when executed by the processing module, enables the electronic device to perform corresponding steps in the following life support-based human-computer interaction method.

[0051] The electronic device can be, but is not limited to, smartphones, personal computers or other mobile terminals; no specific limitation is made here.

[0052] Please refer to Figure 1 This application also provides a human-computer interaction method based on life support, referred to as a human-computer interaction method. This human-computer interaction method can be applied to the aforementioned electronic devices. Understandably, the electronic device can have an application program installed, and the electronic device can utilize the installed application program to implement the various steps of the human-computer interaction method. The human-computer interaction method may include the following steps:

[0053] Step 110: Obtain the training dataset, which includes multiple corpus data based on life support scenarios, and each corpus data includes at least two related corpus contents spliced ​​together.

[0054] Step 120: Using the corpus data in the training dataset, perform autoregressive training on the GPT2 model to obtain the trained GPT2 model.

[0055] Step 130: Acquire the user's voice or text data through an electronic device as the corpus to be recognized;

[0056] Step 140: Input the corpus to be recognized into the trained GPT2 model in the application of the electronic device to obtain the interaction result output by the trained GPT2 model, the interaction result including the response content corresponding to the corpus to be recognized.

[0057] The following will elaborate on each step of the human-computer interaction method as follows:

[0058] In step 110, the training dataset is a large amount of corpus data prepared in advance based on the life support scenario. For example, the corpus in the training dataset is common Chinese chatting corpus. Among them, the corpus data in the training dataset can come from Xiaohuangji corpus, Douban corpus, TV drama dialogue corpus, Tieba forum reply corpus, Weibo corpus, Qingyun corpus, etc.

[0059] The amount of corpus data in the training dataset can be flexibly determined according to the actual situation. Generally speaking, the more the number of corpus in the training dataset, the more beneficial it is to improve the effectiveness of the interaction of the trained model. For example, the training dataset can include 500,000 Chinese chatting corpus, or 1,000,000 Chinese chatting corpus. Among the included Chinese chatting corpus, it can include the original corpus and preprocessing data of multi-turn conversations.

[0060] For example, in the training data, for the following multi-segment related corpus content, before training the model, the multi-segment related corpus content can be spliced as follows: "[CLS] Want to know the weather on your side [SEP] It rained heavily at noon [SEP] Is it still raining now [SEP] Yes, it's not heavy [SEP]". Then use the above splicing result as the input data for training the model, and let the model perform autoregressive training.

[0061] In step 120, using each corpus data in the training dataset to train the GPT2 model, a trained GPT2 (Generative Pre-Training 2) model can be obtained. After the model is trained, the GPT2 model can fit the life support scenario and have a conversation with the user according to the text content or voice content input by the user to achieve human-computer interaction.

[0062] In step 130, the corpus to be recognized can be the user's voice data or the text data input by the user. For example, the electronic device can collect the user's voice data through the microphone, and then convert the voice data into text data. Or the user can directly input text data using the touch display screen of the electronic device. Here, the method of obtaining the corpus to be recognized is not specifically limited.

[0063] In this embodiment, step 140 may include:

[0064] If there is unlabeled text in the text of the corpus to be recognized, each word in the unlabeled text is represented as u i , all the unlabeled text in the corpus to be recognized is represented as U = {u1, u2,..., u n};

[0065] Based on the first objective function of the prediction subtask of the trained GPT2 model in the application of the electronic device, predict the words corresponding to all unlabeled text U; since language has a natural ordering, the joint probability on the symbols is usually decomposed into the product of conditional probabilities P. The prediction subtask objective function is, i.e., the first objective function is:

[0066]

[0067] Wherein, the first objective function is used to predict the probability of the next word appearing after k words; k refers to the context window size; Θ refers to the standard language model, and the decoder of Θ is a Transformer, the first layer input of which is represented as:

[0068] h0=UW e +W p

[0069] Among them, W e Word embedding projection, W p This refers to the encoding of positional information. The Transformer's block structure has n layers, so the input vector h of the l-th layer... l Represented as:

[0070] h l =transformer_block(h l-1 V i ∈[1, n]

[0071] Where n is an integer greater than 1, and l is any integer from 1 to n; transformer_block refers to using the output of the previous layer as the input of this layer; the projection of the last output in the Transformer is expressed as:

[0072]

[0073] in, Transpose of the embedding projection of the representative term;

[0074] If the text in the corpus to be identified contains labeled text, then the labeled text is represented as: a sequence x of length m. 1 x 2 , ..., x m The label is y, and m is an integer greater than or equal to 1;

[0075] Based on the second objective function of the classification subtask of the trained GPT2 model, predict the word corresponding to the labeled text. The second objective function is expressed as:

[0076]

[0077] Wherein, the second objective function is used to, given x 1 x 2 , ..., x m Then, predict the probability of y; W represents the output of a sequence of length m after a Transformer block of length l; y This represents the classification label obtained by putting the sequence into the trained GPT2 model, wherein the classification accuracy of the trained GPT2 model is expressed as:

[0078]

[0079] The interaction result of the corpus to be identified is determined by using the overall objective function of the trained GPT2 model, wherein the overall objective function is expressed as: L3(C)=L2(C)+λL1(C).

[0080] Understandably, the first objective function aims to predict the probability of the next word appearing, given k words. The conditional probability P is modeled using a neural network with parameters Θ, trained using stochastic gradient descent. The GPT2 model uses a multi-layer Transformer decoder. This model applies a multi-head self-attention mechanism to the input context tags, generating an output distribution on the target tags through position-ordered feedforward layers. In the Transformer, the last output is projected using softmax logistic regression to obtain the probability P(U) of the predicted sentence.

[0081] In the overall objective function L3(C), λ is a constant that can be flexibly determined according to the actual situation. Understandably, using the overall objective function, labeled and unlabeled text in the corpus to be recognized can be identified, and the results can be combined to obtain the final interactive result.

[0082] After step 140, the method may further include:

[0083] The text of the interaction result is converted into speech output.

[0084] Understandably, electronic devices can use speakers to convert the text of the interaction results into speech output, thereby facilitating more intuitive human-computer interaction and improving the user experience. Of course, in other implementations, the text of the interaction results can be displayed as text on the electronic device's screen.

[0085] For example, when the user is an elderly person, the elderly person can use the intelligent dialogue function in the application of the electronic device to interact with the electronic device and achieve intelligent dialogue, and the dialogue style can be tailored to the elderly.

[0086] Before using an application on an electronic device to identify and detect a user's corpus of speech, the method may also include a process of designing the application.

[0087] Please refer to Figure 2 Developers can design the user interface for applications / software that support life hacking based on the Qt platform (originally a product of Qt Inc.). For example, they can design the user interface and add functional controls to closely match real user needs.

[0088] Based on the concept of life support, the developers can divide the main functions into intelligent chat, address book, memo, and login / registration functions. The interface design adopts a relative layout style to adapt to different screen sizes; the intelligent chat function uses the aforementioned human-computer interaction methods to recognize the user's intent and generate a dialogue strategy. This software focuses on casual conversation to provide companionship to the user; the address book is used to store the contact information of key contacts and provides an interface button for sending messages in emergencies; the memo module is designed to record to-do items for easy access by the user.

[0089] In this embodiment, the method may further include:

[0090] Upon receiving a screen navigation command, the current first screen is navigated to a second screen corresponding to the screen navigation command, based on a pre-created mapping relationship for screen navigation.

[0091] Before receiving the interface redirection instruction, the method may further include:

[0092] Create a mapping relationship between the first interface and the second interface.

[0093] Understandably, mappings between different interfaces can be pre-created within an application. For example, these mappings can be generated using methods such as defining page address pointers or triggering slots on the Qt platform.

[0094] For example, when implementing page navigation using defined interface address pointers, assume there are two interfaces, mainWin and aimWin. mainWin is the current interface, i.e., the first interface; aimWin is the interface to navigate to, i.e., the second interface. A pointer to the target page needs to be defined in the source file corresponding to mainWin.

[0095] In the header / source files of mainWin, you can set:

[0096] aimWin*aim;

[0097] The definition of the above statement must first include the header file of the target page. Here, aimWin is the class name representing the target interface, and *aim is a pointer to the address of the target interface. The above expression means that a pointer to the address of the target interface is defined in the header / source file of the current interface.

[0098] Furthermore, in the main function of mainWin, there is:

[0099] this->aim = new aimWin;

[0100] Here, `this` is a pointer that points to an object of a class, and `new` represents creating a new object. The above expression means that the address pointer of the target interface is assigned to `aim`, and `this` is used to point to it. That is, the address of the target interface becomes the object of the current interface, which can be called in the member functions of the class of the current interface.

[0101] The button trigger function corresponding to mainWin contains:

[0102] this->aim->show();

[0103] In this way, the mapping relationship between page jumps can be created, where show() is a function to display the interface.

[0104] It should be noted that in this embodiment, the mapping relationship between interface jumps can be designed first, and then the GPT2 model can be used for training to realize the intelligent dialogue function of the application.

[0105] Before acquiring a user's voice or text data via an electronic device as corpus to be recognized, the method further includes:

[0106] Create a user interface for logging into the application, the user interface including a first virtual button for user login and user registration.

[0107] Understandably, the application includes user registration, login, and logout functions. These functions can be centrally managed by the server. Users can register using a username and password, and the application's smart chat function can be set to be available only after registration and login. The login and registration interface is as follows... Figure 3As shown. Users can access the user login / registration interface by clicking the virtual "Login / Register" button (the first virtual button) on the electronic device's display screen. See also... Figure 4 This allows for subsequent login or registration operations.

[0108] In this embodiment, the method may further include:

[0109] Create a second virtual button in the user interface for adding contacts to the address book.

[0110] Please refer to the reference. Figure 3 and Figure 5 Understandably, to prepare for unforeseen circumstances, the application can include a contact list feature. Users can access this feature through various means, such as... Figure 3 The virtual "Contacts" button shown (which is also the second virtual button) leads to the Contacts interface. Within the Contacts interface, users can synchronously store emergency contact information into a local file on the electronic device, and then load the data from the file using a Qt list. All operations synchronously update the file content.

[0111] For example, when the application on an electronic device is used by an elderly person, they can make an emergency contact by dialing the corresponding mobile phone number that is reserved in their address book.

[0112] The application's communication function can set three parameter files to store the contact's name, phone number, and avatar path, respectively. The program loads the file content in the form of a vector storing pairs, and then converts it into the data format required by the Qt list for population.

[0113] The contacts app can include modules for adding, deleting, searching, and sending messages. The add contact module can be configured for single or batch addition, while the delete contact module can offer quick delete, single delete, batch delete, and block options. A screenshot of the contacts app's interface can be found here. Figure 5 .

[0114] In this embodiment, the method may further include:

[0115] Create a third virtual button in the user interface to serve as a memo.

[0116] Please refer to Figure 6The application can be configured with a memo function. This memo function can be implemented using a MySQL database, allowing the electronic device to synchronously save data changes to the database. This database uses the user's own database to enhance data security. User operations on memos can include adding, deleting, and viewing. The memo interface is as follows... Figure 6 As shown.

[0117] Based on the above design, this invention uses a database to manage user data, ensuring user data security; a deep learning model based on the GPT2 model is thoroughly trained on the Chinese dataset, making the Chinese dialogue more closely resemble the conversational style of Chinese people. Furthermore, the development approach based on the Qt framework has excellent cross-platform characteristics, and its modular features offer good reusability.

[0118] In this embodiment, the processing module can be an integrated circuit chip with signal processing capabilities. The processing module can be a general-purpose processor. For example, the processor can be a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0119] The storage module can be, but is not limited to, random access memory, read-only memory, programmable read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, etc. In this embodiment, the storage module can be used to store the corpus to be recognized, interaction results, and GPT2 model, etc. Of course, the storage module can also be used to store programs, which the processing module executes after receiving an execution instruction.

[0120] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the electronic device described above can be referred to the corresponding steps in the aforementioned method, and will not be elaborated further here.

[0121] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the life support-based human-computer interaction method as described in the above embodiments.

[0122] Based on the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by hardware or by using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as a personal computer, electronic device, or network device, etc.) to execute the methods described in the various implementation scenarios of this application.

[0123] In summary, this application provides a human-computer interaction method, electronic device, and storage medium based on life support. In this solution, multiple corpus data points based on life support scenarios are used as training datasets to perform autoregressive training on the GPT2 model. This enables the trained GPT2 model to effectively perform human-computer interaction based on life support scenarios. Specifically, the trained GPT2 model can use the user's voice or text data as the corpus to be recognized and output the interaction result corresponding to the corpus. Thus, human-computer interaction can be performed according to life support scenarios, which can be applied to life support for the elderly to provide convenient services to users.

[0124] In the embodiments provided in this application, it should be understood that the disclosed apparatus, systems, and methods can also be implemented in other ways. The apparatus, systems, and methods embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which includes one or more executable instructions for implementing a specified logical function. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0125] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A human-computer interaction method based on life support, characterized in that, The method includes: Obtain a training dataset, which includes multiple corpus data based on life support scenarios, and each corpus data includes at least two related corpus contents spliced ​​together; Using the corpus data in the training dataset, the GPT2 model is trained autoregressively to obtain the trained GPT2 model. Acquire users’ voice or text data through electronic devices as corpus to be recognized; The text to be identified is input into the trained GPT2 model in the application of the electronic device to obtain the interaction result output by the trained GPT2 model, the interaction result including the response content corresponding to the text to be identified; The text to be recognized is input into the trained GPT2 model in the application of the electronic device to obtain the interaction results output by the trained GPT2 model, including: If the text in the corpus to be identified contains unlabeled text, each word in the unlabeled text is represented as u. i All unlabeled text in the corpus to be identified is represented as U = {u1, u2, ..., u}. n }; Based on the first objective function of the prediction subtask of the trained GPT2 model in the application of the electronic device, predict the words corresponding to all unlabeled text U, whereby the first objective function is: Wherein, the first objective function is used to predict the probability of the next word appearing after k words; k refers to the context window size; Θ refers to the standard language model, and the decoder of Θ is a Transformer, the first layer input of which is represented as: h0=UW e +W p Among them, W e Word embedding projection, W p This refers to the encoding of positional information. The Transformer's block structure has n layers, so the input vector h of the l-th layer... l Represented as: h l =transformer_block(h l-1 )V i ∈[1,n] Where n is an integer greater than 1, and l is any integer from 1 to n; transformer_block refers to using the output of the previous layer as the input of this layer; the projection of the last output in the Transformer is expressed as: If the text in the corpus to be identified contains labeled text, then the labeled text is represented as: a sequence x of length m. 1 x 2 , ..., x m The label is y, and m is an integer greater than or equal to 1; Based on the second objective function of the classification subtask of the trained GPT2 model, predict the word corresponding to the labeled text. The second objective function is expressed as: Wherein, the second objective function is used to, given x 1 x 2 , ..., x m Then, predict the probability of y; W represents the output of a sequence of length m after a Transformer block of length l; y This represents the classification label obtained by putting the sequence into the trained GPT2 model, wherein the classification accuracy of the trained GPT2 model is expressed as: The interaction result of the corpus to be identified is determined by using the overall objective function of the trained GPT2 model, wherein the overall objective function is expressed as: L3(C)=L2(C)+λL1(C).

2. The method according to claim 1, characterized in that, The method further includes: Upon receiving a screen navigation command, the current first screen is navigated to a second screen corresponding to the screen navigation command, based on a pre-created mapping relationship for screen navigation.

3. The method according to claim 2, characterized in that, Before receiving the interface redirection instruction, the method further includes: Create a mapping relationship between the first interface and the second interface.

4. The method according to claim 1, characterized in that, Before acquiring a user's voice or text data via an electronic device as corpus to be recognized, the method further includes: Create a user interface for logging into the application, the user interface including a first virtual button for user login and user registration.

5. The method according to claim 4, characterized in that, The method further includes: Create a second virtual button in the user interface for adding contacts to the address book.

6. The method according to claim 4, characterized in that, The method further includes: Create a third virtual button in the user interface to serve as a memo.

7. The method according to any one of claims 1-6, characterized in that, The method further includes: The text of the interaction result is converted into speech output.

8. An electronic device, characterized in that, The electronic device includes a processor and a memory coupled together, the memory storing a computer program that, when executed by the processor, causes the electronic device to perform the method as described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Cloud ERP community generation type question and answer method based on GPT2

    CN115062003A