Data processing method and related device

By introducing preset parameters into the large language model and selecting target intent and conditional information, the problem of poor training performance of the large language model under complex intent and conditional types is solved, achieving higher accuracy and optimization capabilities.

CN121745103APending Publication Date: 2026-03-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Large language models perform poorly when faced with complex user intents and condition types, resulting in low accuracy of intent and condition information, and are difficult to optimize.

Method used

By simultaneously inputting the first input and preset parameters into the large language model, selecting the target intent and conditional information from the preset parameters, and employing knowledge augmentation, the intent recognition and slot filling processes are distinguished, thereby optimizing the training process of the large language model.

Benefits of technology

It improves the accuracy of large language models in recognizing target intent and conditional information, reduces inference latency, and can optimize for errors, thereby improving the overall performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121745103A_ABST
    Figure CN121745103A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and a related device, in the method, after a first device obtains a first input, the first input is sent to a second device for processing. And after receiving the first input, the second device inputs the preset data into the large language model, and compresses the preset data containing various kinds of information into the preset parameters through the large language model. And then, the second equipment inputs the first input and a preset parameter into a large language model, determines a target intention from one or more intentions contained in the preset parameter through the large language model, and obtains condition information corresponding to the target intention through the large language model. The first device can execute the target action according to the target intention and the condition information corresponding to the target intention so as to respond to the first input. Therefore, the obtained target intention can be predefined, the probability that the large language model outputs the non-predefined intention is reduced, and the accuracy of the output result of the large language model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence, and in particular, to a data processing method and related apparatus. BACKGROUND

[0002] A large language model (LLM) is a deep learning model trained from a large amount of text data, which can generate natural language text or understand the meaning of language text. Electronic devices such as smartphones and tablet computers can identify the user's intent from the user input and identify the conditional information (slot information) corresponding to the intent through the large language model. Then, the electronic device provides the user with corresponding services according to the identified conditional information to achieve the user's intent.

[0003] However, with the rapid development of technology, the functions that electronic devices can implement increase, thereby increasing the user's intent and making the conditional types (slot types) corresponding to the intent more complex. When facing complex intent and conditional types, the training effect of the large language model is poor, and the accuracy of the user's intent and / or conditional information identified by the electronic device through the large language model with poor training effect is low, thereby making it difficult to achieve the user's actual intent according to the intent and / or conditional information with low accuracy. SUMMARY

[0004] The data processing method and related apparatus provided by the embodiments of the present application input the first input and the preset parameters containing one or more intents and the conditional types corresponding to the one or more intents into the large language model at the same time, so that the target intent obtained by the large language model is one of the one or more intents defined in advance, and the conditional information obtained by the large language model satisfies the conditional types defined in advance, thereby improving the accuracy of the large language model in determining the target intent and the conditional information.

[0005] In a first aspect, the present application provides a data processing method applied to a first device, the method comprising:

[0006] obtaining a first input and sending the first input to a second device;

[0007] receiving a target intent and conditional information corresponding to the target intent from the second device, wherein the target intent and the conditional information corresponding to the target intent are obtained by the second device from the first input and preset parameters through a large language model, the preset parameters include one or more intents and conditional types corresponding to the one or more intents, the target intent is determined from the one or more intents based on the first input, and the conditional information corresponding to the target intent includes information determined from the first input and satisfying the conditional types corresponding to the target intent.

[0008] In the method, the first device processes the first input through the second device with more computing resources to obtain a target intent corresponding to the first input and condition information. The second device inputs the first input and preset parameters into the large language model at the same time, which is equivalent to knowledge enhancement for the large language model. The large language model is different from the existing scheme in that it generates a target intent based on learned knowledge, but selects a target intent from one or more intents contained in the preset parameters. Through the knowledge enhancement mode of selecting a target intent from one or more intents contained in the preset parameters, the second device can obtain a target intent with high accuracy through the large language model, solve the problem that the training effect of the large language model is poor when the number of intents and / or condition types is large, and improve the accuracy of extracting a target intent and condition information through the large language model.

[0009] In a possible implementation, the method further includes:

[0010] performing a target action according to the target intent and the condition information corresponding to the target intent, wherein the target action is used to respond to the first input.

[0011] In the method, the first device responds to the first input based on the target intent and the condition information. By mapping the first input to an intent and condition information corresponding to the intent, the first device can perform a corresponding action based on understanding the first input, thereby better providing services for the user.

[0012] In a possible implementation, the preset parameters include one or more of an intent description, an intent scene, a condition type, and a data format.

[0013] The intent description is used for the large language model to determine the target intent from the one or more intents that conforms to the first input.

[0014] The intent scene is used for the large language model to determine the target intent from the one or more intents, and the intent scene corresponding to the target intent conforms to a scene when the first device performs an action corresponding to the first input.

[0015] The data format is used to represent a data format of the target intent and the condition information corresponding to the target intent.

[0016] In a second aspect, the present application provides a data processing method applied to a second device, and the method includes:

[0017] receiving a first input from a first device;

[0018] input the first input and preset parameters into a large language model, obtain a target intent and condition information corresponding to the target intent through the large language model, wherein the preset parameters include one or more intents and condition types corresponding to the one or more intents, the target intent is determined from the one or more intents based on the first input, and the condition information corresponding to the target intent includes information determined from the first input and satisfying the condition type corresponding to the target intent;

[0019] send the target intent and the condition information corresponding to the target intent to the first device, wherein the target intent and the condition information corresponding to the target intent are used to instruct the first device to perform a target action, and the target action is used to respond to the first input.

[0020] In the above method, in the process of reasoning the target intent through the large language model, the first input and the preset parameters are input into the large language model. Since the number of preset parameters can be one or more, it is equivalent to selecting the target preset parameter corresponding to the first input from one or more preset parameters through the large language model, and then taking the intent corresponding to the target preset parameter as the target intent. Compared with the prior art in which the first input is input into the large language model and the large language model generates the target intent based on the learned knowledge, the prior art may have the problem that the generated target intent is not a pre-defined intent (for example, 50 intents are pre-defined, and the target intent generated by the large language model may be an intent other than the above 50 intents), which may cause the first device to be difficult to provide the service actually required by the user according to the non-pre-defined intent. The present application embodiment enhances the knowledge of the large language model by taking the pre-defined intent in the form of a preset parameter, so that the target intent generated by the large language model is one of the pre-defined intents, avoiding hallucination of the large language model.

[0021] In a possible implementation, the inputting the first input and the preset parameters into the large language model, and obtaining the target intent and the condition information corresponding to the target intent through the large language model includes:

[0022] inputting the first input and the preset parameters into the large language model, and outputting the target intent through the large language model;

[0023] obtaining M condition types corresponding to the target intent from the preset parameters, wherein M is an integer greater than or equal to 1;

[0024] determining the condition information corresponding to the target intent based on the M condition types through the large language model.

[0025] In the above method, in the embodiments of the present application, the second device first determines the target intent through the large language model, then obtains the condition type based on the target intent, and finally fills the slot of the obtained condition type through the large language model to obtain the condition information corresponding to the target intent. Compared with the prior art scheme of inputting the first input into the large language model and directly generating the target intent and the condition information corresponding to the target intent through the large language model, the embodiments of the present application distinguish the process of intent recognition (i.e., generating the target intent) through the large language model and the process of slot filling (i.e., generating the condition information corresponding to the target intent) through the large language model. Since the large language model is equivalent to a black box in the reasoning process, only the input data (such as the first input) and the output result (such as the target intent and the corresponding condition information) are displayed, and when the result output by the large language model is incorrect, it is impossible to determine which step in the reasoning process of the large language model has a problem, and it is also impossible to optimize the large language model based on the problem. The embodiments of the present application distinguish the process of intent recognition and the process of slot filling, and when the result output by the large language model is incorrect, it can be determined that the large language model has an error in the process of intent recognition and / or in the process of slot filling. Therefore, the large language model can be optimized according to the problem to improve the accuracy of the large language model.

[0026] In a possible implementation, the determining, by the large language model, of the condition information corresponding to the target intent based on the M condition types comprises:

[0027] The first input and the M condition types are respectively grouped into M pieces of spliced information, wherein the Jth piece of spliced information in the M pieces of spliced information comprises the first input and the Jth condition type in the M condition types, and J is a positive integer less than or equal to M;

[0028] The M pieces of spliced information are simultaneously input into the large language model, and the large language model outputs M pieces of condition information corresponding to the target intent, wherein the M pieces of condition information corresponding to the target intent correspond to the M condition types one by one.

[0029] In the above method, the first input and the condition type are grouped into spliced information, which is equivalent to forming a known slot system, and then the condition type in the formed slot system is filled through the large language model to obtain the condition information corresponding to the condition type. Since the condition type that needs to be filled by the large language model is input into the large language model by the second device, the large language model will not autonomously generate the condition type based on the learned knowledge, but can directly extract the condition information satisfying the condition type from the first input, thereby avoiding the problem of the large language model reasoning out the condition type that does not match the target intent.

[0030] Furthermore, the second device simultaneously inputs M concatenated pieces of information into the large language model. Parallel processing of these M pieces of information by the large language model allows it to fill slots based on the condition types contained within them, thereby minimizing the possibility of the large language model exhibiting illusions (e.g., inferring condition types that do not match the target intent). This reduces the probability of generating incorrect intents and condition types through the large language model. On the other hand, since the large language model typically infers only one token at a time, and its inference latency (i.e., the total time required for the large language model to infer the result) is the sum of the first token inference latency and the all-total token prediction latency, this embodiment of the application reduces inference latency to some extent by performing parallel inference on multiple condition types using the large language model.

[0031] In one possible implementation, before inputting the first input and preset parameters into the large language model, the method further includes:

[0032] Preset data is input into the large language model, which then compresses the preset data into preset parameters. The preset parameters include one or more of the following: intent descriptions corresponding to the one or more intents, intent scenarios corresponding to the one or more intents, and data formats. The intent descriptions are used by the large language model to determine the target intent that matches the first input from the one or more intents. The intent scenarios are used by the large language model to determine the target intent from the one or more intents. The intent scenarios corresponding to the target intent match the scenario when the first device performs the action corresponding to the first input. The data formats are used to represent the target intent and the conditional information corresponding to the target intent.

[0033] In the above method, the preset data can be understood as a predefined standardized instruction set. The large language model needs to map the first input to this predefined standardized instruction set to infer the machine language that the first device can understand. Since the preset data contains a large amount of data, if the second device directly inputs the preset data into the large language model during the inference of the target intent, it may consume a large amount of memory and affect the inference speed of the large language model. Therefore, compressing the preset data into preset parameters can reduce memory usage and improve the inference speed of the large language model. The large language model can select the target intent that matches the first input from one or more intents after understanding the meaning of the intent description. Furthermore, after learning the intent scenarios corresponding to one or more intents, the large language model can identify the scenario corresponding to the first input and select the target intent that satisfies the scenario corresponding to the first input.

[0034] In one possible implementation, prior to receiving the first input from the first device, the method further includes:

[0035] The second input and the preset parameters are used as inputs to the large language model, and the first intent is used as outputs to train the large language model to obtain a first large language model. The first large language model is used to determine the target intent corresponding to the first input. The first intent is the intent corresponding to the second input among one or more intents included in the preset parameters.

[0036] The first large language model is trained by taking the second input and the condition type corresponding to the first intent as inputs and the condition information corresponding to the first intent as outputs. The trained large language model is obtained by training the first large language model, wherein the condition information corresponding to the first intent is the information in the second input that satisfies the condition type corresponding to the first intent.

[0037] In the methods described above, when the number of intents and / or condition types is large, the amount of training data used to train the large language model is also large, which may lead to poor training performance of the large language model, resulting in lower accuracy in intent recognition and / or condition type slot filling. Therefore, in this embodiment, preset parameters are input into the large language model for training, so that the trained large language model determines the target intent from one or more intents included in the preset parameters, rather than determining the target intent based on learned knowledge. Furthermore, the trained large language model determines condition information based on the condition types included in the preset parameters, rather than generating condition types first and then extracting condition information based on learned knowledge. Therefore, even with a large number of intents and / or condition types, the large language model still possesses good intent recognition capabilities, which can improve the training effect of the large language model.

[0038] In one possible implementation, before using the second input and the preset parameters as inputs to the large language model, the method further includes:

[0039] The preset data is input into the large language model, and the preset data is compressed into the preset parameters by the large language model.

[0040] Thirdly, an electronic device is provided in the embodiments of this application, the electronic device comprising: one or more processors and one or more memories; wherein, the one or more memories are coupled to the one or more processors, the one or more memories are used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the electronic device to perform the data processing method described in any possible implementation of the first or second aspect.

[0041] Fourthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the data processing method described in any possible implementation of the first or second aspect. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.

[0042] In one possible implementation, the chip or chip system described above in the embodiments of this application further includes at least one memory, which stores instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).

[0043] Fifthly, embodiments of this application provide a computer storage medium storing a computer program that, when executed by a processor, causes the computer to perform a data processing method as described in any possible implementation of the first or second aspect.

[0044] Sixthly, embodiments of this application provide a computer program product that, when run on a communication device, causes the communication device to perform a data processing method as described in any possible implementation of the first or second aspect.

[0045] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description

[0046] The accompanying drawings used in the embodiments of this application are described below.

[0047] Figure 1 This is a schematic diagram of the architecture of a data processing system provided in an embodiment of this application;

[0048] Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application;

[0049] Figure 3 This is a flowchart illustrating the generation of a target intent, provided in an embodiment of this application.

[0050] Figure 4 This is a flowchart illustrating the generation of condition information provided in an embodiment of this application;

[0051] Figures 5A to 5E This is a schematic diagram of the interface of a set of voice assistants provided in an embodiment of this application;

[0052] Figure 6 This is a schematic diagram of a data processing method provided in an embodiment of this application;

[0053] Figure 7This is a flowchart illustrating a method for training a large language model, as provided in an embodiment of this application.

[0054] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0055] Figure 9 This is a software structure block diagram of a first device provided in an embodiment of this application. Detailed Implementation

[0056] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.

[0057] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0058] To more clearly describe the solution of this application, some of the terms used in this application will be explained below.

[0059] 1. Intent: refers to the main purpose or need expressed by the user in the conversation, that is, the target action that the electronic device needs to perform.

[0060] For example, if the user inputs "play XX song by XX artist", then the electronic device responds to the user input by performing the target action of playing the song, that is, the user's intention is to play the song.

[0061] 2. Intent recognition: This refers to the electronic device obtaining the target action to be performed from the user's input. For example, in the embodiments of this application, the electronic device obtains the target action to be performed from the user's input through a large language model.

[0062] 3. Condition information: also known as slot information, refers to the specific information or parameters required to achieve the intent, which can be used to further refine the user's request.

[0063] For example, taking the user's intent to play a song as an example, the corresponding condition type (i.e., slot type) includes one or more of the following: song name, artist, album, language, etc. The more types of condition types there are, the more precise the service the electronic device can provide to the user, thus better fulfilling the user's intent.

[0064] For example, taking the user input as "play XX song by XX artist", the electronic device can use "XX artist" as the condition information corresponding to the condition type "artist" during the slot filling process, and can also use "XX song" as the condition information corresponding to the condition type "song title". Slot filling refers to the process of extracting specific values ​​that conform to the condition type from the user input. For example, in this embodiment, the electronic device can extract the condition information corresponding to the condition type from the user input using a large language model for slot filling.

[0065] To facilitate understanding of the embodiments of this application, the specific technical problems to be solved by this application will be analyzed and proposed below.

[0066] Typically, electronic devices require a large amount of training data to train a large language model, enabling it to recognize intents and fill in slots. When the number of intents and / or condition types is large, the amount of training data used to train the large language model is also large, which may lead to poor training performance and consequently lower accuracy in intent recognition and / or slot filling.

