A multi-strategy fusion method for randomly inspecting materials

Through multi-strategy fusion model training and weighted average processing, the problems of low efficiency and low accuracy in power material sampling were solved, and more efficient and accurate sampling results were achieved.

CN117669810BActive Publication Date: 2025-07-04STATE GRID CORPORATION OF CHINA +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311597412.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-27
Publication Date
2025-07-04
Estimated Expiration
2043-11-27

AI Technical Summary

Technical Problem

The existing technology lacks targetedness and precision in the sampling inspection of power materials, resulting in unreasonable resource allocation, low efficiency and low accuracy of sampling inspections, and neural network models are prone to overfitting problems.

Method used

A multi-strategy fusion method is adopted to obtain standardized historical power material data, and a multi-strategy fusion model including the first strategy model, the second strategy model and the third strategy model are built, and the gradient enhancement technology and decision tree ensemble learning method are used for training, combined with weighted average processing of the sampling results.

Benefits of technology

It improves the accuracy and work efficiency of power material sampling, enhances the generalization ability of the model, avoids overfitting, and achieves more scientific resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117669810B_ABST
    Figure CN117669810B_ABST
Patent Text Reader

Abstract

The present invention relates to intelligent decision-making technology and discloses a multi-strategy fusion method for randomly inspecting materials, including: obtaining standardized historical power material data and converting the standardized historical power material data into historical power material data features; training a pre-constructed multi-strategy fusion model using the historical power material data features, and obtaining a standard multi-strategy fusion model after the training is completed; obtaining power material data to be randomly inspected, and the first strategy model, the second strategy model, and the third strategy model of the standard multi-strategy fusion model respectively conduct random inspection predictions on the power material data to be randomly inspected, and perform weighted average processing on the random inspection results predicted by the first strategy model, the second strategy model, and the third strategy model to obtain a random inspection prediction result. The present invention also proposes a multi-strategy fusion material random inspection device, an electronic device, and a storage medium. The present invention can improve the work efficiency of randomly inspecting power materials and the accuracy of the random inspection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent decision-making technology, and in particular to a multi-strategy fusion material sampling method. Background Art

[0002] With the development of intelligent material management and control, sampling and testing of power materials has become an important work step in the power material supply chain.

[0003] The patent document with publication number CN 110555596 A discloses a method and system for formulating sampling strategies based on the quality evaluation of power distribution materials. The method and system obtain the batches, quantities, suppliers, material categories and the number of sampling inspections of the power distribution materials for which sampling strategies need to be formulated. After a preliminary sampling strategy is formulated while fully ensuring the comprehensive sampling inspection of each supplier, batch and material category, the strategy is adjusted according to the product quality evaluation results. The sampling strategy and the adjustment strategy are combined to form the final sampling strategy for power distribution materials. The above-mentioned public document CN 110555596 A uses a statistical method for sampling, and conducts sampling inspections in the same proportion for each type of power material. It lacks pertinence and precision, and does not reasonably allocate resources and formulate differentiated sampling measures on the issue of the inspection pass rate of different suppliers and material categories.

[0004] The patent document with publication number CN 116187836 A discloses a method for evaluating and sampling the quality of electric power materials. The method is based on the historical data required for formulating the sampling strategy of electric power materials, establishes three quality evaluation indicators for electric power materials, and performs quality evaluation on the historical data of sampling of electric power materials. Then, the sampling data of electric power materials are classified using the modulo C-means clustering algorithm and the quality evaluation index, and the sampling rate index of electric power materials is established based on the classification results; finally, based on the sampling rate index and historical data, the neural network is trained to form an intelligent sampling strategy for electric power materials. The above-mentioned public document CN 116187836 A uses a neural network for training, but the algorithm used is single and overfitting is prone to occur.

[0005] Traditional sampling detection technology does not adopt reasonable sampling measures, and even if the neural network model prediction is used, the sampling algorithm is single and prone to overfitting, which can easily lead to low sampling efficiency and low accuracy of sampling results. How to formulate a reasonable, effective and scientific sampling strategy for power materials is of great significance to the construction of a smart power material industry chain. Summary of the invention

[0006] The present invention provides a multi-strategy fusion material sampling inspection method, which can improve the security and certification efficiency of the multi-strategy fusion material sampling inspection.

[0007] To achieve the above object, a multi-strategy fusion method for randomly inspecting materials provided by the present invention includes:

[0008] Obtain standardized historical power material data, and convert the standardized historical power material data into historical power material data features, where the historical power material data features include: material category number, material supplier number, experiment category number, and material supplier status;

[0009] Use the historical power material data features to train a pre-constructed multi-strategy fusion model, and after training is completed, obtain a standard multi-strategy fusion model, where the pre-constructed multi-strategy fusion model includes a first strategy model, a second strategy model, and a third strategy model;

[0010] Obtain the power material data to be randomly inspected. The first strategy model, the second strategy model, and the third strategy model of the standard multi-strategy fusion model respectively perform random inspection predictions on the power material data to be randomly inspected, and perform weighted average processing on the random inspection results predicted by the first strategy model, the second strategy model, and the third strategy model to obtain a random inspection prediction result.

