Generative pre-training GPT model input data construction method and storage medium

By identifying and adding target entity types to the initial input data, more accurate target input data is formed and inputting it into the generative pre-training GPT model, the problem of low efficiency of model processing on input data in the prior art is solved, and the technical effect of improving model processing efficiency and accuracy is achieved.

CN120144757APending Publication Date: 2025-06-13QINGDAO HAIER TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311687386.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the prior art, the pre-trained model is less efficient in processing user unstructured natural language input data, especially when the input data exceeds the scope of model knowledge, the accuracy of the processing results is reduced.

Method used

By identifying the target named entities in the initial input data and their corresponding target entity types, adding these entity types to the initial input data, forming more accurate target input data, and inputting them into the generative pre-trained GPT model.

Benefits of technology

The efficiency and accuracy of the generative pre-trained GPT model for input data processing is improved, ensuring that the model can effectively identify the target operations indicated by the initial input data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144757A_ABST
    Figure CN120144757A_ABST
Patent Text Reader

Abstract

The invention discloses a construction method of input data of a generative pre-training GPT model and a storage medium, the construction method of the input data of the generative pre-training GPT model comprises the steps of obtaining initial input data of the generative pre-training GPT model, the generative pre-training GPT model being used for identifying a target operation indicated by the initial input data; a target entity type to which each target named entity in one or more target named entities in the initial input data belongs is recognized, one or more target entity types are obtained, and the generative pre-training GPT model has the recognition capability on the target entity types; adding one or more target entity types into the initial input data to obtain target input data; and inputting the target input data into the generative pre-training GPT model, and by adopting the technical scheme, the problems of relatively low efficiency of processing the input data by the model and the like in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of smart home / smart family. Specifically, it relates to a method for constructing input data for a generative pre-trained GPT model and a storage medium. Background Art

[0002] During the process of human-computer conversation, users generally express information in natural language. Therefore, the dialogue system needs to abstract the unstructured natural language of users into structured information that machines can understand. In the prior art, when the dialogue system obtains the information expressed by the user, it will transmit the information to the pre-trained model and perform natural language processing through the NLU (Natural Language Understanding) module of the pre-trained model. However, when the information expressed by the user exceeds the scope of knowledge of the NLU module, the processing ability of the pre-trained model for the information will decline, resulting in a decrease in the accuracy of the processing result.

[0003] In view of the problems in the related art, such as the low efficiency of the model in processing input data, no effective solution has been proposed yet. Summary of the Invention

[0004] Embodiments of this application provide a method and device for constructing model input data, a storage medium, and an electronic device to at least solve the problems in the related art, such as the low efficiency of the model in processing input data.

[0005] According to an embodiment of the embodiments of this application, a method for constructing input data for a generative pre-trained GPT model is provided, including:

[0006] Obtain the initial input data of the generative pre-trained GPT model, where the generative pre-trained GPT model is used to identify the target operation indicated by the initial input data;

[0007] Identify the target entity type to which each of one or more target named entities in the initial input data belongs, and obtain one or more target entity types, where the generative pre-trained GPT model has the ability to identify the target entity type;

[0008] Add one or more of the target entity types to the initial input data to obtain target input data;

[0009] Input the target input data into the generative pre-trained GPT model, where the generative pre-trained GPT model is used to identify the target operation indicated by the target input data.

[0010] Optionally, identifying, for each of one or more target named entities in the initial input data, a target entity type to which the target named entity belongs, to obtain one or more target entity types, includes:

[0011] Extracting one or more of the target named entities from the initial input data;

[0012] Identifying, according to the entity types and named entities with corresponding relationships recorded in the knowledge base, the target entity type to which each of the target named entities belongs, to obtain one or more target entity types.

[0013] Optionally, adding one or more of the target entity types to the initial input data to obtain target input data, includes:

[0014] Concatenating each of the target named entities with the corresponding target entity type into a target field, to obtain one or more target fields;

[0015] Connecting one or more of the target fields after the initial input data to obtain the target input data.

[0016] Optionally, concatenating each of the target named entities with the corresponding target entity type into a target field, to obtain one or more target fields, includes:

[0017] Concatenating each of the target named entities with the corresponding target entity type to obtain an initial field;

[0018] Adding a first tag before the initial field to obtain the target field, where the first tag is used to indicate the position of the initial field to the generative pre-trained GPT model.

[0019] Optionally, connecting one or more of the target fields after the initial input data to obtain the target input data, includes:

[0020] Identifying the arrangement order of one or more of the target named entities in the initial input data;

[0021] Connecting one or more of the target fields after the initial input data according to the arrangement order to obtain the target input data.

[0022] Optionally, adding one or more of the target entity types to the initial input data to obtain target input data, includes:

[0023] Insert each of the target entity types into the positions of the corresponding target named entities in each of the initial input data to obtain reference input data, where the reference input data includes one or more candidate fields, and each candidate field includes a set of connected target entity types and target named entities;

[0024] Insert a second tag at the position of each candidate field to obtain the target input data, where the second tag is used to indicate the position of the candidate field to the generative pre-trained GPT model.

[0025] Optionally, identifying the target entity types to which each of the target named entities in one or more target named entities in the initial input data belong to obtain one or more target entity types, includes:

[0026] Perform named entity recognition on the initial input data to obtain multiple sets of entity recognition results, where each set of entity recognition results includes one or more of the target named entities;

[0027] Perform entity type recognition on the target named entities in each set of entity recognition results to obtain multiple sets of type recognition results, where each set of type recognition results includes a set of corresponding target named entities and target entity types.

[0028] Optionally, adding one or more of the target entity types to the initial input data to obtain target input data, includes:

[0029] Add the target entity types to the initial input data respectively according to each set of corresponding target named entities and target entity types to obtain multiple target input data.

[0030] Optionally, inputting the target input data to the generative pre-trained GPT model includes one of the following:

[0031] Screen out a target input data with the highest semantic matching degree between the multiple target input data and the initial input data; input the one target input data into the generative pre-trained GPT model;

[0032] Input the multiple target input data into the generative pre-trained GPT model, where the generative pre-trained GPT model is used to screen out a target input data with the highest semantic matching degree between the multiple target input data and the initial input data, and identify the target operation indicated by the one target input data.