[0067] For example, taking mobile phones and other electronic devices as an example, when the services a mobile phone can provide to a user are limited to basic services such as making calls and sending text messages, the types of intents the user needs to fulfill are relatively few, and the number of corresponding condition types is also relatively small. For example, in the condition types corresponding to the intent "make a call," the condition types include one or more of the following: phone number, contact name, etc. It can be seen that the number of condition types is small, so the training data required to train the large language model is small, resulting in good training performance. However, with the development of technology, mobile phones can provide users with more and more complex services, leading to an increase in the types of intents users need to fulfill. Furthermore, to provide users with more precise services, it is necessary to increase the number of condition types corresponding to the intents, thereby extracting as much conditional information as possible from the user input to refine the user's request. In this case, the training data required to train the large language model is large, which may lead to poor training performance. Mobile phones using poorly trained large language models to generate intent and / or conditional information based on user input often have low accuracy. For example, the intent generated by the large language model may be inaccurate, leading to inaccurate conditional types and consequently inaccurate conditional information obtained from inaccurate conditional types. Furthermore, the number of conditional types obtained by the large language model may not match the number of predefined conditional types corresponding to the intent, potentially resulting in conditional information obtained based on conditional types failing to fulfill the user's intent.

[0068] After acquiring a trained Large Language Model (LLM), the electronic device responds to user input by feeding the user input into the LLM. The electronic device then uses the LLM to perform contextual understanding of the user input, generating the user's intent and the conditional information needed to achieve that intent. When the user input contains content belonging to a vertical knowledge system already learned by the LLM, it may cause the LLM to generate a false intent, resulting in the generation of non-predefined intents and / or conditional types.

[0069] For example, the knowledge learned by the large language model includes intents and condition types related to playing music. That is, the large language model can identify the intent to play music and the condition information corresponding to the condition type "song name" from user input. So, when the user input includes "song name," the intent recognition result of the large language model might be to play music. For example, if the user inputs "What is 'The Foolish Old Man Who Moved Mountains'?", the user's actual intent is for the electronic device to explain the idiom "The Foolish Old Man Who Moved Mountains." However, "The Foolish Old Man Who Moved Mountains" is also a song name. The electronic device might use the large language model to recognize the user's intent as playing the song and then explain the meaning of "The Foolish Old Man Who Moved Mountains" by playing the corresponding song. Therefore, in this case, the large language model is experiencing an illusion; the recognized intent and condition type are not predefined but rather what the large language model considers correct and reasonable, resulting in inaccurate generated intent or condition information.

[0070] Furthermore, electronic devices typically generate conditional information corresponding to intent and condition type in a single, end-to-end manner. This end-to-end approach means the large language model treats the entire process as a whole, directly obtaining the final result (conditional information corresponding to intent and condition type) from the raw data (user input) without involving independent intermediate steps; therefore, the large language model is essentially a black box. During optimization of the large language model, because this black box doesn't reveal the specific processing steps, it's impossible to determine which step in the large language model's data processing went wrong when the output is incorrect, making targeted optimization difficult. This results in high optimization difficulty for large language models, impacting their output results.

[0071] To address the aforementioned issues, this application provides a data processing method. After receiving a first input, a first device can send the first input to a second device. The second device inputs the received first input and preset parameters into a large language model, and selects the target intent corresponding to the first input from one or more intents included in the preset parameters. Then, the second device obtains the condition type corresponding to the target intent from the preset parameters, and inputs the first input and the condition type corresponding to the target intent into the large language model, determining the condition information that satisfies the condition type from the first input. After determining the target intent and the corresponding condition information, the second device sends the target intent and the corresponding condition information to the first device. Thus, the second device simultaneously inputs the first input and preset parameters into the large language model, effectively performing knowledge enhancement on the large language model. Unlike existing solutions that generate target intents based on learned knowledge, the large language model selects the target intent from one or more intents included in the preset parameters. By using a knowledge augmentation method that selects the target intent from one or more intents included in preset parameters, the second device can obtain the target intent with high accuracy through the large language model. This solves the problem that the training effect of the large language model is poor when the number of intents and / or condition types is large, and improves the accuracy of extracting target intent and condition information through the large language model.

[0072] The system architecture used in the embodiments of this application is described below. It should be noted that the system architecture and business scenarios described in this application are for the purpose of more clearly illustrating the technical solutions of this application, and do not constitute a limitation on the technical solutions provided in this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in this application are also applicable to similar technical problems.

[0073] Please see Figure 1 , Figure 1 This is a schematic diagram of the architecture of a data processing system provided in an embodiment of this application. Figure 1 As shown, the data processing system includes a first device 101 and a second device 102, which are communicatively connected.

[0074] The first device 101 has the ability to interact with users, including but not limited to mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) and virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. The type of the first device 101 is not limited in this application embodiment.

[0075] For example, during interaction with a user, the first device 101 can receive a first input from the user and then send the first input to the second device 102. The data type of the first input includes voice data or text data. For instance, the first input could be voice data collected by the first device 101 through a microphone or other sound-receiving device. When the first input is voice data, the first device 101 can first convert the voice data into text data and then send the converted text data to the second device. Another example is that the first input could be text data manually entered by the user and received by the first device 101. Yet another example is that the first input could be a question statement selected and confirmed by the user from multiple question statements displayed by the first device 101, where the question statement is used by the first device to inquire of the user about the target action that the first device needs to perform.

[0076] The second device 102 is a device with data processing capabilities, such as a cloud server. When the second device 102 is a server, it can be a single server, a server cluster or distributed system composed of several servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud computing, cloud storage, big data and artificial intelligence platforms. There are no restrictions here.

[0077] For example, the second device 102 receives a first input from the first device 101, identifies the target intent corresponding to the first input and the condition information corresponding to the target intent from the first input, and then returns the determined target intent and the condition information corresponding to the target intent to the first device 101.

[0078] In one implementation, the second device 102 inputs preset data into a large language model and outputs preset parameters through the large language model. The preset data includes intent name, intent description, intent scenario, and data format, while the preset parameters are tokens output by the large language model. Essentially, the second device 102 compresses the preset data containing various information into preset parameters through the large language model, saving memory and improving computational speed when the large language model infers the target intent based on the preset parameters. Then, the second device 102 inputs the first input and the preset parameters into the large language model, and determines the target intent corresponding to the first input from one or more intents contained in the preset parameters. The second device 102 determines the condition type corresponding to the target intent from the preset parameters, inputs the first input and the condition type into the large language model, and extracts the condition information that satisfies the condition type from the first input through the large language model.

[0079] The methods of the embodiments of this application will be described in detail below.

[0080] Please see Figure 2 , Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application. The method is applied to, for example... Figure 1 The data processing system shown. (For example...) Figure 2 As shown, the method includes, but is not limited to, the following steps:

[0081] Step S201: The second device receives the first input from the first device.

[0082] Specifically, after receiving the first input, in order to determine the intent corresponding to the first input in a short time, the first device can send the first input to a second device with more computing resources, such as sending the first input to a cloud-based server. After receiving the first input, the second device can process the first input according to step S202. For a more detailed description of the first input, please refer to... Figure 5A The description of the first input in the corresponding embodiments will not be repeated here.

[0083] For example, the second device can provide intent recognition and slot filling services to the first device through an application programming interface (API). The first device can send a first input to the second device through the API provided by the second device, and then the second device processes the received first input according to step S202.

[0084] In step S202, the second device inputs the first input and preset parameters into the large language model, and obtains the target intent and the corresponding conditional information through the large language model.

[0085] Among them, the Large Language Model (LLM) is a deep learning model trained on a large amount of text data, which can generate natural language text or understand the meaning of language text. Therefore, the embodiments of this application can use the LLM to understand the meaning of the first input, and then infer the target intent corresponding to the first input, as well as the conditional information required by the first device to achieve the target intent.

[0086] Specifically, the preset parameters include one or more pre-set intents and corresponding condition types. The second device inputs the first input and the preset parameters into the large language model, and can select the target intent corresponding to the first input from the one or more intents included in the preset parameters through the large language model. After the second device determines the target intent, it can also obtain information on the condition types that satisfy the target intent from the first input through the large language model, that is, the condition information corresponding to the target intent.

[0087] The following will be based on Figure 3 and Figure 4 This section details the process by which the second device uses a large language model to determine the target intent and the corresponding conditional information.

[0088] Please see Figure 3 , Figure 3 This is a flowchart illustrating the generation of a target intent, as provided in an embodiment of this application. Figure 3 As shown, the flowchart includes steps S2021 to S2022, as detailed below.