[0011] Optionally, the using the historical power material data features to train a pre-constructed multi-strategy fusion model, and after training is completed, obtaining a standard multi-strategy fusion model includes:

[0012] Input the historical power material data features into the pre-constructed multi-strategy fusion model, and respectively train the first strategy model, the second strategy model, and the third strategy model in the pre-constructed multi-strategy fusion model. After training is completed, obtain the standard multi-strategy fusion model.

[0013] Optionally, the training of the first strategy model in the pre-constructed multi-strategy fusion model includes:

[0014] Use the gradient boosting technique to construct a tree main model, and divide each node of the tree main model according to the historical power material data features to obtain tree sub-models. When the division reaches a preset stop condition, integrate the tree sub-models and the tree main model to obtain an initial tree model;

[0015] Use a preset first loss function to calculate the loss value of the initial tree model, and iteratively train the initial tree model through the loss value to obtain a classification tree model;

[0016] Add a basic predictor to each node of the classification tree model, and optimize the branch selection of each node through the basic score value of the basic predictor;

[0017] Summarize the branch selections of each of the nodes in the classification tree model to obtain the first policy model.

[0018] Optionally, calculating the loss value of the initial tree model using a preset first loss function includes:

[0019] Calculate the loss value of the initial tree model using the following formula:

[0020]

[0021] where N is the number of historical power material data features, y i is the actual classification label, is the model prediction label.

[0022] Optionally, training the second policy model in the pre-constructed multi-policy fusion model includes:

[0023] Extract any one of the historical power material data features as the root node of the decision tree, and use the features of the same category as the selected feature as the parallel root nodes of the decision tree to obtain multiple root nodes;

[0024] Split the features other than those of the same category as the root node at the root node to obtain multiple child nodes;

[0025] Summarize all the root nodes and all the child nodes to obtain a decision tree cluster, and determine the classification result of the decision tree cluster by voting to obtain the second policy model.

[0026] Optionally, training the third policy model in the pre-constructed multi-policy fusion model includes:

[0027] Allocate pass rates to each category in the historical power material data features according to a preset pass rate rule;

[0028] Calculate the weights of each category according to the pass rate, and calculate the pass rate of the material provider according to the weights of each category to obtain the third policy model.

[0029] Optionally, obtaining the standardized historical power material data includes:

[0030] Obtain historical power material data, preprocess the historical power material data, and tag the historical power material data according to a preset label;

[0031] Sample the tagged data using a preset sample sampling technique to obtain the standardized historical power material data.

[0032] To solve the above problems, the present invention also provides a multi-strategy fusion material sampling inspection device, which includes:

[0033] A data standardization module, configured to obtain standardized historical power material data and convert the standardized historical power material data into historical power material data features, where the historical power material data features include: material category number, material supplier number, experiment category number, and material supplier status;

[0034] A model training module, configured to use the historical power material data features to train a pre-constructed multi-strategy fusion model, and obtain a standard multi-strategy fusion model after the training is completed, where the pre-constructed multi-strategy fusion model includes a first strategy model, a second strategy model, and a third strategy model;

[0035] A sampling inspection prediction module, configured to obtain power material data to be sampled. The first strategy model, the second strategy model, and the third strategy model of the standard multi-strategy fusion model respectively perform sampling inspection predictions on the power material data to be sampled, and perform weighted average processing on the sampling inspection results predicted by the first strategy model, the second strategy model, and the third strategy model to obtain a sampling inspection prediction result.

[0036] To solve the above problems, the present invention also provides an electronic device, which includes:

[0037] At least one processor; and,

[0038] A memory communicatively connected to the at least one processor; wherein,

[0039] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned multi-strategy fusion material sampling inspection method.

[0040] To solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the above-mentioned multi-strategy fusion material sampling inspection method.

[0041] In the embodiment of this solution, the standardized historical power material data is used to transform into historical power material data features, and the historical power material data features are used to train the first strategy model, the second strategy model, and the third strategy model in the pre-constructed multi-strategy fusion model respectively, which can ensure the generalization ability of the multi-strategy fusion model to process power material data. Moreover, by using multiple strategy models to conduct material sampling inspection prediction, the accuracy of the sampling inspection can be achieved. In addition, by directly using the multi-strategy model to conduct sampling inspection prediction on the power material data to be sampled, the work efficiency of the power material sampling inspection can be improved. Brief Description of the Drawings

[0042] Figure 1 It is a schematic flowchart of a multi-strategy fusion material sampling inspection method provided by an embodiment of the present invention;

[0043] Figure 2 It is a functional module diagram of a multi-strategy fusion material sampling inspection device provided by an embodiment of the present invention;

[0044] Figure 3 It is a schematic structural diagram of an electronic device for implementing the above-mentioned multi-strategy fusion material sampling inspection method provided by an embodiment of the present invention.

[0045] The realization, functional characteristics, and advantages of the purpose of the present invention will be further described in conjunction with the embodiments with reference to the drawings. Detailed Embodiments

