Power grid electronic component interface test method based on big data processing
By storing historical test data of power grid electronic components on a big data platform and deploying an expert network, the problem of high difficulty in interface testing of electronic components in power grid systems has been solved, and rapid and accurate test scheme generation has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU RUIHU INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2024-12-09
- Publication Date
- 2026-05-12
AI Technical Summary
The power grid system contains a wide variety of electronic components, making interface testing difficult and challenging to provide quick and accurate test solutions.
A big data platform is used to store historical test datasets of power grid electronic components, and multiple expert networks are deployed. The datasets are divided into multiple subsets through feature extraction and clustering, and each subset is associated with an expert network. The expert networks are then used to generate accurate test plans.
It enables rapid and accurate testing of the interfaces of electronic components in the power grid, reducing computing power requirements and improving response speed.
Smart Images

Figure CN119721123B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of testing technology, and in particular to a method for testing the interface of power grid electronic components based on big data processing. Background Technology
[0002] To ensure the stable operation of the power grid system, it is necessary to perform corresponding interface tests on various power grid electronic components before installation or during routine maintenance of these components after installation, so as to avoid affecting the safe and stable operation of the power grid system due to interface failures.
[0003] However, the electronic components used in power grid systems are numerous and varied. In particular, with the promotion of smart grids, the types and functions of power grid electronic components are increasing day by day. As a result, the difficulty of interface testing has increased significantly, making it difficult to provide a quick and accurate test plan for the interfaces that need to be tested. Summary of the Invention
[0004] To address the aforementioned technical issues, this application proposes a method for testing the interface of power grid electronic components based on big data processing, which can quickly generate accurate test plans for the interface under test.
[0005] This application provides a method for testing interfaces of power grid electronic components based on big data processing. The method is applicable to a big data platform, which stores historical test datasets of power grid electronic component interfaces and deploys multiple expert networks. The historical test datasets are divided into multiple first data subsets, each of which is associated with one of the multiple expert networks. The method includes:
[0006] Receive information from the interface under test of the electronic components under test in the power grid;
[0007] Obtain target data that matches the information of the interface under test from the historical test dataset;
[0008] Based on the target data, at least one second data subset is selected from the plurality of first data subsets, wherein there is overlapping data between the second data subset and the target data;
[0009] Invoke the expert network associated with each of the at least one second data subset to generate a test plan corresponding to the interface to be tested based on the target data;
[0010] Based on the test plan, test instructions are sent to the test equipment so that the test equipment tests the interface under test according to the test plan.
[0011] Optionally, each first data subset contains at least one test data sample, and the big data platform also stores the sample feature vector corresponding to each test data sample in the historical test dataset. The step of obtaining target data matching the information of the interface to be tested from the historical test dataset includes:
[0012] Feature extraction is performed on the information of the interface under test to obtain the feature vector of the interface under test;
[0013] Determine the first similarity between each sample feature vector in the sample feature vector corresponding to each test data sample in the historical test dataset and the feature vector of the interface to be tested;
[0014] From the historical test dataset, select N test data samples corresponding to the N sample feature vectors with the highest first similarity, and use the N test data samples to form the target data, where N is a positive integer.
[0015] Optionally, the historical test dataset consists of all test data samples therein, and before receiving information about the interface under test of the electronic component under test in the power grid, the method further includes:
[0016] Feature extraction is performed on each test data sample in the historical test dataset to obtain the corresponding sample feature vector, which is then stored in the big data platform.
[0017] Based on the sample feature vectors corresponding to all test data samples in the historical test dataset, clustering is performed on all test data samples in the historical test dataset to obtain multiple cluster centers.
[0018] Based on the multiple cluster centers, all test data samples in the historical test dataset are divided into multiple first data subsets, and the multiple first data subsets are stored in the big data platform.
[0019] Optionally, the number of the plurality of cluster centers is equal to the number of the plurality of first data subsets, and the plurality of cluster centers correspond one-to-one with the plurality of first data subsets. The step of dividing all test data samples in the historical test dataset into the plurality of first data subsets based on the plurality of cluster centers includes:
[0020] For each test data sample, a second similarity is determined between the test data sample and each of the plurality of cluster centers, and the cluster center with the largest second similarity is taken as the cluster center that matches the test data sample;
[0021] For each cluster center, all test data samples matched by that cluster center are grouped into a dataset, which serves as the first data subset corresponding to that cluster center.
[0022] Optionally, the information of the interface under test includes: image information, and / or, information of the interface chip built into the interface under test;
[0023] When the information of the interface under test includes image information, the feature extraction includes image feature extraction;
[0024] The information about the interface chip is generated by diagnosing the interface chip using a chip-level diagnostic algorithm.
[0025] Optionally, before receiving information about the interface under test of the electronic component under test in the power grid, the method further includes:
[0026] For each first subset of data
[0027] All test data samples in the first data subset are input into each expert network for computation to obtain the first prediction results output by the multiple expert networks respectively;
[0028] Based at least on the first prediction results output by the plurality of expert networks, the first data subset is associated with one of the plurality of expert networks.
[0029] Optionally, the plurality of expert networks includes at least two first expert networks and one second expert network, wherein the computing resources required to run the at least two first expert networks simultaneously are less than the computing resources required to run the second expert network, and the step of associating the first data subset with one of the plurality of expert networks based at least on the first prediction results output by the plurality of expert networks includes:
[0030] Determine the third similarity between the first prediction result output by the second expert network and the first prediction result output by each of the first expert networks;
[0031] Based at least on the third similarity, the first data subset is associated with one of the at least two first expert networks.
[0032] Optionally, each first data subset is pre-labeled with a corresponding test label, and associating the first data subset with one of the at least two first expert networks based at least on the third similarity includes:
[0033] Determine the fourth similarity between the test label corresponding to the first data subset and the first prediction result output by each first expert network;
[0034] Calculate the product between the third and fourth similarities for each first expert network to obtain the corresponding fifth similarity;
[0035] The first subset of data is associated with the first expert network corresponding to the maximum value in the fifth similarity.
[0036] Optionally, the step of invoking the expert network associated with each of the at least one second data subset to generate a test plan corresponding to the interface under test based on the target data includes:
[0037] For each second data subset, the overlapping data between the target data and the second data subset is input into the expert network associated with the second data subset for computation, and a second prediction result output by the expert network associated with the second data subset is obtained.
[0038] The test scheme is generated based on the second prediction results output by the expert networks associated with each of the at least one second subset of data.
[0039] Optionally, where there is no overlap between any pair of the plurality of first data subsets, the method further includes:
[0040] Determine the proportion of the target data to the amount of data that overlaps between the target data and each second data subset.
[0041] The process of generating the test plan, based at least on the second prediction results output by the expert networks associated with each of the at least one second subset of data, includes:
[0042] The second prediction results output by the expert networks associated with each of the at least one second data subset are weighted and merged according to the proportion of the data volume to generate the test scheme.
[0043] In summary, the embodiments of this application have at least the following beneficial effects:
[0044] In this embodiment of the application, a big data platform stores historical test datasets of power grid electronic component interfaces and deploys multiple expert networks. The historical test dataset is divided into multiple first data subsets, each of which is associated with one of the multiple expert networks. The method includes: receiving information about the interface to be tested of a power grid electronic component; obtaining target data matching the information of the interface to be tested from the historical test dataset; selecting at least one second data subset from the multiple first data subsets based on the target data, wherein there is overlapping data between the second data subset and the target data; calling the expert networks associated with each of the at least one second data subset to generate a test plan corresponding to the interface to be tested based on the target data; and sending test instructions to a test device based on the test plan, so that the test device tests the interface to be tested according to the test plan. This allows the big data platform to respond to the information of the interface to be tested, quickly find the target data matching the information from the pre-stored big data (i.e., the historical test dataset), and quickly call the appropriate expert network to generate an accurate test plan based on the target data, thereby enabling the rapid generation of an accurate test plan for the interface to be tested. Attached Figure Description
[0045] Figure 1 This is a flowchart illustrating the power grid electronic component interface testing method based on big data processing provided in this application embodiment;
[0046] Figure 2 This is a schematic diagram of the structure of the power grid electronic component interface testing device based on big data processing provided in the embodiments of this application;
[0047] Figure 3 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0049] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more. In the description of this application, the term "comprising" and its variations are open-ended, meaning "including but not limited to." The term "based on" means "at least partially based on." The term "according to" means "at least partially according to." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments."
[0050] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0051] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this application is for the purpose of describing specific embodiments only and is not intended to limit the application. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0052] The following explains some terms and concepts used in the embodiments of this application:
[0053] MoE (Mixture of Experts): In the field of deep learning, expert networks typically refer to the individual sub-models within a MoE. A MoE is a deep learning architecture that improves task performance by combining multiple expert networks. Each expert network focuses on processing a specific type of data or task, while a gating mechanism determines which expert networks should be activated and influence the outcome given the input. This approach aims to make the entire system more flexible and efficient by leveraging the expertise of different specialists.
[0054] in:
[0055] 1. Expert Networks: Independent sub-models, each of which can be a complete neural network. Expert networks typically focus on different aspects of the data, thus capturing diverse information.
[0056] 2. Gated Networks: A key component used to determine which expert networks are activated under the current input. They typically use simple neural networks that output a set of weights that can be used to weight the outputs of different expert networks.
[0057] The power grid electronic component interface testing method based on big data processing provided in this application embodiment is applicable to a big data platform. The big data platform stores historical test datasets of power grid electronic component interfaces and deploys multiple expert networks. The historical test datasets are divided into multiple first data subsets, and each first data subset is associated with one of the multiple expert networks.
[0058] In one example, the historical test dataset can be divided into multiple first data subsets according to a preset classification rule. Further, it can include: the historical test dataset being divided into multiple first data subsets according to interface type, and / or, the historical test dataset being divided into multiple first data subsets according to interface function, and / or, the historical test dataset being divided into multiple first data subsets according to the conditions during testing (e.g., temperature / humidity conditions of the interface environment, communication environment of the interface, electromagnetic environment of the interface, etc.), and / or, the historical test dataset being divided into multiple first data subsets according to geographical region, and / or, the historical test dataset being divided into multiple first data subsets according to time series.
[0059] It is understood that an expert network can be associated with one or more first data subsets, meaning different first data subsets can be associated with the same expert network. In this embodiment, some first data subsets may have a small amount of data, and can be used together with other first data subsets with a small amount of data to train the same expert network; or, some different first data subsets may belong to similar domains, making them suitable for training the same expert network.
[0060] See Figure 1 The diagram illustrates a flowchart of a power grid electronic component interface testing method based on big data processing, provided in an embodiment of this application. The method includes steps S101-S105, as follows:
[0061] S101 receives information about the interface under test of the electronic component under test in the power grid;
[0062] In one example, the component type to which the power grid electronic component under test and / or the power grid electronic component interface belongs can typically include at least one of the following: smart meters, relays and protection devices, transformer monitoring systems, circuit breakers and switching equipment, energy management systems, sensors and monitoring equipment, electric vehicle charging stations, energy storage systems, and microgrid controllers.
[0063] In one example, the information of the interface under test can come from a test device configured to test the interface under test. The information of the interface under test may include at least one of the following: the interface type of the interface under test (such as the type and / or supported protocols of the communication interface, the type and / or supported protocols of the data interface, the type and / or supported protocols of the control interface, etc.) and the function of the interface under test.
[0064] S102, Obtain target data that matches the information of the interface under test from the historical test dataset;
[0065] In one example, the historical test dataset can be stored in one or more databases that support queries. Thus, step S102 may include: using the information of the interface under test, or the interface type and / or interface function of the interface under test contained in the information of the interface under test, as an index, to search in the database storing the historical test dataset to obtain target data that matches the information of the interface under test.
[0066] S103, based on the target data, at least one second data subset is selected from the plurality of first data subsets, wherein there is overlapping data between the second data subset and the target data;
[0067] In one example, step S103 may include: for each first data subset, detecting whether there is overlapping data between the first data subset and the target data; if so, then using the first data subset as the second data subset.
[0068] S104, invoke the expert network associated with each of the at least one second data subset to generate a test plan corresponding to the interface to be tested based on the target data;
[0069] In one example, step S104 may include: inputting the target data into the expert network associated with at least one second data subset, so that the expert network associated with at least one second data subset outputs its corresponding third prediction result, and generating a test plan based on all the third prediction results.
[0070] S105, based on the test plan, send a test instruction to the test device so that the test device tests the interface under test according to the test plan.
[0071] In some cases, since the amount of data in historical test datasets is usually very large, if a model is trained directly using historical test datasets, the trained model must have a very complex structure, and the computing resources required when calling it after training will also be very large, and the response will not be fast enough.
[0072] In this embodiment, the expert network can be trained in advance using the first data subset associated with each expert network, so that the expert network has excellent prediction ability on the first data subset to generate accurate test plans. Moreover, the amount of data used by each expert network during training is smaller than the historical test dataset, which simplifies the structure of each expert network, thereby reducing the computing resources required and improving the response speed.
[0073] In one optional implementation, each first data subset contains at least one test data sample, and the big data platform also stores sample feature vectors corresponding to each test data sample in the historical test dataset. The step of obtaining target data matching the information of the interface to be tested from the historical test dataset includes:
[0074] Feature extraction is performed on the information of the interface under test to obtain the feature vector of the interface under test;
[0075] Determine the first similarity between each sample feature vector in the sample feature vector corresponding to each test data sample in the historical test dataset and the feature vector of the interface to be tested;
[0076] From the historical test dataset, select N test data samples corresponding to the N sample feature vectors with the highest first similarity, where N is a positive integer;
[0077] The target data is formed from the N test data samples.
[0078] In one example, constructing the target data from the N test data samples may include: grouping the N test data samples according to their respective first data subsets, and then constructing the target data from the grouped N test data samples.
[0079] In one example, the sample feature vector can be a feature vector extracted in advance from the corresponding test data sample. The sample feature vector can be used to indicate the interface function features, interface type features and / or timing features in the test process of the sample interface corresponding to the test data sample. Correspondingly, the feature vector of the interface under test can be used to indicate the interface function features, interface type features and / or timing features in the test process of the interface under test.
[0080] In one example, determining this first similarity may include:
[0081] Determine / calculate the first cosine similarity between each sample feature vector and the feature vector of the interface to be tested;
[0082] Determine / calculate the first Euclidean distance between each sample feature vector and the feature vector of the interface to be tested;
[0083] Determine / calculate the first Manhattan distance between each sample feature vector and the feature vector of the interface to be tested;
[0084] Determine / calculate the first Pearson correlation coefficient between each sample feature vector and the feature vector of the interface to be tested;
[0085] Determine / calculate the first KL divergence between each sample feature vector and the feature vector of the interface to be tested;
[0086] The first similarity is obtained by weighting the first cosine similarity, the first Euclidean distance, the first Manhattan distance, the first Pearson correlation coefficient, and / or the first KL divergence.
[0087] In one optional implementation, the historical test dataset consists of all test data samples therein, and before receiving information about the interface under test of the electronic component under test in the power grid, the method further includes:
[0088] Feature extraction is performed on each test data sample in the historical test dataset to obtain the corresponding sample feature vector, which is then stored in the big data platform.
[0089] Based on the sample feature vectors corresponding to all test data samples in the historical test dataset, clustering is performed on all test data samples in the historical test dataset to obtain multiple cluster centers.
[0090] Based on the multiple cluster centers, all test data samples in the historical test dataset are divided into multiple first data subsets, and the multiple first data subsets are stored in the big data platform.
[0091] In one example, the clustering algorithm may include at least one of the following: K-means clustering algorithm, hierarchical clustering, etc.
[0092] In one example, dividing all test data samples in the historical test dataset into multiple first data subsets based on the multiple cluster centers may include: assigning each test data sample to the cluster where its nearest cluster center is located, wherein each cluster center corresponds to a first data subset.
[0093] In this embodiment, clustering is used to automatically divide the historical test dataset. If the big data platform receives a new test data sample, it can also directly allocate the new test data sample to the corresponding first data subset based on multiple cluster centers. This avoids the problem that it may be difficult to exhaustively list all classification rules in some cases due to the large amount of data in the historical test dataset, and it does not require labeling each test data sample for matching classification rules.
[0094] In one optional implementation, the number of the plurality of cluster centers is equal to the number of the plurality of first data subsets, and the plurality of cluster centers correspond one-to-one with the plurality of first data subsets. The step of dividing all test data samples in the historical test dataset into the plurality of first data subsets based on the plurality of cluster centers includes:
[0095] For each test data sample, a second similarity is determined between the test data sample and each of the plurality of cluster centers, and the cluster center with the largest second similarity is taken as the cluster center that matches the test data sample;
[0096] For each cluster center, all test data samples matched by that cluster center are grouped into a dataset, which serves as the first data subset corresponding to that cluster center.
[0097] In one example, determining this second similarity may include:
[0098] Determine / calculate the second cosine similarity between the test data sample and each of the plurality of cluster centers;
[0099] Determine / calculate the second Euclidean distance between the test data sample and each of the plurality of cluster centers;
[0100] Determine / calculate the second Manhattan distance between the test data sample and each of the plurality of cluster centers;
[0101] Determine / calculate the second Pearson correlation coefficient between the test data sample and each of the plurality of cluster centers;
[0102] Determine / calculate the second KL divergence between the test data sample and each of the plurality of cluster centers;
[0103] The second similarity is obtained by weighting the second cosine similarity, the second Euclidean distance, the second Manhattan distance, the second Pearson correlation coefficient, and / or the second KL divergence.
[0104] In one optional implementation, the information of the interface under test includes: image information, and / or, information of the interface chip built into the interface under test;
[0105] When the information of the interface under test includes image information, the feature extraction includes image feature extraction;
[0106] The information about the interface chip is generated by diagnosing the interface chip using a chip-level diagnostic algorithm.
[0107] In one optional implementation, before receiving information about the interface under test of the electronic component under test in the power grid, the method further includes:
[0108] For each first subset of data
[0109] All test data samples in the first data subset are input into each expert network for computation to obtain the first prediction results output by the multiple expert networks respectively;
[0110] Based at least on the first prediction results output by the plurality of expert networks, the first data subset is associated with one of the plurality of expert networks.
[0111] In one example, each first data subset is pre-labeled with a corresponding test label. The step of associating the first data subset with one of the multiple expert networks based on the first prediction results output by the multiple expert networks may include: taking the expert network corresponding to the first prediction result with the highest similarity to the test label labeled in the first data subset from the first prediction results output by the multiple expert networks as the expert network associated with the first data subset.
[0112] In one optional implementation, the plurality of expert networks includes at least two first expert networks and one second expert network, wherein the computing resources required to run the at least two first expert networks simultaneously are less than the computing resources required to run the second expert network, and the step of associating the first data subset with one of the plurality of expert networks based at least on the first prediction results output by the plurality of expert networks includes:
[0113] Determine the third similarity between the first prediction result output by the second expert network and the first prediction result output by each of the first expert networks;
[0114] Based at least on the third similarity, the first data subset is associated with one of the at least two first expert networks.
[0115] In this embodiment, a second expert network with high computing power requirements and a relatively complex structure, and a first expert network with low computing power requirements and a relatively simple structure can be deployed simultaneously in the big data platform. However, the second expert network is only used to provide the basis for associating each first expert network with each first data subset, and is not directly associated with each first data subset (i.e. it will not be called and does not need to be used to generate test plans). In this way, the accuracy and speed of generating test plans can be taken into account, and the computing power requirements of the big data platform can be reduced.
[0116] In one example, associating the first data subset with one of the at least two first expert networks based at least on the third similarity may include associating the first data subset with the first expert network corresponding to the maximum value of the third similarity among the at least two first expert networks.
[0117] In one example, determining this third similarity may include:
[0118] Determine / calculate the third cosine similarity between the first prediction result output by the second expert network and the first prediction result output by each of the first expert networks;
[0119] Determine / calculate the third Euclidean distance between the first prediction result output by the second expert network and the first prediction result output by each of the first expert networks;
[0120] Determine / calculate the third Manhattan distance between the first prediction result output by the second expert network and the first prediction result output by each of the first expert networks;
[0121] Determine / calculate the first prediction result output by the second expert network and the third Pearson correlation coefficient between it and the first prediction result output by each of the first expert networks;
[0122] Determine / calculate the first prediction result output by the second expert network and the third KL divergence between it and the first prediction result output by each of the first expert networks;
[0123] The third similarity is obtained by weighting the third cosine similarity, the third Euclidean distance, the third Manhattan distance, the third Pearson correlation coefficient, and / or the third KL divergence.
[0124] In one optional implementation, each first data subset is pre-labeled with a corresponding test label, and associating the first data subset with one of the at least two first expert networks based at least on the third similarity includes:
[0125] Determine the fourth similarity between the test label corresponding to the first data subset and the first prediction result output by each first expert network;
[0126] Calculate the product between the third and fourth similarities for each first expert network to obtain the corresponding fifth similarity;
[0127] The first subset of data is associated with the first expert network corresponding to the maximum value in the fifth similarity.
[0128] In one example, determining this fourth similarity may include:
[0129] Determine / calculate the fourth cosine similarity between the test label corresponding to the first data subset and the first prediction result output by each first expert network;
[0130] Determine / calculate the fourth Euclidean distance between the test label corresponding to the first data subset and the first prediction result output by each first expert network;
[0131] Determine / calculate the fourth Manhattan distance between the test label corresponding to the first data subset and the first prediction result output by each first expert network;
[0132] Determine / calculate the fourth Pearson correlation coefficient between the test label corresponding to the first data subset and the first prediction result output by each first expert network;
[0133] Determine / calculate the fourth KL divergence between the test label corresponding to the first data subset and the first prediction result output by each first expert network;
[0134] The fourth similarity is obtained by weighting the fourth cosine similarity, the fourth Euclidean distance, the fourth Manhattan distance, the fourth Pearson correlation coefficient, and / or the fourth KL divergence.
[0135] In one optional implementation, the step of invoking the expert network associated with each of the at least one second data subset to generate a test plan corresponding to the interface under test based on the target data includes:
[0136] For each second data subset, the overlapping data between the target data and the second data subset is input into the expert network associated with the second data subset for computation, and a second prediction result output by the expert network associated with the second data subset is obtained.
[0137] The test scheme is generated based on the second prediction results output by the expert networks associated with each of the at least one second subset of data.
[0138] In one example, generating the test plan based on the second prediction results output by the expert networks associated with each of the at least one second data subset may include: deduplicating the second prediction results output by the expert networks associated with each of the at least one second data subset, and merging the deduplicated second prediction results into a test plan.
[0139] In an optional implementation, the plurality of first data subsets do not overlap with each other, and the method further includes:
[0140] Determine the proportion of the target data to the amount of data that overlaps between the target data and each second data subset.
[0141] The process of generating the test plan, based at least on the second prediction results output by the expert networks associated with each of the at least one second subset of data, includes:
[0142] The second prediction results output by the expert networks associated with each of the at least one second data subset are weighted and merged according to the proportion of the data volume to generate the test scheme.
[0143] In this embodiment, since there is no overlap between any two first data subsets, it means that the overlap between each second data subset and the target data is different. There will be no overlap between the same data in the target data and different second data subsets. At this time, the proportion of the overlapping data in the target data can be used to characterize the weight of the target data itself relative to each second data subset, so that weighted merging can be performed to generate a more accurate test plan.
[0144] Accordingly, this application also provides a power grid electronic component interface testing device based on big data processing, which can realize all the processes of the power grid electronic component interface testing method based on big data processing provided in the above embodiments.
[0145] See Figure 2 This illustration shows a structural schematic of a power grid electronic component interface testing device based on big data processing provided in an embodiment of this application. The device is suitable for a big data platform, which stores historical test datasets of power grid electronic component interfaces and deploys multiple expert networks. The historical test datasets are divided into multiple first data subsets, each first data subset being associated with one of the multiple expert networks. The device includes:
[0146] The information receiving module 201 is used to receive information about the interface under test of the electronic components under test in the power grid;
[0147] The target data acquisition module 202 is used to acquire target data that matches the information of the interface to be tested from the historical test dataset;
[0148] The dataset selection module 203 is used to select at least one second data subset from the plurality of first data subsets based on the target data, wherein there is overlapping data between the second data subset and the target data;
[0149] The test plan generation module 204 is used to call the expert network associated with each of the at least one second data subset and generate a test plan corresponding to the interface to be tested based on the target data.
[0150] The test instruction sending module 205 is used to send test instructions to the test device based on the test plan, so that the test device tests the interface under test according to the test plan.
[0151] In one optional implementation, each first data subset contains at least one test data sample, and the big data platform also stores sample feature vectors corresponding to each test data sample in the historical test dataset. The step of obtaining target data matching the information of the interface to be tested from the historical test dataset includes:
[0152] Feature extraction is performed on the information of the interface under test to obtain the feature vector of the interface under test;
[0153] Determine the first similarity between each sample feature vector in the sample feature vector corresponding to each test data sample in the historical test dataset and the feature vector of the interface to be tested;
[0154] From the historical test dataset, select N test data samples corresponding to the N sample feature vectors with the highest first similarity, and use the N test data samples to form the target data, where N is a positive integer.
[0155] In an optional embodiment, the apparatus further includes a pre-storage processing module, the pre-storage processing module being used for:
[0156] The historical test dataset consists of all test data samples within it. Before receiving the information of the interface under test of the electronic components under test in the power grid, feature extraction is performed on each test data sample in the historical test dataset to obtain the corresponding sample feature vector and store it in the big data platform.
[0157] Based on the sample feature vectors corresponding to all test data samples in the historical test dataset, clustering is performed on all test data samples in the historical test dataset to obtain multiple cluster centers.
[0158] Based on the multiple cluster centers, all test data samples in the historical test dataset are divided into multiple first data subsets, and the multiple first data subsets are stored in the big data platform.
[0159] In one optional implementation, the number of the plurality of cluster centers is equal to the number of the plurality of first data subsets, and the plurality of cluster centers correspond one-to-one with the plurality of first data subsets. The step of dividing all test data samples in the historical test dataset into the plurality of first data subsets based on the plurality of cluster centers includes:
[0160] For each test data sample, a second similarity is determined between the test data sample and each of the plurality of cluster centers, and the cluster center with the largest second similarity is taken as the cluster center that matches the test data sample;
[0161] For each cluster center, all test data samples matched by that cluster center are grouped into a dataset, which serves as the first data subset corresponding to that cluster center.
[0162] In one optional implementation, the information of the interface under test includes: image information, and / or, information of the interface chip built into the interface under test;
[0163] When the information of the interface under test includes image information, the feature extraction includes image feature extraction;
[0164] The information about the interface chip is generated by diagnosing the interface chip using a chip-level diagnostic algorithm.
[0165] In an optional implementation, the apparatus further includes an association module, the association module being used for:
[0166] Before receiving information about the interface of the electronic component under test in the power grid, for each first data subset,
[0167] All test data samples in the first data subset are input into each expert network for computation to obtain the first prediction results output by the multiple expert networks respectively;
[0168] Based at least on the first prediction results output by the plurality of expert networks, the first data subset is associated with one of the plurality of expert networks.
[0169] In one optional implementation, the plurality of expert networks includes at least two first expert networks and one second expert network, wherein the computing resources required to run the at least two first expert networks simultaneously are less than the computing resources required to run the second expert network, and the step of associating the first data subset with one of the plurality of expert networks based at least on the first prediction results output by the plurality of expert networks includes:
[0170] Determine the third similarity between the first prediction result output by the second expert network and the first prediction result output by each of the first expert networks;
[0171] Based at least on the third similarity, the first data subset is associated with one of the at least two first expert networks.
[0172] In one optional implementation, each first data subset is pre-labeled with a corresponding test label, and associating the first data subset with one of the at least two first expert networks based at least on the third similarity includes:
[0173] Determine the fourth similarity between the test label corresponding to the first data subset and the first prediction result output by each first expert network;
[0174] Calculate the product between the third and fourth similarities for each first expert network to obtain the corresponding fifth similarity;
[0175] The first subset of data is associated with the first expert network corresponding to the maximum value in the fifth similarity.
[0176] In one optional implementation, the step of invoking the expert network associated with each of the at least one second data subset to generate a test plan corresponding to the interface under test based on the target data includes:
[0177] For each second data subset, the overlapping data between the target data and the second data subset is input into the expert network associated with the second data subset for computation, and a second prediction result output by the expert network associated with the second data subset is obtained.
[0178] The test scheme is generated based on the second prediction results output by the expert networks associated with each of the at least one second subset of data.
[0179] In an optional implementation, the plurality of first data subsets do not overlap with each other, and the apparatus further includes a ratio determination module, the ratio determination module being used to:
[0180] Determine the proportion of the target data to the amount of data that overlaps between the target data and each second data subset.
[0181] The process of generating the test plan, based at least on the second prediction results output by the expert networks associated with each of the at least one second subset of data, includes:
[0182] The second prediction results output by the expert networks associated with each of the at least one second data subset are weighted and merged according to the proportion of the data volume to generate the test scheme.
[0183] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0184] This application provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the method described above.
[0185] See Figure 3 This application also provides a computer device, including a processor 301, a memory 302, and a computer program stored in the memory 302 and configured to be executed by the processor 301, wherein the processor 301 executes the computer program to implement the steps of the method described in any of the above-mentioned embodiments.
[0186] The computer device in this embodiment includes a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301, such as a power grid electronic component interface testing program based on big data processing. When the processor 301 executes the computer program, it implements the steps in the various embodiments of the power grid electronic component interface testing method based on big data processing described above, for example... Figure 1 The steps S101-S105 are shown.
[0187] For example, the computer program may be divided into one or more modules / units, which are stored in the memory 302 and executed by the processor 301 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the computer device.
[0188] The computer device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will understand that the schematic diagram is merely an example of a computer device and does not constitute a limitation on the computer device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.
[0189] The processor 301 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor, or the processor 301 can be any conventional processor. The processor 301 is the control center of the computer device, connecting various parts of the entire computer device through various interfaces and lines.
[0190] The memory 302 can be used to store the computer programs and / or modules. The processor 301 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 302 and calling the data stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0191] Wherein, if the modules / units integrated into the computer device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by the processor 301, it can implement the steps of the various method embodiments described above. Wherein, the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0192] In summary, the embodiments of this application have at least the following beneficial effects:
[0193] In this embodiment of the application, a big data platform stores historical test datasets of power grid electronic component interfaces and deploys multiple expert networks. The historical test dataset is divided into multiple first data subsets, each of which is associated with one of the multiple expert networks. The method includes: receiving information about the interface to be tested of a power grid electronic component; obtaining target data matching the information of the interface to be tested from the historical test dataset; selecting at least one second data subset from the multiple first data subsets based on the target data, wherein there is overlapping data between the second data subset and the target data; calling the expert networks associated with each of the at least one second data subset to generate a test plan corresponding to the interface to be tested based on the target data; and sending test instructions to a test device based on the test plan, so that the test device tests the interface to be tested according to the test plan. This allows the big data platform to respond to the information of the interface to be tested, quickly find the target data matching the information from the pre-stored big data (i.e., the historical test dataset), and quickly call the appropriate expert network to generate an accurate test plan based on the target data, thereby enabling the rapid generation of an accurate test plan for the interface to be tested.
[0194] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary hardware platforms, or it can be implemented entirely by hardware. Based on this understanding, all or part of the technical solutions of this application that contribute to the background technology can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0195] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.
Claims
1. A method for testing electronic components interface of power grid based on big data processing, characterized in that, The method is suitable for a big data platform in which a historical test data set of a power grid electronic component interface is stored and a plurality of expert networks are deployed, the historical test data set is divided into a plurality of first data subsets, each first data subset is associated with one expert network in the plurality of expert networks, and the method comprises the following steps: receiving information of a to-be-tested interface of a to-be-tested electronic component of a power grid; obtaining target data matching the information of the to-be-tested interface from the historical test data set; selecting at least one second data subset from the plurality of first data subsets based on the target data, wherein there is overlapping data between the target data and the second data subset; calling the expert network associated with each of the at least one second data subset to generate a test scheme corresponding to the to-be-tested interface according to the target data; sending a test instruction to a test device based on the test scheme, so that the test device tests the to-be-tested interface according to the test scheme; wherein the calling the expert network associated with each of the at least one second data subset to generate a test scheme corresponding to the to-be-tested interface according to the target data comprises: for each second data subset, inputting the overlapping data between the target data and the second data subset into the expert network associated with the second data subset to obtain a second prediction result output by the expert network associated with the second data subset; and generating the test scheme based on at least the second prediction results output by the expert networks associated with the at least one second data subset respectively.
2. The method of claim 1, wherein, Each first data subset contains at least one test data sample, and the big data platform further stores a sample feature vector corresponding to each test data sample in the historical test data set, and the obtaining target data matching the information of the to-be-tested interface from the historical test data set comprises: extracting features of the information of the to-be-tested interface to obtain a to-be-tested interface feature vector; determining a first similarity between each sample feature vector in the sample feature vectors corresponding to all test data samples in the historical test data set and the to-be-tested interface feature vector; selecting N test data samples corresponding to N sample feature vectors with the largest first similarity from the historical test data set, and constructing the N test data samples into the target data, wherein N is a positive integer.
3. The method of claim 2, wherein, The historical test data set is composed of all test data samples therein, and before the receiving information of a to-be-tested interface of a to-be-tested electronic component of a power grid, the method further comprises: extracting features of each test data sample in the historical test data set to obtain a corresponding sample feature vector and store the sample feature vector in the big data platform; clustering all test data samples in the historical test data set based on the sample feature vectors corresponding to the test data samples to obtain a plurality of cluster centers; and Based on the multiple cluster centers, all test data samples in the historical test dataset are divided into multiple first data subsets, and the multiple first data subsets are stored in the big data platform.
4. The method of claim 3, wherein, The number of cluster centers is equal to the number of first data subsets, and each cluster center corresponds one-to-one with a first data subset. The step of dividing all test data samples in the historical test dataset into the first data subsets based on the cluster centers includes: For each test data sample, a second similarity is determined between the test data sample and each of the plurality of cluster centers, and the cluster center with the largest second similarity is taken as the cluster center that matches the test data sample; For each cluster center, all test data samples matched by that cluster center are grouped into a dataset, which serves as the first data subset corresponding to that cluster center.
5. The method as described in claim 2, characterized in that, The information of the interface under test includes: image information, and / or, information of the interface chip built into the interface under test; When the information of the interface under test includes image information, the feature extraction includes image feature extraction; The information about the interface chip is generated by diagnosing the interface chip using a chip-level diagnostic algorithm.
6. The method of claim 1, wherein, Before receiving information about the interface of the electronic component under test in the power grid, the method further includes: For each first subset of data All test data samples in the first data subset are input into each expert network for computation to obtain the first prediction results output by the multiple expert networks respectively; Based at least on the first prediction results output by the plurality of expert networks, the first data subset is associated with one of the plurality of expert networks.
7. The method of claim 6, wherein, The plurality of expert networks includes at least two first expert networks and one second expert network. The computing resources required to run the at least two first expert networks simultaneously are less than the computing resources required to run the second expert network. The step of associating the first data subset with one of the plurality of expert networks based at least on the first prediction results output by each of the plurality of expert networks includes: Determine the third similarity between the first prediction result output by the second expert network and the first prediction result output by each of the first expert networks; Based at least on the third similarity, the first data subset is associated with one of the at least two first expert networks.
8. The method of claim 7, wherein, Each first data subset is pre-labeled with a corresponding test label. Associating this first data subset with one of the at least two first expert networks based at least on the third similarity includes: Determine the fourth similarity between the test label corresponding to the first data subset and the first prediction result output by each first expert network; Calculate the product between the third and fourth similarities for each first expert network to obtain the corresponding fifth similarity; The first subset of data is associated with the first expert network corresponding to the maximum value in the fifth similarity.
9. The method of claim 1, wherein, The method further includes: (The plurality of first data subsets do not overlap with each other.) Determine the proportion of the target data to the amount of data that overlaps between the target data and each second data subset. The process of generating the test plan, based at least on the second prediction results output by the expert networks associated with each of the at least one second subset of data, includes: The second prediction results output by the expert networks associated with each of the at least one second data subset are weighted and merged according to the proportion of the data volume to generate the test scheme.