[0089] Step S2021: The second device determines the preset parameters.

[0090] Since the first input is usually a natural expression, it needs to be converted into machine language so that the first device can understand its meaning. Therefore, this application embodiment predefines a standardized instruction set. The first device can map the first input to the predefined standardized instruction set through a large language model deployed on the second device. The large language model infers machine language that the first device can understand, thereby enabling the first device to understand the first input and execute the action corresponding to the instruction.

[0091] The predefined, standardized instruction system can be understood as a system of intents and their corresponding condition types. For example, an intent represents the target action that a first device needs to perform; it can be understood as a service that the first device can provide to the user. Therefore, when defining an intent, the service that the first device can provide to the user, or the action that the first device can perform, can be used as the name of the intent. For example, taking a mobile phone as the first device, the services a mobile phone can provide to the user include, but are not limited to, playing music for the user, checking the weather for the user, and so on. Therefore, when defining an intent, playing music or checking the weather can be used as the intent name in the instruction system.

[0092] Since conditional information is the specific information or parameters required for the first device to execute the target action, the first device needs to extract conditional information from the first input to realize the intent. The first input may contain various types of conditional information. Therefore, to distinguish different types of conditional information and obtain more refined conditional information, the conditional type corresponding to the intent can be defined based on the intent name and the first device's business process. This facilitates the large language model in extracting conditional information that satisfies the conditional type from the first input. For example, taking the intent name "check the weather," since the first device needs to query the weather conditions corresponding to a specific location for the user, the location information is the specific information required for the first device to execute the "check the weather" action. The location (e.g., province, city, scenic spot) can be preset as the conditional type corresponding to the "check the weather" intent, so that the first device can obtain the conditional information to execute the "check the weather" action.

[0093] The preset data includes content from the predefined standardized instruction system. Specifically, the preset data includes one or more of the following: intent name, intent description, intent scenario, condition type corresponding to the intent, and data format. For example, when there are N sets of preset data, and N is an integer greater than or equal to 1, any set of preset data in the N sets includes one or more of the following: intent name, intent description, condition type, and data format corresponding to that set of preset data. The intent description and intent scenario can be understood as prompts for the large language model. The large language model can determine the meaning of the intent based on the intent description and determine the scenario in which the first device executes the intent based on the intent scenario. Therefore, the large language model can select the target intent that matches the first input from one or more intents after understanding the meaning of the intent based on the intent description. Furthermore, after learning the intent scenarios corresponding to one or more intents, the large language model can identify the scenario corresponding to the first input and thus select the target intent that satisfies the scenario corresponding to the first input.

[0094] For example, taking the intent name "check the weather" as an example, the corresponding intent description could be "Provide a service to check weather information. Users can use preset data to obtain weather data, including but not limited to temperature, humidity, wind force, etc., at a specific time and place based on conditions such as city, date, weather type, and time." Therefore, the large language model can determine the meaning of the intent "check the weather" based on the above intent description.

[0095] The intent named "Check Weather" corresponds to an intent scenario where "a user needs to obtain real-time weather conditions for a certain location. This user can use preset parameters to perform a query by providing conditions such as city, date, weather type, and time. For example, a user might want to know the current temperature, humidity, and wind speed in Beijing." Therefore, the large language model can determine the scenario corresponding to the "Check Weather" action based on these intent scenarios.

[0096] The condition types corresponding to the intent name "Query Weather" include, but are not limited to, "City," "Date," "Weather Type," and "Time." Specifically, the condition description for the "City" condition type is "The user needs to provide the city name for the weather query," the "Date" condition type is "The user needs to provide the date for the weather query," the "Weather Type" condition type is "The type of weather the user wants to query," and the "Time" condition type is "The user needs to provide the time for the weather query." Therefore, the large language model can determine the condition types corresponding to the intent "Query Weather" and the meaning of each condition type based on these condition types.

[0097] Data formats include, but are not limited to, text and JSON structures. When the target intent is "check the weather", the large language model can determine the data format corresponding to the target intent and the condition information corresponding to the target intent based on the data format.

[0098] As described above, since the preset data contains a large amount of data, if the second device directly inputs the preset data into the large language model during the inference of the target intent, it may consume a large amount of memory and affect the inference speed of the large language model. Therefore, in this embodiment, N sets of preset data can be compressed into N preset parameters to reduce memory usage and improve the inference speed of the large language model.

[0099] For example, the second device inputs N sets of preset data into a large language model, where each set of preset data corresponds to data related to N intents. The large language model then vectorizes each set of preset data to obtain N tokens. Each of the N tokens corresponds one-to-one with one of the N sets of preset data, and the resulting tokens can be used to represent compressed information of the preset data, i.e., the preset parameters corresponding to the embodiments of this application.

[0100] For example, please refer to Table 1, which is a preset parameter table provided in an embodiment of this application. As shown in Table 1, the preset data includes preset data 1, preset data 2, preset data 3 to preset data n. The preset data is a system of predefined intentions and corresponding condition types based on actions that the first device can perform. The system of intentions and corresponding condition types includes, but is not limited to, intention name, intention description, intention scenario, corresponding condition type, and data format. For example, preset data 1 includes, but is not limited to, intention... Figure 1 Intended name, meaning Figure 1 Intent description, meaning Figure 1 Intent scenario, meaning Figure 1 Corresponding condition types, meaning Figure 1 Data format, etc.

[0101] Table 1

[0102]

[0103] In one possible implementation, the second device can vectorize the preset data using a vectorized large language model (Embedding). Vectorization refers to mapping high-dimensional discrete data (preset data) to a low-dimensional continuous space, thereby compressing and reducing the dimensionality of the data to achieve a vector representation of the text (preset data). The preset parameters after vector representation are easier for the computer to process and analyze compared to the preset data before vector representation. For example, the second device inputs preset data 1, preset data 2, preset data 3 to preset data n shown in Table 1 into the vectorized large language model, and the vectorized large language model outputs token1 (preset parameter 1), token2 (preset parameter 2), token3 (preset parameter 3) to token n (preset parameter n) respectively, thereby achieving compression and dimensionality reduction of the preset data.

[0104] In step S2022, the second device inputs the first input and preset parameters into the large language model and outputs the target intent through the large language model.

[0105] Specifically, the second device inputs both the first input and the preset parameters into the large language model, which can make the preset parameters serve as knowledge enhancement in the intent recognition process of the large language model. This results in the target intent output by the large language model being one of one or more predefined intents (e.g., one of one or more intents contained in the preset parameters), rather than the intent generated by the large language model based on the knowledge it has already learned.

[0106] For example, the second device inputs preset parameters (such as preset parameters 1, 2, 3 to n shown in Table 1), system prompts, and user prompts containing the first input into the large language model, so that the large language model determines the target intent corresponding to the first input from the intents contained in preset parameters 1 to n based on the system prompts and user prompts.

[0107] System prompts are typically used to set the context of a dialogue, provide guidance, or define rules. For example, in intent recognition within a large language model, system prompts might include the following context: You are an assistant capable of understanding the dialogue process and extracting target intent and corresponding conditional information. I will provide you with two rounds of historical dialogue content and extraction results, represented by the fields "User Input," "Historical Status," and "Historical Responses."

[0108] Furthermore, the system prompts can also include descriptions and corresponding rules for the three fields: "user input," "historical status," and "historical replies." For example, "user input" represents the received user's message. For instance, "user input" could be "Play XX song in AA language."

[0109] For example, "historical status" refers to the target intent and condition information determined from the "user input" field and output in a fixed format.

[0110] The format requirement for the "Historical Status" field in the system prompt is: Intent Name (Condition Type 1 = Condition Information 1, Condition Type 2 = Condition Information 2, Condition Type 3 = Condition Information 3, ..., Condition Type n = Condition Information n). The intent name in the format requirement corresponds to the intent name generated based on the "user input". Condition Type 1, Condition Type 2, Condition Type 3, Condition Type n, etc., are the possible condition types for this target intent. Condition Information 1, Condition Information 2, Condition Information 3, Condition Information n, etc., are the specific information extracted from the original user input that conforms to the condition type. It should be noted that if a condition type has no specific value, the corresponding condition information is represented by the character "None". The number of condition types corresponding to an intent can be greater than or equal to 0. For example, when the first device can execute the corresponding action based on the intent, the intent has no corresponding condition type. For instance, when the intent is "Power off", the first device can directly execute the power off action based on the intent "Power off" without relying on specific condition information.

