Artificial intelligence-based adaptive communication state detection method and system
Patent Information
- Application Number
- CN202611257343.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-10-16
AI Technical Summary
[0009]针对现有技术中的不足,本发明旨在解决现有技术中通讯状态模糊测试存在的状态感知能力不足且缺乏智能适应性、状态感知维度单一缺乏多模态融合、异常处理机制简单缺乏智能决策、测试用例生成缺乏智能指导以及系统架构缺乏自学习与持续优化能力等技术问题,提供一种基于人工智能的自适应通讯状态检测方法及系统
通过预训练的通讯状态预测模型,学习通讯状态之间的时序依赖关系和转换规律。模型能够根据多模态特征输入,智能输出当前通讯状态及其置信度,并对预期目标通讯状态进行精准预测。相比传统硬编码状态表方式,AI模型能够自动识别和归类未知状态,适应协议版本升级和不同厂商终端的实现差异。通过AI感知层对响应报文进行多模态特征提取,融合物理层信号特征(信号强度、信噪比、误码率等)和协议层行为特征,实现从物理层到协议层的跨层状态综合感知。多模态融合感知有效克服了单一维度状态识别的局限性,即使在信号质量波动或物理层异常情况下也能保持较高的状态识别准确率。
Smart Images

Figure CN122933218A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of network communication security testing technology, specifically relating to an adaptive communication status detection method and system based on artificial intelligence. Background Technology
[0002] With the rapid development of 4G / 5G and even future 6G mobile communication technologies, communication networks have become a core component of social information infrastructure. Communication interactions between communication base stations and terminals under test (such as smartphones and IoT terminals) based on complex protocol stacks are becoming increasingly frequent, and the complexity and diversity of protocol implementations have brought more security risks. Fuzz testing, as an automated vulnerability discovery technique, continuously inputs mutated or unexpected test cases into the target under test to trigger anomalies or crashes, and has been widely used in the security testing of network protocol software.
[0003] When conducting fuzz testing on terminal devices based on 4G / 5G communication network protocols, accurately determining the execution status of the fuzz test—that is, whether the terminal under test transitions to the communication state as expected after receiving the mutated test cases—is a crucial step in evaluating the effectiveness of the test. In existing technologies, fuzz testing systems typically use a pre-set state transition table to compare the actual communication state with the theoretically expected state to determine the success or failure of the test. However, this traditional method based on hard-coded state tables has many inherent drawbacks.
[0004] The existing solution suffers from insufficient communication state awareness and a lack of intelligent adaptability. It uses a protocol encoding / decoding module to convert the response message format before inputting it into a state machine, which then outputs the current communication state. However, the state machine can only recognize defined protocol states and cannot effectively identify or classify unknown, abnormal, or boundary states. When the tested terminal experiences unexpected state transitions, there is no corresponding record in the preset state transition table, making it impossible for the system to make an effective judgment. Furthermore, the preset table requires frequent manual maintenance and updates to address protocol version upgrades or differences in protocol implementation between different manufacturers' terminals, resulting in poor adaptability.
[0005] The current state perception method is limited to a single dimension and lacks multimodal fusion analysis. It relies solely on protocol-layer message parsing to determine communication status, failing to fully utilize multi-dimensional information such as physical layer signal characteristics (e.g., signal strength, signal-to-noise ratio, bit error rate). This single-dimensional state perception is prone to misjudgment when signal quality fluctuates or physical layer anomalies occur, making accurate and comprehensive perception of communication status impossible.
[0006] The anomaly handling mechanism is simplistic and lacks intelligent decision-making capabilities. When the actual communication state differs from the theoretically expected state, the existing solution merely determines the test result by sending legitimate probe messages and detecting whether the terminal under test responds normally. This binary "normal / abnormal" judgment is too simplistic and cannot distinguish the specific reasons for the communication state deviation (such as protocol implementation defects, signal interference, terminal deadlock, state machine suspension, etc.), nor can it guide the optimization and adjustment of subsequent test strategies.
[0007] Test case generation lacks intelligent guidance. Existing test case generators generate test cases based on seed test cases using a fixed mutation strategy. This mutation strategy is relatively fixed and does not utilize historical test data to optimize mutation direction and priority. A large number of test cases are wasted on low-value communication state areas, limiting testing efficiency.
[0008] The system architecture lacks self-learning and continuous optimization capabilities. The existing system does not have the ability to learn from the results of each fuzz test, and cannot feed back abnormal communication status patterns discovered during the testing process to the status prediction and test case generation stages, thus failing to form a continuously optimizing intelligent closed loop. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention aims to solve the technical problems of insufficient state perception capability and lack of intelligent adaptability, single state perception dimension and lack of multimodal fusion, simple anomaly handling mechanism and lack of intelligent decision-making, lack of intelligent guidance in test case generation, and lack of self-learning and continuous optimization capabilities in system architecture in existing communication state fuzzy testing. It provides an artificial intelligence-based adaptive communication state detection method and system.
[0010] The technical solution adopted by this invention to solve its technical problem is: An AI-based adaptive communication state detection method is applied to a fuzzy testing system based on a communication network protocol. The fuzzy testing system includes a communication base station and a terminal under test connected by communication. The communication base station includes a communication protocol stack, an AI perception layer, and a software-defined radio hardware layer connected by communication. The method includes: sending target test cases to the terminal under test through the software-defined radio hardware layer, and receiving response messages sent by the terminal under test through the software-defined radio hardware layer; the AI perception layer extracts multimodal features from the response messages, the multimodal features including physical layer signal features and protocol layer behavioral features; and... The extracted multimodal features are input into a pre-trained communication state prediction model, which outputs the first communication state of the communication base station and the terminal under test, along with the corresponding first confidence level. A second communication state matching the target test case is determined through the communication protocol stack. The second communication state is input into the communication state prediction model, which predicts the expected target communication state of the terminal under test after receiving the target test case. If the first communication state matches the target communication state and the first confidence level is greater than a preset threshold, a fuzz test execution success message is generated.
[0011] Preferably, the AI perception layer includes a signal feature extraction module, a protocol behavior encoding module, and a state fusion inference module. The multimodal feature extraction of the response message by the AI perception layer includes: the signal feature extraction module extracting at least one physical layer feature from the radio frequency signal received by the software-defined radio hardware layer, including signal strength, signal-to-noise ratio, bit error rate, and multipath delay; the protocol behavior encoding module converting the response message into a protocol semantic vector using a pre-trained protocol encoding model; and the state fusion inference module performing multimodal fusion of the physical layer features and the protocol semantic vector to generate a fused state representation vector.
[0012] Preferably, the pre-trained communication state prediction model is a time-series prediction model based on a long short-term memory network, a gated recurrent unit, or a Transformer architecture. The communication state prediction model is trained using historical communication state sequences and corresponding test case labels to learn the temporal dependencies and transition patterns between communication states.
[0013] Preferably, the method further includes: constructing a communication state knowledge graph, wherein nodes in the knowledge graph represent communication states, and edges represent state transition relationships and their triggering conditions; if the first communication state is detected to be inconsistent with the target communication state, or the first confidence level is less than the preset threshold, the first communication state is added to the knowledge graph as an unknown state node; based on the newly added unknown state nodes in the knowledge graph, incremental learning is performed through the communication state prediction model to update the network parameters of the communication state prediction model.
[0014] Preferably, the method further includes: constructing an adaptive decision agent based on a reinforcement learning algorithm, wherein the state space of the adaptive decision agent includes the current communication state, target test case features, and historical state sequences, and the action space includes continuing the current test, switching test cases, sending probe messages, and adjusting sending parameters; inputting the comparison result between the first communication state and the target communication state as a reward signal into the adaptive decision agent; and dynamically adjusting the subsequent test strategy by the adaptive decision agent according to the reward signal.
[0015] Preferably, after detecting that the first communication state is inconsistent with the target communication state, the method further includes: the adaptive decision agent selecting a probe message sending action from the action space; sending the probe message to the terminal under test through the software-defined radio hardware layer, wherein the probe message is a legal control message or data packet that conforms to the communication network protocol specification; detecting the response of the terminal under test to the probe message; and the adaptive decision agent updating the reward signal based on the response, and adjusting the subsequent action strategy according to the updated reward signal.
[0016] Preferably, the method further includes: generating the target test cases through an intelligent test case generator based on generative AI, wherein the intelligent test case generator is a generative model based on a large language model or a variational autoencoder; the intelligent test case generator learns the structure and semantic constraints of protocol messages from protocol specification documents and / or historical valid test cases according to the current communication state and historical state coverage, and generates test cases that match the current communication state.
[0017] Preferably, the communication state prediction model outputs the first confidence level corresponding to the first communication state. The method further includes: if the first confidence level is less than the preset threshold, sending multiple identical or different probe messages to the terminal under test through the software-defined radio hardware layer; collecting multiple response messages from the terminal under test to the multiple probe messages; inputting the multimodal features of the multiple response messages back into the communication state prediction model to obtain an updated second communication state and a second confidence level; if the second confidence level is greater than the preset threshold, using the second communication state as the current communication state.
[0018] Another technical problem to be solved by this invention is to provide an artificial intelligence-based adaptive communication state detection system. The system includes a communication base station and a terminal under test connected by communication. The communication base station includes a communication protocol stack, an AI perception layer, and a software-defined radio hardware layer connected by communication. The software-defined radio hardware layer is used to send target test cases to the terminal under test and receive response messages sent by the terminal under test. The AI perception layer is used to extract multimodal features from the response messages, including physical layer signal features and protocol layer behavioral features. The communication base station also includes a communication state prediction model, which is pre-trained. The artificial intelligence model is used to output the first communication state and the corresponding first confidence level of the communication base station and the terminal under test based on the multimodal features; the communication protocol stack is used to determine the second communication state that matches the target test case; the communication state prediction model is also used to predict the expected target communication state of the terminal under test after receiving the target test case based on the second communication state; the communication base station also includes a state comparison module, used to detect whether the first communication state is consistent with the target communication state, and whether the first confidence level is greater than a preset threshold. If they are consistent and greater than the preset threshold, a fuzz test execution success message is generated.
[0019] The system further includes: a communication state knowledge graph, where nodes represent communication states and edges represent state transition relationships and their triggering conditions; an incremental learning module, used to add the first communication state as an unknown state node to the knowledge graph when the first communication state is detected to be inconsistent with the target communication state or the first confidence level is less than the preset threshold, and to incrementally learn and update the communication state prediction model based on the knowledge graph; an adaptive decision agent, built based on a reinforcement learning algorithm, used to dynamically adjust subsequent testing strategies according to the comparison results between the first communication state and the target communication state; and an intelligent test case generator, built based on generative AI, used to generate test cases that match the current communication state based on the current communication state and historical state coverage.
[0020] The beneficial effects of this invention are as follows: By employing a pre-trained communication state prediction model, the system learns the temporal dependencies and transition patterns between communication states. Based on multimodal feature inputs, the model intelligently outputs the current communication state and its confidence level, and accurately predicts the expected target communication state. Compared to traditional hard-coded state tables, the AI model can automatically identify and classify unknown states, adapting to protocol version upgrades and implementation differences between different vendors' terminals. Through an AI perception layer, multimodal features are extracted from response messages, fusing physical layer signal features (signal strength, signal-to-noise ratio, bit error rate, etc.) and protocol layer behavioral features to achieve comprehensive cross-layer state perception from the physical layer to the protocol layer. This multimodal fusion perception effectively overcomes the limitations of single-dimensional state recognition, maintaining high state recognition accuracy even under conditions of signal quality fluctuations or physical layer anomalies.
[0021] An adaptive decision-making agent is constructed based on reinforcement learning algorithms. The current communication state, target test case characteristics, and historical state sequences form the state space, while actions such as continuing the current test, switching test cases, sending probe messages, and adjusting sending parameters form the action space. The agent dynamically adjusts subsequent testing strategies based on state matching results, achieving an intelligent closed loop of "perception-analysis-decision-execution." When states are inconsistent, the agent can intelligently select probe strategies and accurately locate the cause of anomalies based on response conditions, avoiding simple binary misjudgments. An intelligent test case generator is built based on generative AI. It learns the structure and semantic constraints of protocol messages from protocol specification documents and historical valid test cases, intelligently generating high-value test cases based on the current communication state and historical state coverage. Compared to traditional fixed mutation strategies, AI-driven generation can focus testing resources on high-value state regions, significantly improving testing efficiency. Attached Figure Description
[0022] Figure 1 This is a block diagram illustrating the principle of the AI-based adaptive communication status detection system of the present invention. Figure 2 This is a flowchart of the AI-based adaptive communication state detection method of the present invention. Detailed Implementation
[0023] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments are not intended to limit the present invention.
[0024] Example like Figure 1As shown, an AI-based adaptive communication state detection method is applied to a fuzz testing system based on a communication network protocol. The fuzz testing system includes a communication base station and a terminal under test (DUT) connected by a communication connection. The communication base station includes a communication protocol stack, an AI perception layer, and a software-defined radio hardware layer connected by a communication connection. The communication protocol stack is used to generate a test case library required for performing fuzz testing between the communication base station and the DUT; the software-defined radio hardware layer is used to send the test cases from the test case library sent by the communication protocol stack to the DUT.
[0025] In this embodiment, the communication base station is a 4G / 5G / 6G communication base station, and the terminal under test is a smartphone, IoT smart terminal, or Internet of Things terminal. The terminal under test is equipped with a wireless communication interface and communicates with the communication base station through the wireless communication interface.
[0026] Software-defined radio (SDK) is a radio broadcasting communication technology that is based on software-defined wireless communication protocols rather than hard-wired implementations. Frequency bands, air interface protocols, and functions can be upgraded via software downloads and updates without requiring a complete hardware replacement. By setting up a software-defined radio hardware layer at the communication base station, the communication connection between the base station and the terminal under test gains significant flexibility and openness.
[0027] Before performing fuzz testing, the fuzz testing system in this embodiment controls the communication connection between the communication base station and the terminal under test. Then, the fuzz testing system executes the fuzz testing method, generates a test case library from the communication protocol stack, and sends the test cases from the library to the software-defined radio hardware layer. Finally, the software-defined radio hardware layer sends the test cases (i.e., mutation messages) to the terminal under test to perform the fuzz testing and receives the response messages from the terminal under test after receiving the test cases.
[0028] Furthermore, the AI perception layer in the communication base station receives the response messages sent by the software-defined radio hardware layer, and performs multimodal feature extraction and intelligent analysis on the response messages to determine the execution status of the fuzz test.
[0029] In this embodiment, the fuzz testing system may further include a control terminal. The control terminal is communicatively connected to a communication base station and the terminal under test. The test engineer can control the communication base station through the control terminal to modify its relevant configuration parameters, thereby enabling communication between the communication base station and the terminal under test. The control terminal can be an electronic device such as a laptop computer.
[0030] It should be noted that, in this embodiment, fuzz testing refers to the test engineer controlling the communication connection of the terminal under test through the control terminal, and the communication base station sending test cases to the terminal under test, monitoring the response of the terminal under test, and judging the execution status of the fuzz test based on the response messages sent by the terminal under test.
[0031] The AI perception layer is located between the software-defined radio hardware layer and the communication protocol stack, and is used to extract multimodal features and intelligently perceive the status of response messages.
[0032] The AI perception layer includes a signal feature extraction module, a protocol behavior encoding module, and a state fusion reasoning module.
[0033] The signal feature extraction module communicates with the software-defined radio hardware layer and is used to extract physical layer signal features from the radio frequency signals received by the software-defined radio hardware layer. Physical layer signal features include, but are not limited to, at least one of: signal strength, signal-to-noise ratio, bit error rate, multipath delay, signal phase deviation, and frequency offset. The signal feature extraction module extracts these multi-dimensional physical layer features by performing time-domain and frequency-domain analysis on the radio frequency signals, providing physical layer perception information for subsequent state fusion inference.
[0034] The protocol behavior encoding module communicates with the software-defined radio hardware layer and is used to convert response messages into protocol semantic vectors using a pre-trained protocol encoding model. Specifically, the protocol behavior encoding module first performs data format conversion on the response message (e.g., converting binary format to structured text format), and then maps the converted message into a fixed-dimensional protocol semantic vector using a pre-trained protocol encoding model (e.g., a protocol semantic encoder based on the Transformer architecture). The protocol semantic vector captures the semantic information and behavioral characteristics of the response message at the protocol level.
[0035] The state fusion inference module is communicatively connected to both the signal feature extraction module and the protocol behavior encoding module. It performs multimodal fusion of physical layer features and protocol semantic vectors to generate a fused state representation vector. Multimodal fusion can employ early fusion (feature-level concatenation), late fusion (decision-level fusion), or a cross-modal fusion method based on an attention mechanism. In this embodiment, a cross-modal fusion method based on a cross-attention mechanism is preferred, allowing physical layer features and protocol layer semantic features to mutually enhance each other during the fusion process, improving the accuracy and robustness of the state representation.
[0036] The communication state prediction model is a pre-trained artificial intelligence model installed in the communication base station and communicates with the state fusion and inference module of the AI perception layer. The communication state prediction model is used to output the first communication state of the communication base station and the tested terminal, along with the corresponding first confidence level, based on the fused state representation vector.
[0037] In this embodiment, the communication state prediction model is a temporal prediction model based on a Long Short-Term Memory (LSTM) network, a gated recurrent unit (GRU), or a Transformer architecture. Preferably, a Transformer architecture is used, leveraging its self-attention mechanism to capture long-distance dependencies in the communication state sequence. The communication state prediction model is trained using historical communication state sequences and corresponding test case labels to learn the temporal dependencies and transition patterns between communication states.
[0038] The communication state prediction model consists of an input embedding layer, a multi-head self-attention layer, a feedforward neural network layer, and an output layer. The input embedding layer maps the fused state representation vector to the model input vector; the multi-head self-attention layer captures the dependencies between different positions in the input sequence; the feedforward neural network layer performs a non-linear transformation on the output of the self-attention layer; and the output layer outputs the classification result of the current communication state and its confidence level.
[0039] The training process of the communication state prediction model is as follows: A large amount of historical fuzzy test execution data of state sequences is collected, including the communication state of each round of testing, the corresponding test cases, and the execution result labels. The state sequence data is organized chronologically, and the model is trained using supervised learning, enabling the model to predict the current communication state based on current and historical state information. After training, the model can perform vectorized representation and similarity clustering of unknown states, achieving automatic classification of unknown states.
[0040] The communication state prediction model outputs the first communication state along with its corresponding first confidence score. The confidence score represents the model's estimate of the reliability of the output result, and its value ranges from 0 to 1. When the confidence score is high (e.g., greater than 0.85), it indicates that the model has a high degree of confidence in the state judgment; when the confidence score is low, it indicates that the model has uncertainty in the state judgment and further verification is needed.
[0041] The communication protocol stack communicates with the AI perception layer to generate a test case library required for performing fuzz testing, and to determine a second communication state that matches the target test case.
[0042] The communication protocol stack consists of the application layer, control layer, protocol layer, and driver layer from top to bottom.
[0043] The control layer connects the AI perception layer and the protocol layer. It is used to generate the test case library required for fuzz testing, arrange the order of test cases in the test case library, obtain the test cases (i.e. target test cases) selected from the arranged test case library in a preset order, and send them to the next communication layer. It is also used to monitor the execution of fuzz testing.
[0044] Specifically, the control layer includes a test case generator, a test case orchestrator, a test case executor, and a test status monitor. These components are interconnected. The test case generator generates a test case library, and the test case orchestrator arranges the execution order (i.e., the preset order) of the test cases in the library. The test case executor determines and executes the current test case according to the preset order, and selects the next test case from the library to ensure execution of the next test case after the current one has finished. The test status monitor monitors the status of the next communication layer and the feedback signals from the terminal under test.
[0045] In this embodiment, the test case generator is an intelligent test case generator built on generative AI, such as a generative model based on a large language model or variational autoencoder. The intelligent test case generator learns the structure and semantic constraints of protocol messages from the protocol specification document and / or historical valid test cases based on the current communication state and historical state coverage, generating test cases that match the current communication state. Specifically, the intelligent test case generator first extracts the protocol message format, field definitions, and constraints from the protocol specification document to construct a protocol syntax tree; then, it learns the effective message patterns that can trigger state transitions under different communication states from historical valid test cases; finally, combining the current communication state and historical state coverage, it generates high-value test cases that conform to the basic protocol syntax and cover unexplored state regions through a generative model.
[0046] The communication protocol stack is also used to determine a second communication state that matches the target test case. The second communication state represents the communication state that the communication base station and the terminal under test (DUT) must be in in order to perform fuzz testing based on the target test case. Specifically, it determines the second communication state of the communication base station and the DUT before the software-defined radio hardware layer sends the target test case to the DUT. This is because in any communication connection process, steps such as establishing physical / link layer connectivity, protocol parameter matching, handshake or authentication completion, and basic interaction verification are required before fuzz testing can be performed.
[0047] The state comparison module is set in the communication base station and is connected to the communication state prediction model and the communication protocol stack respectively. It is used to detect whether the first communication state is consistent with the target communication state and whether the first confidence level is greater than a preset threshold.
[0048] Specifically, the state comparison module receives the first communication state and the first confidence level output by the communication state prediction model, as well as the second communication state determined by the communication protocol stack and the target communication state predicted based on the second communication state. The state comparison module compares the first communication state with the target communication state and simultaneously determines whether the first confidence level is greater than a preset threshold (e.g., 0.85).
[0049] If the first communication state is found to be consistent with the target communication state and the first confidence level is greater than the preset threshold, the state comparison module generates a fuzz test execution success message, indicating that the fuzz test is executed normally as expected.
[0050] If the first communication state is found to be inconsistent with the target communication state, or the first confidence level is less than the preset threshold, the state comparison module triggers the abnormal handling process, and the adaptive decision-making agent performs further judgment and processing.
[0051] The communication state knowledge graph is set up in a communication base station or a server connected to the base station. It is used to store and manage structured knowledge of communication states and their transition relationships. Nodes in the knowledge graph represent communication states, and edges represent state transition relationships and their triggering conditions.
[0052] Each communication state node includes a state identifier, state description, state type (such as normal state, abnormal state, boundary state, unknown state, etc.), and state feature vector. Each state transition edge includes a source state, a target state, a triggering condition (such as a specific test case type, signal condition, etc.), and a transition probability.
[0053] The knowledge graph is constructed by: extracting standard state transition relationships from protocol specification documents as the basic skeleton of the knowledge graph; mining actual state transition relationships from historical fuzzy test execution data to supplement and enrich the knowledge graph; and continuously updating the knowledge graph through an incremental learning module, adding newly discovered states and state transition relationships to the graph in each test.
[0054] The incremental learning module is located in the communication base station or in a server connected to the communication base station. It communicates with the communication state knowledge graph and the communication state prediction model. When the first communication state is detected to be inconsistent with the target communication state or the first confidence level is less than a preset threshold, the module adds the first communication state as an unknown state node to the knowledge graph and performs incremental learning updates on the communication state prediction model based on the knowledge graph.
[0055] Specifically, the incremental learning module first determines whether the first communication state already exists in the knowledge graph. If it does not, a new state node is created, and a state description and state type are generated based on the feature vector and context information of the first communication state. Then, the incremental learning module adds the transformation relationship between the first communication state and the current communication state as a new edge in the knowledge graph. Finally, based on the updated knowledge graph, the incremental learning module uses incremental learning algorithms (such as elastic weight consolidation, memory replay, or online learning) to update the parameters of the communication state prediction model, enabling the model to recognize newly discovered states.
[0056] The incremental learning module enables the system to continuously evolve. The more tests conducted and the wider the state coverage, the higher the accuracy of state prediction and the higher the testing efficiency.
[0057] The adaptive decision-making agent is built based on a reinforcement learning algorithm and is set up in a communication base station. It communicates with the state comparison module, the software-defined radio hardware layer, and the communication protocol stack. It is used to dynamically adjust subsequent test strategies based on the comparison results between the first communication state and the target communication state.
[0058] The state space of the adaptive decision-making agent includes: the current communication state, the characteristics of the target test case, the historical state sequence, and the current confidence level. The action space includes: continuing the current test, switching test cases, sending probe messages, adjusting sending parameters (such as sending power, sending frequency, etc.), and terminating the test. The reward function is designed based on state matching accuracy, test coverage, the number of new states discovered, and test execution efficiency.
[0059] In this embodiment, the adaptive decision-making agent preferably employs a deep Q-network or a near-end policy optimization algorithm. After each fuzzy test, the agent calculates the reward value based on the state comparison results and updates the policy network parameters to maximize the cumulative reward in subsequent decisions.
[0060] When the state comparison module detects an inconsistency between the first communication state and the target communication state, the adaptive decision-making agent selects a probe message sending action from the action space. The probe message is a legitimate control message or data packet that conforms to the communication network protocol specifications. The agent sends the probe message to the tested terminal through the software-defined radio hardware layer and detects the tested terminal's response to the probe message. Based on the response, the agent updates the reward signal and adjusts subsequent action strategies according to the updated reward signal.
[0061] Specifically, if the terminal under test responds normally to the probe message, it indicates that the communication link between the communication base station and the terminal under test is still normal. The inconsistency in state may be due to the target test case triggering an unexpected but legal state transition. In this case, the agent can continue to execute subsequent test cases. If the terminal under test responds abnormally to the probe message (such as no response, response timeout, or response error), it indicates that the target test case may cause serious anomalies such as deadlock, crash, or state machine suspension in the terminal under test. In this case, the agent records the anomaly information and generates fuzz test execution failure information.
[0062] See Figure 2 As shown, the method may include the following steps.
[0063] The software-defined radio hardware layer sends target test cases to the terminal under test and receives response messages from the terminal under test.
[0064] Specifically, the test case generator of the fuzzing system's control communication protocol stack generates target test cases. These target test cases are then passed through the control layer, protocol layer, and driver layer to the software-defined radio hardware layer. The software-defined radio hardware layer sends the target test cases to the terminal under test (DUT) via the radio frequency interface and the DUT's wireless communication interface to execute the fuzzing test.
[0065] The terminal under test generates a response message based on the target test case and sends the response message to the software-defined radio hardware layer via the wireless communication interface and the radio frequency interface. The software-defined radio hardware layer receives the response message and passes it to the AI perception layer.
[0066] The AI perception layer extracts multimodal features from the response message. These multimodal features include physical layer signal features and protocol layer behavioral features.
[0067] Specifically, the signal feature extraction module of the AI perception layer extracts at least one physical layer feature from the radio frequency signals received by the software-defined radio hardware layer, including signal strength, signal-to-noise ratio, bit error rate, and multipath delay.
[0068] The protocol behavior encoding module of the AI perception layer converts response messages into protocol semantic vectors using a pre-trained protocol encoding model. The module first performs data format conversion on the response message (e.g., converting binary format to JSON or XML format), and then maps the converted message into a fixed-dimensional protocol semantic vector using the pre-trained protocol encoding model.
[0069] The state fusion inference module of the AI perception layer performs multimodal fusion of physical layer features and protocol semantic vectors to generate a fused state representation vector. The multimodal fusion adopts a cross-modal fusion method based on a cross-attention mechanism, which enables physical layer features and protocol layer semantic features to enhance each other during the fusion process.
[0070] The extracted multimodal features are input into a pre-trained communication state prediction model, which outputs the first communication state of the communication base station and the tested terminal, as well as the corresponding first confidence level.
[0071] Specifically, the state fusion inference module inputs the generated fused state representation vector into the communication state prediction model. Based on the current fused state representation vector and historical state sequence information, the communication state prediction model outputs the classification result and its confidence level of the current communication state through processing by a multi-head self-attention layer and a feedforward neural network layer.
[0072] The first communication state output by the communication state prediction model represents the current actual communication state of the communication base station and the tested terminal. The first confidence level indicates the reliability estimate of the model's output result.
[0073] The second communication state that matches the target test case is determined by the communication protocol stack.
[0074] Specifically, the communication protocol stack determines the second communication state of the communication base station and the terminal under test before the software-defined radio hardware layer sends the target test cases to the terminal under test. The second communication state represents the communication state that the communication base station and the terminal under test need to be in order to perform fuzz testing based on the target test cases.
[0075] The second communication state is input into the communication state prediction model, which then predicts the expected target communication state of the terminal under test after receiving the target test case.
[0076] Specifically, the communication protocol stack inputs the second communication state into the communication state prediction model. Based on the second communication state and historical state transition patterns, the communication state prediction model predicts the next communication state that the terminal under test will transition from the second communication state after receiving the target test case, i.e., the target communication state.
[0077] The communication state prediction model can predict the target communication state by combining the state transition relationships in the communication state knowledge graph. Specifically, the model searches for state transition edges that match the second communication state in the knowledge graph, and determines the target communication state based on the triggering conditions (the type and characteristics of the target test case).
[0078] If the first communication state is found to be consistent with the target communication state and the first confidence level is greater than the preset threshold, a fuzz test execution success message is generated.
[0079] Specifically, the state comparison module compares the first communication state with the target communication state and determines whether the first confidence level is greater than a preset threshold (e.g., 0.85). If both conditions are met, it indicates that the communication state during the actual execution of the fuzz test is consistent with the theoretically expected communication state, and the model judgment has high credibility. The state comparison module then generates a fuzz test execution success message.
[0080] If the first communication state is found to be inconsistent with the target communication state or the first confidence level is less than the preset threshold, the adaptive decision-making agent will dynamically adjust the subsequent testing strategy based on the comparison results.
[0081] Specifically, when the state comparison module detects that the first communication state is inconsistent with the target communication state or the first confidence level is less than a preset threshold, it triggers the adaptive decision-making agent to make an intelligent decision.
[0082] The adaptive decision-making agent selects the optimal action from the action space based on the current state space (including the current communication state, target test case characteristics, historical state sequence, and current confidence level). Optional actions include: continuing the current test, switching test cases, sending probe messages, adjusting sending parameters, and terminating the test.
[0083] If the adaptive decision-making agent chooses to send a probe message, it transmits the probe message to the terminal under test (DUT) via the software-defined radio hardware layer. The probe message is a legitimate control message or data packet that conforms to the communication network protocol specifications. Then, the DUT's response to the probe message is monitored. If the DUT responds normally, a fuzz test success message is generated; if the DUT responds abnormally, a fuzz test failure message is generated.
[0084] If the adaptive decision agent chooses to switch test case actions, it selects the next test case from the test case library and continues to execute the fuzz test.
[0085] If the adaptive decision agent chooses to adjust the transmission parameters, it will adjust parameters such as the transmission power, transmission frequency, or modulation method of the software-defined radio hardware layer to eliminate the interference of physical layer factors on state detection.
[0086] The newly discovered communication states are updated to the communication state knowledge graph, and the communication state prediction model is updated through incremental learning.
[0087] Specifically, after each fuzz test, the incremental learning module checks whether the first communication state already exists in the knowledge graph. If it does not exist, a new state node is created, and a state description and state type are generated based on the feature vector and context information of the first communication state. Then, the transformation relationship between the first communication state and the current communication state is added as a new edge to the knowledge graph. Finally, based on the updated knowledge graph, the incremental learning algorithm is used to update the parameters of the communication state prediction model.
[0088] Incremental learning can be performed in real time after each test, or in batches after accumulating a certain number of new states, depending on the system's computing resources and real-time requirements.
[0089] The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the method embodiments described above.
[0090] The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, processors, microprogram controllers, application-specific integrated circuits, programmable gate arrays, digital processors, embedded devices, etc.
[0091] For example, a computer program can also be divided into one or more modules / units, which are stored in memory and executed by a processor. The one or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in an electronic device.
[0092] Those skilled in the art will understand that the schematic diagram is merely an example of an electronic device and does not constitute a limitation on the electronic device. It may include more or fewer components than shown in the diagram, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0093] A processor can be a central processing unit, or it can be other general-purpose processors, digital signal processors, application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (OPGs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor, a single-chip microcomputer, or any conventional processor.
[0094] Memory can be used to store computer programs and / or modules / units. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules / units stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the electronic device, etc. Furthermore, memory can include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards, secure digital cards, flash memory cards, at least one disk storage device, flash memory device, or other non-volatile solid-state storage devices.
[0095] When modules / units integrated into an electronic 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 a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory, random access memory, electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0096] This application also provides a computer-readable storage medium storing computer-readable instructions, which are executed by a processor in an electronic device to implement the above-described artificial intelligence-based adaptive communication state detection method.
[0097] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the electronic device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and other division methods may be used in actual implementation.
[0098] Furthermore, the functional units in the various embodiments of this application can be integrated into the same processing unit, or each unit can exist physically separately, or two or more units can be integrated into the same unit. The integrated units described above can be implemented in hardware or in the form of hardware plus software functional modules.
[0099] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and not restrictive in all respects. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or electronic devices recited in the electronic device claims may also be implemented by the same unit or electronic device through software or hardware. The terms "first," "second," etc., are used to denote names and do not indicate any particular order.
[0100] The above embodiments of the present invention are not intended to limit the scope of protection of the present invention. The implementation of the present invention is not limited thereto. All other modifications, substitutions or alterations made to the above structure of the present invention based on the above content of the present invention, in accordance with ordinary technical knowledge and common practice in the field, without departing from the basic technical idea of the present invention, shall fall within the scope of protection of the present invention.
Claims
1. An adaptive communication state detection method based on artificial intelligence, characterized in that, A fuzz testing system based on a communication network protocol is provided. The fuzz testing system includes a communication base station and a terminal under test (DUT) connected by communication. The communication base station includes a communication protocol stack, an AI perception layer, and a software-defined radio hardware layer connected by communication. The method includes: sending a target test case to the DUT through the software-defined radio hardware layer, and receiving a response message sent by the DUT through the software-defined radio hardware layer; extracting multimodal features from the response message by the AI perception layer, the multimodal features including physical layer signal features and protocol layer behavioral features; inputting the extracted multimodal features into a pre-trained communication state prediction model, which outputs a first communication state of the communication base station and the DUT, along with a corresponding first confidence level; determining a second communication state matching the target test case through the communication protocol stack; inputting the second communication state into the communication state prediction model, which predicts the expected target communication state of the DUT after receiving the target test case; and generating fuzz test execution success information if the first communication state matches the target communication state and the first confidence level is greater than a preset threshold.
2. The method according to claim 1, characterized in that, The AI perception layer includes a signal feature extraction module, a protocol behavior encoding module, and a state fusion inference module. The multimodal feature extraction of the response message by the AI perception layer includes: the signal feature extraction module extracting at least one physical layer feature from the radio frequency signal received by the software-defined radio hardware layer, including signal strength, signal-to-noise ratio, bit error rate, and multipath delay; the protocol behavior encoding module converting the response message into a protocol semantic vector using a pre-trained protocol encoding model; and the state fusion inference module performing multimodal fusion of the physical layer features and the protocol semantic vector to generate a fused state representation vector.
3. The method according to claim 1, characterized in that, The pre-trained communication state prediction model is a time-series prediction model based on a long short-term memory network, a gated recurrent unit, or a Transformer architecture. The communication state prediction model is trained using historical communication state sequences and corresponding test case labels to learn the temporal dependencies and transition rules between communication states.
4. The method according to claim 1, characterized in that, The method further includes: constructing a communication state knowledge graph, wherein nodes in the knowledge graph represent communication states, and edges represent state transition relationships and their triggering conditions; if the first communication state is detected to be inconsistent with the target communication state, or the first confidence level is less than the preset threshold, the first communication state is added to the knowledge graph as an unknown state node; based on the newly added unknown state nodes in the knowledge graph, incremental learning is performed through the communication state prediction model to update the network parameters of the communication state prediction model.
5. The method according to claim 1, characterized in that, The method further includes: constructing an adaptive decision agent based on a reinforcement learning algorithm, wherein the state space of the adaptive decision agent includes the current communication state, target test case features, and historical state sequences, and the action space includes continuing the current test, switching test cases, sending probe messages, and adjusting sending parameters; inputting the comparison result between the first communication state and the target communication state as a reward signal into the adaptive decision agent; and dynamically adjusting the subsequent test strategy according to the reward signal.
6. The method according to claim 5, characterized in that, If the first communication state is detected to be inconsistent with the target communication state, the method further includes: the adaptive decision agent selecting a probe message sending action from the action space; sending the probe message to the terminal under test through the software-defined radio hardware layer, wherein the probe message is a legal control message or data packet that conforms to the communication network protocol specification; detecting the response of the terminal under test to the probe message; and updating the reward signal based on the response, and adjusting the subsequent action strategy according to the updated reward signal.
7. The method according to claim 1, characterized in that, The method further includes: generating the target test cases through an intelligent test case generator based on generative AI, wherein the intelligent test case generator is a generative model based on a large language model or a variational autoencoder; the intelligent test case generator learns the structure and semantic constraints of protocol messages from protocol specification documents and / or historical valid test cases based on the current communication state and historical state coverage, and generates test cases that match the current communication state.
8. The method according to claim 1, characterized in that, The communication state prediction model outputs the first confidence level corresponding to the first communication state. The method further includes: if the first confidence level is less than the preset threshold, sending multiple identical or different probe messages to the terminal under test through the software-defined radio hardware layer; collecting multiple response messages from the terminal under test to the multiple probe messages; inputting the multimodal features of the multiple response messages back into the communication state prediction model to obtain an updated second communication state and second confidence level; if the second confidence level is greater than the preset threshold, using the second communication state as the current communication state.
9. An adaptive communication status detection system based on artificial intelligence, characterized in that, The system includes a communication base station and a terminal under test (DUT) connected by communication. The communication base station includes a communication protocol stack, an AI perception layer, and a software-defined radio hardware layer connected by communication. The software-defined radio hardware layer is used to send target test cases to the DUT and receive response messages sent by the DUT. The AI perception layer is used to extract multimodal features from the response messages, including physical layer signal features and protocol layer behavioral features. The communication base station also includes a communication state prediction model, which is a pre-trained artificial intelligence model used to output the first communication state and the corresponding first confidence level of the communication base station and the DUT based on the multimodal features. The communication protocol stack is used to determine a second communication state that matches the target test case. The communication state prediction model is also used to predict the expected target communication state of the DUT after receiving the target test case based on the second communication state. The communication base station also includes a state comparison module used to detect whether the first communication state is consistent with the target communication state and whether the first confidence level is greater than a preset threshold. If they are consistent and greater than the preset threshold, a fuzz test execution success message is generated.
10. The system according to claim 9, characterized in that, The system further includes: a communication state knowledge graph, where nodes represent communication states and edges represent state transition relationships and their triggering conditions; an incremental learning module, used to add the first communication state as an unknown state node to the knowledge graph when the first communication state is detected to be inconsistent with the target communication state or the first confidence level is less than the preset threshold, and to incrementally learn and update the communication state prediction model based on the knowledge graph; an adaptive decision agent, built based on a reinforcement learning algorithm, used to dynamically adjust subsequent testing strategies according to the comparison results between the first communication state and the target communication state; and an intelligent test case generator, built based on generative AI, used to generate test cases that match the current communication state based on the current communication state and historical state coverage.