A virtual test model verification method under weak connection and small sample
By cleaning the sample data and the construction of graphs in the weak Unicom sample environment, the sub -structure of the analysis and scoring graph is analyzed and the scoring diagram, the sample is generated, the problem of insufficient samples is solved, and the verification effect and quality of the model is improved.
Patent Information
- Application Number
- CN202410199688.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-23
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-02-23
AI Technical Summary
In a weak China Unicom small sample environment, the data backhaul mechanism may be disturbed, resulting in insufficient samples, affecting the accuracy of the model and the use of upper-level services.
By cleaning the initial sample data and the construction of the graph, analyze the sub -structure relationship of the graph, build the sub -structure of the scoring diagram, generate enhanced samples, and construct the training collection and train the second -class classification model to predict new enhanced samples.
Enhance the set of samples, reduce the impact of data sparse, improve the verification effect of the model, and improve the quality and availability of the model.
Smart Images

Figure CN117972378B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer science, and specifically relates to a virtual test model verification method under weakly connected small samples. Background Art
[0002] The construction of training samples is the core step of model training. The problem with small sample training models is that the model is underfitted due to the small amount of training data, which ultimately leads to low model accuracy and affects the use of upper-layer services. Sample enhancement is an important means to solve the small sample problem. At present, the mainstream methods of sample enhancement include artificially constructing training sets and performing sample enhancement by reorganizing the encoding of training data.
[0003] The steps to manually construct a training set include:
[0004] Clarify the goal: First, you need to clarify the goal of the training set, such as training a classifier, regression model, or clustering model.
[0005] Data collection: According to the training objectives, relevant data is collected through various means. It can be obtained from public datasets or private data sources.
[0006] Data cleaning: Clean the collected data, including processing missing values, outliers, removing noise, normalizing the data, and other operations.
[0007] Data preprocessing: Preprocess the cleaned data, including feature extraction, feature selection, feature encoding and other operations, so as to convert the data into a form suitable for model training.
[0008] Construct a training set: Divide the preprocessed data into a training set and a validation set according to a certain division method. The training set is used to train the model, and the validation set is used to evaluate the performance of the model.
[0009] Label data: If you are training a classifier or regression model, you need to label the data, such as labeling images and text.
[0010] However, manually constructing training sets is time-consuming and labor-intensive, and requires a lot of labor costs.
[0011] The method of reorganizing the encoding of training data is a technique to enhance data diversity and improve model performance by recombining the encoding vectors of samples. First of all, encoding vectors are a representation method that maps high-dimensional data into a low-dimensional space. They can convert complex objects (such as text, images, etc.) into easy-to-process vector representations that can capture the similarities and relationships between objects.
[0012] The purpose of model verification is to better train the model and produce a high-quality model. Data enhancement is a way to increase training data. At the same time, on the prediction side, you can also use the method of analyzing the verification results to further improve the quality of the model. Currently, when encountering a return result that does not meet the threshold conditions, the upper layer of the model system returns a null value, which gives a poor feedback experience in the virtual environment. Summary of the invention
[0013] In a weakly connected environment where the data return mechanism may be disturbed, resulting in insufficient samples, in order to solve the above technical problems and improve the quality and availability of data, the present invention provides a virtual test model verification method under weakly connected small samples, which maps the feature set in the sample to the spectrum, and enhances the sample set by quantifying the intrinsic connection of the spectrum between samples, thereby reducing the impact of data sparsity caused by small samples, thereby improving the verification effect of the model. The present invention can enhance the sample set, reduce the impact of data sparsity, and thus improve the verification effect of the model.
[0014] In order to achieve the above object, the present invention adopts the following technical scheme:
[0015] A method for verifying a virtual test model under weak connection and small sample conditions, comprising the following steps:
[0016] Step 1: Clean the data of the initial sample to obtain sample data, and construct a graph for the sample data;
[0017] Step 2: Based on the sample data in step 1, reconstruct the sample data by splitting, merging, aggregating, and stratifying, and analyze the substructure relationship of the graph;
[0018] Step 3: According to the substructure relationship of the graph analyzed in step 2, the substructure of the graph is constructed, and the instance of the graphed substructure is extracted from the sample; the substructure includes a hierarchical structure, a nested structure, a collateral association structure, a direct association structure, and a cyclic association structure;
[0019] Step 4: The substructure of the graph established in step 3 is layered, and there is an association relationship between the layers, which is a hierarchical relationship; the substructures are structurally matched within the layers, and the layers are nested and scored, and finally the substructure score of the graph between the samples is formed to evaluate the correlation and difference between the samples;
[0020] Step 5: Measure the correlation between substructures through the substructure score of the graph, so as to extract the common substructures of the graph and the non-common substructures of the graph as a whole, and use the similarity of the substructures and the similarity of the content of the nodes in the substructure as the measurement criteria;
[0021] Step 6: Using the common substructure of the graph as the base and randomly sampling the substructure of the non-common graph to assemble into an enhanced sample;
[0022] Step 7. Based on the enhanced samples in step 6, a training set is constructed and manually annotated to determine whether the substructures of the graphs are similar; based on the training set, a binary classification model is trained, and the binary classification model uses a neural network model, and the neural network model is used to predict the generation of new enhanced samples; after using the neural network model to predict the substructures of similar images and the substructures of dissimilar images, more enhanced samples are generated using step 6.
[0023] In summary, the present invention involves a complex process of data cleaning, graph analysis, substructure construction and matching. In each link, it is necessary to accurately identify and process the relationships and structures in the data to ensure the quality and effectiveness of the final enhanced sample. Through this method, even in a restricted environment, a high-quality knowledge graph can be constructed, providing strong support for model construction.
[0024] Beneficial effects:
[0025] (1) The present invention can enhance the sample set and reduce the impact of data sparsity, thereby improving the verification effect of the model.
[0026] (2) The present invention adopts node-centered hierarchical substructure vector calculation (see step three). The advantage of this is that it can extract first-degree, second-degree and even third-degree substructure information in the graph.
[0027] (3) The present invention adopts relationship calculation that distinguishes relationship types (superior and subordinate, collateral), which can effectively distinguish the relationship between nodes and fully consider the amount of information brought by different relationships.
[0028] (4) The present invention adopts a graph modeling approach, which can fully consider the structural information of the instance (e.g., airplane). Compared with single embedding information, it considers the relationship and structure, making the representation of the instance more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flow chart of a method for verifying a virtual test model under weakly connected small samples of the present invention;
[0030] Figure 2 It is a node relationship diagram. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0032] In the case of weak connectivity, the data feedback mechanism may be disturbed, resulting in insufficient samples. In a restricted environment, samples need to be enhanced. First, the initial sample features are cleaned, a graph is constructed for the sample data, and the substructure relationship, substructure stratification, substructure extraction, and substructure matching and grading in the graph are analyzed to finally form an enhanced sample.
[0033] Specifically, Figure 1 As shown, a virtual test model verification method under weak connection and small sample of the present invention comprises the following steps:
[0034] Step 1: Clean the data of the initial sample to obtain sample data, and construct a graph for the sample data:
[0035] During the entire data cleaning process, the cleaning rules need to be verified and adjusted to ensure the effectiveness and accuracy of the cleaning rules. At the same time, pay attention to abnormal situations in the data cleaning process and make timely adjustments and processing. If there are errors in the cleaned data, perform cleaning operations on various problems in the data source according to the established cleaning rules, such as missing value filling, error data correction, duplicate data deletion, etc.
[0036] Step 2: Analyze the substructure relationship of the graph:
[0037] On the basis of data cleaning, the sample data is reconstructed through splitting, merging, aggregation and stratification, and the respective relationships in the graph are analyzed, including hierarchical relationships, nested relationships, collateral relationships, direct relationships, circular relationships, etc.
[0038] The hierarchical relationship indicates the relationship between the whole and the part. For example, the subordinate part of the wing of an airplane includes the aileron, and the aileron is a part of the wing. Therefore, the wing and the aileron have a hierarchical relationship in the atlas.
[0039] The collateral relationship indicates a parallel relationship between parts. For example, if the aileron and the slat are both part of the wing of an aircraft, then the aileron and the slat are in a collateral relationship.
[0040] The direct association relationship indicates a mutually associated relationship, for example, an aircraft wing anti-icing system is used to waterproof the aircraft wing, but it is not part of the aircraft wing, so the two are in a direct association relationship, and the type of relationship is a fit effect.
[0041] The circular association relationship refers to a relationship that is associated in a circular manner, for example, a solar power device absorbs solar energy and acts on itself at the same time, so it is a circular association relationship.
[0042] The nested relationship indicates an interactive relationship, for example, in a water circulation device and a power device, the power device releases hot water to the water circulation device, and the water circulation device cools the water and returns it to the power device. There is an interactive relationship between the water circulation device and the power device, so it is a nested relationship.
[0043] Each relationship is represented by a vector, and the value of the vector is calculated by the vectors of the nodes at both ends of each relationship. First, the nodes are the two endpoints of each relationship, for example, the aileron and slat of the aircraft wing mentioned above, where the aileron is represented by a vector, and the value in the vector is determined by many properties of the aileron, such as: the length, weight, heat resistance of the material used to make the aileron, etc. The vector relation of each relationship comes from the mean of the Hadamard product of the vectors of the nodes at both ends, and the calculation formula is as follows:
[0044]
[0045] In the formula, n represents the number of samples with a certain relationship in the sample; relation i The Hadamard product of the vectors representing the nodes at both ends of the i-th example.
[0046] The Hadamard product is the multiplication of the corresponding positions of the vectors. The advantage of this is that it allows a certain relationship to fully learn the characteristics of various examples.
[0047] When the relationship vector and the node vector are of different dimensions, vector conversion is required. The conversion method is to multiply the node vector by a conversion matrix to convert it into a vector of the same dimension, such as Figure 2 As shown, A, B, and C are represented as node A, node B, and node C respectively. The transformation matrix is learned in step seven.
[0048] Step 3: Construct the substructure of the graph: According to the substructure relationship of the graph analyzed in step 2, construct the substructure of the graph, which includes structures such as upper and lower structures, nested structures, collateral association structures, direct association structures, and circular association structures. Extract instances of the substructure after the graph is extracted from the sample, such as Figure 2 As shown:
[0049] vector_A X vector_B=simi_rate
[0050] simi_rate X relation_1_vector=substructure_vector
[0051] Among them, simi_rate is the similarity between the vector of node A and the vector of node B, which is calculated by the cosine similarity method. substructure_vector means the vector of the substructure composed of node A, node B and the edge relation_1 between them.
[0052] The representation of the substructure is: When calculating the substructure vector centered on node A, vector_A and vector_B can be used, where vector_A is the vector of the central node and vector_B is the vector of node B, such as Figure 2 As shown, then multiply it by the substructure vector relation_1_vector. When calculating the substructure formed by nodes A, B, and C, the cosine similarity of vector_A and vector_C is added to the substructure vector relation_1_vector, where vector_C is the vector of node A's out-degree node C through node B, and then multiplied by relation_2_vector, relation_2 is the edge between node B and out-degree node C, and the vector representing this edge is called relation_2_vector. The advantage of this is that it can extract the first, second, or even third-degree substructure information in the graph.
[0053] Step 4: Match the hierarchical substructure of the graph: The substructure of the graph established in step 3 is hierarchical, and the layers are associated with each other, and the relationship is a hierarchical relationship. The substructures are structurally matched within the layers, and the layers are nested and scored, and finally the substructure score of the graph between the samples is formed to evaluate the correlation and difference between the samples.
[0054] The substructure score of the graph can quantify the correlation between samples and then extract the common and non-common substructures of the graph. This step is crucial to reveal the deep-level associations between samples.
[0055] Step 5: Measure the correlation between substructures through the substructure score of the graph: It is possible to extract the common substructures of the graph and the non-common substructures of the graph as a whole, and use the similarity of the self-structure and the similarity of the node content within the substructure as the measurement criteria.
[0056] Step 6: Use the common substructure of the graph and the randomly sampled non-common substructure of the graph to assemble into enhanced samples: When assembling, use the common substructure as the base, randomly sample the non-common substructure, and assemble into enhanced samples. This method can enhance the relevance of samples while maintaining data diversity, providing richer and more useful information for subsequent learning and analysis tasks.
[0057] Step 7: Based on the enhanced samples in step 6, a training set can be constructed to manually mark whether the substructures are similar. Based on the training set, a binary classification model is trained. The binary classification model uses a neural network model, which can predict the generation of new enhanced samples. After using the model to predict similar substructures and dissimilar substructures, more enhanced samples are generated using step 6.
[0058] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for verifying a virtual test model under weak connectivity and small sample conditions, characterized in that: The following steps are involved: Step 1: Clean the data of the initial sample to obtain sample data, and construct a graph for the sample data; Step 2: Based on the sample data in step 1, reconstruct the sample data by splitting, merging, aggregating, and stratifying, and analyze the substructure relationship of the graph; The substructure relationships of the graph include hierarchical relationships, nested relationships, collateral relationships, direct relationships, and circular relationships; The substructure relationship of each graph is represented by a vector, and the value of the vector is calculated by the vectors of the nodes at both ends of the substructure relationship of each graph; the nodes are the two endpoints of the substructure relationship of each graph, and the vector of the substructure relationship of each graph comes from the mean of the Hadamard product of the vectors of the nodes at both ends. The calculation formula is as follows: (1) Among them, n represents the number of samples with a certain relationship in the sample; relation A vector representing the substructure relationship of each graph, relation i The Hadamard product of the vectors representing the nodes at both ends of the i-th sample; Step 3: According to the substructure relationship of the graph analyzed in step 2, the substructure of the graph is constructed, and the instance of the graphed substructure is extracted from the sample; the substructure includes a hierarchical structure, a nested structure, a collateral association structure, a direct association structure, and a cyclic association structure; Step 4: The substructure of the graph established in step 3 is layered, and there is an association relationship between the layers, which is a hierarchical relationship; the substructures are structurally matched within the layers, and the layers are nested and scored, and finally the substructure score of the graph between the samples is formed to evaluate the correlation and difference between the samples; Step 5: Measure the correlation between substructures through the substructure score of the graph, so as to extract the common substructures of the graph and the non-common substructures of the graph as a whole, and use the similarity of the substructures and the similarity of the content of the nodes in the substructure as the measurement criteria; Step 6: Using the common substructure of the graph as the base and randomly sampling the substructure of the non-common graph to assemble into an enhanced sample; Step 7. Based on the enhanced samples in step 6, a training set is constructed and manually annotated to determine whether the substructures of the graphs are similar; based on the training set, a binary classification model is trained, and the binary classification model uses a neural network model, and the neural network model is used to predict the generation of new enhanced samples; after using the neural network model to predict the substructures of similar images and the substructures of dissimilar images, more enhanced samples are generated using step 6.
2. According to the method for verifying a virtual test model under weak connectivity and small sample size in claim 1, it is characterized in that: The step one includes: the cleaning includes filling missing values, correcting erroneous data, and deleting duplicate data; during data cleaning, the cleaning rules are verified and adjusted to ensure the effectiveness and accuracy of the cleaning rules; attention is paid to abnormal situations in data cleaning, and adjustments and processing are made in a timely manner.
3. The method for verifying a virtual test model under weak connectivity and small sample size according to claim 1, characterized in that: When the vector of the substructure relationship of the graph and the vector of the node are of different dimensions, the vector is transformed by multiplying the vector of the node by a transformation matrix.
4. The method for verifying a virtual test model under weak connectivity and small sample conditions according to claim 1, characterized in that: In step 3, the substructure of the graph includes a hierarchical structure, a nested structure, a collateral association structure, a direct association structure, and a cyclic association structure; When calculating the substructure vector centered on node A, the cosine similarity of vector_A and vector_B is used, where vector_A is the vector of node A, vector_B is the vector of node B, and then multiplied by the substructure vector relation_1_vector; when calculating the substructure formed by nodes A, B, and C, the cosine similarity of vector_A and vector_C is added to the substructure vector relation_1_vector, where vector_C is the vector of the out-degree node C of node A passing through node B, and then multiplied by relation_2_vector, relation_2 is the edge between node B and the out-degree node C, and the vector representing this edge is relation_2_vector.
Citation Information
Patent Citations
Few-sample knowledge graph representation learning method and system based on context data enhancement
CN115525771A
Knowledge graph embedding method based on graph convolution contrast learning and XLNet
CN115936115A