Object anomaly detection method and device
By generating exception labels and training the target model, the high cost problem caused by manual annotation in the prior art is solved, and the effect of reducing the annotation and detection costs is achieved.
Patent Information
- Application Number
- CN202411449719.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The existing object exception detection methods require manual annotation, and the exception type of each sample collects the object, resulting in high annotation cost and abnormal detection cost.
By obtaining the set of exception codes and exception code weights generated by the sample collection object, an exception tag is generated for the sample collection object, and the target model is trained for exception detection using these tags.
The labeling cost and abnormal detection cost are reduced, and unlabeled sample collection objects are automatically marked, improving detection efficiency.
Smart Images

Figure CN118965246B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of anomaly detection, and in particular to a method and device for object anomaly detection. Background Art
[0002] In the field of anomaly detection, supervised classification models are often trained as anomaly detection models to detect anomaly types of related objects (such as charging piles). However, when training anomaly detection models, existing object anomaly detection methods usually first require labelers to label the anomaly type of each sample collection object, and then use the relevant sample data to train the supervised classification model based on the labeling results. In this process, since the anomaly type of each sample collection object needs to be manually labeled, the anomaly detection cost of existing object anomaly detection methods is very high. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides an object anomaly detection method and device to reduce the labeling cost and further reduce the anomaly detection cost.
[0004] In a first aspect, an embodiment of the present invention provides a method for detecting anomalies of an object, the method comprising:
[0005] Identify multiple unlabeled sample collection objects;
[0006] Respectively obtaining at least one abnormal code generated by each of the sample collection objects;
[0007] For each of the sample collection objects, an exception label is generated for the sample collection object according to the exception code and the exception code weight set generated by the sample collection object, wherein the exception code weight set includes the global weight of each of the exception codes for different preset exception types, the exception label is used to mark the exception type of the sample collection object in the plurality of preset exception types, and the exception code is an identification code generated by the sample collection object when an abnormal situation occurs and used to characterize the cause of the abnormal situation;
[0008] Acquire a target model according to the abnormal label training;
[0009] Anomaly detection is performed on the object to be detected according to the target model to determine the abnormality type of the object to be detected, and the sample collection object and the object to be detected are both charging piles.
[0010] In a second aspect, an embodiment of the present invention provides an object anomaly detection device, the device comprising:
[0011] A determination unit, used to determine multiple unlabeled sample collection objects;
[0012] An acquisition unit, used to respectively acquire at least one abnormal code generated by each of the sample collection objects;
[0013] a label generating unit, configured to generate an abnormal label for each of the sample collection objects according to an abnormal code and an abnormal code weight set generated by the sample collection object, wherein the abnormal code weight set includes a global weight of each of the abnormal codes for different preset abnormal types, the abnormal label is used to mark the abnormal type of the sample collection object in a plurality of the preset abnormal types, and the abnormal code is an identification code generated by the sample collection object when an abnormal situation occurs and used to characterize the cause of the abnormal situation;
[0014] A model training unit, used for acquiring a target model according to the abnormal label training;
[0015] A detection unit is used to perform anomaly detection on the object to be detected according to the target model to determine the abnormality type of the object to be detected, and the sample collection object and the object to be detected are both charging piles.
[0016] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer program instructions, wherein the computer program instructions implement the method described in the first aspect when executed by a processor.
[0017] In a fourth aspect, an embodiment of the present invention provides an electronic device, the device comprising:
[0018] a memory for storing one or more computer program instructions;
[0019] A processor, wherein the one or more computer program instructions are executed by the processor to implement the method as described in the first aspect.
[0020] In a fifth aspect, an embodiment of the present invention provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method as described in the first aspect.
[0021] After determining multiple unlabeled sample collection objects, the embodiment of the present invention obtains at least one exception code generated by each sample collection object, generates an exception label for each sample collection object based on the exception code generated by each sample collection object and the exception code weight set, and then obtains the target model based on the exception label training, and then performs anomaly detection on the object to be detected based on the target model to determine the abnormal type of the object to be detected. Among them, the exception code weight set includes the global weight of each exception code for different preset abnormal types, and the exception label is used to mark the abnormal type of the sample collection object in multiple preset abnormal types. Therefore, by using the exception code generated by the sample collection object and the exception code weight set to mark the unlabeled sample collection object, the embodiment of the present invention can reduce the labeling cost and thus reduce the abnormality detection cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0023] Figure 1 is a flow chart of an object anomaly detection method according to an embodiment of the present invention;
[0024] Figure 2 A flowchart of a method for generating an abnormal label according to an embodiment of the present invention;
[0025] Figure 3 Flow chart of a method for determining an abnormal code weight set according to an embodiment of the present invention;
[0026] Figure 4 is a flow chart of a method for determining a local weight according to an embodiment of the present invention;
[0027] Figure 5 Schematic diagram of the construction process of the first judgment matrix according to an embodiment of the present invention;
[0028] Figure 6 A flowchart of a method for determining importance according to an embodiment of the present invention;
[0029] Figure 7 Schematic diagram of the conversion process of the first judgment matrix according to an embodiment of the present invention;
[0030] Figure 8 is a flow chart of a method for determining a local weight according to an embodiment of the present invention;
[0031] Fig. 9 Schematic diagram of the construction process of the second judgment matrix according to an embodiment of the present invention;
[0032] Fig.10 Schematic diagram of the conversion process of the second judgment matrix according to an embodiment of the present invention;
[0033] Fig.11 A flow chart of a target model optimization method according to an embodiment of the present invention;
[0034] Fig.12 Schematic diagram of the optimization process of the target model of an embodiment of the present invention;
[0035] Fig.13 is a schematic diagram of an object anomaly detection device according to an embodiment of the present invention;
[0036] Fig.14 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, some specific details are described in detail. It is possible for those skilled in the art to fully understand the present application without the description of these details. In order to avoid confusing the essence of the present application, known methods, processes, flows, components and circuits are not described in detail.
[0038] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.
[0039] Unless the context clearly requires otherwise, the words "include", "comprising" and similar words throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is "including but not limited to".
[0040] In the description of this application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.
[0041] The solutions described in this specification and in the examples, if they involve the processing of personal information, will be processed on the premise of having a legal basis (such as obtaining the consent of the subject of personal information, or being necessary for the performance of a contract, etc.), and will only be processed within the scope of regulations or agreements. If a user refuses to process personal information other than the necessary information for basic functions, it will not affect the user's use of basic functions.
[0042] It is to be noted that in the following description, the detection object is a charging pile as an example for specific description. However, it should be understood that the object anomaly detection method in the embodiment of the present invention can also be applied to other devices with abnormal type detection requirements, such as shared vehicles, and this application does not limit this.
[0043] Figure 1Flow chart of the object anomaly detection method according to an embodiment of the present invention. It should be understood that the execution subject of the object anomaly detection method can be a tablet computer, a laptop computer, a desktop computer or any other type of general data processing device, and the present application does not limit this. Figure 1 As shown, the object anomaly detection method may specifically include the following steps:
[0044] Step S100: Determine a plurality of unlabeled sample collection objects.
[0045] Specifically, the data processing device may determine a plurality of unlabeled sample collection objects. Among them, the unlabeled sample collection object may refer to a charging pile that has been confirmed to be in an abnormal state but has not yet been labeled with a specific abnormal type. It should be understood that this part of the charging piles can be used as collection objects for the data processing device to collect sample data for training anomaly detection models. Optionally, for any charging pile, if the charging success rate of the charging pile is lower than a preset threshold within a certain period of time, the data processing device may determine that the charging pile is in an abnormal state.
[0046] Step S200: respectively obtain at least one abnormal code generated by each of the sample collection objects.
[0047] Specifically, after determining a plurality of unlabeled sample collection objects, the data processing device may obtain at least one abnormality code generated by the sample collection object for each sample collection object, wherein the abnormality code may be an identification code generated by the sample collection object when an abnormality occurs and used to characterize the cause of the abnormality.
[0048] It should be understood that there can be multiple types of exception codes. Different exception codes can be used to characterize the causes of different abnormal situations. Furthermore, the exception codes that can be generated by different types of equipment or equipment of the same type but manufactured by different manufacturers may be different. For example, for charging piles and shared vehicles, due to the different structures and services provided by the two, the exception codes that can be generated by the two will also be different. For another example, for charging piles produced by different manufacturers, due to the differences in the manufacturers' settings, the exception codes that can be generated by the two will also be different.
[0049] Optionally, in this embodiment, at least one exception code generated by each sample collection object can be determined by the data processing device by traversing the historical abnormal charging orders of each sample collection object. Specifically, whenever a user uses a charging pile to charge his vehicle, the charging pile or the background server of the charging pile will generate a corresponding charging order. Among them, if an abnormal situation occurs during the charging process and causes charging failure, the charging pile or the background server of the charging pile will generate an exception code and store the exception code as the order information of the corresponding charging order. By traversing the historical abnormal charging orders of each sample collection object, the data processing device can obtain at least one exception code generated by each sample collection object.
[0050] It should be understood that the abnormal situation of the charging pile during the charging process may be caused by the fault of the charging pile itself, or may be caused by other reasons (such as improper user operation). In this embodiment, the abnormal code involved may specifically refer to the abnormal code generated when the charging pile has an abnormal situation due to its own fault during the charging process.
[0051] Step S300: For each sample collection object, generate an abnormal label for the sample collection object according to the abnormal code and abnormal code weight set generated by the sample collection object.
[0052] Specifically, after obtaining the exception code generated by each sample collection object, the data processing device can generate an exception label for each sample collection object according to the exception code generated by each sample collection object and the exception code weight set. Among them, the exception label can be used to mark the exception type of the sample collection object in multiple preset exception types. Multiple preset exception types may include all the exception types that may occur in the sample collection object, which can be specifically set and adjusted by relevant personnel. In this embodiment, the preset exception types may include at least a charging gun failure (the charging gun is a component of the charging pile used to establish a physical connection with the vehicle, which is responsible for transmitting electrical energy to the vehicle) and a charging module failure (the charging module is the power supply unit of the charging pile, which is used to provide electrical energy to the charging gun). The exception code weight set may include the global weight of each exception code for different preset exception types.
[0053] It should be understood that the global weight of the exception code for the corresponding preset exception type can be used to characterize the probability that the sample collection object is in the corresponding preset exception type when the generated exception code includes the exception code. Specifically, the larger the global weight of the exception code for the corresponding preset exception type, the higher the probability that the sample collection object is in the corresponding preset exception type when the generated exception code includes the exception code. The smaller the global weight of the exception code for the preset exception type, the lower the probability that the sample collection object is in the corresponding preset exception type when the generated exception code includes the exception code.
[0054] Figure 2 Flow chart of the abnormal label generation method according to an embodiment of the present invention. Figure 2 In the method for generating an abnormal label shown in the figure, the data processing device can generate an abnormal label for the sample collection object according to the abnormal code and abnormal code weight set generated by the corresponding sample collection object. Figure 2 As shown, the abnormal label generation method may specifically include the following steps:
[0055] Step S310: Determine the score of each of the preset abnormality types according to the abnormality code generated by the sample collection object and the abnormality code weight set.
[0056] Specifically, the data processing device can determine the score of each preset abnormality type according to the abnormality code generated by the sample collection object and the abnormality code weight set. The score of the corresponding preset abnormality type can be the sum of the product of the number of occurrences of each abnormality code and the global weight of each abnormality code for the preset abnormality type. For example, assuming that the abnormality codes generated by the sample collection object are A 1 , A 2 and A 3 Among them, the abnormal code A 1 The number of occurrences is 2, and the exception code is A 2 The number of occurrences is 1, and the exception code is A 3 The number of occurrences is 1. The preset abnormality types include charging gun failure and charging module failure. Among them, abnormal code A 1 The global weights for charging gun failure and charging module failure are 0.0955 and 0.191, respectively. 2 The global weights for charging gun failure and charging module failure are 0.1287 and 0.3861, respectively. 3The global weights for charging gun failure and charging module failure are 0.1309 and 0.0262. Therefore, for this sample collection object, the score for charging gun failure is 0.4506 (that is, the calculation result of 0.0955*2+0.1287+0.1309), and the score for charging module failure is 0.7943 (that is, the calculation result of 0.191*2+0.3861+0.0262).
[0057] It should be understood that the score of the preset abnormality type can be used to characterize the probability that the sample collection object is in the preset abnormality type. Specifically, the higher the score of the current preset abnormality type, the higher the probability that the sample collection object is in the current preset abnormality type. The lower the score of the current preset abnormality type, the lower the probability that the sample collection object is in the current preset abnormality type.
[0058] Step S320: Determine the preset abnormality type with the highest score as the abnormality type of the sample collection object to generate the abnormality label for the sample collection object.
[0059] Specifically, after determining the scores of each preset abnormality type, the data processing device may determine the preset abnormality type with the highest score as the abnormality type of the sample collection object to generate an abnormality label for the sample collection object. For example, assuming that for the current sample collection object, the score of the charging gun failure is 0.4506, and the score of the charging module failure is 0.7943. Then, the data processing device may determine the charging module failure with a higher score as the abnormality type of the sample collection object to generate an abnormality label for the sample collection object to mark the current sample collection object as being in a charging module failure.
[0060] Optionally, before executing step S300, the data processing device also needs to determine a set of abnormal code weights.
[0061] Figure 3 Flow chart of the method for determining the abnormal code weight set according to an embodiment of the present invention. Figure 3 The method for determining an abnormal code weight set shown in the figure can determine an abnormal code weight set. Figure 3 As shown, the method for determining the abnormal code weight set may specifically include the following steps:
[0062] Step S310': determining the local weight of each of the abnormal codes for the marking operation.
[0063] Specifically, when determining the exception code weight set, the data processing device may first determine the local weight of each exception code for the labeling operation.
[0064] It should be understood that different exception codes have different importance for the marking operation.2 and A 4 For example, assuming exception code A 2 It will only be generated by a sample collection object with a specific exception type, and the exception code A 4 It can be generated by sample collection objects in multiple abnormal types. Then, abnormal code A 2 The importance of the annotation operation is higher than that of the exception code A. 4 (That is, compared to exception code A 4 , exception code A 2 In this embodiment, the local weight of the abnormal code for the marking operation can be used to characterize the importance of the abnormal code for the marking operation. Specifically, the greater the local weight of the abnormal code for the marking operation, the higher the importance of the abnormal code for the marking operation. The smaller the local weight of the abnormal code for the marking operation, the lower the importance of the abnormal code for the marking operation.
[0065] It should be understood that when determining the local weight of each exception code for the labeling operation, the data processing device will separately determine the local weight of each exception code that can be generated by the sample collection object for the labeling operation. For example, assuming that the exception code that can be generated by the sample collection object includes exception code A 1 , Exception code A 2 , Exception code A 3 and exception code A 4 Then, the data processing device can determine the abnormal code A 1 , Exception code A 2 , Exception code A 3 and exception code A 4 Local weight for the annotation operation.
[0066] Figure 4 Flow chart of the local weight determination method of the embodiment of the present invention. Figure 4 According to the local weight determination method shown in the figure, the data processing device can determine the local weight of each abnormal code for the marking operation, that is, to implement the above step S310'. Figure 4 As shown, the local weight determination method may specifically include the following steps:
[0067] Step S311 ′: compare the importance of each of the abnormal codes to the marking operation in pairs to construct a first judgment matrix.
[0068] Specifically, when determining the local weight of each exception code for the labeling operation, the data processing device can first compare the importance of each exception code for the labeling operation in pairs, thereby constructing a first judgment matrix. Among them, the number of rows and columns of the first judgment matrix are equal to the number of types of exception codes. For example, assuming that the number of types of exception codes is 4 (that is, there are four types of exception codes that can be generated by the sample collection object when an abnormal situation occurs due to its own fault). Then, the first judgment matrix is a 4*4 matrix. Furthermore, each element in the first judgment matrix can be used to characterize the relative importance of one exception code and another exception code for the labeling operation.
[0069] Figure 5 FIG. 4 is a schematic diagram of the construction process of the first judgment matrix of an embodiment of the present invention. Figure 5 As shown, by comparing the importance of each of the abnormal codes to the marking operation, the data processing device can obtain a comparison result 51. Then, according to the comparison result 51, the data processing device can construct a first judgment matrix 52. Among them, the element a in the first judgment matrix 52 ij (i.e., the element in the i-th row and j-th column of the matrix, where i and j are both less than or equal to the number of exception code types) can be used to characterize exception code A i The importance of the annotation operation is relative to the exception code A j The ratio of the importance of the annotation operation. Specifically, element a ij The value of is greater than 1, indicating that compared with the abnormal code A j , exception code A i It is more important for annotation operations. ij If the value of is equal to 1, it means that the two are equally important for the annotation operation. ij The value of is less than 1, which means that compared with the abnormal code A i , exception code A j It is more important for annotation operations.
[0070] Optionally, an Extreme Gradient Boosting (XGBoost) model is an efficient machine learning algorithm that can be used to evaluate the importance of different features for making a final judgment. In this embodiment, the data processing device can use the Extreme Gradient Boosting model to determine the importance of each abnormal code for the labeling operation.
[0071] Figure 6 Flow chart of the importance determination method of the embodiment of the present invention. Figure 6 The importance determination method shown in the figure, the data processing device can use the extreme gradient boosting model to determine the importance of each abnormal code for the marking operation. Figure 6As shown, the importance determination method may specifically include the following steps:
[0072] Step S3111': determine a plurality of labeled sample collection objects.
[0073] Specifically, the data processing device may first determine a plurality of labeled sample collection objects. Among them, the labeled sample collection objects may refer to charging piles that have been confirmed to be in an abnormal state and have been labeled with specific abnormal types. It should be understood that the labeled sample collection objects may be obtained by the relevant labeling personnel by labeling the collection objects of the corresponding samples offline or online.
[0074] Step S3112': training an extreme gradient boosting model according to the abnormal codes generated by each of the sample collection objects.
[0075] Specifically, after determining a plurality of labeled sample collection objects, the data processing device may use the abnormal codes generated by each sample collection object as sample data to train the extreme gradient boosting model.
[0076] It is hoped that since the extreme gradient boosting model is used to determine the importance of each abnormal code for the labeling operation, this embodiment only needs to use a small amount of labeled sample collection objects to train the extreme gradient boosting model, which does not increase the abnormality detection cost too much.
[0077] Step S3113': determining the importance of each of the abnormal codes for the marking operation according to the trained extreme gradient boosting model.
[0078] Specifically, after training the extreme gradient boosting model, the data processing device may determine the importance of each abnormal code for the labeling operation according to the trained extreme gradient boosting model.
[0079] Therefore, the data processing device can use the extreme gradient boosting model to determine the importance of each abnormal code for the labeling operation. It should be understood that the value of each element in the first judgment matrix can be obtained by the data processing device by running the corresponding algorithm, or by manual comparison by relevant personnel, and this application does not make specific restrictions on this.
[0080] Step S312': perform column normalization on the first judgment matrix to obtain a normalized first judgment matrix.
[0081] Specifically, after constructing the first judgment matrix, the data processing device may perform column normalization on the first judgment matrix to obtain a normalized first judgment matrix.
[0082] Figure 7 FIG. 4 is a schematic diagram of the conversion process of the first judgment matrix of an embodiment of the present invention. Figure 7As shown, the data processing device may perform column normalization on the first judgment matrix 71 to obtain a normalized first judgment matrix 72 .
[0083] Step S313 ′: sum the standardized first judgment matrix row by row to obtain a first weight matrix.
[0084] Specifically, after obtaining the normalized first judgment matrix, the data processing device may sum the normalized first judgment matrix row by row to obtain the first weight matrix. Figure 7 As shown, the data processing device may sum the normalized first judgment matrix 72 row by row to obtain a first weight matrix 73 .
[0085] Step S314': perform column normalization on the first weight matrix to obtain a normalized first weight matrix.
[0086] Specifically, after obtaining the first weight matrix, the data processing device may perform column normalization on the first weight matrix to obtain a normalized first weight matrix. Each element in the normalized first weight matrix is the local weight of each abnormal code for the marking operation. Figure 7 As shown, the data processing device can perform column normalization on the first weight matrix 73 to obtain a normalized first weight matrix 74. Among them, the element a in the first weight matrix 74 i (i.e., the elements in the i-th row of the matrix, i is less than or equal to the number of exception code types) can be used to represent the exception code A i Local weight for the annotation operation.
[0087] Step S320': for each of the exception codes, determine a local weight of each of the preset exception types for the exception code.
[0088] Specifically, for each exception code, the data processing device may also determine the local weight of each preset exception type for the exception code.
[0089] It should be understood that different preset exception types have different correlations with the same exception code. 4 For example, when most of the abnormal codes generated by charging piles in the charging module failure state include this abnormal code, and only a small number of charging piles in the charging gun failure state generate abnormal codes including this abnormal code, the charging module failure and abnormal code A 4 The correlation between the charging gun failure and abnormal code A is obviously higher than 4In this embodiment, the local weight of the preset exception type for the exception code can be used to characterize the correlation between the preset exception type and the exception code. Specifically, the greater the local weight of the preset exception type for the exception code, the higher the correlation between the preset exception type and the exception code. The smaller the local weight of the preset exception type for the exception code, the lower the correlation between the preset exception type and the exception code.
[0090] Figure 8 Flow chart of the local weight determination method of the embodiment of the present invention. Figure 8 The local weight determination method shown in the figure can determine the local weight of each preset exception type for the corresponding exception code. Figure 8 As shown, the local weight determination method may specifically include the following steps:
[0091] Step S321': compare the correlation between each of the preset abnormality types and the abnormality codes in pairs to construct a second judgment matrix.
[0092] Specifically, when determining the local weight of each preset exception type for the corresponding exception code, the data processing device can first compare the correlation between each preset exception type and the corresponding exception code in pairs, thereby constructing a second judgment matrix. Wherein, the number of rows and columns of the second judgment matrix are equal to the number of types of preset exception types. For example, assuming that the number of types of exception codes is 2. Then, the second judgment matrix is a 2*2 matrix. Further, each element in the second judgment matrix is used to characterize the relative correlation between a preset exception type and another preset exception type for the corresponding exception code.
[0093] Fig. 9 FIG. 4 is a schematic diagram of the construction process of the second judgment matrix according to an embodiment of the present invention. Fig. 9 As shown, for each exception code, by comparing the correlation between each preset exception type and the exception code, the data processing device can obtain comparison results 911, 912, 913 and 914 respectively. Then, according to the comparison results 911, 912, 913 and 914, the data processing device can construct second judgment matrices 921, 922, 923 and 924 respectively. Taking the second judgment matrix 921 as an example, the element b in the second judgment matrix 921 is mn (i.e., the element in the mth row and nth column of the matrix, where m and n are both less than or equal to the number of preset abnormal types) can be used to characterize the preset abnormal type B m With exception code A 1 The correlation between the preset abnormal type B n With exception code A 1 Specifically, element b mnIf the value is greater than 1, it means that compared with the preset abnormal type B n , preset exception type B m With exception code A 1 The correlation between them is higher. mn The value of is equal to 1, indicating that both are consistent with exception code A 1 The correlation between them is quite high. mn If the value is less than 1, it means that compared with the preset abnormal type B m , preset exception type B n With exception code A 1 It should be understood that in this embodiment, the preset abnormality type B 1 Specifically, it may refer to a charging gun failure, with the default abnormality type B. 2 It could be a charging module failure.
[0094] Optionally, the degree of correlation between each preset abnormal type and the corresponding abnormal code can also be determined by the data processing device based on a plurality of labeled sample collection objects. Specifically, the data processing device can determine the degree of correlation between each preset abnormal type and the corresponding abnormal code by counting the number of occurrences and / or the probability of occurrence of the corresponding abnormal code in the abnormal code generated by the sample collection object of each preset abnormal type. It should be understood that the numerical values of each element in the second judgment matrix can be obtained by the data processing device by running the corresponding algorithm, or can be obtained by manual comparison by relevant personnel, and the present application does not make specific restrictions on this.
[0095] Step S322': perform column normalization on the second judgment matrix to obtain a normalized second judgment matrix.
[0096] Specifically, after constructing each second judgment matrix, the data processing device may perform column normalization on each second judgment matrix to obtain a normalized corresponding second judgment matrix.
[0097] Fig.10 FIG. 4 is a schematic diagram of the conversion process of the second judgment matrix of an embodiment of the present invention. Fig.10 As shown, the data processing device may perform column normalization on the second judgment matrices 1011 , 1021 , 1031 , and 1041 , respectively, to obtain normalized second judgment matrices 1012 , 1022 , 1032 , and 1042 .
[0098] Step S323', summing the standardized second judgment matrix row by row to obtain a second weight matrix.
[0099] Specifically, after obtaining each standardized second judgment matrix, the data processing device can sum each standardized second judgment matrix row by row to obtain a second weight matrix. Fig.10As shown, the data processing device can sum the standardized second judgment matrices 1012 , 1022 , 1032 and 1042 row by row to obtain second weight matrices 1013 , 1023 , 1033 and 1043 .
[0100] Step S324': perform column normalization on the second weight matrix to obtain a normalized second weight matrix.
[0101] Specifically, after obtaining each second weight matrix, the data processing device can perform column normalization on each second weight matrix to obtain each standardized second weight matrix. Each element in the standardized second weight matrix is a local weight of each preset exception type for the exception code. Fig.10 As shown, the data processing device can perform column normalization on the second weight matrices 1013, 1023, 1033 and 1043 respectively to obtain normalized second weight matrices 1014, 1024, 1034 and 1044. Taking the normalized second weight matrix 1014 as an example, the element b in the second weight matrix 1014 is m (i.e., the elements in the mth row of the matrix, where m is less than or equal to the number of preset exception types) can be used to characterize the preset exception type B m For exception code A 1 The local weight of .
[0102] Step S330': for each of the exception codes, determine the global weight of the exception code for each of the preset exception types according to the local weight of the exception code for the marking operation and the local weight of each of the preset exception types for the exception code.
[0103] Specifically, after determining the local weight of each exception code for the marking operation and the local weight of each preset exception type for different exception codes, for each exception code, the data processing device can determine the global weight of the exception code for each preset exception type according to the local weight of the exception code for the marking operation and the local weight of each preset exception type for the exception code. Wherein, the global weight of the exception code for the preset exception type is the product of the local weight of the exception code for the marking operation and the local weight of the preset exception type for the exception code.
[0104] like Figure 7 and Fig.10 As shown, according to Figure 7 The local weights and Fig.10 The data processing device can calculate the local weights of different exception codes for each preset exception type in the data processing device. 1 The global weight of the charging gun failure is 0.0955 (that is, the calculation result of 0.2865*0.3333), and the abnormal code A 1The global weight for the charging module failure is 0.191 (that is, the calculation result of 0.2865*0.6667), and the abnormal code A 2 The global weight of the charging gun failure is 0.1287 (that is, the calculation result of 0.5148*0.25), and the abnormal code A 2 The global weight for the charging module failure is 0.3861 (that is, the calculation result of 0.5148*0.75), and the abnormal code A 3 The global weight of the charging gun failure is 0.1309 (that is, the calculation result of 0.1571*0.8333), and the abnormal code A 3 The global weight for the charging module failure is 0.0262 (that is, the calculation result of 0.1571*0.1667) and the abnormal code A 4 The global weight of the charging gun failure is 0.0312 (that is, the calculation result of 0.0416*0.75), and the abnormal code A 4 The global weight for the charging module failure is 0.0104 (that is, the calculation result of 0.0416*0.25).
[0105] It should be understood that the calculated values and calculation results given above are only for illustration, and in actual application, the calculated values and calculation results are not limited thereto.
[0106] Optionally, in order to avoid the logical error that x is more important than y, y is more important than z, but z is more important than x in each judgment matrix (that is, including the first judgment matrix and each second judgment matrix), when executing step S330', the data processing device can also perform consistency check on the local weight of each exception code for the marking operation and the local weight of each preset exception type for the exception code. Then, if both consistency checks are passed, the data processing device can execute step S330'.
[0107] It should be understood that the process of consistency checking for the two is the same, so the verification process for the two will be described uniformly below.
[0108] Specifically, the data processing device first calculates the product of the target judgment matrix and the standardized target weight matrix to obtain an intermediate matrix. It should be understood that when the local weights of each exception code for the marking operation are checked for consistency, the target judgment matrix and the standardized target weight matrix can be the first judgment matrix and the standardized first weight matrix, respectively. When the local weights of each preset exception type for the exception code are checked for consistency, the target judgment matrix and the standardized target weight matrix can be the second judgment matrix and the standardized second weight matrix, respectively.
[0109] Furthermore, after obtaining the intermediate matrix, the data processing device can calculate and determine the maximum eigenvalue λ according to the target weight matrix and the intermediate matrix based on the following formula: max .
[0110]
[0111] Among them, λ max is the largest characteristic root, c g is the element in the gth row of the intermediate matrix, d g is the element of the g-th row in the target weight matrix, and k is the order of the target judgment matrix.
[0112] Furthermore, after obtaining the maximum characteristic root λ max After that, the data processing device can be used according to the maximum characteristic root λ max The consistency index CI was calculated and determined based on the following formula.
[0113]
[0114] Among them, λ max is the calculated maximum eigenvalue, and k is the order of the target judgment matrix.
[0115] Further, the data processing device can determine the consistency ratio CR according to the consistency index CI and the corresponding random consistency index RI. The consistency ratio CR is specifically the quotient of the consistency index CI and the corresponding random consistency index RI. It should be understood that the random consistency index RI can be determined by querying in a value table according to the order k of the target weight matrix, and the value table includes random consistency indicators corresponding to the orders of each matrix.
[0116] Furthermore, if the consistency ratio CR is less than 0.1, the data processing device can confirm that the current consistency check has passed. If the consistency ratio CR is greater than 0.1, the data processing device can adjust the elements with logical errors in the target judgment matrix, update the target weight matrix, and then re-check the consistency of the adjusted target judgment matrix and the updated target weight matrix.
[0117] Step S400: Acquire a target model according to the abnormal label training.
[0118] Specifically, after generating an abnormal label for each sample collection object, if sample data has been acquired in advance, the data processing device can classify the sample data collected from each sample collection object according to the abnormal label of each sample collection object, thereby forming a sample data set corresponding to each preset abnormal type, and then train and acquire the target model according to each sample data set. If sample data has not been acquired, the data processing device can collect sample data from sample collection objects of different abnormal types according to the abnormal label of each sample collection object to obtain sample data sets corresponding to each preset abnormal type, and then train and acquire the target model according to the sample data set.
[0119] It should be understood that the trained target model can be used to determine the abnormality type of the detection object in multiple preset abnormality types. Further, in this embodiment, the sample data may be the charging data of the charging pile (for example, the charging data may include the temperature, charging rate or charging current of the charging pile when charging the vehicle). Optionally, in this embodiment, the target model may adopt a supervised classification model. Furthermore, the supervised classification model used as the target model may include any one of the models such as a logistic regression model, a decision tree model, a random forest model, a K-nearest neighbor or a neural network model, and the present application does not make specific limitations on this.
[0120] Step S500: Perform anomaly detection on the object to be detected according to the target model to determine the anomaly type of the object to be detected.
[0121] Specifically, after the target model is obtained through training, the data processing device can perform anomaly detection on the object to be detected according to the target model to determine the abnormal type of the object to be detected. The object to be detected may be a charging pile for which an abnormal type detection requirement exists.
[0122] Optionally, after the target model is put into use, the data processing device may continue to use the rule labeling method (i.e., a method of labeling unlabeled sample collection objects using the exception codes and exception code weight sets generated by the sample collection objects) to continuously optimize the target model during the use of the target model.
[0123] Fig.11 FIG. 1 is a flow chart of a target model optimization method according to an embodiment of the present invention. Fig.11 As shown, the target model optimization method may specifically include the following steps:
[0124] Step S610: Obtain at least one abnormal code generated by the object to be detected.
[0125] Specifically, after determining the abnormality type for the object to be detected by using the target model, the data processing device may obtain at least one abnormality code generated by the object to be detected.
[0126] Step S620: Generate an abnormal label for the object to be detected according to the abnormal code generated by the object to be detected and the abnormal code weight set.
[0127] Specifically, after obtaining at least one abnormal code generated by the object to be detected, the data processing device can continue to use the rule-based labeling method to label the object to be detected, thereby generating an abnormal label for the object to be detected. It should be understood that the process of the data processing device generating an abnormal label for the object to be detected using the rule-based labeling method is the same as the process of generating an abnormal label for the sample collection object using the rule-based labeling method. The details can be referred to in the previous description, and will not be repeated here.
[0128] Step S630: In response to the abnormality type of the object to be detected not matching the abnormality label of the object to be detected, obtaining a verification result.
[0129] Specifically, after generating an abnormality label of the object to be detected, if it is detected that the abnormality type determined by the target model for the object to be detected does not match the abnormality label generated for the object to be detected by the rule labeling method, the data processing device can obtain a verification result. The verification result can be used to characterize whether the abnormality type of the object to be detected is wrong and whether the abnormality label of the object to be detected is wrong.
[0130] Optionally, when obtaining the verification result, the data processing device may send the relevant data of the object to be detected to the terminal device held by the relevant labeling personnel, so that the relevant labeling personnel can re-label the object to be detected through the terminal device. Furthermore, the data processing device can obtain the verification result according to the labeling result of the labeling personnel.
[0131] Step S640: adjusting the abnormal code weight set and / or the target model according to the verification result.
[0132] Specifically, after obtaining the verification result, the data processing device may adjust the abnormal code weight set and / or the target model according to the verification result.
[0133] Optionally, if the verification result indicates that the target model is an error in the type of anomaly determined for the object to be detected, the data processing device may adjust the target model according to the object to be detected. If the verification result indicates that the anomaly label generated for the object to be detected by the rule annotation method is an error, the data processing device may adjust the anomaly code weight set according to the object to be detected. If the verification result indicates that the target model is an error in the type of anomaly determined for the object to be detected and the anomaly label generated for the object to be detected by the rule annotation method are both wrong, the data processing device may adjust the target model and the anomaly code weight set according to the object to be detected.
[0134] It should be understood that the target model can be adjusted by obtaining relevant sample data according to the object to be detected and using the relevant sample data to perform supplementary training on the target model. The abnormal code weight set can be adjusted by adjusting the elements in the first judgment matrix and / or the corresponding second judgment matrix according to the object to be detected.
[0135] Optionally, in order to reduce the labeling cost, the data processing device may also collect a certain number of objects to be detected whose abnormal types do not match the abnormal labels, and then proportionally extract a part of the objects to be detected from the collected objects to be detected to obtain the verification results, and adjust the abnormal code weight set and / or the target model according to the verification results.
[0136] Fig.12 FIG. 1 is a schematic diagram of the optimization process of the target model of an embodiment of the present invention. Fig.12 As shown, after detecting the object to be detected 121 with an abnormal type detection requirement, the data processing device can input the relevant data into the target model 122 and the rule annotation module 124 (the rule annotation module 124 can be a functional module for implementing the rule annotation method). Among them, taking the object to be detected as a charging pile as an example, the relevant data input by the data processing device to the target model 122 can be the charging data of the charging pile. The relevant data input by the data processing device to the rule annotation module 124 can be at least one abnormal code generated by the charging pile.
[0137] Furthermore, the target model 122 determines the abnormality type 123 of the object to be detected 121 and sends the abnormality type 123 to the determination module 126. The rule annotation module 124 generates an abnormality label 125 for the object to be detected 121 and sends the abnormality label 125 to the determination module 126.
[0138] Further, after receiving the exception type 123 sent by the target model 122 and the exception label 125 sent by the rule annotation module 124, the determination module 126 determines whether the exception type 123 matches the exception label 125. If the two do not match, the determination module 126 can obtain the verification result.
[0139] Further, if the verification result obtained by the determination module 126 indicates that the abnormality type 123 determined by the target model 122 for the object to be detected 121 is wrong, the data processing device will adjust the target model 122. If the verification result obtained by the determination module 126 indicates that the abnormality label 125 generated by the rule annotation module 124 for the object to be detected 121 is wrong, the data processing device will adjust the abnormality code weight set in the rule annotation module 124. If the verification result obtained by the determination module 126 indicates that the abnormality type 123 determined by the target model 122 for the object to be detected 121 and the abnormality label 125 generated by the rule annotation module 124 for the object to be detected 121 are both wrong, the data processing device will adjust the abnormality code weight set in the target model 122 and the rule annotation module 124 at the same time.
[0140] Therefore, after the target model is put into use, the data processing device can continue to use the rule labeling method to continuously optimize the target model, thereby improving the anomaly detection accuracy of the target model.
[0141] After determining multiple unlabeled sample collection objects, the embodiment of the present invention obtains at least one exception code generated by each sample collection object, generates an exception label for each sample collection object based on the exception code generated by each sample collection object and the exception code weight set, and then obtains the target model based on the exception label training, and then performs anomaly detection on the object to be detected based on the target model to determine the abnormal type of the object to be detected. Among them, the exception code weight set includes the global weight of each exception code for different preset abnormal types, and the exception label is used to mark the abnormal type of the sample collection object in multiple preset abnormal types. Therefore, by using the exception code generated by the sample collection object and the exception code weight set to mark the unlabeled sample collection object, the embodiment of the present invention can reduce the labeling cost and thus reduce the abnormality detection cost.
[0142] Fig.13 FIG. 1 is a schematic diagram of an object anomaly detection device according to an embodiment of the present invention. Fig.13 As shown, the object anomaly detection device according to the embodiment of the present invention includes a determination unit 131 , an acquisition unit 132 , a label generation unit 133 , a model training unit 134 and a detection unit 135 .
[0143] Specifically, the determining unit 131 is used to determine a plurality of unlabeled sample collection objects.
[0144] The acquisition unit 132 is used to respectively acquire at least one abnormal code generated by each of the sample collection objects.
[0145] The label generation unit 133 is used to generate an exception label for each sample collection object according to the exception code and exception code weight set generated by the sample collection object, wherein the exception code weight set includes the global weight of each exception code for different preset exception types, and the exception label is used to mark the exception type of the sample collection object among multiple preset exception types.
[0146] The model training unit 134 is used to obtain a target model according to the abnormal label training.
[0147] The detection unit 135 is used to perform anomaly detection on the object to be detected according to the target model to determine the anomaly type of the object to be detected.
[0148] After determining multiple unlabeled sample collection objects, the embodiment of the present invention obtains at least one exception code generated by each sample collection object, generates an exception label for each sample collection object based on the exception code generated by each sample collection object and the exception code weight set, and then obtains the target model based on the exception label training, and then performs anomaly detection on the object to be detected based on the target model to determine the abnormal type of the object to be detected. Among them, the exception code weight set includes the global weight of each exception code for different preset abnormal types, and the exception label is used to mark the abnormal type of the sample collection object in multiple preset abnormal types. Therefore, by using the exception code generated by the sample collection object and the exception code weight set to mark the unlabeled sample collection object, the embodiment of the present invention can reduce the labeling cost and thus reduce the abnormality detection cost.
[0149] Fig.14 Schematic diagram of an electronic device according to an embodiment of the present invention. Fig.14 As shown, Fig.14The electronic device shown is a data processing device in the above embodiment, which includes a general computer hardware structure, which at least includes a processor 141 and a memory 142. The processor 141 and the memory 142 are connected via a bus 143. The memory 142 is suitable for storing instructions or programs executable by the processor 141. The processor 141 can be an independent microprocessor or a collection of one or more microprocessors. Thus, the processor 141 executes the instructions stored in the memory 142 to execute the method flow of the embodiment of the present invention as described above to realize the processing of data and the control of other devices. The bus 143 connects the above multiple components together, and at the same time connects the above components to the display controller 144 and the display device and the input / output (I / O calculation result) device 145. The input / output (I / O calculation result) device 145 can be a mouse, a keyboard, a modem, a network interface, a touch input device, a somatosensory input device, a printer, and other devices known in the art. Typically, the input / output device 145 is connected to the system through the input / output (I / O calculation result) controller 146.
[0150] It should be understood by those skilled in the art that the embodiments of the present application may be provided as methods, devices (the calculation results of the equipment) or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to the calculation results of disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0151] The present application is described with reference to flowcharts of methods, apparatuses (calculation results of devices) and computer program products according to embodiments of the present application. It should be understood that each process in the flowchart can be implemented by computer program instructions.
[0152] These computer program instructions may be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device that implements the process Figure 1 A function specified in a process or multiple processes.
[0153] These computer program instructions may also be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce instructions for implementing the process Figure 1 A device that specifies functions in a process or multiple processes.
[0154] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, wherein the computer-readable program is used for a computer to execute part or all of the above method embodiments.
[0155] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by specifying the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be the calculation result of a single-chip microcomputer, chip, etc.) or a processor (the calculation result of a processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory calculation result), random access memory (RAM, Random Access Memory calculation result), disk or optical disk and other media that can store program code.
[0156] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for detecting anomalies of an object, characterized in that: The method comprises: Identify multiple unlabeled sample collection objects; Respectively obtaining at least one abnormal code generated by each of the sample collection objects; For each of the sample collection objects, an exception label is generated for the sample collection object according to the exception code and the exception code weight set generated by the sample collection object, wherein the exception code weight set includes the global weight of each of the exception codes for different preset exception types, and the global weight of the exception code for the corresponding preset exception type is used to characterize the probability that the sample collection object is in the corresponding preset exception type when the exception code generated by the sample collection object includes the exception code, and the exception label is used to mark the exception type of the sample collection object in a plurality of the preset exception types, and the exception label is determined according to the score of each of the preset exception types, and the score of the preset exception type is the sum of the product of the number of occurrences of each of the exception codes and the global weight of each of the exception codes for the preset exception type, and the exception code is an identification code generated by the sample collection object when an abnormal situation occurs and used to characterize the cause of the abnormal situation; Acquire a target model according to the abnormal label training; Anomaly detection is performed on the object to be detected according to the target model to determine the abnormality type of the object to be detected, and the sample collection object and the object to be detected are both charging piles.
2. The method according to claim 1, characterized in that After determining the abnormality type of the object to be detected, the method further includes: Acquire at least one abnormal code generated by the object to be detected; Generate an abnormal label for the object to be detected according to the abnormal code generated by the object to be detected and the abnormal code weight set; In response to the abnormality type of the object to be detected not matching the abnormality label of the object to be detected, obtaining a verification result, wherein the verification result is used to indicate whether the abnormality type of the object to be detected is wrong and whether the abnormality label of the object to be detected is wrong; The abnormal code weight set and / or the target model are adjusted according to the verification result.
3. The method according to claim 2, characterized in that The adjusting the abnormal code weight set and / or the target model according to the verification result includes: In response to the verification result indicating that the abnormal type of the object to be detected is wrong, adjusting the target model according to the object to be detected; In response to the verification result indicating that the abnormal label of the object to be detected is wrong, adjusting the abnormal code weight set according to the object to be detected; In response to the verification result indicating that both the abnormal type of the object to be detected and the abnormal label of the object to be detected are wrong, the abnormal code weight set and the target model are adjusted according to the object to be detected.
4. The method according to claim 1, characterized in that: Generating an abnormal label for the sample collection object according to the abnormal code and the abnormal code weight set generated by the sample collection object includes: Determine the score of each of the preset abnormality types according to the abnormality code generated by the sample collection object and the abnormality code weight set; The preset abnormality type with the highest score is determined as the abnormality type of the sample collection object to generate the abnormality label for the sample collection object.
5. The method according to claim 1, characterized in that: Before generating an abnormal label for the sample collection object according to the abnormal code and the abnormal code weight set generated by the sample collection object, the method further includes: The exception code weight set is determined.
6. The method according to claim 5, characterized in that Determining the abnormal code weight set includes: Determining a local weight of each of the exception codes for the marking operation; For each of the exception codes, determining a local weight of each of the preset exception types for the exception code; For each of the exception codes, a global weight of the exception code for each of the preset exception types is determined according to a local weight of the exception code for the marking operation and a local weight of each of the preset exception types for the exception code, wherein the global weight of the exception code for the preset exception type is the product of the local weight of the exception code for the marking operation and the local weight of the preset exception type for the exception code.
7. The method according to claim 6, characterized in that Determining the local weight of each of the exception codes for the marking operation includes: Compare the importance of each of the abnormal codes to the marking operation in pairs to construct a first judgment matrix, wherein each element in the first judgment matrix is used to represent the relative importance of one abnormal code and another abnormal code to the marking operation; Performing column normalization on the first judgment matrix to obtain a normalized first judgment matrix; Summing the standardized first judgment matrix row by row to obtain a first weight matrix; The first weight matrix is column-normalized to obtain a normalized first weight matrix, wherein each element in the normalized first weight matrix is a local weight of each of the abnormal codes for the marking operation.
8. The method according to claim 7, characterized in that Before comparing the importance of each of the abnormal codes to the marking operation in pairs to construct the first judgment matrix, the method further includes: Determine multiple labeled sample collection objects; Training an extreme gradient boosting model according to the abnormal codes generated by each of the sample collection objects; The importance of each of the abnormal codes for the labeling operation is determined according to the trained extreme gradient boosting model.
9. The method according to claim 6, characterized in that The determining of the local weight of each of the preset exception types for the exception code includes: Compare the correlation between each of the preset abnormality types and the abnormality code in pairs to construct a second judgment matrix, wherein each element in the second judgment matrix is used to represent the relative correlation between one preset abnormality type and another preset abnormality type to the abnormality code; performing column normalization on the second judgment matrix to obtain a normalized second judgment matrix; Summing the standardized second judgment matrix row by row to obtain a second weight matrix; The second weight matrix is column-normalized to obtain a normalized second weight matrix, wherein each element in the normalized second weight matrix is a local weight of each of the preset exception types for the exception code.
10. The method according to claim 6, characterized in that The determining the global weight of the exception code for each of the preset exception types according to the local weight of the exception code for the marking operation and the local weight of each of the preset exception types for the exception code comprises: Performing a consistency check on the local weight of each of the exception codes for the marking operation and the local weight of each of the preset exception types for the exception code; In response to the consistency check being passed, a global weight of the exception code for each of the preset exception types is determined according to a local weight of the exception code for the marking operation and a local weight of each of the preset exception types for the exception code.
11. The method according to claim 1, characterized in that: The sample collection object is a charging pile, and the preset abnormality types at least include a charging gun failure and a charging module failure.
12. An object anomaly detection device, characterized in that: The device comprises: A determination unit, used to determine multiple unlabeled sample collection objects; An acquisition unit, used to respectively acquire at least one abnormal code generated by each of the sample collection objects; a label generating unit, configured to generate an abnormality label for each of the sample collection objects according to the abnormality code and the abnormality code weight set generated by the sample collection object, wherein the abnormality code weight set includes the global weight of each of the abnormality codes for different preset abnormality types, the global weight of the abnormality code for the corresponding preset abnormality type is used to characterize the probability that the sample collection object is in the corresponding preset abnormality type when the abnormality code generated by the sample collection object includes the abnormality code, the abnormality label is used to mark the abnormality type of the sample collection object in a plurality of the preset abnormality types, the abnormality label is determined according to the score of each of the preset abnormality types, the score of the preset abnormality type is the sum of the product of the number of occurrences of each of the abnormality codes and the global weight of each of the abnormality codes for the preset abnormality type, and the abnormality code is an identification code generated by the sample collection object when an abnormal situation occurs and used to characterize the cause of the abnormal situation; A model training unit, used for acquiring a target model according to the abnormal label training; A detection unit is used to perform anomaly detection on the object to be detected according to the target model to determine the abnormality type of the object to be detected, and the sample collection object and the object to be detected are both charging piles.
13. A computer-readable storage medium storing computer program instructions, characterized in that: The computer program instructions implement the method according to any one of claims 1 to 11 when executed by a processor.
14. An electronic device, characterized in that: The device comprises: a memory for storing one or more computer program instructions; A processor, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 11.
15. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Abnormality interpretation method, abnormality interpretation device, computer device, and storage medium
CN114187490A
Multi-type target recognition model training method and device, equipment and medium
CN118673312A