Label determination method and apparatus, electronic device, and storage medium
By combining a pre-defined defect label dictionary with the ALBERT-TextCNN model, the problems of unstructured and semantically unclear vehicle recall complaint data are solved, enabling fast and accurate labeling processing.
Patent Information
- Application Number
- CN202211641048.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-12-20
AI Technical Summary
The unstructured and semantically ambiguous nature of vehicle recall complaint data makes it difficult to quickly and accurately categorize the complaint data to the vehicle parts and categories.
The vehicle safety data is initially labeled using a pre-set defect label dictionary. Then, a multi-label classification method combining the ALBERT pre-trained language model and the TextCNN deep learning model is used to determine the defect labels.
It enables rapid and accurate labeling of vehicle recall complaint data, solves the label recommendation problem of unstructured data, and improves the accuracy of data classification.
Smart Images

Figure CN116383710B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of computers, and particularly relates to a label determination method and device, an electronic device, and a storage medium. BACKGROUND
[0002] With the development of automobile technology, safety issues become more and more important, and the complaint data about various problems of automobiles is also increasing. However, the automobile recall defect complaint data has problems such as non-structured and unclear semantics, and cannot be quickly and accurately classified into which part of the automobile and which type of problem. Therefore, how to classify the current automobile recall complaint data by labels and realize the labeling of automobile recall complaint data is a technical problem that needs to be solved urgently. SUMMARY
[0003] The embodiments of the present application provide a label determination method, device, electronic device, and storage medium, which can quickly and accurately determine the defect label of automobile recall complaint data.
[0004] In a first aspect, the embodiments of the present application provide a label determination method, which comprises: obtaining automobile safety data to be processed; determining at least one defect label of the automobile safety data according to a preset defect label dictionary; in the case that the defect label is failed to be determined according to the preset defect label dictionary, inputting the automobile safety data into a multi-label classification model to obtain at least one defect label of the automobile safety data, wherein the multi-label classification model is obtained based on a plurality of safety data samples.
[0005] In a second aspect, the embodiments of the present application provide a label determination device, which comprises: an obtaining module configured to obtain automobile safety data to be processed; a determining module configured to determine at least one defect label of the automobile safety data according to a preset defect label dictionary; and the determining module is further configured to, in the case that the defect label is failed to be determined according to the preset defect label dictionary, input the automobile safety data into a multi-label classification model to obtain at least one defect label of the automobile safety data, wherein the multi-label classification model is obtained based on a plurality of safety data samples.
[0006] In a third aspect, the embodiments of the present application provide an electronic device, which comprises a processor, a memory, and a program or instruction stored on the memory and executable on the processor, and the program or instruction is executed by the processor to implement the steps of the method according to the first aspect.
[0007] In a fourth aspect, the embodiments of the present application provide a readable storage medium, which stores a program or instruction, and the program or instruction is executed by a processor to implement the steps of the method according to the first aspect.
[0008] In a fifth aspect, an embodiment of the present application provides a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, and the processor is configured to run programs or instructions to implement the method in the first aspect.
[0009] In the label determination method provided in the present application, first, a defect label dictionary is used to recommend a defect label for the automobile safety data. When the defect label dictionary cannot determine the defect label of the automobile safety data, a trained multi-label classification model is used to determine the defect label of the automobile safety data. In this way, the problem of quickly and accurately corresponding the automobile safety data to the defect label is solved, and the labeling of the automobile safety data is realized. BRIEF DESCRIPTION OF DRAWINGS
[0010] Figure 1 is a flowchart of a label determination method provided by an embodiment of the present application;
[0011] Figure 2 is a flowchart of another label determination method provided by an embodiment of the present application;
[0012] Figure 3 is a flowchart of still another label determination method provided by an embodiment of the present application;
[0013] Figure 4 is a flowchart of a specific implementation of a label determination method provided by an embodiment of the present application;
[0014] Figure 5 is a structural diagram of a label determination device provided by an embodiment of the present application;
[0015] Figure 6 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0017] At present, there is no method for multi-label classification of automobile recall complaint data. There are many studies on multi-label data classification, such as CNN-RNN, which uses an integrated application of a convolutional neural network and a recurrent neural network in multi-label text classification to capture global and contextual semantic information. There is also an embedded language learning model ELMO based on a bidirectional long short-term memory network BiLSTM learning framework that can effectively learn contextual semantic information. These models either face problems such as gradient disappearance and non-parallelization, or face problems such as insufficient text representation ability, or face the problem that only a large amount of data can be used to train better results. Automobile recall complaint data has strong domain characteristics (such as: complaint data is not massive, complaint data text is short, and complaint category text data length is balanced). Pre-trained language models have strong text representation and semantic understanding capabilities. TextCNN uses the classification structure of CNN to classify sentences composed of word vectors using different size windows to capture local information of sentences and extract information, which is very suitable for short text classification. Therefore, this paper combines the ALBERT pre-trained language model and the deep convolutional neural network TextCNN to realize a multi-label automobile recall complaint text classification model based on the ALBERT-TextCNN deep learning model framework.
[0018] The technical problems solved by the present application are first to develop fault standards, that is, what are the defect labels of automobile primary assemblies and secondary assemblies, what are the key words for description, and what are the corresponding fault levels; secondly, to map specific defect complaint data content to fault standards. The third is to select a suitable text multi-label classification method according to the characteristics of automobile recall complaint data.
[0019] The label determination method, device, electronic equipment and storage medium provided by the embodiments of the present application will be described in detail below in combination with the drawings and specific embodiments and their application scenarios.
[0020] Figure 1 An embodiment of the present application provides a label determination method. The method can be executed by an electronic device, which can include a server and / or a terminal device. In other words, the method can be executed by software or hardware installed on the electronic device. The method includes the following steps.
[0021] Step 110: Obtain automobile safety data to be processed.
[0022] The automobile safety data can include vehicle basic information, fault phenomenon, and fault location, such as "the engine of xxx has a crack".
[0023] The source of the automobile safety data can include official website complaint data, automobile media website discussion data, social platform public opinion data, vehicle enterprise technical service bulletin (TSB) announcement data, and traffic accident related data.
[0024] It should be noted that the automobile safety data can be obtained by data mining through big data analysis, data dotting, or user reporting through a client.
[0025] Step 120: determining at least one defect label of the automobile safety data according to a preset defect label dictionary.
[0026] The preset defect label dictionary is created based on historical automobile safety data using expert experience, and is used to recommend labels for the automobile safety data to be processed. The preset defect label includes a fault position and a fault feature. The fault position includes a first assembly and a second assembly. The first assembly refers to a first component of the automobile, which is assembled by the main machine factory, for example, the automobile air conditioner belongs to the first assembly. The second assembly refers to a second component of the automobile, which is manufactured by the supplier of the supplier, and is a part of the first part, that is, a part of the part, for example, the automobile air conditioner evaporator is a part of the automobile air conditioner, which belongs to the second assembly. The fault feature includes a keyword and a severity level. The keyword is a fault description of the automobile safety data, for example, "the engine of xxx has a crack", and the keyword is "crack". The severity level refers to a quantitative operation of the defect degree of the automobile safety data. The severity level can be divided into five levels: high, higher, medium, lower, and low.
[0027] It should be noted that the at least one defect label refers to a plurality of defect labels that can correspond to one piece of automobile safety data, for example, an automobile fault complaint can include a plurality of fault performances, such as oil leakage, odor, etc., and the corresponding defect labels can be oil leakage and odor.
[0028] In one implementation mode, as shown in FIG. 1, Figure 2 Step 120 includes:
[0029] Step 121: preprocessing the automobile safety data to determine the first assembly, the second assembly, and the target keyword of the automobile safety data.
[0030] The preprocessing refers to splitting the automobile safety data according to the first assembly and the second assembly to form preprocessed data indexed by the first assembly and the second assembly, for example, for the safety data "discovering that the vehicle body often shakes", after preprocessing, the first assembly is the vehicle body, the second assembly is the vehicle frame, and the target keyword is shaking. It should be noted that the preprocessing operation is performed by a business personnel or an automobile recall expert.
[0031] It should be noted that each automobile safety data is indexed by a unique primary assembly and secondary assembly, and if an automobile safety data involves a set of multiple primary assemblies and secondary assemblies, the automobile safety data needs to be split into different primary assemblies and secondary assemblies and corresponding data contents during preprocessing.
[0032] Step 122: match the target keywords of the automobile safety data with the keywords of the preset defect label dictionary, and take the matched preset defect label as a backup label.
[0033] Step 123: in the case where the backup label is determined to be the same as the primary assembly and secondary assembly of the automobile safety data, take the backup label as the defect label of the automobile safety data.
[0034] It can be understood that the logic of defect label determination is to match the keywords in the preset defect label dictionary with the keywords in the automobile safety data, and to perform secondary screening through the primary assembly and secondary assembly of the automobile safety data and the defect label. For example, a keyword in a piece of automobile safety data contains any keyword of A label and any keyword of B label, and the primary assembly and secondary assembly of A label and B label are consistent with the automobile safety data, then A label and B label are recommended to the automobile safety data, that is, A label and B label are determined as the defect label of the automobile safety data.
[0035] Optionally, the determined defect label can be re-verified by other business personnel or experts to ensure that the automobile safety data corresponds to the correct defect label.
[0036] Step 130: in the case where the defect label is determined according to the preset defect label dictionary fails, input the automobile safety data into a multi-label classification model to obtain at least one defect label of the automobile safety data.
[0037] The multi-label classification model is trained based on a plurality of safety data samples.
[0038] Since the preset defect label dictionary is created based on historical automobile safety data and expert experience, it cannot quickly and accurately recommend defect labels for automobile safety data when facing unstructured and semantically unclear automobile safety data. Therefore, the multi-label classification model can well solve this problem. The automobile safety data whose defect label determination fails according to the preset defect label dictionary is input into the multi-label classification model, and the multi-label classification model gives the defect label of the automobile safety data.
[0039] In the implementation manner of the present application, first, a defect label is recommended for the automobile safety data through a preset defect label dictionary, and when the preset defect label dictionary cannot determine the defect label of the automobile safety data, a trained multi-label classification model is used to determine the defect label of the automobile safety data. In this way, the problem of quickly and accurately corresponding the automobile safety data to the defect label is solved, and the labeling of the automobile safety data is realized.
[0040] In an implementation manner, before the at least one defect label of the automobile safety data is determined according to the preset defect label dictionary, the method further includes: obtaining an automobile safety data set, wherein the automobile safety data set includes a plurality of automobile safety data; analyzing each automobile safety data to obtain corresponding defect features; determining the preset defect label dictionary based on the defect features and the feature levels.
[0041] It can be understood that before the defect label of the automobile safety data is determined according to the preset defect label dictionary, the preset defect label dictionary needs to be determined, that is, the plurality of automobile safety data in the automobile safety data set is analyzed to obtain the defect features of each automobile safety data, and then the defect label is determined according to the defect features of each automobile safety data, and then the defect label corresponding severity level is set based on the defect label. It should be noted that the determination of the preset defect label dictionary can be operated by a business personnel or an automobile recall expert.
[0042] In an implementation manner, the defect features include a fault position and a keyword, wherein the fault position includes a primary assembly and a secondary assembly; the preset defect label dictionary is determined based on the defect features and the feature levels, including determining the defect label of each automobile safety data according to the primary assembly, the secondary assembly and the keyword; setting the severity level of the defect label based on the defect label; and determining the preset defect label dictionary based on the primary assembly, the secondary assembly, the keyword, the defect label and the severity level corresponding to the defect label of each automobile safety data. For example, as shown in Table 1, a record table of the preset defect label dictionary is as follows:
[0043]
[0044] The preset defect label dictionary can be modified, and the modification time and the modifier will also be recorded, so that the controversial defect label can be traced back.
[0045] It should be noted that the work of label determination is completed in the data warehouse, and the task is an offline task. Therefore, newly acquired automobile safety data and a newly maintained preset defect label dictionary need to be used in the label determination work after a specified time, and the specified time can be set according to actual conditions, and the application does not specifically set the specified time.
[0046] In an implementation manner, before the automobile safety data is input into the multi-label classification model to obtain at least one defect label of the automobile safety data, the method further includes: training a preset multi-label classification model based on a training set and a predetermined loss function until the loss function converges, to obtain a trained preset multi-label classification model; verifying the trained preset multi-label classification model based on a verification set to determine whether the trained preset multi-label classification model meets a first preset effect; and testing the trained preset multi-label classification model based on a test set, and taking the trained preset multi-label classification model that meets a second preset effect as the multi-label classification model.
[0047] The training set, the verification set, and the test set are high-quality label data that are randomly extracted after being processed by a business personnel or an automobile recall expert and are allocated according to a ratio of 3:1:1. Optionally, the format of the high-quality label data can be [complaint data: label 1 label 2… label n], wherein the labels are separated by a tab key. For example, “[the automobile has been purchased since 2011, and there has been an odor in the car for more than 6 years. Many methods have been used, but the odor cannot be eliminated: bodywork and frame odor]”.
[0048] In the implementation manner, the construction of the multi-label classification model can include a training process, a verification process, and a test process. The training process is to train a preset multi-label classification model based on a training set and a predetermined loss function. The verification process is to verify whether the trained preset multi-label classification model meets a preset effect based on a verification set. The test process is to evaluate whether the verified preset multi-label classification model can be put into use based on a test set. The first preset effect means that the preset multi-label classification model does not appear overfitting in the verification process. The second preset effect means that the preset multi-label classification model can be deployed as a production model.
[0049] It should be noted that in the case of unqualified verification or test failure, the preset multi-label classification model needs to be parameter-optimized and continuously trained.
[0050] In an implementation manner, the preset multi-label classification model includes a pre-trained language model and a text classification model.
[0051] The pre-training language model can be a Lite BERT (A Lite BERT for Self-supervised Learning of Language Representations, ALBERT), and the text classification model can be a text convolutional neural network (Text Convolutional Neural Networks, TextCNN).
[0052] As shown in Figure 3 The preset multi-label classification model is trained based on the training set and the predetermined loss function until the loss function converges, and the trained preset multi-label classification model is obtained, including the following steps:
[0053] Step 310: inputting the training set into the pre-training language model, performing semantic feature extraction on the training samples in the training set by the pre-training language model, and obtaining the text feature vector of the training sample.
[0054] Specifically, the training set is input into the pre-training language model, each training sample in the training set is processed by the processing layer of the pre-training language model, the original word vector, the position vector and the first-level text vector of each training sample are generated, and then the original word vector, the position vector and the first-level text vector of each training sample are processed by the encoder of the pre-training language model, and the text feature vector of each training sample is output.
[0055] Step 320: inputting the text feature vector into the text classification model, performing multi-level processing on the text feature vector by the text classification model, and obtaining the trained preset multi-label classification model.
[0056] In one implementation, the text classification model includes an input layer, a convolution layer, a pooling layer, a first full connection layer, and a second full connection layer.
[0057] The multi-level processing of the text feature vector comprises: performing semantic feature extraction on the text feature vector through the input layer to obtain a high-level text feature vector of the training sample; performing convolution operation on the high-level text feature vector through the convolution layer to obtain a convolution feature vector; performing dimension reduction operation on the convolution feature vector through the pooling layer to obtain a pooling feature vector; performing dropout operation on the pooling feature vector through the first full connection layer to obtain a first feature vector; performing activation operation on the first feature vector through the second full connection layer to obtain a first prediction probability of the training sample for each defect label, thereby obtaining a plurality of first prediction probabilities; and training the multi-label classification model based on the plurality of first prediction probabilities and the predetermined loss function. In another implementation manner, the predetermined loss function can be:
[0058]
[0059] wherein N represents the number of the training samples, L represents the number of the defect labels corresponding to the training samples, in the interval [0, 1], represents the prediction probability of the defect label, y ij in the interval [0, 1], represents whether the i-th training sample belongs to the j-th defect label.
[0060] In an implementation manner, the testing of the preset multi-label classification model that passes the verification comprises: evaluating the preset multi-label classification model based on preset evaluation parameters.
[0061] wherein the preset evaluation parameters can comprise precision, recall and F1 value.
[0062] It should be noted that the preset multi-label classification model can be evaluated by dividing the training samples in the test set into positive class (Positive) and negative class (Negative), so that the output of the preset multi-label classification model has four classification results: TP (True Positive): correct positive example, an instance is a positive class and is also determined as a positive class; FN (False Negative): false negative example, false alarm, a positive class is determined as a false class; FP (False Positive): false positive example, false alarm, a false class is determined as a positive class; TN (True Negative): correct negative example, an instance is a false class and is also determined as a false class. According to the above four classification results, the specific values of precision, recall and F1 value can be determined. The precision can be determined by the following formula:
[0063]
[0064] The recall rate can be determined by the following formula:
[0065]
[0066] It should be noted that the precision and recall affect each other and are mutually "restrained": pursuing high precision results in low recall, and pursuing high recall usually affects precision. In order to make the predicted results have high precision and recall, the F-score index can be introduced to balance the precision and recall, so that the preset multi-label classification model can be evaluated more comprehensively. The F-score can be determined by the following formula:
[0067]
[0068] It should be noted that if β is 1, it means that Precision and Recall are equally important; if β is less than 1, it means that Precision is more important than Recall; and if β is greater than 1, it means that Recall is more important than Precision. In the present implementation, β is 1, that is, F1 is the harmonic mean of precision and recall, and F 1-Score The greater the value, the higher the quality of the model, so when the precision, recall and F1 value are all greater than 0.8, the F 1-Score value is the largest, the preset multi-label classification model is determined to be a multi-label classification model.
[0069] In one implementation, after determining the at least one defect label of the automotive safety data, the method further includes converting the at least one defect label of the automotive safety data into a one-hot variable for storage.
[0070] For example, the preset defect label dictionary includes 500 defect labels, and two defect labels are involved in certain automotive safety data: cooling kettle crack and ignition coil damage fault. The two defects are located at the 2nd and 4th positions of the preset defect label dictionary, and the one-hot label encoding of the automotive safety data is 0101000…0.
[0071] Figure 4 A flowchart illustrating a specific implementation of a label determination method in the present application is shown, which includes the following steps:
[0072] Step 410: randomly divide the complaint label data labeled by expert experience into three parts: training set, validation set and test set.
[0073] Step 420: use the ALBERT pre-training model + TextCNN model to train the multi-label classification model using the training set.
[0074] Step 430: according to the precision and recall performance of the produced model on the validation set and test, confirm the final model.
[0075] Step 440: deploy the multi-classification NLP model for complaint data label recommendation.
[0076] In the present implementation, a text multi-label classification model is trained using complaint label data that has been confirmed by experts and an ALBERT+TextCNN method, so that when a suitable defect label cannot be matched through keyword matching, a trained NLP classification model can be used for defect label recommendation.
[0077] The above, in combination with Figures 1-4 The label determination method of the embodiment of the present specification is described in detail, and the following, in combination with Figure 5 , a label determination device of the embodiment of the present specification is described in detail.
[0078] Figure 5 The structure diagram of a label determination device provided by the embodiment of the present specification is shown, as Figure 3 shown, the label determination device 500 can include an acquisition module 510 and a determination module 520.
[0079] The acquisition module 510 is configured to acquire automobile safety data to be processed; the determination module 520 is configured to determine at least one defect label of the automobile safety data according to a preset defect label dictionary; and the determination module 520 is further configured to, in a case where the determination of the defect label according to the preset defect label dictionary fails, input the automobile safety data into a multi-label classification model to obtain at least one defect label of the automobile safety data, wherein the multi-label classification model is obtained based on a plurality of safety data samples.
[0080] In one implementation, the determination module 520 is further configured to, before determining the at least one defect label of the automobile safety data according to the preset defect label dictionary, acquire an automobile safety data set, wherein the automobile safety data set includes a plurality of automobile safety data; analyze each of the automobile safety data to acquire corresponding defect features; divide feature levels based on the defect features to determine the preset defect label dictionary.
[0081] In an implementation, the defect feature includes a fault location and a keyword, and the determining module 520 is further configured to determine a defect label of each of the automotive safety data according to the primary assembly, the secondary assembly, and the keyword; set a severity level of the defect label based on the defect label; and determine the preset defect label dictionary based on the primary assembly, the secondary assembly, the keyword, the defect label, and the severity level corresponding to the defect label of each of the automotive safety data.
[0082] In an implementation, the determining module 520 is further configured to pre-process the automotive safety data, determine a primary assembly, a secondary assembly, and a target keyword of the automotive safety data; match the target keyword of the automotive safety data with the keyword of the preset defect label dictionary, and use the matched preset defect label as a backup label; and in a case where the backup label is determined to be the same as the primary assembly and the secondary assembly of the automotive safety data, use the backup label as a defect label of the automotive safety data.
[0083] In an implementation, the determining module 520 is further configured to, before the automotive safety data is input into the multi-label classification model to obtain at least one defect label of the automotive safety data, train a preset multi-label classification model based on a training set and a predetermined loss function until the loss function converges to obtain a trained preset multi-label classification model; verify that the trained preset multi-label classification model meets a first preset effect based on a verification set; and test the preset multi-label classification model that passes the verification based on a test set, and use the preset multi-label classification model that meets a second preset effect as the multi-label classification model.
[0084] In an implementation, the preset multi-label classification model includes a pre-trained language model and a text classification model, and the determining module 520 is further configured to input the training set into the pre-trained language model, perform semantic feature extraction on the training sample in the training set by the pre-trained language model to obtain a text feature vector of the training sample; and input the text feature vector into the text classification model, perform multi-level processing on the text feature vector by the text classification model, and obtain the trained preset multi-label classification model.
[0085] In an implementation manner, the text classification model comprises an input layer, a convolution layer, a pooling layer, a first full connection layer, and a second full connection layer. The determining module 520 is further configured to perform semantic feature extraction on the text feature vector through the input layer to obtain a high-level text feature vector of the training sample; perform convolution operation on the high-level text feature vector through the convolution layer to obtain a convolution feature vector; perform dimension reduction operation on the convolution feature vector through the pooling layer to obtain a pooling feature vector; perform dropout operation on the pooling feature vector through the first full connection layer to obtain a first feature vector; perform activation operation on the first feature vector through the second full connection layer to obtain a first prediction probability of the training sample for each defect label, and obtain a plurality of first prediction probabilities; and train the preset multi-label classification model based on the plurality of first prediction probabilities and the predetermined loss function.
[0086] In an implementation manner, the predetermined loss function of the determining module 520 can be:
[0087]
[0088] wherein N represents the number of training samples, L represents the number of defect labels corresponding to the training sample, in the interval [0, 1], represents the prediction probability of the defect label, y ij between 0 and 1, represents whether the i th training sample belongs to the j th label.
[0089] In an implementation manner, the determining module 520 is further configured to evaluate the preset multi-label classification model based on a preset evaluation parameter.
[0090] In an implementation manner, the determining module 520 is further configured to convert the at least one defect label of the automobile safety data into a one-hot variable for storage after determining the at least one defect label of the automobile safety data.
[0091] The label determining apparatus in the embodiments of the present application can be an apparatus, or a component, an integrated circuit, or a chip in an electronic device. The embodiments of the present application are not limited in a specific manner.
[0092] The label determining apparatus in the embodiments of the present application can be an apparatus with an operating system. The operating system can be an Android operating system, an ios operating system, or other possible operating systems, and the embodiments of the present application are not limited in a specific manner.
[0093] The label determining apparatus provided in the embodiments of the present application can achieve the following advantages. Figure 1 The processes achieved in the method embodiments are not repeated here to avoid repetition.
[0094] Optionally, as shown in Figure 6 The electronic device includes a processor 610, a memory 620, and a program or instruction stored in the memory 620 and executable on the processor 610. The program or instruction is executed by the processor 610 to implement the processes of the above method embodiments, and achieve the same technical effects. To avoid repetition, details are not described here.
[0095] The readable storage medium stores a program or instruction, which is executed by a processor to implement the processes of the above tag determination method embodiment, and achieve the same technical effects. To avoid repetition, details are not described here.
[0096] The processor is the processor of the electronic device in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc.
[0097] The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to execute a program or instruction to implement the processes of the above tag determination method embodiment, and achieve the same technical effects. To avoid repetition, details are not described here.
[0098] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip chip, etc.
[0099] It should be noted that in this document, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "includes a" does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to the order of performing functions as shown or discussed, but can also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method can be performed in an order different from that described, and various steps can also be added, omitted or combined. In addition, the features described with reference to some examples can be combined in other examples.
[0100] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, also can be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art contribution can be embodied in the form of software product, the computer software product is stored in a storage medium (such as ROM / RAM, disk, optical disk), including a number of instructions to make a terminal (may be a mobile phone, computer, server, air conditioner, or network equipment, etc.) executes the method described in various embodiments of the present application.
[0101] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, the above-mentioned specific embodiments are only illustrative, not restrictive, those skilled in the art can make many forms without departing from the scope of the present application and the protection scope of the claims under the inspiration of the present application, all of which belong to the protection of the present application.
Claims
1. A label determination method, characterized in that, include: Acquire vehicle safety data to be processed; Based on a preset defect label dictionary, at least one defect label is determined for the vehicle safety data; If the defect label fails to be determined according to the preset defect label dictionary, the vehicle safety data is input into a multi-label classification model to obtain at least one defect label of the vehicle safety data, wherein the multi-label classification model is trained based on multiple safety data samples; Before determining at least one defect label of the vehicle safety data according to a preset defect label dictionary, the method further includes: Obtain a vehicle safety dataset, wherein the vehicle safety dataset includes multiple vehicle safety data; Each of the vehicle safety data is analyzed to obtain corresponding defect features, which include fault location and keywords. The fault location includes primary assemblies and secondary assemblies. Determine the defect label for each piece of vehicle safety data based on the primary assembly, the secondary assembly, and the keywords; The severity level of the defect label is set based on the defect label; Based on the primary assembly, secondary assembly, keywords, defect tags, and severity levels corresponding to the defect tags in each of the vehicle safety data, the preset defect tag dictionary is determined.
2. The method according to claim 1, characterized in that, The step of determining at least one defect label for the vehicle safety data according to a preset defect label dictionary includes: The vehicle safety data is preprocessed to determine the primary assemblies, secondary assemblies, and target keywords of the vehicle safety data; The target keywords of the vehicle safety data are matched with the keywords in the preset defect tag dictionary, and the matched preset defect tags are used as backup tags. If it is determined that the spare label is the same as the primary assembly and the secondary assembly of the vehicle safety data, the spare label shall be used as the defect label of the vehicle safety data.
3. The method according to claim 1, characterized in that, Before inputting the vehicle safety data into the multi-label classification model to obtain at least one defect label for the vehicle safety data, the method further includes: A pre-defined multi-label classification model is trained based on the training set and a pre-defined loss function until the loss function converges, thus obtaining the trained pre-defined multi-label classification model. Based on the validation set, verify that the trained preset multi-label classification model meets the first preset effect; Based on the test set, the preset multi-label classification model that has passed the verification is tested, and the preset multi-label classification model that meets the second preset effect is taken as the multi-label classification model.
4. The method according to claim 3, characterized in that, The preset multi-label classification model includes: a pre-trained language model and a text classification model; The process of training a pre-defined multi-label classification model based on a training set and a predetermined loss function until the loss function converges, to obtain the trained pre-defined multi-label classification model, includes: The training set is input into the pre-trained language model, and the pre-trained language model extracts semantic features from the training samples in the training set to obtain the text feature vector of the training samples. The text feature vector is input into the text classification model, and the text classification model performs multi-level processing on the text feature vector to obtain the trained preset multi-label classification model.
5. The method according to claim 4, characterized in that, The text classification model includes an input layer, a convolutional layer, a pooling layer, a first fully connected layer, and a second fully connected layer. The multi-level processing of the text feature vector includes: Semantic features are extracted from the text feature vector through the input layer to obtain the high-level text feature vector of the training sample; The high-level text feature vector is convolved by the convolutional layer to obtain the convolutional feature vector; The pooling layer performs a dimensionality reduction operation on the convolutional feature vector to obtain a pooled feature vector; The first feature vector is obtained by performing a dropout operation on the pooled feature vector through the first fully connected layer. The first feature vector is activated by the second fully connected layer to obtain the first prediction probability of the training sample for each defect label, thus obtaining multiple first prediction probabilities; The preset multi-label classification model is trained based on multiple first predicted probabilities and the predetermined loss function.
6. The method according to claim 4, characterized in that, The predetermined loss function is: Where N represents the number of training samples, and L represents the number of defect labels corresponding to the training samples. The interval [0,1] represents the predicted probability of the defect label. The range [0,1] indicates whether the i-th training sample belongs to the j-th defect label.
7. The method according to claim 4, characterized in that, The testing of the pre-defined multi-label classification model after verification includes: The preset multi-label classification model is evaluated based on preset evaluation parameters.
8. The method according to claim 1, characterized in that, After determining at least one defect label of the vehicle safety data, the method further includes: At least one of the defect labels in the vehicle safety data is converted into a one-hot variable and stored.
9. A label determining device, characterized in that, include: The acquisition module is used to acquire vehicle safety data to be processed. The determination module is used to determine at least one defect label of the vehicle safety data based on a preset defect label dictionary; The determining module is further configured to, in the event that the determination of the defect label fails according to the preset defect label dictionary, input the vehicle safety data into a multi-label classification model to obtain at least one defect label of the vehicle safety data, wherein the multi-label classification model is trained based on multiple safety data samples; The determining module is further configured to obtain a vehicle safety dataset before determining at least one defect label of the vehicle safety data according to a preset defect label dictionary, wherein the vehicle safety dataset includes multiple vehicle safety data. Each of the vehicle safety data is analyzed to obtain corresponding defect features, which include fault location and keywords. The fault location includes primary assemblies and secondary assemblies. Determine the defect label for each piece of vehicle safety data based on the primary assembly, the secondary assembly, and the keywords; The severity level of the defect label is set based on the defect label; Based on the primary assembly, secondary assembly, keywords, defect tags, and severity levels corresponding to the defect tags in each of the vehicle safety data, the preset defect tag dictionary is determined.
10. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the tag determination method as described in any one of claims 1-8.
11. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the tag determination method as described in any one of claims 1-8.
Citation Information
Patent Citations
Word vector-based intelligent assistant diagnosis method and system for automobile faults
CN109240258A
Power equipment fault defect text named entity extraction method and device
CN113343701A