[0046] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0047] The embodiment of the present application provides a multi-strategy fusion material sampling inspection method. The execution subject of the above-mentioned multi-strategy fusion material sampling inspection method includes, but is not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the above-mentioned multi-strategy fusion material sampling inspection method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes, but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

[0048] Refer to Figure 1As shown in the figure, it is a schematic flowchart of a multi-strategy fusion material sampling inspection method provided by an embodiment of the present invention. In this embodiment, the multi-strategy fusion material sampling inspection method includes:

[0049] S1. Obtain standardized historical power material data, and convert the standardized historical power material data into historical power material data features, where the historical power material data features include: material category number, material supplier number, experiment category number, and material supplier status.

[0050] In an embodiment of the present invention, the standardized historical power material data refers to the power material data that has been sampled and inspected, the blacklist manufacturer information and blacklist manufacturer penalty information announced by the historical power material data power grid platform, etc.

[0051] As an embodiment of the present invention, the obtaining of the standardized historical power material data includes:

[0052] Obtain historical power material data, preprocess the historical power material data, and perform tagging processing on the historical power material data according to preset tags;

[0053] Perform sampling processing on the data after tagging processing by using a preset sample sampling technique to obtain standardized data.

[0054] In an embodiment of the present invention, the preset tags refer to two states of sampling and non-sampling for each data in the sampling inspection task.

[0055] In an embodiment of the present invention, the sample sampling technique refers to a data processing technique for adjusting the balance of multiple collected data samples, which can prevent the model from being biased towards the majority class samples due to class imbalance and rarely considering the minority class samples. By using the sample sampling technique, the number of minority class samples can be increased to balance the class ratio in the dataset, and the oversampling technique is often used.

[0056] Further, the preprocessing of the historical power material data includes:

[0057] Screen out the abnormal data in the historical power material data, and process the abnormal data to obtain standard power material data;

[0058] Identify the keywords in the standard power material data, and perform data extraction according to the preset data item keywords to complete the preprocessing process of the historical power material data.

[0059] In an embodiment of the present invention, the abnormal data refers to duplicate data, missing values, error data, etc. in the data.

[0060] In the embodiments of the present invention, the preset data item keywords refer to the material categories required in the task requirements, etc. For example, the preset data keywords may be material category numbers, material supplier numbers, experiment category numbers, and material supplier statuses.

[0061] Exemplarily, 1. Data processing: 1.1 Removing duplicate data: Check all data and remove any rows that are exactly the same. 1.2 Handling missing values: Depending on the content of the missing values, they can be processed by imputation, deletion, or retention. 1.3 Correcting incorrect data: Check the correctness of the data, for example, the date should be within a reasonable range, and the codes of electrical materials should conform to specific coding specifications, etc.

[0062] 2. Data cleaning: 2.1 Deleting useless data: If certain columns have no impact on the final analysis and results, such as record IDs, individual remarks, etc., they can be selected for deletion. 2.2 Format conversion: Unify the data format, for example, unify all date formats to "yyyy - mm - dd". 2.3 Standardization: For numerical data, such as prices, perform standardization so that they are on the same scale. 2.4 Removing illegal characters: Check all columns and delete any illegal characters present in all columns.

[0063] 3. Data extraction: 3.1 Data scraping: Match and extract information related to the blacklisted manufacturers announced by the State Grid. 3.2 Deleting irrelevant columns: For example, if specific address information is not required in the analysis, this column can be selected for deletion. 3.3 Extracting keywords: If certain columns contain keywords, such as those related to winning bids, quality assurance, reputation, etc., these keywords can be extracted from them.

[0064] 4. Data screening: 4.1 Screening by time: Only extract data within a specified time range. 4.2 Screening by manufacturer: Select all material data under this manufacturer.

[0065] S2. Use the standardized historical electrical material data features to train a pre - constructed multi - strategy fusion model. After training is completed, a standard multi - strategy fusion model is obtained, where the pre - constructed multi - strategy fusion model includes a first strategy model, a second strategy model, and a third strategy model.

[0066] In the embodiments of the present invention, the pre - constructed multi - strategy fusion model refers to a strategy model that uses multiple models for fusion.

[0067] As an embodiment of the present invention, the using the historical electrical material data features to train a pre - constructed multi - strategy fusion model and obtaining a standard multi - strategy fusion model after training includes:

[0068] Input the historical power material data features into the pre-constructed multi-strategy fusion model, and train the first strategy model, the second strategy model, and the third strategy model in the pre-constructed multi-strategy fusion model respectively. After the training is completed, the standard multi-strategy fusion model is obtained.

[0069] Further, the training of the first strategy model in the pre-constructed multi-strategy fusion model includes:

[0070] Use the gradient boosting technique to construct a tree main model, and segment each node of the tree main model according to the historical power material data features to obtain tree sub-models. When the segmentation reaches the preset stop condition, integrate the tree sub-models and the tree main model to obtain an initial tree model;

[0071] Use a preset first loss function to calculate the loss value of the initial tree model, and iteratively train the initial tree model through the loss value to obtain a classification tree model;

[0072] Add a base predictor to each node of the classification tree model, and optimize the branch selection of each node through the base score value of the base predictor;