[0033] According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the method for constructing the input data of the generative pre-trained GPT model when running.

[0034] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the above-mentioned processor executes the method for constructing the input data of the generative pre-trained GPT model through the computer program.

[0035] In the embodiments of the present application, the initial input data of the generative pre-trained GPT model for identifying the target operation indicated by the initial input data is obtained; each target named entity in one or more target named entities in the initial input data is identified to obtain one or more target entity types to which it belongs, and the generative pre-trained GPT model also has the ability to identify the target entity types; one or more target entity types are added to the initial input data to obtain target input data; the target input data is input into the generative pre-trained GPT model for identifying the target operation indicated by the target input data. That is, the target input data carrying the target entity types to which each target named entity in one or more target named entities in the initial input data belongs is input into the generative pre-trained GPT model. Since the generative pre-trained GPT model obtains the target entity types to which each target named entity in the initial input data belongs when receiving the target input data, the accuracy of the input data input into the generative pre-trained GPT model is improved. Therefore, the generative pre-trained GPT model can identify the target operation indicated by the initial input data according to the target entity types, ensuring that the information of each target named entity in the initial input data can be obtained. By adopting the above technical solution, the problems such as the low efficiency of the model in processing input data in the related art are solved, and the technical effect of improving the efficiency of the model in processing input data is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings here are incorporated into the specification and constitute a part of this specification, showing the embodiments consistent with the present application and used together with the specification to explain the principles of the present application.

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0038] Figure 1Schematic diagram of the hardware environment of a method for constructing input data of a generative pre-trained GPT model according to an embodiment of the present application;

[0039] Figure 2 Flowchart of a method for constructing input data of a generative pre-trained GPT model according to an embodiment of the present application;

[0040] Figure 3 Schematic diagram of a target named entity and a target entity type of the target named entity in a knowledge base according to an embodiment of the present application;

[0041] Figure 4 Schematic of target input data according to an embodiment of the present application Figure 1 ;

[0042] Figure 5 Schematic diagram of a named entity recognition and entity type recognition according to an embodiment of the present application;

[0043] Figure 6 Schematic of target input data according to an embodiment of the present application Figure 2 ;

[0044] Figure 7 Flowchart of constructing target input data of a generative pre-trained GPT model according to an embodiment of the present application;

[0045] Figure 8 Block diagram of the structure of a device for constructing model input data according to an embodiment of the present application. Detailed implementation manners

[0046] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0047] It should be noted that the terms "first", "second", etc. in the description, claims, and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or devices.

[0048] According to one aspect of the embodiments of this application, a method for generating a deployment scenario based on digital twin is provided. The method for generating a deployment scenario based on digital twin is widely applied to whole-house intelligent digital control application scenarios such as Smart Home, smart home, smart home appliance ecosystem, and Intelligence House ecosystem. Optionally, in this embodiment, Figure 1 is a schematic diagram of the hardware environment of a method for generating a deployment scenario based on digital twin according to an embodiment of this application, as Figure 1 shown. The above-mentioned method for generating a deployment scenario based on digital twin can be applied to the hardware environment composed of a terminal device 102 and a server 104 as Figure 1 shown. The server 104 is connected to the terminal device 102 through a network and can be used to provide services (such as application services, etc.) for the terminal or the client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data operation services for the server 104.

[0049] The above network may include, but is not limited to, at least one of the following: a wired network, a wireless network. The above wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, a local area network. The above wireless network may include, but is not limited to, at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart drying rack, a smart curtain, a smart audio and video device, a smart socket, a smart speaker, a smart new air device, a smart kitchen and bathroom device, a smart bathroom device, a smart floor sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steam box, a smart microwave oven, a smart kitchen water heater, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0050] In this embodiment, a method for constructing input data of a generative pre-trained GPT model is provided, which is applied to the above device terminal. Figure 2 It is a flowchart of a method for constructing input data of a generative pre-trained GPT model according to an embodiment of the present application. The process includes the following steps:

[0051] Step S202, obtain the initial input data of the generative pre-trained GPT model, where the generative pre-trained GPT model is used to identify the target operation indicated by the initial input data;

[0052] Step S204, identify the target entity type to which each of one or more target named entities in the initial input data belongs, to obtain one or more target entity types, where the generative pre-trained GPT model has the ability to identify the target entity type;

[0053] Step S206, add one or more of the target entity types to the initial input data to obtain target input data;

[0054] Step S208, input the target input data into the generative pre-trained GPT model, where the generative pre-trained GPT model is used to identify the target operation indicated by the target input data.

[0055] Through the above steps, obtain the initial input data of the generative pre-trained GPT model for identifying the target operation indicated by the initial input data; identify the target entity type to which each target named entity in one or more target named entities in the initial input data belongs, to obtain one or more target entity types, and the generative pre-trained GPT model also has the ability to identify the target entity type; add one or more target entity types to the initial input data to obtain the target input data; input the target input data into the generative pre-trained GPT model for identifying the target operation indicated by the target input data. That is, input the target input data carrying the target entity type to which each target named entity in one or more target named entities in the initial input data belongs into the generative pre-trained GPT model. Since the generative pre-trained GPT model obtains the target entity type to which each target named entity in the initial input data belongs while receiving the target input data, the accuracy of the input data input into the generative pre-trained GPT model is improved. Therefore, the generative pre-trained GPT model can identify the target operation indicated by the initial input data according to the target entity type, ensuring that the information of each target named entity in the initial input data can be obtained. By adopting the above technical solution, the problems such as low efficiency of the model in processing input data in the related art are solved, and the technical effect of improving the efficiency of the model in processing input data is achieved.

[0056] In the technical solution provided in the above step S202, the above generative pre-trained GPT model is used to determine the target operation in the initial input data according to the initial input data and make a response according to the target operation. It may include, but is not limited to, a variety of pre-trained models, such as: BERT model (Bidirectional Encoder Representations from Transformers, a model with bidirectional encoder representations from Transformers), GPT model (Generative Pre-trained Transformer, a generative pre-trained transformer), XLNet model (Extra-Large Transformer Language Model, an extra-large Transformer language model), and so on.