[0111] Taking the user input "Play XX song in language AA" as an example, the second device, through a large language model, generates the target intent "Play song" based on the above user input. The condition types corresponding to the intent "Play song" include, but are not limited to, song name, artist, album, and language. The condition information extracted from "Play XX song in language AA" that matches the condition type "Song Name" is "XX song". Since there is no specific condition information for the condition type "Artist" in the user input, it is represented by the character "None". Similarly, there is no specific condition information for the condition type "Album" in the user input, so it is represented by the character "None". Finally, the condition information extracted from "Play XX song in language AA" that matches the condition type "Language" is "Academic language". That is, when the "user input" is "play XX song in AA language", the target intent and the corresponding condition information generated by the large language model can be represented as: play song (song name = XX song, artist = None, album = None, language = AA language).

[0112] For example, "historical replies" refers to the replies displayed to the user based on the "user input" and "historical status" fields. For instance, taking "play XX song in AA language" as an example, the "historical replies" could be: Okay, "XX song" has been played for you.

[0113] Furthermore, in order to enable the large language model to generate the target intent and corresponding conditional information based on the first input, the system prompt can also include the following information: Now I will give you two rounds of "user input", "historical status" and "historical response", as well as the latest round of "user input" received by the first device (i.e., the first input). Based on the latest "user input", you need to help me extract and generate the latest "historical status".

[0114] In addition to the system prompts mentioned above, the second device can also input user prompts into a large language model, enabling the large language model to generate the target intent and its corresponding conditional information based on the rules in the system prompts.

[0115] For example, the user prompt word includes input received by the first device from the user or other electronic devices, such as the first input. Since there may be some correlation between multiple rounds of first input received by the first device within a certain period of time, the user prompt word may include not only the first input received by the first device in the latest round, but also the first inputs from previous rounds, so that the large language model can perform contextual understanding on the first inputs from multiple rounds, thereby obtaining a more accurate target intent and its corresponding conditional information.

[0116] For example, the "user input", "historical status" and "historical response" corresponding to the first input in the first round included in the user prompt can be: "User input: one-quarter; Historical status: audio progress rewind (percentage = None, rewind duration = None, score = one-quarter); Historical response: Okay, one-quarter rewind has been completed".

[0117] For example, the "user input", "historical status" and "historical reply" corresponding to the second round of first input included in the user prompt can be: "User input: Can you check the air quality index in Nanjing tomorrow? Historical status: Check air quality index (city = Nanjing, county = None, district = None, province = None, attraction = None, time = tomorrow); Historical reply: Okay, air quality index: 100, UV index: 5, suitable exercise index: 50".

[0118] For example, the user prompt might include the latest round of first input, which corresponds to the user input "Check the weather again." It can be seen that "Check the weather again" is a continuation of the dialogue based on the previous round of first input (i.e., the second round of first input). The large language model needs to obtain conditional information related to the latest round of first input based on the previous round's first input. Therefore, if the time interval between multiple rounds of first input received by the first device is less than or equal to a time threshold, all received rounds of first input can be input into the large language model as user prompts. This allows "historical status" and "historical replies" to be used as prompts, and also enables the large language model to perform contextual understanding of the multiple rounds of first input to obtain the target intent corresponding to the latest round of first input.

[0119] The following example, using "Check the weather again" as the first input, illustrates the process by which the second device infers the target intent using a large language model. First, the second device uses the large language model to calculate attention based on the system prompts and user prompts, resulting in a series of cached key-value pairs.

[0120] The attention mechanism mimics the internal processes of biological observation, aligning internal experience with external senses to increase the precision of observation in specific areas. It can quickly filter high-value information from a large amount of data using limited attentional resources. The attention mechanism can rapidly extract important features from sparse data and is therefore widely used in natural language processing tasks. The attention function can be described as mapping a query to a series of key-value pairs. By calculating the similarity or relevance between the query and the key, a weight coefficient is obtained for each key's corresponding value. Finally, the values ​​are weighted and summed based on these weight coefficients to generate the attention value. Conceptually, attention can be understood as selectively filtering a small amount of important information from a large amount of data and focusing on this important information, while ignoring most of the unimportant information. Therefore, attention calculations can filter high-value information from system prompts and user prompts, and then predict the output vector of the next character.

[0121] Finally, the large language model calculates the argmax probability based on the predicted vectors to obtain the final string output. The argmax function in machine learning is primarily used to find the class with the highest predicted probability. Through training, the large language model learns the structure and patterns of language, enabling it to generate or complete text. When generating text, the large language model considers all possible words and calculates the probability of each word. Using the argmax method, the large language model can select the word with the highest probability as the output, thus ensuring that the generated text conforms as closely as possible to the rules and conventions of the language.

[0122] Furthermore, for large language models, a single response (of length N) is typically output based on the received text. However, the large language model performs N inference steps during its reasoning process. That is, the large language model outputs only one token per inference step, which is then concatenated with the input tokens and used as the input for the next inference step. This process is repeated until a terminator is encountered or the length of the response reaches a pre-set length threshold.

[0123] During the training of the large language model, some characters are inserted to allow the model to learn to a certain level. For example, inserting the character "EOS" (a pre-defined terminator) allows the large language model to learn that the multiple output tokens already constitute a complete sentence or a final result. Therefore, during reasoning, the large language model can perceive whether the current output is a complete sentence based on its learned knowledge. If it is a complete sentence, it can infer the character "EOS". If it is not a complete sentence, the large language model appends the current output token to the end of the input as the input for the next inference. For example, if the current input is n1, n2, n3, n4…nn, and the large language model infers token nn+1 without inferring the character "EOS", then the next input for the large language model can be n1, n2, n3, n4…nn, nn+1, until the character "EOS" is inferred. When the large language model infers the character "EOS", it can output all the inferred tokens as the result. For example, the result (i.e., the target intent) generated by the large language model for "check the weather again" can be "query the weather".

[0124] In one possible implementation, when the first input contains multiple intents, the large language model can also generate multiple target intents. For example, if the first input is "check today's weather and then record the temperature in a memo", then the second device can obtain the target intents corresponding to the first input as "check the weather" and "record a memo" through the large language model.

[0125] It should be noted that in the process of reasoning the target intent through the large language model in this embodiment, both the first input and the preset parameters are input into the large language model. Since the number of preset parameters can be one or more, it is equivalent to selecting the target preset parameter corresponding to the first input from one or more preset parameters through the large language model, and then using the intent corresponding to the target preset parameter as the target intent. Compared with the existing solution, where the first input is input into the large language model and the large language model generates the target intent based on the learned knowledge, the existing solution may have the problem that the generated target intent is not a predefined intent (for example, if 50 intents are predefined, the target intent generated by the large language model may be an intent other than the above 50 intents), which may cause the first device to be unable to provide the service that the user actually needs based on the non-predefined intent. In this embodiment, the predefined intent is used as knowledge enhancement of the large language model in the form of preset parameters, so that the target intent generated by the large language model is one of the predefined intents, avoiding the large language model from generating illusions.

[0126] The above Figure 3 The process of generating target intent using a large language model by the second device was introduced. The following will be based on... Figure 4 This section describes the process by which the second device generates conditional information corresponding to the target intent using a large language model.

[0127] Please see Figure 4 , Figure 4 This is a flowchart illustrating the generation of conditional information provided in an embodiment of this application. For example... Figure 4 As shown, the flowchart includes steps S2023 to S2025, as detailed below.

[0128] S2023, the second device obtains the condition type corresponding to the target intent from the preset parameters.

[0129] Specifically, after the second device determines the target intent using a large language model, it can retrieve the condition type corresponding to the target intent from preset parameters. Since the preset parameters are vectors compressed from preset data using a large language model, the preset data contains various types of data before compression, such as the intent and its corresponding condition type. The second device can directly retrieve the condition type corresponding to the target intent from the preset data corresponding to the preset parameters. For example, Figure 4 The conditions shown are 1, 2, and m.

