A marking method, device, electronic device and medium based on GPT model
By retraining the GPT model with automotive domain knowledge and adjusting the samples, a labeling model for automotive domain features is generated, which solves the problem of insufficient generalization ability in existing technologies and realizes an efficient and low-cost labeling process.
Patent Information
- Application Number
- CN202311194255.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-15
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-09-15
AI Technical Summary
Existing labeling models have limited generalization ability, require labeling training with sample sets, consume a lot of manual labor costs and have high maintenance costs, and cannot solve the zero-shot problem.
The GPT model is retrained using knowledge samples from the vehicle domain to obtain a labeled model. Training samples are generated using mask sampling and sequence recombination. The model parameters are adjusted to adapt to the characteristics of the vehicle domain. Query samples are generated and classified in conjunction with prompts to obtain query labels.
It simplifies the labeling process, improves efficiency, reduces costs, enhances the model's knowledge base and labeling accuracy, and provides a greater competitive advantage.
Smart Images

Figure CN117113155B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data marking technology, specifically to a marking method, apparatus, electronic device, and medium based on the GPT model. Background Technology
[0002] With the rapid development of artificial intelligence (AI), repetitive, mechanical tasks can be automated. In the automotive field, this can be achieved through automated robots that automatically label data. For example, when a user inputs navigation to a location, the location needs to be automatically labeled and identified. However, before automatic labeling, manual annotation of relevant data is required, necessitating significant investment of human resources, time, and money to build a labeling model. Existing labeling models have limited generalization capabilities and cannot solve the zero-shot problem. They require training with a sample set and optimization with a validation set to obtain the final model. This model building process is not only complex and labor-intensive, but also incurs high maintenance costs.
[0003] Therefore, how to provide a marking method that is simple in process and cost-effective is a technical problem that urgently needs to be solved. Summary of the Invention
[0004] In view of the shortcomings of the prior art described above, the present invention provides a marking method, apparatus, electronic device and medium based on the GPT model to solve the above technical problems.
[0005] To achieve the above and other related objectives, the technical solution provided by this invention is as follows.
[0006] A labeling method based on the GPT model, the method comprising:
[0007] The process involves acquiring the data to be labeled, prompts, and a labeling model, wherein the labeling model is obtained by retraining the GPT model using knowledge samples from the vehicle domain.
[0008] The query statement corresponding to the data to be labeled is determined based on the labeling model.
[0009] The prompt is embedded into the query statement to obtain a query sample;
[0010] The query samples are classified using the labeling model to obtain query labels.
[0011] In the technical solution provided in the embodiments of this application, each of the vehicle domain knowledge samples is masked to obtain sampled data and masked data; the sampled data is reassembled to obtain reassembled samples; and the reassembled samples and masked data are used as training samples for training the GPT model.
[0012] In the technical solution provided in the embodiments of this application, the sampling data is reassembled to obtain a reassembled sample, and the method further includes: identifying the position of the reassembled sample and the mask data: obtaining a mask identifier, a start identifier, and an end identifier; embedding the mask identifier into the sampling position of the mask data to obtain a mask identifier; embedding the start identifier into the start point of the reassembled sample and embedding the end identifier into the end point of the reassembled sample to obtain a start-end identifier.
[0013] In the technical solution provided in the embodiments of this application, the labeling model is obtained by retraining the GPT model with vehicle domain knowledge samples, including: inputting the training samples into the GPT model for feature recognition to obtain vehicle sample features; adjusting the parameters of the GPT model based on the vehicle sample features and the actual vehicle features to obtain the labeling model.
[0014] In the technical solution provided in the embodiments of this application, the parameters of the GPT model are adjusted based on the vehicle sample features and the actual vehicle features to obtain a labeled model, including: calculating the similarity between the vehicle sample features and the actual vehicle features; updating the parameters of the GPT model according to the similarity until the similarity is within a preset similarity range, thereby obtaining the labeled model.
[0015] In the technical solution provided by the embodiments of this application, the data to be labeled is input into the labeling model for feature recognition to obtain the features to be labeled; the features to be labeled are then filtered by statement to obtain the query statement.
[0016] In the technical solution provided in the embodiments of this application, the query sample is classified by the labeling model to obtain query tags, including: inputting the query sample into the labeling model for feature recognition to obtain query features; matching the query features with vehicle sample features, and determining the query tags based on the matching results.
[0017] According to one aspect of the embodiments of this application, a labeling device based on a GPT model is provided. The device includes: a data acquisition module for acquiring data to be labeled, a prompt, and a labeling model, wherein the labeling model is obtained by retraining the GPT model using vehicle domain knowledge samples; a statement determination module for determining a query statement corresponding to the data to be labeled based on the labeling model; a sample determination module for embedding the prompt into the query statement to obtain a query sample; and a tag determination module for classifying the query sample using the labeling model to obtain query tags.
[0018] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the GPT-based marking method as described above.
[0019] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the marking method based on the GPT model as described above.
[0020] This application provides a tagging method, apparatus, electronic device, and medium based on the GPT model. The method includes: acquiring data to be tagged, prompts, and a tagging model, wherein the tagging model is obtained by retraining the GPT model using automotive domain knowledge samples; determining the query statement corresponding to the data to be tagged based on the tagging model; embedding the prompts into the query statements to obtain query samples; and classifying the query samples using the tagging model to obtain query tags. The tagging model of this application inputs relevant automotive domain information into the GPT model, enabling the GPT model to possess automotive domain knowledge and broadening its knowledge base. It identifies the query statements in the data to be tagged through the automotive domain knowledge in the tagging model, combines the prompts with the query statements to clarify the contextual meaning and obtain query samples, and classifies the query samples to quickly obtain query tags. This simplifies the tagging process for data to be tagged, improves overall efficiency, reduces tagging costs, and can bring higher benefits and greater competitive advantages to organizations. Attached Figure Description
[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0022] Figure 1 This is a flowchart illustrating a labeling method based on the GPT model, as shown in an exemplary embodiment of this application;
[0023] Figure 2 This is a flowchart illustrating the location identification of training samples, as shown in an exemplary embodiment of this application;
[0024] Figure 3 This is a block diagram illustrating a marking apparatus based on the GPT model, as shown in an exemplary embodiment of this application;
[0025] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0026] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0027] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0028] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0029] It's important to note that GPT stands for Generative Pre-trained Transformer, a natural language processing technique based on pre-trained models. "Generative" in GPT means "generative," while "pre-trained" indicates that the model is pre-trained before being trained for a specific task. Finally, "Transformer" refers to the attention mechanism network used in the model architecture. GPT's full Chinese name is "Generative Pre-trained Transformer." Through pre-training, GPT learns a large amount of knowledge and rules from raw text, giving it powerful understanding and generation capabilities. GPT has wide applications in natural language processing tasks, including question answering systems, text summarization, machine translation, and dialogue generation. In these tasks, GPT can generate text that conforms to grammatical and semantic rules based on the input context. GPT can capture word and sentence meanings through word and sentence vector representations. By encoding the input text and generating the output text through a decoder, GPT can achieve the task of generating Chinese text. Compared with other traditional methods, GPT performs exceptionally well in Chinese text generation tasks, producing fluent and accurate Chinese text.
[0030] The inventors discovered that with the rapid development of artificial intelligence, repetitive mechanical tasks can be automated by delegating them to AI. In the automotive field, automated robots can automatically label data, for example, when a user inputs navigation to a location, the location needs to be automatically labeled and identified. However, before automatic labeling, manual annotation of relevant data is required, necessitating significant investment of human resources, time, and money to build a labeling model. Existing labeling models have limited generalization capabilities and cannot solve the zero-shot problem. They require training with a sample set and optimization with a validation set to obtain the final labeled model. This model building process is not only complex and labor-intensive, but also incurs high maintenance costs.
[0031] To solve the above problems, this invention acquires the data to be labeled, the prompt, and the labeling model. Based on the labeling model, it determines the query statement for the data to be labeled, embeds the prompt into the query statement to obtain query samples, and classifies the query samples using the labeling model to obtain query tags.
[0032] Please see Figure 1 , Figure 1 This is a flowchart illustrating a labeling method based on the GPT model, as shown in an exemplary embodiment of this application. Figure 1 As shown, in one embodiment of this application, the labeling method based on the GPT model includes at least the following steps:
[0033] S110. Obtain the data to be labeled, prompts, and labeling model, wherein the labeling model is obtained by retraining the GPT model using knowledge samples from the vehicle domain.
[0034] S120. Determine the query statement corresponding to the data to be labeled based on the labeling model;
[0035] S130. Embed the prompt into the query statement to obtain a query sample;
[0036] S140. Classify the query samples using a labeling model to obtain query labels.
[0037] In step S110, the data to be labeled, the prompt, and the labeling model are acquired. The GPT model is retrained using in-vehicle domain knowledge samples to obtain the labeling model. The labeling model can learn and memorize relevant data in the in-vehicle domain. In-vehicle domain knowledge samples include, for example, vehicle functions, in-vehicle devices, and car brands. The data to be labeled can be dialogue information sent by the user to the vehicle, such as "Go to XX University".
[0038] In detail, before retraining the GPT model using automotive domain knowledge samples, the process includes: masking each automotive domain knowledge sample to obtain sampled data and masked data; recombining the sampled data to obtain recombined samples; and using the recombined samples and masked data as training samples for GPT model training. Specifically, if the automotive domain knowledge sample is [x1,x2,x3,x4,x5,x6], masking is performed on the automotive domain knowledge sample to obtain sampled data [x3], [x5,x6] and masked data [x1,x2,,x4,]; the sampled data is recombined; the positions of the sampled data are randomly shuffled to obtain recombined samples. If the recombined samples are [x5,x6] and [x3], the recombined samples and masked data are merged to obtain training samples, which are then used for GPT model training.
[0039] Please see Figure 2 , Figure 2 This is a flowchart illustrating the location identification of training samples, as shown in an exemplary embodiment of this application.
[0040] More in detail, such as Figure 2As shown, after the sampled data undergoes sequence recombination to obtain recombined samples, the process further includes: identifying the positions of the recombined samples and mask data: obtaining a mask identifier, a start identifier, and an end identifier; embedding the mask identifier into the sampling position of the mask data to obtain a mask identifier; embedding the start identifier into the start point of the recombined sample and the end identifier into the end point of the recombined sample to obtain start and end point identifiers. Specifically, the mask identifier is [M], the start identifier is [S], and the end identifier is [E]. The mask identifier [M] is embedded into the sampling position of the mask data to obtain a sampling identifier; the mask data is: [x1, x2, M, x4, M], where the position with M indicates that the data in that part is masked and sampled; the start identifier [S] is embedded into the start point of the recombined sample and the end identifier [E] is embedded into the end point of the recombined sample to obtain start and end point identifiers; the recombined samples are: [S, x5, x6, E] and [S, x3, E], where S is the start identifier and E is the end identifier. Training samples are better labeled using mask identifiers, start identifiers, and end identifiers to facilitate sample training for the GPT model.
[0041] In detail, the labeling model is obtained by retraining the GPT model using automotive domain knowledge samples. This includes: inputting training samples into the GPT model for feature recognition to obtain automotive sample features; and adjusting the parameters of the GPT model based on the automotive sample features and actual automotive features to obtain the labeling model. It should be noted that inputting training samples into the GPT model involves encoding two sample word groups using the GPT model, performing data transformation on the encoded data to obtain the relative positions of the two sample word groups, and then performing vector feature transformation on the relative positions to obtain the automotive sample features. Because the training samples are automatically filled in, which improves the accuracy of the labeling model, feature extraction is performed using the training samples, and the parameters of the GPT model are adjusted based on the automotive sample features and actual automotive features to obtain the labeling model.
[0042] More specifically, the parameters of the GPT model are adjusted based on the vehicle-mounted sample features and actual vehicle-mounted features to obtain the labeled model. This includes: calculating the similarity between the vehicle-mounted sample features and actual vehicle-mounted features; updating the parameters of the GPT model based on the similarity until the similarity is within a preset similarity range, thus obtaining the labeled model. Specifically, if the vehicle-mounted sample features are driving data for a certain road segment, the similarity between the vehicle-mounted sample features and actual vehicle-mounted features is calculated. The similarity calculation includes data on the speed, route, lane, and other vehicle travel data during the vehicle's journey. If the similarity is outside the preset similarity range, the parameters in the GPT model are adjusted until the similarity is within the preset similarity range, at which point the parameters of the GPT model stabilize, resulting in the labeled model.
[0043] In detail, determining the corresponding query statement for the data to be tagged based on the tagged model includes: inputting the data to be tagged into the tagged model for feature recognition to obtain the features to be tagged; and filtering the features to be tagged to obtain the query statement. Specifically, the tagged data is tagged using the tagged model to obtain the features to be tagged; irrelevant data in the tagged features is filtered to obtain the query statement.
[0044] In detail, embedding a prompt into the query statement to obtain a query sample includes: when the query statement has multiple semantic meanings, obtaining a prompt, and concatenating the prompt with the query statement to obtain a query sample. For example, when the query statement is "Go to XX University," many universities have multiple campuses, and the referent is ambiguous, a prompt is needed, such as "XX University is located in City A," to specify the university's location, thus improving the understanding of the query statement and increasing the accuracy of semantic understanding. The prompt is then concatenated after the data to be labeled to obtain the query sample, which is "Go to XX University, XX University is located in City A."
[0045] In detail, the query samples are classified using a labeling model to obtain query tags. This includes: inputting the query samples into the labeling model for feature recognition to obtain query features; matching the query features with the features of the vehicle-mounted samples; and determining the query tags based on the matching results. It should be explained that when the query sample is "Go to XX University, XX University is located in City A," the labeling model performs feature recognition on the query data to identify the destination and specific location information. The query features are then matched with the features of the vehicle-mounted samples. If the matching result is a match, the destination and specific location information become the query tags. If there is no match, the user is notified that the query sample is abnormal and they should confirm the accuracy of the data to be labeled and the prompt message.
[0046] This application provides a tagging method based on the GPT model. The method includes: acquiring data to be tagged, prompts, and a tagging model. The tagging model is obtained by retraining the GPT model using automotive domain knowledge samples. The method determines the query statement corresponding to the data to be tagged based on the tagging model; embedding the prompts into the query statements to obtain query samples; and classifying the query samples using the tagging model to obtain query labels. The tagging model of this application inputs relevant automotive domain information into the GPT model, enabling the GPT model to possess automotive domain knowledge and broadening its knowledge base. It identifies the query statements in the data to be tagged through the automotive domain knowledge in the tagging model, combines the prompts with the query statements to clarify the contextual meaning and obtain query samples. The tagging model classifies the query samples to quickly obtain query labels, simplifying the tagging process for data to be tagged, improving overall efficiency, reducing tagging costs, and bringing higher benefits and greater competitive advantages to the organization.
[0047] Please see Figure 3 This is a block diagram illustrating a marking device based on the GPT model, as shown in an exemplary embodiment of the present invention. Figure 3 As shown, this exemplary GPT-based marking device includes:
[0048] The acquisition module 310 is used to acquire the data to be labeled, the prompts, and the labeling model, wherein the labeling model is obtained by retraining the GPT model using vehicle domain knowledge samples;
[0049] The statement determination module 320 is used to determine the query statement corresponding to the data to be labeled based on the labeling model.
[0050] The sample determination module 330 is used to embed the prompt into the query statement to obtain the query sample;
[0051] The label determination module 340 is used to classify the query samples using a labeling model to obtain query labels.
[0052] It should be noted that the marking device based on the GPT model provided in the above embodiments and the marking method based on the GPT model provided in the above embodiments belong to the same concept. The specific ways in which each module and unit performs operations have been described in detail in the method embodiments, and will not be repeated here. In practical applications, the marking device based on the GPT model provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above, and this is not a limitation here.
[0053] Embodiments of the present invention also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device enables the GPT-based marking method provided in the above embodiments.
[0054] Please see Figure 4 A schematic diagram of a computer system suitable for implementing embodiments of the present invention is shown. It should be noted that... Figure 4 The computer system 400 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0055] like Figure 4As shown, the computer system 400 includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on a program stored in Read-Only Memory (ROM) 402 or a program loaded from Storage Unit 408 into Random Access Memory (RAM) 403. The RAM 403 also stores various programs and data required for system operation. The CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An Input / Output (I / O) interface 405 is also connected to the bus 404.
[0056] The following components are connected to I / O interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to I / O interface 405 as needed. A removable medium 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 410 as needed so that computer programs read from it can be installed into storage section 408 as needed.
[0057] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs various functions defined in the system of the present invention.
[0058] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the marking method based on the GPT model as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0059] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0060] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0061] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0062] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A labeling method based on the GPT model, characterized in that, The method includes: The process involves acquiring the data to be labeled, prompts, and a labeling model, wherein the labeling model is obtained by retraining the GPT model using knowledge samples from the vehicle domain. The query statement corresponding to the data to be labeled is determined based on the labeling model. The prompt is embedded into the query statement to obtain a query sample; The query samples are classified using the labeling model to obtain query labels; Before retraining the GPT model using knowledge samples from the automotive domain, the process includes: Each of the aforementioned vehicle domain knowledge samples is masked for sampling to obtain sampled data and masked data; The sampled data is reconstructed to obtain reconstructed samples; The recombined samples and mask data are used as training samples for training the GPT model.
2. The labeling method based on the GPT model according to claim 1, characterized in that, The process of reconstructing the sampled data to obtain reconstructed samples also includes: identifying the positions of the reconstructed samples and the mask data. Get the mask identifier, start identifier, and end identifier; The mask identifier is embedded into the sampling position of the mask data to obtain the mask identifier; The start point identifier is embedded into the start point of the recombined sample, and the end point identifier is embedded into the end point of the recombined sample to obtain the start and end point identifiers.
3. The labeling method based on the GPT model according to claim 2, characterized in that, The labeling model is obtained by retraining the GPT model using knowledge samples from the vehicle domain, including: The training samples are input into the GPT model for feature recognition to obtain vehicle sample features; The parameters of the GPT model are adjusted based on the vehicle sample features and the actual vehicle features to obtain the labeling model.
4. The labeling method based on the GPT model according to claim 3, characterized in that, The parameters of the GPT model are adjusted based on the vehicle sample features and actual vehicle features to obtain a labeling model, including: Calculate the similarity between the vehicle-mounted sample features and the actual vehicle-mounted features; The parameters of the GPT model are updated based on the similarity until the similarity is within a preset similarity range, thus obtaining the labeling model.
5. The labeling method based on the GPT model according to claim 3, characterized in that, The query statement corresponding to the data to be labeled is determined based on the labeling model, including: The data to be marked is input into the marking model for feature recognition to obtain the features to be marked; The query statement is obtained by filtering the features to be labeled.
6. The labeling method based on the GPT model according to claim 2, characterized in that, The query samples are classified using the labeling model to obtain query labels, including: The query sample is input into the labeling model for feature recognition to obtain the query features; The query features are matched with the features of the vehicle samples, and the query label is determined based on the matching results.
7. A marking device based on the GPT model, characterized in that, include: The data acquisition module is used to acquire the data to be labeled, prompts, and labeling models, wherein the labeling model is obtained by retraining the GPT model using vehicle domain knowledge samples. The statement determination module is used to determine the query statement corresponding to the data to be labeled based on the labeling model. A sample determination module is used to embed the prompt into the query statement to obtain a query sample; The label determination module is used to classify the query sample using the labeling model to obtain query labels; Before retraining the GPT model using knowledge samples from the automotive domain, the process includes: Each of the aforementioned vehicle domain knowledge samples is masked for sampling to obtain sampled data and masked data; The sampled data is reconstructed to obtain reconstructed samples; The recombined samples and mask data are used as training samples for training the GPT model.
8. An electronic device, characterized in that, The electronic device includes: one or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the electronic device to implement the marking method based on the GPT model as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the marking method based on the GPT model as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Coal mine production field question and answer intention classification method based on prompt learning
CN116595169A