[0057] Optionally, in this embodiment, the data that needs to be processed by the generative pre-trained GPT model can be, but is not limited to, determined as the initial input data. The initial input data can include, but is not limited to, various types of data, such as: text data, voice data, image data, and so on.

[0058] Optionally, in this embodiment, the initial input data can be obtained through different channels, such as: when an instruction statement is detected, the instruction statement is determined as the initial input data; when an instruction text is detected, the instruction text is determined as the initial input data; when an image is detected, the image is determined as the initial input data, and so on.

[0059] Optionally, in this embodiment, the target operation for the generative pre-trained GPT model to execute can be determined based on the initial input data, and the initial input data can indicate the generative pre-trained GPT model to execute multiple operations.

[0060] Optionally, in this embodiment, the generative pre-trained GPT model can be trained using a large amount of natural language, and the trained generative pre-trained GPT model is used to identify the target operation indicated by the initial input data. Since the natural language used to train the generative pre-trained GPT model is limited, the data that the generative pre-trained GPT model can identify is also limited. It can be related to entities related to the target operation that the generative pre-trained GPT model can identify by annotating the initial input data, so that the generative pre-trained GPT model can obtain information related to the target operation and increase the accuracy of the generative pre-trained GPT model in identifying the initial input data.

[0061] In the technical solution provided in step S204 above, the entity related to the target operation in the initial input data can be determined as the target named entity, for example: taking the initial input data as "play CTDGS" as an example, CTDGS in the initial input data can be determined as the target named entity.

[0062] Optionally, in this embodiment, the above initial input data can include one or more target named entities, for example: taking the initial input data as "tell a story that happened in spring" as an example, spring and story in the initial input data can be determined as the target named entities.

[0063] Optionally, in this embodiment, the type to which the target named entity related to the target operation belongs can be determined as the target entity type, and each target named entity included in the initial input data has its corresponding target entity type.

[0064] Optionally, in this embodiment, each target named entity in the initial input data can be identified based on, but not limited to, a knowledge base storing multiple named entities. The knowledge base storing multiple named entities can also store, but not limited to, the entity type of each named entity. For example, taking the initial input data as "Play CTDGS" as an example, the target named entity "CTDGS" in the initial input data can be obtained by matching with the named entities stored in the knowledge base, and the target entity type of CTDGS can be obtained from the knowledge base as "song".

[0065] Optionally, in this embodiment, when the above-mentioned generative pre-trained GPT model obtains the target named entity and the target entity type of the target named entity, it can identify the obtained target named entity and the target entity type of the target named entity, and can identify the target operation indicated by the initial input data of the generative pre-trained GPT model based on the obtained target named entity and the target entity type of the target named entity.

[0066] In an exemplary embodiment, the target entity type to which each of the one or more target named entities in the initial input data belongs can be identified, but not limited to, by the following method to obtain one or more target entity types: extracting one or more of the target named entities from the initial input data; identifying the target entity type to which each of the target named entities belongs according to the entity types and named entities recorded in the knowledge base with a corresponding relationship, to obtain one or more target entity types.

[0067] Optionally, in this embodiment, the above-mentioned knowledge base stores each target named entity in the initial input data and the target entity type of each target named entity. The multiple named entities can be classified in the knowledge base by entity type, so that the named entities stored in the knowledge base have entity types with corresponding relationships thereto.

[0068] Optionally, in this embodiment, a corresponding knowledge base can be pre-constructed according to the scenario in which the generative pre-trained GPT model is used. For example, in the scenario of using the generative pre-trained GPT model for image screening, each image can be stored in the knowledge base as a named entity, and the type to which each image belongs can be used as the entity type of each image.

[0069] Optionally, in this embodiment, the knowledge base can store the entity types and named entities with corresponding relationships in the form of a trie tree (Trie Tree, dictionary tree). Taking the initial input data as "Play ABC" as an example, the target named entity in the initial input data and the target entity type of the target named entity can be identified, but not limited to, through the following process:

[0070] Detect whether the first character "Bo" exists in the knowledge base. If it does not exist in the knowledge base, detect whether the next character exists in the knowledge base;

[0071] When it is detected that the character "A" exists in the knowledge base, determine whether the combination of the character "A" and the next character, i.e., "AB", exists in the knowledge base;

[0072] Since it is detected that the phrase "ABC" exists in the knowledge base, ABC is determined as the target named entity, and then the target entity type corresponding to ABC is obtained from the knowledge base as a song.

[0073] Optionally, in this embodiment, for an initial input data, one or more named entities can be but are not limited to being recognized from the knowledge base, and these one or more named entities are all determined as the target named entities to obtain a set of entity recognition results.

[0074] Optionally, in this embodiment, a set of entity recognition results can be but are not limited to including one or more target named entities, and the target entity type corresponding to each target named entity can be but are not limited to being recognized from the knowledge base to obtain multiple sets of target named entities and target entity types with corresponding relationships.

[0075] Optionally, in this embodiment, Figure 3 is a schematic diagram of the target named entity and the target entity type of the target named entity in the knowledge base according to the embodiment of the present application. As Figure 3 shown, taking the initial input data as "Play ABC of DEF" as an example, the target named entity and the target entity type in the initial input data can be but are not limited to being recognized through the following process:

[0076] Detect whether the first character "Bo" exists in the knowledge base. If it does not exist in the knowledge base, detect whether the next character exists in the knowledge base; when it is detected that the character "D" exists in the knowledge base, determine whether the combination of the character "D" and the next character, i.e., "DE", exists in the knowledge base; since it is detected that the phrase "DEF" exists in the knowledge base, DEF is determined as the target named entity.

[0077] When it is detected that the character "A" exists in the knowledge base, determine whether the combination of the character "A" and the next character, i.e., "AB", exists in the knowledge base; since it is detected that the phrase "ABC" exists in the knowledge base, ABC is determined as the target named entity. The target named entities obtained from the initial input data include DEF and ABC.

[0078] The target entity type corresponding to DEF obtained from the knowledge base is singer; the target entity type corresponding to ABC obtained from the knowledge base is song. The target entity type corresponding to the target named entity DEF in the initial input data is singer, and the target entity type corresponding to the target named entity ABC is song.