[0130] For example, if the target intent is "check the weather", the second device can obtain the following conditions from the preset data: province, city, county, district, scenic spot, time, etc.

[0131] S2024, the second device combines the first input and the condition type into concatenated information.

[0132] Specifically, after obtaining the condition type, the second device can first combine the first input and the condition type into splicing information, and then execute step S2025.

[0133] For example, if the second device obtains M condition types according to step S2023, where M is an integer greater than or equal to 1, then the second device combines the first input and the M condition types into M concatenated information messages. The Jth concatenated information message in the M concatenated information messages includes the first input and the Jth condition type among the M condition types, where J is a positive integer less than or equal to M.

[0134] For example, such as Figure 4 As shown, the first concatenation information in the M concatenation information contains the first input and condition type 1, the second concatenation information in the M concatenation information contains the first input and condition type 2, and the Mth concatenation information in the M concatenation information contains the first input and condition type m.

[0135] Taking the first input as "Check the weather again" as an example, step S2023 shows that the condition types corresponding to the intent "check the weather" include seven types: province, city, county, district, scenic spot, and time. Therefore, the second device can combine the first input and the above seven condition types into seven concatenated information entries. For example, taking the condition type "city" as an example, the concatenated information corresponding to this condition type is "User input: Check the weather again, historical status: target intent: check the weather, condition type: city". As another example, taking the condition type "time" as an example, the concatenated information corresponding to this condition type is "User input: Check the weather again, historical status: target intent: check the weather, condition type: time".

[0136] It should be noted that in this embodiment, the second device first determines the target intent through the large language model according to steps S2021 and S2022, then obtains the condition type based on the target intent, and finally fills the slots of the obtained condition type through the large language model according to step S2025 to obtain the condition information corresponding to the target intent. Compared with the existing solution, which inputs the first input into the large language model and directly generates the target intent and the corresponding condition information through the large language model, this embodiment distinguishes between the process of intent recognition (i.e., generating the target intent) through the large language model and the process of slot filling (i.e., generating the condition information corresponding to the target intent) through the large language model. Since the large language model is like a black box during the reasoning process, only displaying the input data (e.g., the first input) and the output results (e.g., the target intent and its corresponding condition information), when the output result of the large language model is incorrect, it is impossible to determine which step in the reasoning process of the large language model has a problem, and therefore it is impossible to optimize the large language model based on the problem. This application's embodiments distinguish between the intent recognition process and the slot filling process. When the output of the large language model is incorrect, it can be determined that the error occurred during the intent recognition process and / or during the slot filling process. For example, if the target intent determined by the second device through the large language model in steps S2021 and S2022 is incorrect, it can be determined that the error occurred during the intent recognition process. If the conditional information determined by the second device through the large language model in step S2025 is incorrect, but the obtained target intent is correct, it can be determined that the error occurred during the slot filling process. Therefore, by distinguishing between the intent recognition process and the slot filling process during the second device's reasoning of the target intent and its corresponding conditional information using the large language model, it can determine which step in the large language model's reasoning process has a problem, and thus optimize the large language model to improve its accuracy.

[0137] S2025, the second device inputs the splicing information into the large language model, and outputs the conditional information corresponding to the target intent through the large language model.

[0138] Specifically, after obtaining M pieces of splicing information according to step S2024, the second device can simultaneously input the M pieces of splicing information into the large language model, and output the condition information corresponding to the condition type in the M pieces of splicing information in batches through the large language model.

[0139] For example, such as Figure 4As shown, the second device outputs condition information 1 corresponding to condition type 1, condition information 2 corresponding to condition type 2, and condition information m corresponding to condition type m in batches through the large language model. When the first input does not contain condition information corresponding to a certain condition type, the large language model can represent the condition information corresponding to that condition type using the character None.

[0140] For example, taking "Check the weather again" as the first input, the second device can input the preset data corresponding to the target intent of "check the weather", the system prompt words, the user prompt words, and the concatenation information corresponding to the target intent of "check the weather" into the large language model. This allows the large language model to determine the meaning of the condition type from the preset parameters, determine the rules for generating condition information from the system prompt words, understand the context of the multi-round first input from the user prompt words, and then generate the condition information corresponding to the condition type based on the concatenation information.

[0141] The preset data corresponding to the target intent of "checking the weather" can be found in step S2021, the system prompt words and user prompt words can be found in step S2022, and the splicing information corresponding to the target intent of "checking the weather" can be found in step S2024.

[0142] For example, in the user prompts in step S2022, the "user input" corresponding to the first input in the second round is "Check the air quality index in Nanjing tomorrow," and the "user input" corresponding to the first input in the latest round is "Check the weather again." Therefore, the second device, through the large language model, can determine from "Check the air quality index in Nanjing tomorrow" and "Check the weather again" that the condition information corresponding to the condition type "city" is "Nanjing," and the condition information corresponding to the condition type "time" is "tomorrow." Furthermore, the condition types corresponding to the intent "query the weather" also include "province," "county," "district," and "attractions," etc. The second device cannot extract the corresponding information from the first input through the large language model, so the large language model can use the character "None" to represent the corresponding condition information. Thus, the target intent and the corresponding condition information generated by the second device through the large language model can be represented as: Query the weather (province = None, city = Nanjing, county = None, district = None, attraction = None, time = tomorrow).

[0143] It should be noted that in existing solutions, the large language model infers the condition type corresponding to the target intent based on learned knowledge, and then extracts the condition information that satisfies the condition type from the first input. Therefore, during the process of inferring the condition type, the large language model may infer a condition type that does not match the target intent, resulting in the large language model generating condition information that does not match the target intent based on the condition type, which in turn makes it difficult for the first device to provide the service required by the user based on the condition information that does not match the target intent. In the embodiment of this application, the first input and the condition type are combined into concatenated information, which is equivalent to forming a known slot system. Then, the large language model fills the slots of the formed slot system with the condition types to obtain the condition information corresponding to the condition types. Since the condition types that need to be filled by the large language model are input into the large language model by the second device, the large language model does not generate condition types autonomously based on learned knowledge, but directly extracts the condition information that satisfies the condition type from the first input, thus avoiding the problem of the large language model inferring a condition type that does not match the target intent.

[0144] Furthermore, the second device simultaneously inputs the M concatenated information pieces obtained in step S2024 into the large language model, and performs parallel processing on the M concatenated information pieces to obtain the condition information corresponding to the condition types in the M concatenated information pieces. The second device processes the M concatenated information pieces in parallel using the large language model to enable the large language model to fill slots based on the condition types contained in the M concatenated information pieces, thereby minimizing the problem of the large language model exhibiting illusions (e.g., the large language model inferring condition types that do not match the target intent), and reducing the probability of generating incorrect intents and condition types through the large language model. On the other hand, since the large language model typically infers only one token at a time, and the inference latency (Instruction Latency) of the large language model (i.e., the total time required for the large language model to infer the result) is the sum of the first token inference latency and the ALL token prediction latency, this embodiment of the application reduces the inference latency to a certain extent by performing parallel inference on multiple condition types using the large language model.

[0145] In step S203, the second device sends the target intent and the corresponding condition information to the first device.

[0146] Specifically, after the second device obtains the target intent and its corresponding conditional information through the large language model, it can send the obtained target intent and its corresponding conditional information to the first device. The first device can then perform further target actions based on the target intent and conditional information in response to the first input; this is not limited here.

[0147] The following will be through Figures 5A to 5E and Figure 6 The data processing method provided in the embodiments of this application will be introduced in conjunction with the use cases of voice assistants.

[0148] Figures 5A to 5E This is a schematic diagram of the interface of a set of voice assistants provided in the embodiments of this application.

[0149] For example, the first device 50 receives a command from the user to wake up the voice assistant and switches the interface to the voice assistant's interface. The command to wake up the voice assistant includes, but is not limited to, pre-set voice commands and operation commands for the corresponding controls of the voice assistant, etc., and is not limited here. For example, if the pre-set voice command is "Hello Xiao A", when the first device receives the user's voice input "Hello Xiao A", the first device 50 can display as follows: Figure 5A The interface 501 of the voice assistant is shown.