[0073] Summarize the branch selections of each node in the classification tree model to obtain the first strategy model.

[0074] In the embodiment of the present invention, the gradient boosting technique refers to a machine learning algorithm, which can construct a tree model through the gradient boosting technique and can make the decision tree repeat continuously until the decision tree reaches the specified number or condition.

[0075] In the embodiment of the present invention, the stop condition means that when all data features are included in the tree model, the stop condition is reached.

[0076] In the embodiment of the present invention, the base predictor refers to a prediction function used when predicting using data features.

[0077] Further, when using the preset first loss function to calculate the loss value of the initial tree model, the following formula is used to calculate the loss value of the initial tree model:

[0078]

[0079] where N is the number of historical power material data features, y i is the actual classification label, is the model prediction label.

[0080] Further, to optimize the branch selection of each node through the base score value of the base predictor, the following formula is used:

[0081]

[0082] Among them, the y i is the actual classification label, and BaseScore is the model prediction score.

[0083] Exemplarily, assume there are T iteration steps, t = 1, 2, …, T, and a new decision tree is added in each iteration step. In the first iteration step, the initial prediction result of the model is the base score value of the base predictor, that is, the log-odds of the log ratio. For each iteration step t, calculate the predicted value of the first policy model Then calculate the residual r of each node i it , and its calculation formula is as follows:

[0084]

[0085] Among them, the y i is the actual classification label, is the model prediction result of the (t - 1)-th round.

[0086] Then use the data features of the current node where X i is the data feature, construct the decision tree of the current node, and update the weight of each node through the following formula to improve the generalization ability of the model.

[0087]

[0088] Among them, is the gradient of the current node, is the second derivative of the current node, and λ is the regularization parameter.

[0089] As an embodiment of the present invention, the training of the second policy model in the pre-constructed multi-policy fusion model includes:

[0090] Extract any feature in the historical power material data features as the root node of the decision tree, and use the features of the same category as the selected feature as the parallel root nodes of the decision tree to obtain multiple root nodes;

[0091] Split the features other than those of the same category as the root node at the root node to obtain multiple child nodes;

[0092] Summarize all the root nodes and all the child nodes to obtain a decision tree cluster, and determine the classification result of the decision tree cluster by voting to obtain the second policy model.

[0093] In the embodiment of the present invention, the decision tree refers to a tree structure used for classification and prediction. For example, the decision tree can adopt the random forest ensemble learning method.

[0094] In the embodiment of the present invention, the voting method refers to taking the result with the highest number of votes as the final classification result.

[0095] As an embodiment of the present invention, training the third strategy model in the pre-constructed multi-strategy fusion model includes:

[0096] Assigning a pass rate to each category in the historical power material data features according to a preset pass rate rule;

[0097] Calculating the weight of each category according to the pass rate, and calculating the pass rate of the material provider according to the weight of each category to obtain the third strategy model.

[0098] In the embodiment of the present invention, the preset pass rate rule refers to the rule of the pass rate of each feature in the declared historical power material data features, which can be formulated according to the importance of each feature or according to the historical statistical pass rate data.

[0099] In the embodiment of the present invention, the weight of each category can be calculated according to the pass rate by using the following formula:

[0100]

[0101] where, the ω i is the weight of the i-th category, is the pass rate of the i-th category.

[0102] In the embodiment of the present invention, the pass rate of the material provider is calculated by the following formula:

[0103] FPY i = ω1*α1 + ω2*α2 + … + ω t *α t

[0104] where, ω1 is the weight of the first category, α1 is the actual pass rate of the material provider corresponding to the first category, ω2 is the weight of the second category, α2 is the actual pass rate of the material provider corresponding to the second category, ω t is the weight of the second category, α t is the actual pass rate of the material provider corresponding to the second category.

[0105] S3. Obtain the power material data to be inspected. The first strategy model, the second strategy model, and the third strategy model of the standard multi-strategy fusion model respectively perform inspection predictions on the power material data to be inspected, and perform weighted average processing on the inspection results predicted by the first strategy model, the second strategy model, and the third strategy model to obtain the inspection prediction result.

[0106] In the embodiments of the present invention, the power material data to be sampled refers to the power material data that needs to be predicted for material sampling inspection. The power material data to be sampled can be obtained through the power grid platform, manually input, or crawled from web pages using data crawling technology, etc.

[0107] As an embodiment of the present invention, the prediction using the standard multi-strategy fusion model includes:

[0108] Converting the power material data to be sampled into the characteristics of the power material data to be sampled;

[0109] Processing the characteristics of the power material data to be sampled using the first strategy model in the standard multi-strategy fusion model to obtain a first prediction result;

[0110] Processing the characteristics of the power material data to be sampled using the second strategy model in the standard multi-strategy fusion model to obtain a second prediction result;

[0111] Processing the characteristics of the power material data to be sampled using the third strategy model in the standard multi-strategy fusion model to obtain a third prediction result;

[0112] Summarizing the first prediction result, the second prediction result, and the third prediction result to obtain a sampling inspection prediction result.

[0113] Further, the weighted average processing of the sampled inspection results obtained by prediction includes:

[0114] Using the weighted average calculation formula to perform weighted average calculation on the first classification result, the second classification result, and the third classification result to obtain a sampling inspection prediction result.

[0115] In the embodiments of the present invention, the standardized historical power material data is converted into historical power material data characteristics, and the historical power material data characteristics are used to train the first strategy model, the second strategy model, and the third strategy model in the pre-constructed multi-strategy fusion model respectively, which can ensure the generalization ability of the multi-strategy fusion model to process power material data. Moreover, through multiple strategy models for material sampling inspection prediction, the accuracy of sampling inspection can be achieved. In addition, by directly using the multi-strategy model to perform sampling inspection prediction on the power material data to be sampled, the work efficiency of power material sampling inspection can be improved.

[0116] As Figure 2 shown, it is a functional module diagram of a multi-strategy fusion material sampling inspection device provided by an embodiment of the present invention.

[0117] The multi-strategy fusion material sampling inspection device 100 described in the present invention can be installed in an electronic device. According to the functions achieved, the multi-strategy fusion material sampling inspection device 100 may include a data standardization module 101, a model training module 102, and a sampling inspection prediction module 103.

[0118] The module described in the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.

[0119] In this embodiment, the functions of each module / unit are as follows:

[0120] The data standardization module 101 is used to obtain standardized historical power material data and convert the standardized historical power material data into historical power material data features. Among them, the historical power material data features include: material category number, material supplier number, experiment category number, and material supplier status.

[0121] In the embodiment of the present invention, the standardized historical power material data refers to the power material data that has been sampled and inspected, the blacklist manufacturer information and blacklist manufacturer penalty information announced by the historical power material data power grid platform, etc.

[0122] As an embodiment of the present invention, the obtaining of the standardized historical power material data includes:

[0123] Obtain historical power material data, preprocess the historical power material data, and perform tagging processing on the historical power material data according to preset tags;

[0124] Perform sampling processing on the data after tagging processing by using a preset sample sampling technique to obtain standardized data.

[0125] In the embodiment of the present invention, the preset tags refer to the two states of sampling and non-sampling for each data in the sampling inspection task.

[0126] In the embodiment of the present invention, the sample sampling technique refers to a data processing technique for adjusting the balance of multiple collected data samples, which can prevent the model from being biased towards the majority class samples due to class imbalance and rarely considering the minority class samples. By using the sample sampling technique, the number of minority class samples can be increased to balance the class ratio in the dataset, and oversampling techniques are often used.

[0127] Further, the preprocessing of the historical power material data includes:

[0128] Screen out the abnormal data in the historical power material data and process the abnormal data to obtain standard power material data;

[0129] Identify the keywords in the standard power material data, and extract data according to the preset data item keywords to complete the preprocessing process of the historical power material data.

[0130] In the embodiments of the present invention, abnormal data refers to duplicate data, missing values, error data, etc. in the data.

[0131] In the embodiments of the present invention, the preset data item keywords refer to the material categories required in the task requirements. For example, the preset data keywords may be material category numbers, material supplier numbers, experiment category numbers, and material supplier statuses.

[0132] Exemplarily, 1. Data processing: 1.1 Remove duplicate data: Check all data, and if there are completely duplicate rows, remove them. 1.2 Process missing values: According to the content of the missing values, the missing values can be processed by interpolation, deletion, and retention. 1.3 Correct error data: Check the correctness of the data. For example, the date should be within a reasonable range, and the code of the power material should conform to a specific coding specification, etc.

[0133] 2. Data cleaning: 2.1 Delete useless data: If some columns have no impact on the final analysis and results, such as record IDs, individual remarks, etc., they can be selected for deletion. 2.2 Format conversion: Unify the data format. For example, unify all date formats to "yyyy - mm - dd". 2.3 Standardization: For numerical data, such as prices, perform standardization so that they are on the same scale. 2.4 Remove illegal characters: Check all columns and delete the illegal characters existing in all columns.

[0134] 3. Data extraction: 3.1 Data scraping: Match and extract information related to the blacklist manufacturers announced by the State Grid. 3.2 Delete irrelevant columns: For example, if specific address information is not required in the analysis, this column can be selected for deletion. 3.3 Extract keywords: If some columns contain keywords, such as those related to winning bids, quality assurance, reputation, etc., these keywords can be extracted from them.

[0135] 4. Data screening: 4.1 Screen by time: Only extract data within the specified time range. 4.2 Screen by manufacturer: Select all material data under this manufacturer.

[0136] The model training module 102 is used to train a pre - constructed multi - strategy fusion model using the historical power material data features. After training is completed, a standard multi - strategy fusion model is obtained, where the pre - constructed multi - strategy fusion model includes a first strategy model, a second strategy model, and a third strategy model.

[0137] In the embodiments of the present invention, the pre-constructed multi-strategy fusion model refers to a strategy model that fuses multiple models.

[0138] As an embodiment of the present invention, training the pre-constructed multi-strategy fusion model using the historical power material data features, and obtaining a standard multi-strategy fusion model after training, includes:

[0139] Input the historical power material data features into the pre-constructed multi-strategy fusion model, and train the first strategy model, the second strategy model, and the third strategy model in the pre-constructed multi-strategy fusion model respectively. After training, obtain the standard multi-strategy fusion model.

[0140] Further, training the first strategy model in the pre-constructed multi-strategy fusion model includes:

[0141] Use the gradient boosting technique to construct a tree main model, and split each node of the tree main model according to the historical power material data features to obtain tree sub-models. When the splitting reaches a preset stop condition, integrate the tree sub-models and the tree main model to obtain an initial tree model;

[0142] Use a preset first loss function to calculate the loss value of the initial tree model, and iteratively train the initial tree model through the loss value to obtain a classification tree model;

[0143] Add a basic predictor to each node of the classification tree model, and optimize the branch selection of each node through the basic score value of the basic predictor;

[0144] Summarize the branch selections of each node in the classification tree model to obtain the first strategy model.

[0145] In the embodiments of the present invention, the gradient boosting technique refers to a machine learning algorithm that can construct a tree model through the gradient boosting technique and can make the decision tree repeat continuously until the decision tree reaches a specified number or condition.

[0146] In the embodiments of the present invention, the stop condition means that when all data features are included in the tree model, the stop condition is reached.

[0147] In the embodiments of the present invention, the basic predictor refers to a prediction function used when making predictions using data features.

[0148] Further, when using the preset first loss function to calculate the loss value of the initial tree model, the loss value of the initial tree model is calculated using the following formula:

[0149]

[0150] Among them, N is the number of historical power material data features, and y i is the actual classification label, and is the model prediction label.

[0151] Furthermore, the branch selection of each node is optimized by the basic score value of the basic predictor, and the following formula is adopted:

[0152]

[0153] Among them, the y i is the actual classification label, and BaseScore is the model prediction score.

[0154] Exemplarily, assume there are T iteration steps, t = 1, 2,..., T, and a new decision tree is added in each iteration step. In the first iteration step, the initial prediction result of the model is the basic score value of the basic predictor, that is, the log odds of the log ratio. For each iteration step t, calculate the predicted value of the first strategy model Then calculate the residual r of each node i it , and its calculation formula is as follows:

[0155]

[0156] Among them, the y i is the actual classification label, is the model prediction result of the (t - 1)-th round.

[0157] Then use the data features of the current node where X i is the data feature, construct the decision tree of the current node, and update the weight of each node through the following formula to improve the generalization ability of the model.

[0158]

[0159] Among them, is the gradient of the current node, is the second derivative of the current node, and λ is the regularization parameter.

[0160] As an embodiment of the present invention, the training of the second strategy model in the pre-constructed multi-strategy fusion model includes:

[0161] Extract any feature in the historical power material data features as the root node of the decision tree, and use the features of the same category as the selected feature as the parallel root nodes of the decision tree to obtain multiple root nodes;

[0162] Split the features other than those of the same category as the root node at the root node to obtain multiple child nodes;

[0163] Aggregate all root nodes and all child nodes to obtain a decision tree cluster, and determine the classification result of the decision tree cluster by voting to obtain a second policy model.

[0164] In an embodiment of the present invention, the decision tree refers to a tree structure used for classification and prediction. For example, the decision tree can adopt a random forest ensemble learning method.

[0165] In an embodiment of the present invention, the voting method refers to taking the result with the highest number of votes as the final classification result.

[0166] As an embodiment of the present invention, training the third policy model in the pre-constructed multi-policy fusion model includes:

[0167] Allocate a pass rate to each category in the historical power material data features according to a preset pass rate rule;

[0168] Calculate the weight of each category according to the pass rate, and calculate the pass rate of the material provider according to the weight of each category to obtain a third policy model.

[0169] In an embodiment of the present invention, the preset pass rate rule refers to the rule of the pass rate of each feature in the declared historical power material data features, which can be formulated according to the importance of each feature or according to the historical statistical pass rate data.

[0170] In an embodiment of the present invention, the weight of each category is calculated according to the pass rate by using the following formula:

[0171]

[0172] where, ω i is the weight of the i-th category, is the pass rate of the i-th category.

[0173] In an embodiment of the present invention, the pass rate of the material provider is calculated by the following formula:

[0174] FPY i = ω1*α1 + ω2*α2 + … + ω t *α t

[0175] where, ω1 is the weight of the first category, α1 is the actual pass rate of the material provider corresponding to the first category, ω2 is the weight of the second category, α2 is the actual pass rate of the material provider corresponding to the second category, ω t is the weight of the second category, α t is the actual pass rate of the material provider corresponding to the second category.

[0176] The sampling inspection prediction module 103 is used to obtain the power material data to be sampled. The first strategy model, the second strategy model, and the third strategy model of the standard multi-strategy fusion model respectively perform sampling inspection predictions on the power material data to be sampled, and perform weighted average processing on the sampling inspection results predicted by the first strategy model, the second strategy model, and the third strategy model to obtain the sampling inspection prediction result.

[0177] In the embodiment of the present invention, the power material data to be sampled refers to the power material data that needs to be predicted for material sampling inspection. The power material data to be sampled can be obtained through the power grid platform, manually input, or crawled from the web page using data crawling technology.