[0079] In the technical solution provided in step S206 above, the initial input data may, but is not limited to, include one or more target named entities, and may, but is not limited to, add the target entity type corresponding to each target named entity to the initial input data to obtain the target input data.

[0080] Optionally, in this embodiment, the above target input data may, but is not limited to, be used as the input data of the generative pre-trained GPT model. Since the generative pre-trained GPT model has the ability to recognize target entity types, and since the target input data is the initial input data carrying the target entity types, when the generative pre-trained GPT model obtains the target named entity and the target entity type of the target named entity, it can recognize the obtained target named entity and the target entity type of the target named entity, and can also recognize the target operation indicated by the initial input data of the generative pre-trained GPT model according to the obtained target named entity and the target entity type of the target named entity.

[0081] Optionally, in this embodiment, the target entity type corresponding to each target named entity may, but is not limited to, be added to the corresponding position of the initial input data to obtain the target input data. For example: add the target entity type corresponding to each target named entity at the position of each target named entity in the initial input data (before or after the target named entity) to obtain the target input data. Or, splice each target named entity in the initial input data and the target entity type of each target named entity after the initial input data to obtain the target input data.

[0082] In an exemplary embodiment, one or more of the target entity types may, but is not limited to, be added to the initial input data in the following manner to obtain the target input data: splice each target named entity with the corresponding target entity type into a target field to obtain one or more target fields; connect one or more target fields after the initial input data to obtain the target input data.

[0083] Optionally, in this embodiment, the combination of the target named entity and the target entity type corresponding to the target named entity may be, but is not limited to, determined as the target field. For example, taking the target named entity as ABC and the target entity type corresponding to the target named entity as song, [ABC, song] may be, but is not limited to, determined as the target field. Or, [song, ABC] may be, but is not limited to, determined as the target field.

[0084] Optionally, in this embodiment, the target field obtained by combining the target named entity and the target entity type corresponding to the target named entity may be, but is not limited to, connected to the initial input data to obtain the target input data. For example, taking the initial input data as "play ABC", and through knowledge base recognition, the target named entity of the initial input data is identified as ABC, and the target entity type corresponding to the target named entity ABC is song. Taking [ABC, song] as the target field, [ABC, song] may be, but is not limited to, connected after the initial input data [play ABC] to obtain the target input data [play ABC][ABC, song]. Or, taking [song, ABC] as the target field, [song, ABC] may be, but is not limited to, connected after the initial input data [play ABC] to obtain the target input data [play ABC][song, ABC].

[0085] In an exemplary embodiment, each of the target named entities and the corresponding target entity types may be, but is not limited to, spliced into a target field in the following manner to obtain one or more target fields: splicing each of the target named entities and the corresponding target entity types to obtain an initial field; adding a first tag before the initial field to obtain the target field, where the first tag is used to indicate the position of the initial field to the generative pre-trained GPT model.

[0086] Optionally, in this embodiment, the combination of the target named entity and the target entity type corresponding to the target named entity may be, but is not limited to, determined as the initial field. For example, taking the target named entity as ABC and the target entity type corresponding to the target named entity as song, [ABC, song] may be, but is not limited to, determined as the initial field. Or, [song, ABC] may be, but is not limited to, determined as the initial field.

[0087] Optionally, in this embodiment, in order for the generative pre-trained GPT model to correctly identify the target named entity and the target entity type corresponding to the target named entity, it may, but is not limited to, obtain an initial field by connecting the target named entity and the target entity type corresponding to the target named entity, and use a first tag to split each initial field. The first tag may, but is not limited to, be a symbol that the model can recognize and is used to indicate that the data connected at both ends of the first tag are two parts of data, such as: [SEP] (Separator, delimiter), etc.

[0088] Optionally, in this embodiment, the above first tag may, but is not limited to, be used to separate each initial field and separate the initial field from the initial input data. For example, taking the recognition of the initial input data to obtain two initial fields (initial field A and initial field B) as an example, it may, but is not limited to, add the first tag ([first tag][initial field A][first tag][initial field B]) before the two initial fields to separate the initial field A and the initial field B to obtain the target field. Alternatively, it may, but is not limited to, add the first tag ([first tag][initial field B][first tag][initial field A]) before the two initial fields to separate the initial field A and the initial field B to obtain the target field.

[0089] Optionally, in this embodiment, it may, but is not limited to, connect the target field obtained by combining the target named entity and the target entity type corresponding to the target named entity after the initial input data to obtain the target input data. For example, taking the initial input data as "play DEF of ABC", and the target named entities recognized from the knowledge base for the initial input data include DEF and ABC, the target entity type corresponding to the target named entity DEF is "singer", and the target entity type corresponding to the target named entity ABC is "song" as an example, the initial fields include [singer, DEF] and [song, ABC]. By adding the first tag before the initial fields to separate the two initial fields ([first tag][singer, DEF][first tag][song, ABC]) to obtain the target field, and connecting the target field separated by the first tag after the initial input data ["play DEF of ABC"], the target input data ["play DEF of ABC"][first tag][singer, DEF][first tag][song, ABC] is obtained.

[0090] In an exemplary embodiment, after connecting one or more of the target fields to the initial input data, the target input data may be obtained by, but is not limited to, the following method: identifying the arrangement order of one or more of the target named entities in the initial input data; connecting one or more of the target fields to the initial input data in accordance with the arrangement order to obtain the target input data.

[0091] Optionally, in this embodiment, the target named entities in the initial input data are identified through a knowledge base. The target named entities may, but are not limited to, be one or more data segments in the initial input data, and may, but are not limited to, determine the arrangement order of each target named entity in the initial input data according to the position of one or more data segments corresponding to each target named entity in the initial input data. For example, taking the initial input data as "play DEF of ABC", and the target named entities identified through the knowledge base in the initial input data include DEF and ABC, where the target entity type corresponding to the target named entity DEF is singer, and the target entity type corresponding to the target named entity ABC is song as an example, the position of the target named entity DEF in the initial input data is identified as [3, 5], and the position of the target named entity ABC in the initial input data is identified as [7, 9]. Since ABC is after DEF in the initial input data, the target fields corresponding to the target named entities may, but are not limited to, be concatenated according to the arrangement order of each target named entity in the initial input data, and the concatenation order of the two target fields is [singer, DEF][song, ABC].