[0150] like Figure 5A As shown, the voice assistant interface 501 displays an input control 502, a user input 503, an assistant response 504, and a status bar 513.

[0151] The status bar 513 may include one or more signal strength indicators for mobile communication signals (also known as cellular signals) such as 5G, Wi-Fi signal strength indicators, battery status indicators, and time indicators (e.g., 8:00).

[0152] Input control 502 is used to receive initial input, such as user input. For example, input control 502 can receive voice data based on a long press operation. Alternatively, input control 502 can receive text data based on a click operation. Or, input control 502 can receive image data based on a click operation.

[0153] The first input includes voice or text data from the user or other electronic devices. For example, the first input can be voice data collected by the first device through a microphone or other sound-receiving device. It should be noted that, to facilitate the recognition of the first input by the large language model, when the first input is voice data, the first device can first convert the voice data into text data and then send the converted text data to the second device. Another example is text data manually entered by the user and received by the first device. Yet another example is a question statement selected and confirmed by the user from multiple question statements displayed by the first device, where the question statement is used by the first device to inquire about the target action that the first device needs to perform.

[0154] The user inputs 503 as "Hello Xiao A" to activate the voice assistant interface of the first device 50. The assistant replies 504 as "Hello, how can I help you?" to inquire about the user's intent and provide corresponding services.

[0155] like Figure 5B As shown, after the first device 50 outputs an assistant response 504 to the user, the voice assistant's interface 505 displays the user's input 506 "Turn on Bluetooth". At this time, the first device 50 needs to determine the user's target intent and the corresponding condition information based on the user's input 506 "Turn on Bluetooth", so as to provide the user with the corresponding service.

[0156] For example, when user input contains predefined keywords, phrases, or regular expressions, the first device can directly identify the intent based on predefined rules and pattern matching. For instance, taking the user input as "turn on Bluetooth," the first device can obtain the keywords "turn on" and "Bluetooth," so it can directly determine that the intent corresponding to "turn on Bluetooth" is to run an application, the condition type is application, and the condition information is Bluetooth. Therefore, the first device can turn on the Bluetooth component in the first device and display the following to the user: Figure 5C The interface of the voice assistant shown is 507.

[0157] like Figure 5C As shown, the voice assistant interface 507 displays a settings module 508. It can be seen that the Bluetooth control in the settings module 508 is in the enabled state. At this time, the first device 50 executes the action corresponding to the user input 506 "Turn on Bluetooth".

[0158] like Figure 5D As shown, the voice assistant's interface 509 displays user input 510 as "play internet hotspots". At this time, the first device needs to determine the user's target intent and the corresponding condition information based on the user input 510 "play internet hotspots" in order to provide the user with the corresponding service.

[0159] For example, since "playing internet hotspots" does not satisfy predefined rules and pattern matching, the first device needs to determine the target intent corresponding to user input 510 and its corresponding conditional information through a large language model. For instance, the first device sends user input 510 "playing internet hotspots" to the second device, and the second device, based on... Figure 6 The process shown is used to process the user input 510 "Play Internet Hot Topics".

[0160] Please see Figure 6 , Figure 6 This is a schematic diagram illustrating a data processing method provided in an embodiment of this application. Details are as follows:

[0161] In the first step, the second device inputs one or more preset data into the large language model to obtain the corresponding preset parameters.

[0162] Specifically, the second device inputs one or more preset data into a large language model for training, causing the large language model to compress the preset data into corresponding preset parameters, and then stores the obtained preset parameters in the embedding vocabulary, so that each preset data has its corresponding preset parameters. For a description of the preset data and preset parameters, please refer to step S2021, which will not be repeated here.

[0163] The second step involves the second device inputting preset parameters and user input into the large language model to obtain the target intent corresponding to the user input.

[0164] For example, the second device inputs preset parameters and user input 510 "play internet hot topics" into the large language model, and obtains the target intent corresponding to user input 510 "play internet hot topics" as "play news". The process by which the second device generates the target intent through the large language model can be found in step S2022, and will not be repeated here.

[0165] The third step involves the second device obtaining the condition type corresponding to the target intent from the preset data, and then inputting the condition type, user input, and target intent into the large language model to output the condition information corresponding to the target intent.

[0166] For example, the second device obtains the condition type corresponding to the target intent "play news" from preset data. The process of the second device obtaining the condition type corresponding to the target intent from the preset data can be found in step S2023, and will not be repeated here. For example, the condition types corresponding to the target intent "play news" include, but are not limited to, "name," "type," and "time." Then, the condition type, user input, and target intent are input into the large language model, and the large language model outputs the condition information corresponding to the target intent "play news." For example, the condition information corresponding to the condition type "type" is "Internet hot topics."

[0167] Then, the second device is based on Figure 6 The process shown determines that the user input 510 "play internet hotspots" corresponds to the target intent "play news" and the corresponding condition information "type: internet hotspots". After this, it returns the target intent and its corresponding condition information to the first device. The first device can then display the following based on the received target intent and its corresponding condition information: Figure 5E The interface of the voice assistant shown is 511.

[0168] like Figure 5E As shown, the voice assistant's interface 511 displays a news module 512, which is used to play news clips corresponding to "Internet Hot Topics". At this time, the first device 50 executes the action corresponding to the user input 510 "play Internet Hot Topics".

[0169] The above embodiments illustrate the reasoning process of a large language model. The following will combine... Figure 7 The training process of a large language model is introduced.

[0170] Please see Figure 7 , Figure 7 This is a flowchart illustrating a method for training a large language model, as provided in an embodiment of this application. Figure 7 As shown, the flowchart includes steps S701 to S703, as detailed below:

[0171] S701, the second device obtains preset parameters through a large language model.

[0172] Specifically, before training the large language model, the second device can first acquire preset data. Then, the second device inputs the preset data into the large language model for training, so that the large language model compresses the preset data into corresponding preset parameters. For an explanation of the preset data and preset parameters, please refer to step S2021, which will not be repeated here.

[0173] S702, the second device uses the second input and preset parameters as input to the large language model, and the first intent as output to train the large language model to obtain the first large language model.

[0174] Specifically, the second device acquires the second input and the first intent corresponding to the second input to establish a first training set. The first intent is one of one or more intents included in preset parameters. Since the large language model needs to have intent recognition capabilities—that is, it needs to output the corresponding intent based on the first input—the second device uses the second input as input and the first intent corresponding to the second input as output to train the large language model's ability to recognize target intents. This allows the trained first large language model to be used to determine the target intent corresponding to the first input.

[0175] It should be noted that when the number of intents and / or condition types is large, the amount of training data used to train the large language model is also large, which may lead to poor training performance of the large language model, resulting in lower accuracy in intent recognition and / or condition type slot filling. Therefore, in this embodiment, preset parameters are input into the large language model for training, so that the trained large language model determines the target intent from one or more intents included in the preset parameters, rather than determining the target intent based on learned knowledge. Even with a large number of intents and / or condition types, the large language model still has good intent recognition capabilities, which can improve the training effect of the large language model.

[0176] S703, the second device takes the second input and the condition type corresponding to the first intent as the input of the first large language model, takes the condition information corresponding to the first intent as the output of the first large language model, trains the first large language model, and obtains the trained large language model.

[0177] Specifically, to train the slot-filling capability of the large language model—that is, the ability to extract conditional information corresponding to the condition type from the first input—the second device can use the second input and the condition type corresponding to the first intent as input, and use the conditional information corresponding to the first intent (the information in the second input that satisfies the condition type corresponding to the first intent) as the output of the first large language model to train the slot-filling capability of the first large language model. This enables the trained large language model to extract conditional information corresponding to the condition type from the first input.

[0178] For example, when there are M first condition types corresponding to the first intent, where M is an integer greater than or equal to 1, the second device can use the second input and the M concatenated information composed of the M first condition types as the input of the first large language model, and use the condition information corresponding to the M first condition types as the output of the first large language model to train the first large language model, so that the trained large language model can fill the slots of all condition types corresponding to the target intent in parallel.

[0179] The embodiments of this application will now be described in conjunction with the hardware and software structures of the electronic device.