[0178] As an embodiment of the present invention, the prediction using the standard multi-strategy fusion model includes:

[0179] Convert the power material data to be sampled into the characteristics of the power material data to be sampled;

[0180] Use the first strategy model in the standard multi-strategy fusion model to process the characteristics of the power material data to be sampled to obtain the first prediction result;

[0181] Use the second strategy model in the standard multi-strategy fusion model to process the characteristics of the power material data to be sampled to obtain the second prediction result;

[0182] Use the third strategy model in the standard multi-strategy fusion model to process the characteristics of the power material data to be sampled to obtain the third prediction result;

[0183] Summarize the first prediction result, the second prediction result, and the third prediction result to obtain the sampling inspection prediction result.

[0184] Further, the weighted average processing of the sampling inspection results obtained by prediction includes:

[0185] Use the weighted average calculation formula to perform weighted average calculation on the first classification result, the second classification result, and the third classification result to obtain the sampling inspection prediction result.

[0186] As Figure 3 shown, it is a schematic structural diagram of an electronic device for implementing a multi-strategy fusion material sampling inspection method provided by an embodiment of the present invention.

[0187] The electronic device may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13. It may also include a computer program stored in the memory 11 and executable on the processor 10, such as a multi-strategy fusion material sampling inspection method program.

[0188] Among them, in some embodiments, the processor 10 may be composed of integrated circuits. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core (Control Unit) of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. By running or executing programs or modules stored in the memory 11 (such as executing a multi-strategy fusion material sampling inspection method program, etc.), and calling data stored in the memory 11, it performs various functions of the electronic device and processes data.

[0189] The memory 11 includes at least one type of readable storage medium, which includes flash memory, mobile hard disks, multimedia cards, card-type memories (such as SD or DX memories, etc.), magnetic memories, disks, optical discs, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device, such as the mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 can be used not only to store application software installed on the electronic device and various types of data, such as the code of a multi-strategy fusion material sampling inspection method program, etc., but also to temporarily store data that has been output or will be output.

[0190] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable connection communication between the memory 11 and at least one processor 10, etc.

[0191] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), and is generally used to establish a communication connection between this electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), and optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, and is used to display the information processed in the electronic device and to display a visual user interface.

[0192] Figure 3 Only the electronic device with components is shown, and those skilled in the art can understand that Figure 3 the shown structure does not constitute a limitation on the electronic device, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0193] For example, although not shown, the electronic device may further include a power source (such as a battery) for powering each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so as to implement functions such as charging management, discharging management, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, and a power status indicator. The electronic device may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.

[0194] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.

[0195] A multi-strategy fusion material sampling inspection method program stored in the memory 11 of the electronic device is a combination of multiple instructions. When running in the processor 10, it can implement:

[0196] Obtain standardized historical power material data, and convert the standardized historical power material data into historical power material data features, where the historical power material data features include: material category number, material supplier number, experiment category number, and material supplier status;

[0197] Train a pre-constructed multi-strategy fusion model using the historical power material data features, and obtain a standard multi-strategy fusion model after training. Among them, the pre-constructed multi-strategy fusion model includes a first strategy model, a second strategy model, and a third strategy model;

[0198] Obtain the power material data to be sampled and inspected. The first strategy model, the second strategy model, and the third strategy model of the standard multi-strategy fusion model respectively conduct sampling and inspection predictions on the power material data to be sampled and inspected, and perform weighted average processing on the sampling and inspection results predicted by the first strategy model, the second strategy model, and the third strategy model to obtain the sampling and inspection prediction results.

[0199] Specifically, for the specific implementation method of the above instructions by the processor 10, reference can be made to the description of the relevant steps in the corresponding embodiments of the attached drawings, which will not be elaborated here.

[0200] Furthermore, if the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM, Read-Only Memory).

[0201] The present invention also provides a computer-readable storage medium. The readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, it can implement:

[0202] Obtain standardized historical power material data, and convert the standardized historical power material data into historical power material data features. Among them, the historical power material data features include: material category number, material supplier number, experiment category number, and material supplier status;

[0203] Train a pre-constructed multi-strategy fusion model using the historical power material data features, and obtain a standard multi-strategy fusion model after training. Among them, the pre-constructed multi-strategy fusion model includes a first strategy model, a second strategy model, and a third strategy model;

[0204] Obtain the power material data to be sampled and inspected. The first strategy model, the second strategy model, and the third strategy model of the standard multi-strategy fusion model respectively conduct sampling and inspection predictions on the power material data to be sampled and inspected, and perform weighted average processing on the sampling and inspection results predicted by the first strategy model, the second strategy model, and the third strategy model to obtain the sampling and inspection prediction results.

[0205] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation.

[0206] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0207] In addition, the functional modules in various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of a combination of hardware and software functional modules.

[0208] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-mentioned exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.

[0209] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any associated drawing marks in the claims should not be regarded as limiting the claimed rights.

[0210] The blockchain referred to in the present invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, in essence, is a decentralized database, a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (anti-counterfeiting) and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer, etc.