[0092] Optionally, in this embodiment, Figure 4 is a schematic diagram of the target input data according to an embodiment of the present application Figure 1 , such as Figure 4 shown, taking the initial input data as "play DEF of ABC" and the first tag as [SEP] as an example, the target input data may, but are not limited to, be obtained through the following method:

[0093] The target named entities in the initial input data identified through the knowledge base include DEF and ABC. The target entity type corresponding to the target named entity DEF is singer, and the target entity type corresponding to the target named entity ABC is song. Moreover, the position of the target named entity DEF in the initial input data is identified as [3, 5], and the position of the target named entity ABC in the initial input data is identified as [7, 9].

[0094] Concatenate each target named entity with the corresponding target entity type to obtain the initial fields including [singer, DEF] and [song, ABC]; add the first tag before the initial fields to obtain the target fields including [SEP][singer, DEF] and [SEP][song, ABC].

[0095] Since ABC is after DEF in the initial input data, the target fields corresponding to the target named entities can be connected according to, but not limited to, the arrangement order of each target named entity in the initial input data, and the connection order of the two target fields obtained is [SEP][Singer, DEF][SEP][Song, ABC]. After connecting the target fields to the initial input data, the target input data [Play ABC of DEF][SEP][Singer, DEF][SEP][Song, ABC] is obtained.

[0096] Each word in the target input data can be split and then input into the generative pre-trained GPT model. For example, taking the target input data [Play ABC of DEF][SEP][Singer, DEF][SEP][Song, ABC] as an example, the [CLS][Play ABC of DEF][SEP][Singer DEF][SEP][Song ABC][SEP] obtained by splitting the target input data can be input into the generative pre-trained GPT model.

[0097] In an exemplary embodiment, one or more of the target entity types can be added to the initial input data to obtain the target input data in the following manner, but not limited to: inserting each target entity type into the position of the target named entity corresponding to each target entity type in the initial input data to obtain the reference input data, where the reference input data includes one or more candidate fields, and each candidate field includes a group of connected target entity types and target named entities; inserting a second label at the position of each candidate field to obtain the target input data, where the second label is used to indicate the position of the candidate field to the generative pre-trained GPT model.

[0098] Optionally, in this embodiment, the target named entities in the initial input data are identified through a knowledge base. Each target named entity can be, but not limited to, a data segment in the initial input data. The target entity type corresponding to the target named entity can be inserted at the position of the data segment corresponding to each target named entity to obtain the reference input data. For example, the target entity type corresponding to the target named entity can be inserted before the data segment corresponding to each target named entity to obtain the reference input data. Or, the target entity type corresponding to the target named entity can be inserted after the data segment corresponding to each target named entity to obtain the reference input data.

[0099] Optionally, in this embodiment, the target named entity and the target entity type with a corresponding relationship in the reference input data can be determined as a candidate field, and the reference input data can include one or more candidate fields.

[0100] Optionally, in this embodiment, in order for the generative pre-trained GPT model to correctly identify the target named entity and the target entity type with a corresponding relationship in the reference input data, it is possible but not limited to split each candidate field in the reference input data through a second tag. The second tag can be but not limited to a symbol that the model can recognize and is used to indicate that the data connected to both ends of the second tag is two parts of data, such as: [SEP], etc.

[0101] Optionally, in this embodiment, it is possible but not limited to insert a second tag at the position of each candidate field in the reference input data. For example, insert a second tag before each candidate field in the reference input data. Or insert a second tag after each candidate field in the reference input data.

[0102] Optionally, in this embodiment, the above-mentioned second tag can be but not limited to separating the candidate field from other data in the reference input data. For example, taking the reference input data including two candidate fields (candidate field A and candidate field B) as an example, it is possible but not limited to add a second tag before the two candidate fields ([second tag][candidate field A], [second tag][candidate field B]) to separate the candidate field from other data in the reference input data to obtain the target input data.

[0103] In an exemplary embodiment, it is possible but not limited to identify the target entity type to which each of the one or more target named entities in the initial input data belongs in the following manner to obtain one or more target entity types: perform named entity recognition on the initial input data to obtain multiple sets of entity recognition results, where each set of the entity recognition results includes one or more of the target named entities; perform entity type recognition on the target named entities in each set of the entity recognition results to obtain multiple sets of type recognition results, where each set of the type recognition results includes a set of the target named entity and the target entity type with a corresponding relationship.

[0104] Optionally, in this embodiment, it is possible but not limited to identify the named entities included in the initial input data through a knowledge base. For the same initial input data, the knowledge base can obtain multiple entity recognition results. For example, taking the initial input data as "play The Story of Spring" as an example, the knowledge base can obtain two sets of entity recognition results through processing. The first set of entity recognition results is that the target named entity is "The Story of Spring". Or, the second set of entity recognition results is that the target named entities include "Spring" and "Story".

[0105] Optionally, in this embodiment, it is possible but not limited to determine, through a knowledge base, the target entity type corresponding to each target named entity in one or more sets of entity recognition results, to obtain one or more sets of type recognition results. For a target named entity, it is possible but not limited to obtain one or more type recognition results. For example, taking the initial input data as playing CTDGS, the knowledge base processes it to obtain the target named entity as CTDGS, and determines through the knowledge base that the target entity type of the target named entity CTDGS is a song. Or, through the knowledge base, it is obtained that the target named entity CTDGS has two target entity types, which are a song and a story respectively.

[0106] Optionally, in this embodiment, Figure 5 is a schematic diagram of named entity recognition and entity type recognition according to an embodiment of the present application. As Figure 5 shown, taking the initial input data as CTDGS as an example, it is possible but not limited to perform named entity recognition and entity type recognition on the initial input data in the following manner:

[0107] Performing named entity recognition on the initial input data according to the knowledge base to obtain the target named entity as CTDGS.