[0180] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 8 As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0181] Understandable, Figure 1 The structures corresponding to the first device 101 and the second device 102 shown can be found in the structural diagram of the electronic device 100. The structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0182] The processor 110 can generate operation control signals based on the instruction opcode and timing signals to control the instruction fetching and execution.

[0183] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0184] In some embodiments, the processor 110 of the first device 101 sends the received first input to the second device 102. After the first device 101 receives the target intent and condition information returned by the second device 102, the processor 110 of the first device 101 responds to the first input by performing the action corresponding to the target intent and condition information.

[0185] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0186] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.

[0187] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0188] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch operation intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands.

[0189] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0190] Please see Figure 9 , Figure 9 This is a software architecture block diagram of a first device provided in an embodiment of this application. The software system of the first device 101 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. For example, a layered architecture software system can be the Android system, the Harmony operating system (OS), or other software systems. This embodiment of the application uses a layered architecture Android system as an example to illustrate the software structure of the first device 101.

[0191] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0192] The application layer can include a series of application packages.

[0193] likeFigure 9 As shown, the application package may include applications such as camera, calendar, map, WLAN, music, SMS, gallery, call, navigation, Bluetooth, and video. The applications in this application can also be replaced with other software such as mini-programs or atomic services.

[0194] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions.

[0195] like Figure 9 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0196] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0197] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, and more.

[0198] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0199] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0200] The notification manager allows applications to display notifications in the status bar. These can be used to convey informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager is used for message reminders. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the device, and flashing indicator lights.

[0201] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0202] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0203] 3D graphics processing libraries are used to implement 3D graphics drawing, image rendering, compositing, and layer processing. 2D graphics engines are drawing engines for 2D graphics.

[0204] The kernel layer is the layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, and sensor drivers.

[0205] The workflow of the software and hardware of the first device 101 will be illustrated below using the scenario of receiving the first input as an example.

[0206] When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, touch operation timestamp, etc.). The raw input event is stored in the kernel layer. The application framework layer retrieves the raw input event from the kernel layer and identifies the control corresponding to the input event. Taking a long press operation as an example, where the corresponding control is, for instance, a voice input control, the first device 101 receives the first input through the microphone 170C. Then, the first device 101 sends the first input to the second device 102 through the wireless communication module 160. The second device 102 obtains the target intent and condition information corresponding to the first input, and then performs an action based on the target intent and condition information.

[0207] It should be understood that the steps in the above-described method embodiments provided in this application can be implemented by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.

[0208] This application also provides an electronic device that may include a memory and a processor. The memory may be used to store a computer program; the processor may be used to invoke the computer program in the memory to cause the electronic device to perform the methods in any of the above embodiments.

[0209] This application also provides a chip system including at least one processor for implementing the functions involved in the methods performed by the electronic device in any of the above embodiments.

[0210] In one possible design, the chip system also includes a memory for storing program instructions and data, which may be located within or outside the processor.

[0211] The chip system can consist of chips or include chips and other discrete components.

[0212] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.

[0213] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.

[0214] For example, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a micro controller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0215] This application also provides a computer program product comprising: a computer program (also referred to as code or instructions) that, when run, causes a computer to perform the method executed by the electronic device in any of the above embodiments.

[0216] This application also provides a computer-readable storage medium storing a computer program (also referred to as code or instructions). When the computer program is run, it causes the computer to perform the method executed by the electronic device in any of the above embodiments.

[0217] The various embodiments of this application can be combined arbitrarily to achieve different technical effects.

[0218] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive).

[0219] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0220] In summary, the above description is merely an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made according to the disclosure of the present invention should be included within the scope of protection of the present invention.

Claims

1. A data processing method, characterized in that, Applied to a first device, the method includes: Obtain the first input and send the first input to the second device; The system receives a target intent and corresponding condition information from the second device. The target intent and corresponding condition information are obtained by the second device through a large language model based on the first input and preset parameters. The preset parameters include one or more intents and the condition types corresponding to the one or more intents. The target intent is determined from the one or more intents based on the first input. The condition information corresponding to the target intent includes information determined from the first input that satisfies the condition type corresponding to the target intent.

2. The method according to claim 1, characterized in that, The method further includes: The target action is executed according to the target intent and the corresponding condition information, wherein the target action is used to respond to the first input.

3. The method according to claim 1 or 2, characterized in that, The preset parameters include one or more of the following: intent description, intent scenario, condition type, and data format; The intent description is used by the large language model to determine the target intent that matches the first input from one or more intents; The intent scenario is used by the large language model to determine the target intent from the one or more intents, and the intent scenario corresponding to the target intent is consistent with the scenario when the first device performs the action corresponding to the first input. The data format is used to represent the target intent and the corresponding condition information.

4. A data processing method, characterized in that, Applied to a second device, the method includes: Receive the first input from the first device; The first input and preset parameters are input into a large language model, and the target intent and the condition information corresponding to the target intent are obtained through the large language model. The preset parameters include one or more intents and the condition types corresponding to the one or more intents. The target intent is determined from the one or more intents based on the first input. The condition information corresponding to the target intent includes information that satisfies the condition type corresponding to the target intent, determined from the first input. The target intent and the corresponding condition information are sent to the first device, wherein the target intent and the corresponding condition information are used to instruct the first device to perform a target action, and the target action is used to respond to the first input.

5. The method according to claim 4, characterized in that, The step of inputting the first input and preset parameters into a large language model, and obtaining the target intent and the corresponding conditional information through the large language model, includes: The first input and the preset parameters are input into the large language model, and the target intent is output through the large language model; Obtain M condition types corresponding to the target intent from the preset parameters, where M is an integer greater than or equal to 1; The large language model determines the condition information corresponding to the target intent based on the M condition types.

6. The method according to claim 5, characterized in that, The step of determining the conditional information corresponding to the target intent based on the M conditional types using the large language model includes: The first input and the M condition types are respectively combined into M concatenated information, wherein the Jth concatenated information in the M concatenated information includes the first input and the Jth condition type in the M condition types, and J is a positive integer less than or equal to M; The M concatenated information pieces are simultaneously input into the large language model, and the large language model outputs M conditional information pieces corresponding to the target intent, wherein the M conditional information pieces corresponding to the target intent correspond one-to-one with the M conditional types.

7. The method according to any one of claims 4-6, characterized in that, Before inputting the first input and preset parameters into the large language model, the method further includes: Preset data is input into the large language model, which then compresses the preset data into preset parameters. The preset parameters include one or more of the following: intent descriptions corresponding to the one or more intents, intent scenarios corresponding to the one or more intents, and data formats. The intent descriptions are used by the large language model to determine the target intent that matches the first input from the one or more intents. The intent scenarios are used by the large language model to determine the target intent from the one or more intents. The intent scenarios corresponding to the target intent match the scenario when the first device performs the action corresponding to the first input. The data formats are used to represent the target intent and the conditional information corresponding to the target intent.

8. The method according to any one of claims 4-7, characterized in that, Before receiving the first input from the first device, the method further includes: The second input and the preset parameters are used as inputs to the large language model, and the first intent is used as outputs to train the large language model to obtain a first large language model. The first large language model is used to determine the target intent corresponding to the first input. The first intent is the intent corresponding to the second input among one or more intents included in the preset parameters. The first large language model is trained by taking the second input and the condition type corresponding to the first intent as inputs and the condition information corresponding to the first intent as outputs. The trained large language model is obtained by training the first large language model, wherein the condition information corresponding to the first intent is the information in the second input that satisfies the condition type corresponding to the first intent.

9. The method according to claim 8, characterized in that, Before using the second input and the preset parameters as input to the large language model, the method further includes: The preset data is input into the large language model, and the preset data is compressed into the preset parameters by the large language model.

10. An electronic device, characterized in that, The electronic device includes: one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories are used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 3.

11. An electronic device, characterized in that, The electronic device includes: one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories are used to store computer program code, the computer program code including computer instructions, and the one or more processors invoke the computer instructions to cause the electronic device to perform the method as described in any one of claims 4 to 9.

12. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the processors being configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 9.

13. A computer program product containing instructions, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1 to 9.

14. A computer-readable storage medium comprising instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1 to 9.