[0211] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Among them, Artificial Intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results of theory, methods, technologies, and application systems.

[0212] In addition, it is obvious that the term "comprising" does not exclude other units or steps, and the singular does not exclude the plural. A plurality of units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. Terms such as first, second, etc. are used to denote names and do not denote any particular order.

[0213] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A multi-strategy fusion method for randomly inspecting materials, characterized in that, The method includes: Obtaining standardized historical power material data, and converting the standardized historical power material data into historical power material data features, where the historical power material data features include: material category number, material supplier number, experiment category number, and material supplier status; Training a pre-constructed multi-strategy fusion model using the historical power material data features, and obtaining a standard multi-strategy fusion model after training, where the pre-constructed multi-strategy fusion model includes a first strategy model, a second strategy model, and a third strategy model; among them, training the first strategy model in the pre-constructed multi-strategy fusion model includes: constructing a tree main model using gradient boosting technology, and splitting each node of the tree main model according to the historical power material data features to obtain tree sub-models. When the splitting reaches a preset stop condition, integrating the tree sub-models and the tree main model to obtain an initial tree model; calculating the loss value of the initial tree model using a preset first loss function, and iteratively training the initial tree model through the loss value to obtain a classification tree model; adding a basic predictor to each node of the classification tree model, and optimizing the branch selection of each node through the basic score value of the basic predictor; summarizing the branch selections of each node in the classification tree model to obtain the first strategy model; among them, training the second strategy model in the pre-constructed multi-strategy fusion model includes: extracting any one of the historical power material data features as the root node of the decision tree, and using the features of the same category as the selected feature as the parallel root nodes of the decision tree to obtain multiple root nodes; splitting the features other than those of the same category as the root nodes at the root nodes to obtain multiple child nodes; summarizing all the root nodes and all the child nodes to obtain a decision tree cluster, and determining the classification result of the decision tree cluster by voting to obtain the second strategy model; among them, training the third strategy model in the pre-constructed multi-strategy fusion model includes: allocating a pass rate to each category in the historical power material data features according to a preset pass rate rule; calculating the weight of each category according to the pass rate, and calculating the pass rate of the material provider according to the weight of each category to obtain the third strategy model; Obtaining power material data to be sampled and inspected, and the first strategy model, the second strategy model, and the third strategy model of the standard multi-strategy fusion model respectively perform sampling and inspection predictions on the power material data to be sampled and inspected, and perform weighted average processing on the sampling and inspection results predicted by the first strategy model, the second strategy model, and the third strategy model to obtain a sampling and inspection prediction result.

2. The multi-strategy fusion material sampling inspection method according to claim 1, wherein The training of the pre-constructed multi-strategy fusion model using the historical power material data features and obtaining a standard multi-strategy fusion model after training includes: Input the historical power material data features into the pre-constructed multi-strategy fusion model, and train the first strategy model, the second strategy model, and the third strategy model in the pre-constructed multi-strategy fusion model respectively. After the training is completed, obtain the standard multi-strategy fusion model.

3. The multi-strategy fusion material sampling inspection method according to claim 1, wherein The calculating the loss value of the initial tree model by using a preset first loss function includes: Calculate the loss value of the initial tree model by using the following formula: Among them, N is the number of historical power material data features, and y i is the actual classification label, and is the model prediction label.

4. The multi-strategy fusion material sampling inspection method according to claim 1 or 2, characterized in that, The obtaining the standardized historical power material data includes: Obtain the historical power material data, preprocess the historical power material data, and label the historical power material data according to a preset label; Sample the data after the labeling process by using a preset sample sampling technique to obtain the standardized historical power material data.

5. A multi-strategy fusion material sampling inspection device, characterized in that, The device can implement the multi-strategy fusion material sampling inspection method described in any one of claims 1 to 4. The device includes: A data standardization module, configured to obtain the standardized historical power material data and convert the standardized historical power material data into historical power material data features, where the historical power material data features include: material category number, material supplier number, experiment category number, and material supplier status; A model training module, configured to train a pre-constructed multi-strategy fusion model by using the historical power material data features, and obtain a standard multi-strategy fusion model after the training is completed, where the pre-constructed multi-strategy fusion model includes a first strategy model, a second strategy model, and a third strategy model; A sampling inspection prediction module, configured to obtain the power material data to be sampled. The first strategy model, the second strategy model, and the third strategy model of the standard multi-strategy fusion model respectively perform sampling inspection predictions on the power material data to be sampled, and perform weighted average processing on the sampling inspection results predicted by the first strategy model, the second strategy model, and the third strategy model to obtain a sampling inspection prediction result.

6. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the multi-strategy fusion material sampling inspection method described in any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, The computer program, when executed by a processor, implements the multi-strategy fusion material sampling inspection method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Spot check strategy making method and system based on power distribution material quality evaluation

    CN110555596A

  • Electric power material quality evaluation and sampling inspection method

    CN116187836A

  • Material sampling inspection method and device based on LightGBM index model

    CN115796704A

  • Product quality sampling inspection system based on sampling inspection strategy making model

    CN116307933A