[0108] Obtaining the target entity type corresponding to CTDGS according to the knowledge base to obtain two sets of type recognition results, which are respectively: the target named entity is CTDGS, and the target entity type corresponding to CTDGS is a story; the target named entity is CTDGS, and the target entity type corresponding to CTDGS is a song.

[0109] In an exemplary embodiment, it is possible but not limited to add one or more of the target entity types to the initial input data in the following manner to obtain the target input data: adding the target entity type to the initial input data respectively according to each set of the target named entity and the target entity type with a corresponding relationship to obtain multiple target input data.

[0110] Optionally, in this embodiment, for the same initial input data, it is possible but not limited to have one or more sets of entity recognition results, and each target named entity in each set of entity recognition results may have one or more target entity types. Therefore, for the same initial input data, it is possible but not limited to have one or more sets of target entity types and corresponding type recognition results.

[0111] Optionally, in this embodiment, it is possible but not limited to add the target named entity of each group and the target entity type corresponding to the target named entity to the initial input data to obtain multiple target input data. For example, add the target named entity of each group and the target entity type corresponding to the target named entity to the initial input data before each target named entity to obtain multiple target input data. Alternatively, add the target named entity of each group and the target entity type corresponding to the target named entity to the initial input data after each target named entity to obtain multiple target input data.

[0112] Optionally, in this embodiment, Figure 6 is a schematic diagram of the target input data according to the embodiment of the present application Figure 2 , such as Figure 6 shown, taking the initial input data as ABC for playing DEF and the second label as [SEP] as an example, it is possible but not limited to obtain the target input data through the following methods:

[0113] The target named entities of the initial input data identified through the knowledge base include DEF and ABC. The target entity type corresponding to the target named entity DEF is singer, and the target entity type corresponding to the target named entity ABC is song.

[0114] Insert the target entity type corresponding to each target named entity before the target named entity of the initial input data to obtain the reference input data including [Play][Singer, DEF][of][Song, ABC], where the candidate fields of the reference input data include [Singer, DEF] and [Song, ABC].

[0115] Insert the second label before each candidate field of the reference input data to obtain the target input data [Play][SEP][Singer, DEF][of][SEP][Song, ABC].

[0116] In the technical solution provided in step S208 above, it is possible but not limited to split each word in the target input data and then input it into the generative pre-trained GPT model. For example, taking the target input data as [Play][SEP][Singer, DEF][of][SEP][Song, ABC] as an example, it is possible but not limited to split the target input data to obtain [CLS][Play][SEP][Singer DEF][of][SEP][Song ABC][SEP] and input it into the generative pre-trained GPT model.

[0117] Optionally, in this embodiment, the generative pre-trained GPT model has the ability to identify the target entity type. Since the target input data carries the target named entity and the target entity type corresponding to the target named entity, the generative pre-trained GPT model can identify the target named entity and the target entity type of the target named entity, and can identify the target operation indicated by the target input data of the generative pre-trained GPT model based on the obtained target named entity and the target entity type of the target named entity.

[0118] In an exemplary embodiment, the target input data can be input to the generative pre-trained GPT model in one of the following ways, but not limited to: screening out a target input data with the highest semantic matching degree with the initial input data from the multiple target input data; inputting the one target input data into the generative pre-trained GPT model; inputting the multiple target input data into the generative pre-trained GPT model, where the generative pre-trained GPT model is used to screen out a target input data with the highest semantic matching degree with the initial input data from the multiple target input data and identify the target operation indicated by the one target input data.

[0119] Optionally, in this embodiment, the above semantic matching degree can be determined according to the scenario in which the generative pre-trained GPT model is used, for example: taking the simultaneous receipt of the target input data [CLS][Play][SEP][Singer DEF][of][SEP][Song ABC][SEP] and [CLS][Play][SEP][Story DEF's ABC][SEP] as an example, in the scenario where the generative pre-trained GPT model is used to play songs, the semantic matching degree of the target input data [CLS][Play][SEP][Story DEF's ABC][SEP] can be increased, but not limited to, so that the generative pre-trained GPT model can correctly identify the song "ABC" by singer DEF.

