A test case intelligent recommendation method and system based on node aggregation and multi-decay mechanism
By constructing a knowledge graph for cryptography assessment and a deep learning model, the complex association rules between test cases are automatically mined, solving the problems of low efficiency and incomplete coverage in traditional test case recommendation methods, and achieving high-precision and high-efficiency intelligent recommendation.
Patent Information
- Application Number
- CN202610053352.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-15
- Publication Date
- 2026-05-26
AI Technical Summary
Traditional test case recommendation methods rely on manually defined empirical rules or shallow similarity calculations, which make it difficult to deeply understand the semantic relationship between test requirements and product capabilities. This results in low testing efficiency, incomplete security capability coverage, and an inability to adapt to dynamically changing security requirements and product forms.
We construct a knowledge graph for password evaluation, utilize a pre-trained text encoder and multi-relation weight learning and multi-hop decay mechanism to automatically mine complex association rules between test cases, and achieve intelligent recommendation through a deep learning model.
It achieves high-precision and high-efficiency test case recommendation, supports multi-scenario input adaptation, improves the flexibility and practicality of test case recommendation, and ensures recommendation accuracy and generalization ability.
Smart Images

Figure CN122086764A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of software engineering and artificial intelligence, and provides a method and system for intelligent test case recommendation based on node aggregation and multi-decay mechanisms. This method constructs a knowledge graph for cryptographic evaluation, designs an end-to-end deep learning model, and integrates text semantic encoding, multi-relation weight learning, and a multi-hop decay mechanism to automatically mine complex association rules between test cases, achieving high-precision and high-efficiency intelligent recommendation. Background Technology
[0002] With the rapid evolution of information technology, cryptographic products, as the core hub of the information security protection system, play an irreplaceable security role in key aspects such as data encryption, identity authentication, and trusted transmission. However, the current cryptographic product testing system suffers from several systemic shortcomings: First, the testing process lacks standardized methodological guidance. Due to differences in technical understanding and insufficient standardization of operational procedures, different testing teams often exhibit significant discrepancies in their test results for the same product, making it difficult to objectively reflect the product's true security capabilities and performance levels. Second, multi-source, heterogeneous evaluation knowledge resources (including technical documents, experience cases, historical data, etc.) are scattered across different carriers and systems, posing significant challenges to the in-depth extraction and cross-scenario reuse of knowledge, severely restricting the overall improvement of evaluation efficiency and quality. Third, test case generation is highly dependent on manual intervention, requiring substantial manpower to complete requirements analysis, test case design, scenario adaptation, and verification optimization. Furthermore, limitations imposed by the experience and cognitive constraints of testers often result in blind spots in functional coverage, making it difficult to comprehensively detect potential security risks and hidden functional defects in cryptographic products. Fourth, the testing process lacks sufficient automation, with key steps still requiring manual intervention, further reducing the efficiency and response speed of the evaluation work.
[0003] The security performance of cryptographic products is a cornerstone element of information security assurance systems. Its evaluation requires a systematic design and execution of comprehensive, focused, and dynamically adaptable test case systems, closely aligned with product functionalities and dynamically evolving security needs. However, with the diversification of cryptographic product types and the continuous iteration of security requirements, the scale and complexity of test cases are growing exponentially. Traditional manual screening or recommendation methods based on simple keyword / rule matching struggle to deeply understand the semantic relationship between testing requirements and product capabilities, failing to achieve accurate matching of test cases with actual needs. This leads to increasingly prominent problems such as low testing efficiency and incomplete security capability coverage.
[0004] Traditional test case recommendation methods often rely on manually defined empirical rules or shallow similarity calculations (such as keyword matching and simple feature overlay), making it difficult to effectively capture the complex, deep, multi-dimensional relationships between test cases. These relationships include micro-level connections such as the logical correlation of execution sequence and the semantic similarity of bug descriptions, as well as macro-level connections such as the statistical regularity of historical test results and the mapping relationship between different product characteristics and scenario requirements. Furthermore, they suffer from inherent deficiencies in flexibility and scalability, making it difficult to adapt to dynamically changing security requirements and product forms. They also cannot continuously optimize recommendation strategies through adaptive learning mechanisms, significantly limiting their accuracy and practicality in complex scenarios. Against this backdrop, developing an intelligent technology that can automatically recommend suitable test cases based on the functional characteristics and security requirements of cryptographic products has become a key breakthrough direction for improving the intelligence level and implementation efficiency of cryptographic testing. Summary of the Invention
[0005] To address the problems existing in the prior art, the purpose of this invention is to provide a method and system for intelligent recommendation of test cases based on node aggregation and multi-decay mechanism.
[0006] The technical solution adopted in this invention is as follows: A test case intelligent recommendation method based on node aggregation and multi-decay mechanism includes the following steps: Construct a knowledge graph for cryptographic product evaluation based on data from a graph database; A pre-trained text encoder is used to encode text-type nodes in a knowledge graph for cryptographic product evaluation, resulting in embedded representations of these nodes. Based on the embedded representation of text nodes, a node aggregation model that integrates multi-relation weight learning and multi-hop decay mechanism is constructed, and the model parameters are optimized through training; Intelligent recommendation of test cases is performed using the trained node aggregation model.
[0007] Furthermore, the construction of a knowledge graph for cryptographic product evaluation based on data from the graph database includes: Receive the raw dataset exported from a graph database, which contains a set of graph-structured data units, each containing one or more data fragments. Parse the raw dataset, traverse all data units and their corresponding data fragments, and extract the node set; for each node... According to its tag attributes Map it to a predefined set of semantic types A certain type in ,in This includes the test case identifier type BugID, the test step type Step, and the defect description type BugDescription; a unique identifier is retained for each node. and all its attribute information Extract the text content of each node. This forms a set of nodes with type labels and text information. , where N is the number of nodes; Extract the set of relation objects from each data segment to obtain the sequence of relation triples. ,in Indicates the first The relationship consists of a pair of start and target node identifiers, where m is 1, 2, ... M, Its semantic relation type, This is a predefined set of relationship types, including INCLUDE, SHARED, PRE, SIMILAR, and TEST. Identify the set of nodes that belong to the text class. Extract its text content Normalization is performed on all text. Structured graph data is constructed based on node sets and relationship sets. ,in: A collection of nodes with type annotations; It is a set of relations, stored as an adjacency list; A text mapping table stores the correspondence between the unique identifiers of text-class nodes and the standardized text content; at the same time, auxiliary mapping relationships are constructed.
[0008] Furthermore, the auxiliary mapping relationship includes: : Mapping of all Step node identifiers corresponding to the BugID node; : Mapping of all BugDescription node identifiers corresponding to the BugID node; : The complete defect description text corresponding to the BugID; : A unique set of identifiers for all BugIDs.
[0009] Furthermore, the step of encoding text-type nodes in the cryptographic product evaluation knowledge graph using a pre-trained text encoder to obtain the embedded representation of the text-type nodes includes: We select a pre-trained language model as the text encoder, initialize the word segmenter and model weights of the text encoder, fix the model parameters and do not participate in subsequent training, to ensure the stability and generalization ability of the encoding results. Will All standardized texts are input into the text encoder in batches, and the following operations are performed: the texts are segmented, padded, and truncated to generate tensors that meet the model input requirements of the text encoder; the hidden state representation of the text is calculated by the text encoder, and the hidden vector at the [CLS] position is extracted as the final embedding representation of the text; the final embedding representation of the text is associated with the unique identifier of the node to form a text embedding dictionary.
[0010] Furthermore, the node aggregation model integrates multi-relation weight learning and multi-hop decay mechanism to achieve effective aggregation of information on the central node and its neighboring nodes; The trainable parameters of the node aggregation model include: Relationship weight parameters are used to learn the importance of different relationships; their dimensions are... ,in It is a collection of relation types extracted from a knowledge graph; : Multi-hop decay parameter, mapped to the (0,1) interval through the Sigmoid activation function, is used to control the decay rate of multi-hop neighbor information; The fused network parameters consist of two fully connected layers and a ReLU activation function, used to fuse information from the central node and neighboring aggregate nodes. The core functional modules of the node aggregation model include: Relation weight calculation module: for any relation type ,like Then return the corresponding trainable weights. , For the relationship in If the index is specified, otherwise the default weight is returned; Multi-hop decay calculation module: uses the Sigmoid function to calculate the decay rate. Convert to multi-hop attenuation coefficient The decay weight of multi-hop neighbors is , This represents the number of hops from the current node to the center node. Node aggregation function module: Based on the average embedding of the central node, the embedding vectors of multi-hop neighbor nodes are accumulated, and the contribution weight of each neighbor node is the product of the relation weight and the multi-hop decay weight. Information fusion network module: After splicing the central node embedding and the neighbor aggregation embedding, the final node aggregation representation is generated through the fusion network and then subjected to L2 normalization.
[0011] Furthermore, the training process of the node aggregation model includes: Based on the text embedding dictionary and knowledge graph structure, a benchmark embedding corresponding to each BugID is generated through a benchmark aggregation strategy, which serves as a supervision signal for model training. The benchmark aggregation strategy employs a fixed relation decay coefficient and a multi-hop decay coefficient. Using all BugIDs as training samples, the input for each sample is the Step node and BugDescription node identifier corresponding to the BugID, and the output is the baseline embedding of that BugID.
[0012] Furthermore, the intelligent recommendation supports BugID input mode and text input mode, and outputs Top-K recommendation results and related performance indicators.
[0013] A test case intelligent recommendation system based on node aggregation and multi-decay mechanism, comprising: The knowledge graph construction module is used to build a knowledge graph for cryptographic product evaluation based on data in a graph database. The text embedding encoding module is used to encode text-type nodes in the cryptographic product evaluation knowledge graph using a pre-trained text encoder to obtain the embedded representation of the text-type nodes. The node aggregation model training module is used to construct a node aggregation model that integrates multi-relation weight learning and multi-hop decay mechanism based on the embedded representation of text-type nodes, and optimize the model parameters through training. The recommendation module is used to intelligently recommend test cases using the trained node aggregation model.
[0014] This invention constructs a knowledge graph for cryptography evaluation, designs an end-to-end deep learning model, and integrates text semantic encoding, multi-relation weight learning, and multi-hop decay mechanisms to automatically mine complex association rules between test cases, achieving high-precision and high-efficiency intelligent recommendation. The beneficial effects of this invention are as follows: (1) Construct a structured knowledge graph to integrate various types of entities and relationships, such as test cases, test steps, and defect descriptions, to break down knowledge fragmentation barriers and achieve efficient reuse and unified management of assessment knowledge.
[0015] (2) By integrating pre-trained text encoding and adaptive aggregation model, it can automatically learn the multi-relation weight and multi-hop decay law, and accurately capture the deep semantic association and structural dependency between test cases without the need for manual pre-setting of complex rules.
[0016] (3) Supports multi-scenario input adaptation. It can automatically associate complete test information based on BugID for recommendation, and can also receive partial test steps or description text to achieve accurate matching, greatly improving the flexibility and practicality of test case recommendation.
[0017] (4) Through a two-stage training and optimization mechanism, the model recommendation accuracy and generalization ability are ensured, while supporting Top-K result output and interpretability analysis, taking into account both recommendation effect and engineering practicality. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the steps of the intelligent test case recommendation method based on node aggregation and multi-decay mechanism of the present invention.
[0019] Figure 2 This is a module composition diagram of the intelligent recommendation system for test cases based on node aggregation and multi-decay mechanism of the present invention. Detailed Implementation
[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0021] The intelligent test case recommendation method based on node aggregation and multi-decay mechanism of the present invention has the following steps: Figure 1 As shown, it includes the following steps: Step S1: Construct a knowledge graph for cryptographic product evaluation based on data from the graph database. Export raw data (JSON format) containing entities such as test case identifiers (BugID), test steps (Step), and defect descriptions (BugDescription) and their relationships from the graph database. After preprocessing operations such as node extraction and classification, relationship extraction, and text content standardization, a structured knowledge graph for cryptographic product evaluation is constructed.
[0022] Step S2: Encode the text-type nodes in the cryptographic product evaluation knowledge graph using a pre-trained text encoder to obtain the embedded representation of the text-type nodes.
[0023] Step S3: Based on the embedded representation of text-type nodes, construct a node aggregation model that integrates multi-relation weight learning and multi-hop decay mechanism, and optimize the model parameters through training. This step optimizes the model parameters through end-to-end training.
[0024] Step S4: Utilize the trained node aggregation model for intelligent test case recommendation. This step supports both BugID and text input modes, outputting Top-K recommendation results and related performance metrics.
[0025] In one embodiment of the present invention, step S1 implements knowledge graph construction and data preprocessing, specifically including the following steps: 1) Node extraction and classification: Receive raw datasets exported from graph databases It contains a set of graph-structured data units. Each data unit Contains one or more data fragments For the dataset Perform parsing and traverse all data units. and its corresponding segments Extract the node set from it. For each node According to its tag attributes Map it to a predefined set of semantic types A certain type in ,in This includes test case identifier type (BugID), test step type (Step), and defect description type (BugDescription). The system retains a unique identifier for each node. and all its attribute information Extract the text content of each node. (The Step node takes the step description text, the BugDescription node takes the defect description text, and the BugID node takes the ID information from the attributes), forming a set of nodes with type annotations and text information. .
[0026] 2) Relation extraction and mapping: From each data fragment Extract the set of relation objects to obtain the sequence of relation triples. ,in Indicates the first The starting node and target node identifier pair of the relationship. Its semantic relation type, This is a predefined set of relation types, including but not limited to INCLUDE, SHARED, PRE, SIMILAR, and TEST. The system retains all valid relation triples to construct the adjacency structure of the undirected graph for subsequent graph traversal and node aggregation.
[0027] 3) Text content standardization: Identify the set of text-type nodes (Step type and BugDescription type). Extract its text content Perform normalization on all text: in The content cleaning function includes operations such as removing redundant whitespace characters, standardizing character encoding formats, and standardizing punctuation marks to ensure the consistency and validity of text information.
[0028] 4) Diagram structure organization: Based on the processed set of nodes and relationships, construct structured graph data. ,in: A collection of nodes with type annotations; For a set of relations, store them in the form of an adjacency list. ,in ;in Indicates the starting node. Indicates the target node. This indicates the relationship between the starting node and the target node; This is a text mapping table that stores the correspondence between unique identifiers of text-type nodes and their standardized text content. .
[0029] At the same time, construct auxiliary mapping relationships: : Mapping of all Step node identifiers corresponding to the BugID node; : Mapping of all BugDescription node identifiers corresponding to the BugID node; : The complete defect description text corresponding to the BugID (integrating the text of all associated BugDescription nodes); : A unique set of identifiers for all BugIDs.
[0030] In one embodiment of the present invention, step S2 uses a pre-trained text encoder to encode the standardized text of text-type nodes to generate a low-dimensional dense vector representation. The specific steps are as follows: 1) Encoder initialization: Select a pre-trained language model (such as all-MiniLM-L6-v2 or bert-base-uncased) as the text encoder, initialize the encoder's tokenizer and model weights, and fix the model parameters so they do not participate in subsequent training to ensure the stability and generalization ability of the encoding results. Set the maximum text length to 128 characters to adapt to the text length requirements of most test steps and defect descriptions.
[0031] 2) Batch text encoding: Will All standardized text is batch-entered into the text encoder, and the following operations are performed: The text is segmented, padded, and truncated to generate tensors that meet the model input requirements of the text encoder. The hidden state representation of the text is calculated by a text encoder, and the hidden vector at the [CLS] position is extracted as the final embedding representation of the text, i.e., the encoding result. The encoded results are associated with the unique identifiers of the nodes to form a text embedding dictionary. ,in , For nodes of 3D embedding vector ( or (This depends on the selected pre-trained model).
[0032] In one embodiment of the present invention, step S3 implements the node aggregation model design. The core model of the present invention is the node aggregation model (AggregatorModel), which integrates multi-relationship weight learning and multi-hop decay mechanism to achieve effective aggregation of information of the central node and its neighboring nodes. The specific design is as follows: 1) Model input and parameter initialization: Input dimension: Text embedding vector dimension ; Set of relation types: All relation types extracted from the knowledge graph ; Hidden layer dimension: set to 128 to balance model expressiveness and computational complexity; Trainable parameters: Relationship weight parameters, with dimensions of This is used to learn the importance of different relationships; : Multi-hop decay parameter, mapped to the (0,1) interval through the Sigmoid activation function, is used to control the decay rate of multi-hop neighbor information; The fused network parameters consist of two fully connected layers and a ReLU activation function, used to fuse information from the central node and neighboring aggregate nodes.
[0033] 2) Core functional modules: Relation weight calculation module: for any relation type ,like Then return the corresponding trainable weights. ( For the relationship in If the index is not specified, return the default weight of 0.5; otherwise, return the default weight of 0.5. Multi-hop decay calculation module: uses the Sigmoid function to calculate the decay rate. Convert to multi-hop attenuation coefficient The decay weight of multi-hop neighbors is ( (This is the number of hops from the current node to the center node). Node aggregation function module: Based on the average embedding of the central node, the embedding vectors of multi-hop neighbor nodes are accumulated, and the contribution weight of each neighbor node is the product of the relation weight and the multi-hop decay weight. Information fusion network module: After splicing the central node embedding and the neighbor aggregation embedding, the final node aggregation representation is generated through the fusion network and then subjected to L2 normalization.
[0034] In one embodiment of the present invention, step S3 employs the following steps for training sample construction and model training: 1) Supervisory signal generation: Based on text-embedded dictionary With knowledge graph structure A benchmark embedding representation corresponding to each BugID is generated using a benchmark aggregation strategy (aggregate_with_groundtruth), serving as a supervision signal for model training. The benchmark aggregation strategy employs a fixed relation decay coefficient and a multi-hop decay coefficient. Relationship attenuation coefficient : Preset the decay weights for various relationships (e.g., INCLUDE=1.0, SHARED=1.5, etc.); Multi-hop attenuation coefficient : Adopting an exponential decay strategy , Number of jumps; Benchmark embedding calculation: For each BugID, calculate the average embedding of its associated Step node and BugDescription node as the center vector, accumulate the embedding vectors of multi-hop neighbor nodes (multiplied by the correspondence decay coefficient and the multi-hop decay coefficient), and finally normalize to obtain the benchmark embedding. .
[0035] 2) Training sample construction: Using all BugIDs as training samples, the input for each sample is the Step node and BugDescription node identifier corresponding to the BugID, and the output is the baseline embedding of that BugID. .
[0036] 3) Training process optimization: Optimizer: The Adam optimizer is used, and the learning rate is set to... ; Loss function: Cosine similarity loss is used, i.e. , in The aggregated embedding of the model output. As a baseline embedding; Training iteration: Set the training rounds to 1000 rounds, the batch size to 16, and randomly shuffle the sample order before each round of training. Update the model parameters through backpropagation. Model saving: After each training round, model parameters, text embedding dictionary and graph structure data are saved to ensure the interruptibility and reproducibility of the training process.
[0037] In one embodiment of the present invention, step S4, after the model training is completed, supports two test case recommendation modes, and the specific process is as follows: 1) Mode 1: BugID Input Mode Input: User-provided target BugID; Information Acquisition: Automatically extract all Step node text and BugDescription node text corresponding to the BugID from the knowledge graph; Embedding computation: The extracted text is encoded using a text encoder, and the central embedding vector is calculated. Model inference: Invoke the trained node aggregation model to calculate the final aggregate embedding of the BugID; Similarity calculation: Traverse all the aggregated embeddings of BugIDs and calculate the cosine similarity between the target embedding and other BugID embeddings; Results sorting: Sort by similarity in descending order, and output the Top-10 recommended results.
[0038] 2) Mode Two: Text Input Mode Input: User-provided text of some or all test steps and / or defect description text; Embedding computation: The input text is encoded by a text encoder, and the average embedding vector is calculated as the center embedding; Model inference: Invoke the node aggregation model, taking the center embedding and the zero vector as input (without neighbor node information), to generate the target embedding; Similarity calculation: Traverse all the aggregated embeddings of BugIDs and calculate the cosine similarity between the target embedding and other BugID embeddings; Results sorting: Sort by similarity in descending order, and output the Top-10 recommended results.
[0039] 3) Performance evaluation: During the testing phase, the precision, recall, and F1 score of the recommendation results are calculated. The system supports performance evaluation for four scenarios: complete text input, input of the first half of the steps, input of the second half of the steps, and input of random parts of the steps. The system outputs statistical results with a 95% confidence interval to fully verify the recommendation effect of the model.
[0040] In one embodiment of the present invention, step S4 employs the following steps for model deployment and expansion: 1) Model loading: During deployment, the saved model parameters, text embedding dictionary and graph structure data are loaded, and the text encoder and node aggregation model are initialized; 2) Dynamic adaptation: Supports real-time encoding and graph updates for newly added test cases, test steps, and defect descriptions, and expands the text embedding dictionary and graph structure; 3) Adjustable parameters: Allows users to adjust parameters such as the Top-K value of the recommendation results and the maximum number of hops (default 10) according to the actual application scenario to optimize the recommendation effect.
[0041] Another embodiment of the present invention provides a test case intelligent recommendation system based on node aggregation and multi-decay mechanism, such as... Figure 2 As shown, it includes: Knowledge graph construction module 21 is used to construct a knowledge graph for cryptographic product evaluation based on data in a graph database; The text embedding encoding module 22 is used to encode the text-type nodes in the cryptographic product evaluation knowledge graph using a pre-trained text encoder to obtain the embedded representation of the text-type nodes. The node aggregation model training module 23 is used to construct a node aggregation model that integrates multi-relation weight learning and multi-hop decay mechanism based on the embedded representation of text-type nodes, and to optimize the model parameters through training. Recommendation module 24 is used to intelligently recommend test cases using the trained node aggregation model.
[0042] The above division of modules is merely illustrative. In practical applications, the functions described above can be assigned to different functional modules as needed to complete all or part of the functions described in the aforementioned method. The specific working process of each module can be found in the corresponding processes in the aforementioned method embodiments.
[0043] Another embodiment of the present invention provides a computer device (computer, server, smartphone, etc.) including a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing steps of the method of the present invention.
[0044] Another embodiment of the present invention provides a computer-readable storage medium (such as ROM / RAM, disk, optical disk) that stores a computer program, which, when executed by a computer, implements the steps of the method of the present invention.
[0045] Another embodiment of the present invention provides a computer program product, the computer program product including a computer program, which, when executed by a computer, implements the steps of the method of the present invention.
[0046] The specific embodiments of the present invention disclosed above are intended to help understand the content of the present invention and to implement it accordingly. Those skilled in the art will understand that various substitutions, changes, and modifications are possible without departing from the spirit and scope of the present invention. The present invention should not be limited to the content disclosed in the embodiments of this specification; the scope of protection of the present invention is defined by the claims.
Claims
1. A test case intelligent recommendation method based on node aggregation and multi-decay mechanism, characterized in that, Includes the following steps: Construct a knowledge graph for cryptographic product evaluation based on data from a graph database; A pre-trained text encoder is used to encode text-type nodes in a knowledge graph for cryptographic product evaluation, resulting in embedded representations of these nodes. Based on the embedded representation of text nodes, a node aggregation model that integrates multi-relation weight learning and multi-hop decay mechanism is constructed, and the model parameters are optimized through training; Intelligent recommendation of test cases is performed using the trained node aggregation model.
2. The method according to claim 1, characterized in that, The construction of a knowledge graph for cryptographic product evaluation based on data from a graph database includes: Receive the raw dataset exported from a graph database, which contains a set of graph-structured data units, each containing one or more data fragments. Parse the raw dataset, traverse all data units and their corresponding data fragments, and extract the node set; for each node... According to its tag attributes Map it to a predefined set of semantic types A certain type in ,in This includes the test case identifier type BugID, the test step type Step, and the defect description type BugDescription; a unique identifier is retained for each node. and all its attribute information Extract the text content of each node. This forms a set of nodes with type labels and text information. , where N is the number of nodes; Extract the set of relation objects from each data segment to obtain the sequence of relation triples. ,in Indicates the first The relationship consists of a pair of start and target node identifiers, where m is 1, 2, ... M, Its semantic relation type, This is a predefined set of relationship types, including INCLUDE, SHARED, PRE, SIMILAR, and TEST. Identify the set of nodes that belong to the text class. Extract its text content Normalization is performed on all text. Structured graph data is constructed based on node sets and relationship sets. ,in: A collection of nodes with type annotations; It is a set of relations, stored as an adjacency list; It serves as a text mapping table, storing the correspondence between the unique identifiers of text-class nodes and their standardized text content; it also constructs auxiliary mapping relationships.
3. The method according to claim 2, characterized in that, The auxiliary mapping relationships include: : Mapping of all Step node identifiers corresponding to the BugID node; : Mapping of all BugDescription node identifiers corresponding to the BugID node; : The complete defect description text corresponding to the BugID; : A unique set of identifiers for all BugIDs.
4. The method according to claim 2, characterized in that, The step of encoding text-type nodes in the cryptographic product evaluation knowledge graph using a pre-trained text encoder to obtain the embedded representation of the text-type nodes includes: We select a pre-trained language model as the text encoder, initialize the word segmenter and model weights of the text encoder, fix the model parameters and do not participate in subsequent training, to ensure the stability and generalization ability of the encoding results. Will All standardized texts are input into the text encoder in batches, and the following operations are performed: the texts are segmented, padded, and truncated to generate tensors that meet the model input requirements of the text encoder; the hidden state representation of the text is calculated by the text encoder, and the hidden vector at the [CLS] position is extracted as the final embedding representation of the text; the final embedding representation of the text is associated with the unique identifier of the node to form a text embedding dictionary.
5. The method according to claim 1, characterized in that, The node aggregation model integrates multi-relation weight learning and multi-hop decay mechanism to achieve effective aggregation of information on the central node and its neighboring nodes. The trainable parameters of the node aggregation model include: Relationship weights are parameters used to learn the importance of different relationships; their dimensions are... ,in It is a collection of relation types extracted from a knowledge graph; : Multi-hop decay parameter, mapped to the (0,1) interval through the Sigmoid activation function, is used to control the decay rate of multi-hop neighbor information; The fused network parameters consist of two fully connected layers and a ReLU activation function, used to fuse information from the central node and neighboring aggregate nodes. The core functional modules of the node aggregation model include: Relation weight calculation module: for any relation type ,like Then return the corresponding trainable weights. , For the relationship in If the index is specified, otherwise the default weight is returned; Multi-hop decay calculation module: uses the Sigmoid function to calculate the decay rate. Convert to multi-hop attenuation coefficient The decay weight of multi-hop neighbors is , This represents the number of hops from the current node to the center node. Node aggregation function module: Based on the average embedding of the central node, the embedding vectors of multi-hop neighbor nodes are accumulated, and the contribution weight of each neighbor node is the product of the relation weight and the multi-hop decay weight. Information fusion network module: After splicing the central node embedding and the neighbor aggregation embedding, the final node aggregation representation is generated through the fusion network and then subjected to L2 normalization.
6. The method according to claim 5, characterized in that, The training process of the node aggregation model includes: Based on the text embedding dictionary and knowledge graph structure, a benchmark embedding corresponding to each BugID is generated through a benchmark aggregation strategy, which serves as a supervision signal for model training. The benchmark aggregation strategy employs a fixed relation decay coefficient and a multi-hop decay coefficient. Using all BugIDs as training samples, the input for each sample is the Step node and BugDescription node identifier corresponding to the BugID, and the output is the baseline embedding of that BugID.
7. The method according to claim 1, characterized in that, The intelligent recommendation supports BugID input mode and text input mode, and outputs Top-K recommendation results and related performance indicators.
8. A test case intelligent recommendation system based on node aggregation and multi-decay mechanism, characterized in that, include: The knowledge graph construction module is used to build a knowledge graph for cryptographic product evaluation based on data in a graph database. The text embedding encoding module is used to encode text-type nodes in the cryptographic product evaluation knowledge graph using a pre-trained text encoder to obtain the embedded representation of the text-type nodes. The node aggregation model training module is used to construct a node aggregation model that integrates multi-relation weight learning and multi-hop decay mechanism based on the embedded representation of text-type nodes, and optimize the model parameters through training. The recommendation module is used to intelligently recommend test cases using the trained node aggregation model.
9. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a computer, implements the method according to any one of claims 1 to 7.