[0120] Optionally, in this embodiment, the semantic matching degree of each target input data can be determined before inputting the generative pre-trained GPT model, but is not limited to it. For example, taking the target input data of [CLS][Play][SEP][Singer DEF][of][SEP][Song Song A][SEP] and [CLS][Play][SEP][Story DEF's ABC][SEP] as an example, when the generative pre-trained GPT model is used to play songs, the semantic matching degree of the target input data [CLS][Play][SEP][Story DEF's ABC][SEP] can be increased, and the target input data [CLS][Play][SEP][Story DEF's ABC][SEP] can be selected as the input of the generative pre-trained GPT model, so that the generative pre-trained GPT model can correctly identify the song "ABC" with the singer DEF as the singer.

[0121] Optionally, in this embodiment, the semantic matching degree of each target input data can be determined by a generative pre-trained GPT model, but is not limited to it. For example, taking the target input data of [CLS][Play][SEP][Singer DEF][of][SEP][Song ABC][SEP] and [CLS][Play][SEP][Story DEF's ABC][SEP] as an example, multiple target input data are simultaneously input into the generative pre-trained GPT model. The generative pre-trained GPT model can, but is not limited to, increase the semantic matching degree of the target input data [CLS][Play][SEP][Story DEF's ABC][SEP] according to the pre-trained scenario (such as the scenario for playing songs), and select the target input data [CLS][Play][SEP][Story DEF's ABC][SEP] for the next step of processing, so that the generative pre-trained GPT model can output the song "ABC" with the singer DEF.

[0122] Optionally, in this embodiment, Figure 7 is a flowchart of constructing target input data of a generative pre-trained GPT model according to an embodiment of the present application, such as Figure 7 As shown, the target input data of the generative pre-trained GPT model can be constructed by, but is not limited to, the following methods:

[0123] When receiving a user request (query) from a user, query the target named entity contained in the user request (initial input data) and the target entity type corresponding to the target named entity from the knowledge base, for example: query = play CTDGS, obtain the query result from the knowledge base, and the target named entity is CTDGS;

[0124] The target entity type of the target named entity can be extracted from the knowledge base according to the target named entity. For example, given the target named entity CTDGS, the corresponding target entity type of the target named entity is song (song = CTDGS).

[0125] Extract the boundary information (order of arrangement) of the target named entity in the original user request. For example, the boundary information of the target named entity CTDGS in query = play CTDGS is [3,7] (the character 'C' is the 3rd character in the query, and the character 'S' is the 7th character in the query).

[0126] In the generative pre-trained GPT model, the vocabulary that can be recognized is often fixed. Therefore, the generative pre-trained GPT model may not be able to directly recognize the target named entity and the corresponding target entity type in the user request. It is possible but not limited to avoid the misalignment between the target named entity recognized by the generative pre-trained GPT model and the boundary information, and enable the generative pre-trained GPT model to correctly recognize the target named entity and the corresponding target entity type through the following methods:

[0127] Connect the target named entity with the corresponding target entity type, and insert the separator [SEP] (the first label) before the target entity type of each target named entity for segmentation. For example, for query = play ABC of DEF, through the knowledge base recognition, the target named entity and the corresponding target entity type are respectively artist (singer, target entity type) = DEF (target named entity), song (target entity type) = ABC (target named entity). After segmentation with the separator [SEP], we get [SEP]artistDEF[SEP]songABC.

[0128] To enable the generative pre-trained GPT model to recognize the phrase "DEF", it is possible but not limited to convert the statement into a format that the generative pre-trained GPT model can recognize. For example, split "DEF" by characters, and the result is "DEF". Combining with the target entity type corresponding to the target named entity, the target field is "[SEP]artist DEF[SEP]song ABC".

[0129] In order to enable the information to be integrated and the original user request to interact, the above target fields can be incorporated into the original user request, but not limited to this, so that when the generative pre-trained GPT model processes the original user request, it can obtain the target fields. For example, given the original user request = play ABC of DEF, the target input data is obtained as "[CLS] play ABC of DEF [SEP] artist DEF [SEP] song ABC [SEP]".

[0130] The target input data is fed into the generative pre-trained GPT model, so that the trained generative pre-trained GPT model obtains external knowledge information (target fields).

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

[0132] Figure 8 It is a structural block diagram of a device for constructing model input data according to an embodiment of the present application; as Figure 8 shown, it includes:

[0133] An acquisition module 802, configured to acquire initial input data of the generative pre-trained GPT model, where the generative pre-trained GPT model is used to identify a target operation indicated by the initial input data;

[0134] An identification module 804, configured to identify a target entity type to which each of one or more target named entities in the initial input data belongs, so as to obtain one or more target entity types, where the generative pre-trained GPT model has the ability to identify the target entity types;

[0135] An addition module 806, configured to add one or more of the target entity types to the initial input data to obtain target input data;

[0136] An input module 808, configured to input the target input data into the generative pre-trained GPT model, where the generative pre-trained GPT model is used to identify the target operation indicated by the target input data.

[0137] Through the above embodiments, obtain the initial input data of the generative pre-trained GPT model for identifying the target operation indicated by the initial input data; identify the target entity type to which each target named entity in one or more target named entities in the initial input data belongs, to obtain one or more target entity types, and the generative pre-trained GPT model also has the ability to identify the target entity type; add one or more target entity types to the initial input data to obtain the target input data; input the target input data into the generative pre-trained GPT model for identifying the target operation indicated by the target input data. That is, input the target input data carrying the target entity type to which each target named entity in one or more target named entities in the initial input data belongs into the generative pre-trained GPT model. Since the generative pre-trained GPT model obtains the target entity type to which each target named entity in the initial input data belongs while receiving the target input data, the accuracy of the input data input into the generative pre-trained GPT model is improved. Therefore, the generative pre-trained GPT model can identify the target operation indicated by the initial input data according to the target entity type, ensuring that the information of each target named entity in the initial input data can be obtained. By adopting the above technical solution, the problems such as the low efficiency of the model in processing input data in the related art are solved, and the technical effect of improving the efficiency of the model in processing input data is achieved.

[0138] In an exemplary embodiment, the recognition module includes:

[0139] An extraction unit, configured to extract one or more of the target named entities from the initial input data;

[0140] A first recognition unit, configured to recognize the target entity type to which each target named entity belongs according to the entity types and named entities recorded in the knowledge base with a corresponding relationship, to obtain one or more target entity types.

[0141] In an exemplary embodiment, the addition module includes:

[0142] A splicing unit, configured to splice each target named entity with the corresponding target entity type into a target field, to obtain one or more target fields;

[0143] A processing unit, configured to connect one or more target fields after the initial input data to obtain the target input data.

[0144] In an exemplary embodiment, the splicing unit is further configured to: splice each of the target named entities with the corresponding target entity type to obtain an initial field; add a first tag before the initial field to obtain the target field, where the first tag is used to indicate the position of the initial field to the generative pre-trained GPT model.

[0145] In an exemplary embodiment, the processing unit is further configured to: identify the arrangement order of one or more of the target named entities in the initial input data; connect one or more of the target fields to the initial input data in accordance with the arrangement order to obtain the target input data.

[0146] In an exemplary embodiment, the adding module includes:

[0147] A first insertion unit, configured to insert each of the target entity types into the positions corresponding to the target named entities of each of the target entity types in the initial input data to obtain a reference input data, where the reference input data includes one or more candidate fields, and each candidate field includes a set of connected target entity types and target named entities;

[0148] A second insertion unit, configured to insert a second tag at the position of each candidate field to obtain the target input data, where the second tag is used to indicate the position of the candidate field to the generative pre-trained GPT model.

[0149] In an exemplary embodiment, the recognition module includes:

[0150] A second recognition unit, configured to perform named entity recognition on the initial input data to obtain multiple sets of entity recognition results, where each set of entity recognition results includes one or more of the target named entities;

[0151] A third recognition unit, configured to perform entity type recognition on the target named entities in each set of entity recognition results to obtain multiple sets of type recognition results, where each set of type recognition results includes a set of target named entities and target entity types with a corresponding relationship.

[0152] In an exemplary embodiment, the adding module includes:

[0153] An adding unit, configured to add the target entity type to the initial input data respectively according to each set of target named entities and target entity types with a corresponding relationship to obtain multiple target input data.

[0154] In an exemplary embodiment, the input module is configured to perform one of the following: screen out a target input data with the highest semantic matching degree between the multiple target input data and the initial input data; input the one target input data into the generative pre-trained GPT model;

[0155] Input the multiple target input data into the generative pre-trained GPT model, wherein the generative pre-trained GPT model is configured to screen out a target input data with the highest semantic matching degree between the multiple target input data and the initial input data, and identify the target operation indicated by the one target input data.

[0156] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the above program executes the method of any one of the above when running.

[0157] Optionally, in this embodiment, the above storage medium may be set to store program code for performing the following steps:

[0158] S1, obtain the initial input data of the generative pre-trained GPT model, wherein the generative pre-trained GPT model is configured to identify the target operation indicated by the initial input data;

[0159] S2, identify the target entity type to which each of the one or more target named entities in the initial input data belongs, to obtain one or more target entity types, wherein the generative pre-trained GPT model has the ability to identify the target entity type;

[0160] S3, add one or more of the target entity types to the initial input data to obtain target input data;

[0161] S4, input the target input data into the generative pre-trained GPT model, wherein the generative pre-trained GPT model is configured to identify the target operation indicated by the target input data.

[0162] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

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

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

[0165] S1, Obtain the initial input data of the generative pre-trained GPT model, where the generative pre-trained GPT model is used to identify the target operation indicated by the initial input data;

[0166] S2, Identify the target entity type to which each of one or more target named entities in the initial input data belongs, to obtain one or more target entity types, where the generative pre-trained GPT model has the ability to identify the target entity type;

[0167] S3, Add one or more of the target entity types to the initial input data to obtain target input data;

[0168] S4, Input the target input data into the generative pre-trained GPT model, where the generative pre-trained GPT model is used to identify the target operation indicated by the target input data.

[0169] Optionally, in this embodiment, the above storage medium may include but is not limited to: various media such as USB flash drives, read-only memories (ROM for short), random access memories (RAM for short), external hard drives, magnetic disks, or optical discs that can store program codes.

[0170] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and will not be elaborated herein.

[0171] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order than here, or they can be separately made into individual integrated circuit modules, or multiple modules or steps among them can be made into a single integrated circuit module to implement. In this way, the present application is not limited to any specific combination of hardware and software.

[0172] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A method for constructing input data for a generative pre-trained GPT model, characterized in that, it includes: Obtain the initial input data of the generative pre-trained GPT model, wherein the generative pre-trained GPT model is used to identify the target operation indicated by the initial input data; Identify the target entity type to which each of one or more target named entities in the initial input data belongs, and obtain one or more target entity types, wherein the generative pre-trained GPT model has the ability to identify the target entity type; Add one or more of the target entity types to the initial input data to obtain target input data; Input the target input data into the generative pre-trained GPT model, wherein the generative pre-trained GPT model is used to identify the target operation indicated by the target input data.

2. The method according to claim 1, characterized in that, The step of identifying the target entity type to which each of one or more target named entities in the initial input data belongs, and obtaining one or more target entity types, includes: Extract one or more of the target named entities from the initial input data; According to the entity types and named entities with corresponding relationships recorded in the knowledge base, identify the target entity type to which each of the target named entities belongs, and obtain one or more target entity types.

3. The method according to claim 1, characterized in that, The step of adding one or more of the target entity types to the initial input data to obtain target input data includes: Concatenate each of the target named entities with the corresponding target entity type to form a target field, and obtain one or more of the target fields; Connect one or more of the target fields after the initial input data to obtain the target input data.

4. The method according to claim 3, characterized in that, The step of concatenating each of the target named entities with the corresponding target entity type to form a target field, and obtaining one or more of the target fields, includes: Concatenate each of the target named entities with the corresponding target entity type to obtain an initial field; Add a first tag before the initial field to obtain the target field, wherein the first tag is used to indicate the position where the initial field is located to the generative pre-trained GPT model.

5. The method according to claim 3, characterized in that, The step of connecting one or more of the target fields after the initial input data to obtain the target input data includes: Identify the arrangement order of one or more of the target named entities in the initial input data; connect one or more of the target fields after the initial input data according to the arrangement order to obtain the target input data.

6. The method according to claim 1, characterized in that, The step of adding one or more of the target entity types to the initial input data to obtain target input data includes: Insert each of the target entity types into the positions of the corresponding target named entities in each of the initial input data to obtain reference input data, where the reference input data includes one or more candidate fields, and each candidate field includes a group of connected target entity types and target named entities; Insert a second tag at the position of each candidate field to obtain the target input data, where the second tag is used to indicate the position of the candidate field to the generative pre-trained GPT model.

7. The method according to claim 1, wherein, the identifying the target entity type to which each of the one or more target named entities in the initial input data belongs to obtain one or more target entity types includes: performing named entity recognition on the initial input data to obtain multiple sets of entity recognition results, where each set of entity recognition results includes one or more of the target named entities; performing entity type recognition on the target named entities in each set of entity recognition results to obtain multiple sets of type recognition results, where each set of type recognition results includes a set of corresponding target named entities and target entity types.

8. The method according to claim 7, wherein, the adding one or more of the target entity types to the initial input data to obtain target input data includes: adding the target entity types to the initial input data respectively according to each set of corresponding target named entities and target entity types to obtain multiple target input data.

9. The method according to claim 8, wherein, the inputting the target input data to the generative pre-trained GPT model includes one of the following: screening out a target input data with the highest semantic matching degree between the multiple target input data and the initial input data; inputting the one target input data into the generative pre-trained GPT model; inputting the multiple target input data into the generative pre-trained GPT model, where the generative pre-trained GPT model is used to screen out a target input data with the highest semantic matching degree between the multiple target input data and the initial input data, and identify the target operation indicated by the one target input data.

10. A computer-readable storage medium, wherein, the computer-readable storage medium includes a stored program, where the program executes the method according to any one of claims 1 to 9 when running.

11. An electronic device, including a memory and a processor, wherein, a computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 9 through the computer program.