Multi-protocol compatibility testing method and system for gateway equipment
Through detailed multi-protocol compatibility testing methods, including device specification analysis, protocol test case set construction, network transmission scenario simulation and compatibility evaluation, the problem that existing testing methods cannot fully cover multiple protocol types is solved, and the compatibility and stability of gateway devices are improved.
Patent Information
- Application Number
- CN202510264250.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2045-03-06
AI Technical Summary
Existing gateway device testing methods cannot fully cover multiple protocol types, resulting in communication failures, data loss or conversion errors prone to complex scenarios, and cannot meet the growing demand for Internet of Things device interconnection.
By obtaining the device specification information of the gateway device, analyzing the adaptive communication protocol, building a protocol test example set, simulating network transmission scenarios under different protocols, collecting protocol interaction data, analyzing compatibility performance, evaluating overall compatibility data, tracing root factors, optimizing resource allocation and monitoring thresholds, and generating abnormal protocol instructions and compatibility test details.
Improve the multi-protocol compatibility of gateway equipment, reduce the incidence of failure, ensure efficient networking and stable operation of equipment in smart homes, industrial Internet of Things and other scenarios, and reduce operation and maintenance costs.
Smart Images

Figure CN119766706A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a multi-protocol compatibility testing method and system for gateway equipment. Background Art
[0002] In today's era of rapid development of digitalization and intelligence, the Internet of Things technology is booming. Gateway devices, as the key hub connecting different networks and devices, are becoming increasingly important. Gateway devices are widely used in many fields such as smart homes, industrial automation, smart cities, etc., responsible for realizing the conversion and data interaction between multiple protocols, and ensuring seamless communication and collaborative work between different devices.
[0003] At present, a large number of diverse network protocols have emerged in the market, such as the common Wi-Fi, Bluetooth, ZigBee, MQTT, CoAP, etc. There are significant differences in the transmission rate, power consumption, applicable scenarios, etc. of each protocol. However, the existing gateway device testing methods have many defects. Most tests are only carried out for a single protocol or a limited combination of protocols, and cannot fully cover the many protocol types involved in actual applications. As a result, in complex scenarios, gateway devices are prone to communication failures, data loss or conversion errors and other compatibility issues, which makes it difficult to meet the growing demand for interconnection and interoperability of IoT devices. Therefore, a multi-protocol compatibility testing method for gateway devices is needed to improve the compatibility requirements of gateway devices. Summary of the invention
[0004] The present invention provides a multi-protocol compatibility testing method and system for a gateway device, the main purpose of which is to improve the compatibility requirements of the gateway device.
[0005] To achieve the above object, the present invention provides a multi-protocol compatibility testing method for a gateway device, comprising: Acquire device specification information of a gateway device, analyze the adapted communication protocol corresponding to the gateway device according to the device specification information, construct a protocol test case set corresponding to the gateway device based on the adapted communication protocol, and standardize the test cases in the protocol test case set to obtain a standard protocol test case set; Determine the network access port corresponding to the gateway device, simulate the network transmission scenarios of the network access port under different protocols, collect protocol interaction data under the network transmission scenarios, analyze the preliminary compatibility performance corresponding to the gateway device based on the protocol interaction data, and extract key performance indicators in the preliminary compatibility performance; Based on the key performance indicators, evaluate the overall compatibility data corresponding to the gateway device, analyze the compatibility problem type corresponding to the overall compatibility data, trace the root cause of the gateway device based on the compatibility problem type, and analyze the performance balance point corresponding to the root cause; Based on the performance balance point, determine the resource allocation channel of the gateway device when multiple protocols are running, detect the channel load corresponding to the resource allocation channel, calculate the channel resource utilization corresponding to the resource allocation channel based on the channel load, optimize the monitoring threshold of the gateway device in the resource monitoring process based on the channel resource utilization, and calculate the threshold deviation corresponding to the monitoring threshold; Based on the threshold deviation, an abnormal protocol instruction of the gateway device in multi-protocol operation is generated, the instruction configuration protocol corresponding to the abnormal protocol instruction is queried, the protocol compatibility factor in the instruction configuration protocol is extracted, and based on the protocol compatibility factor, a compatibility test detail list corresponding to the gateway device is generated.
[0006] Optionally, constructing a protocol test case set corresponding to the gateway device based on the adapted communication protocol includes: Determining core protocol elements in the adapted communication protocol; Analyze the functional characteristics corresponding to the core protocol elements; According to the functional characteristics, a protocol test architecture corresponding to the adapted communication protocol is constructed; Based on the protocol test architecture, determining the test data requirements corresponding to the gateway device; Based on the test data requirements, a protocol test case set corresponding to the gateway device is constructed.
[0007] Optionally, the step of standardizing the test cases in the protocol test case set to obtain a standard protocol test case set includes: Identify the content format structure corresponding to the test case in the protocol test case set; Based on the content format structure, determining original test case information corresponding to the test case in the protocol test case set; Analyze the logical structure of the original use case information; Determine a standard process template corresponding to the logic structure; Mapping and matching the data in the original use case information with the standard process template to obtain mapping differences; Based on the mapping difference points, the test cases in the protocol test case set are standardized to obtain a standard protocol test case set.
[0008] Optionally, analyzing the preliminary compatibility performance corresponding to the gateway device based on the protocol interaction data includes: Extracting key interaction features from the protocol interaction data; Analyzing the communication behavior patterns corresponding to the key interaction features; Based on the communication behavior pattern, identifying compatibility anomalies existing in the gateway device; Analyze the abnormal impact range corresponding to the compatible abnormal point; Based on the abnormal impact range, determining the potential association relationship corresponding to the compatible abnormal point; Based on the potential association relationship, the preliminary compatibility performance corresponding to the gateway device is analyzed.
[0009] Optionally, tracing back the root cause of the gateway device based on the compatibility problem type includes: Identify a set of behavioral performance characteristics corresponding to the compatibility problem type; Analyze the occurrence frequency and distribution of the characteristics of the behavioral performance characteristics; Based on the occurrence frequency and the distribution status, determining an abnormal operation area corresponding to the gateway device; Extracting the operation factor segment in the operation abnormality area; Based on the operation factor segment, the root cause factor corresponding to the gateway device is traced back.
[0010] Optionally, the determining, based on the performance balance point, a resource allocation channel of the gateway device when multiple protocols are running, includes: Analyze the key performance dimensions corresponding to the performance balance point; Screening the core elements of resources corresponding to the key performance dimensions; Based on the resource dependency factors, determining resource consumption patterns of the gateway device in different protocol operation scenarios; Querying the adaptation allocation ratio corresponding to the hardware resources in the resource consumption mode; Based on the adaptation allocation ratio, a resource allocation channel of the gateway device when multiple protocols are running is determined.
[0011] Optionally, the calculating, based on the channel load condition, a channel resource utilization rate corresponding to the resource allocation channel includes: The channel resource utilization rate corresponding to the resource allocation channel is calculated using the following formula: in, The channel resource utilization rate corresponding to the resource allocation channel, Indicates the total number of samples corresponding to the monitoring samples of the channel load condition, Indicates the number index of monitoring samples, Indicates The weight coefficient corresponding to the monitoring samples is: Indicates The load value corresponding to the monitoring sample is and Respectively represent the start time and end time of the allocation time corresponding to the resource allocation channel, Indicates at time Channel capacity indicator at the moment.
[0012] Optionally, calculating the threshold deviation corresponding to the monitoring threshold includes: The threshold deviation corresponding to the monitoring threshold is calculated using the following formula: in, represents the threshold deviation corresponding to the monitoring threshold, and They represent the end time and start time of calculating the threshold deviation, Indicates at time The monitoring data change rate at each moment, represents the number of data samples corresponding to the monitoring threshold, Represents the number index of data samples, Indicates The sample difference between a data sample and the monitoring threshold, Indicates the stability coefficient of the monitoring environment corresponding to the monitoring threshold.
[0013] Optionally, the generating, based on the threshold deviation, an abnormal protocol instruction of the gateway device in multi-protocol operation includes: Querying a key deviation value in the threshold deviation; Based on the key deviation value, analyzing the deviation fluctuation trend corresponding to the threshold deviation; Determining an abnormal deviation interval in the deviation fluctuation trend; Extracting extreme deviation points in the abnormal deviation interval; Based on the extreme deviation point, locate the abnormal fluctuation point of the gateway device in the multi-protocol operation; Based on the abnormal fluctuation point, an abnormal protocol instruction of the gateway device in the multi-protocol operation is generated.
[0014] Optionally, in order to solve the above problem, the present invention provides a multi-protocol compatibility testing system for a gateway device, the system comprising: A standard processing module is used to obtain device specification information of a gateway device, analyze the adapted communication protocol corresponding to the gateway device according to the device specification information, construct a protocol test case set corresponding to the gateway device based on the adapted communication protocol, and perform standardization processing on the test cases in the protocol test case set to obtain a standard protocol test case set; An indicator extraction module is used to determine the network access port corresponding to the gateway device, simulate the network transmission scenarios of the network access port under different protocols, collect protocol interaction data under the network transmission scenarios, analyze the preliminary compatibility performance corresponding to the gateway device based on the protocol interaction data, and extract key performance indicators from the preliminary compatibility performance; A balance point extraction module is used to evaluate the overall compatibility data corresponding to the gateway device based on the key performance indicators, analyze the compatibility problem type corresponding to the overall compatibility data, trace the root cause of the gateway device based on the compatibility problem type, and analyze the performance balance point corresponding to the root cause; A deviation calculation module is used to determine the resource allocation channel of the gateway device when multiple protocols are running based on the performance balance point, detect the channel load corresponding to the resource allocation channel, calculate the channel resource utilization corresponding to the resource allocation channel based on the channel load, optimize the monitoring threshold of the gateway device in the resource monitoring process based on the channel resource utilization, and calculate the threshold deviation corresponding to the monitoring threshold; A detailed list generation module is used to generate abnormal protocol instructions for the gateway device in multi-protocol operation based on the threshold deviation, query the instruction configuration protocol corresponding to the abnormal protocol instruction, extract the protocol compatibility factor in the instruction configuration protocol, and generate a compatibility test detailed list corresponding to the gateway device based on the protocol compatibility factor.
[0015] First of all, by acquiring the device specification information of the gateway device, the present invention can accurately lock the adapted communication protocol, thereby constructing a targeted set of protocol test cases, laying a solid foundation for subsequent multi-protocol compatibility testing, efficiently troubleshooting potential communication and conversion problems, clarifying the characteristics of the network access port through the specification information, and simulating different scenarios to be more in line with the actual device, accurately collecting protocol interaction data, and facilitating the rapid capture of key compatibility indicators, providing strong support for evaluating overall compatibility and locating root problems. At the same time, by determining the network access port corresponding to the gateway device and simulating the network transmission scenarios of the network access port under different protocols, the present invention can simulate different protocol scenarios, replicate diverse and complex real network environments, and expose the compatibility problems of the device during protocol conversion and data transmission and reception in advance, greatly reducing the failure rate after actual deployment, so that the device can be efficiently networked in scenarios such as smart homes and industrial Internet of Things, and smoothly interconnect multiple devices. Based on the key performance indicators, the present invention evaluates the overall compatibility data corresponding to the gateway device, analyzes the compatibility corresponding to the overall compatibility data The problem type is quantified by key indicators to present the performance of the equipment, and the weak links are quickly locked. It is a key guide for repair and optimization, which can greatly reduce the troubleshooting time and facilitate the targeted investment of resources. According to the evaluation results and the problem type, the technology, manpower and material resources are deployed in a targeted manner to avoid blind investment and reduce the operation and maintenance cost. The present invention is based on the performance balance point to determine the resource allocation channel of the gateway device when multiple protocols are running, which can achieve efficient resource utilization, accurately allocate hardware and software resources according to the requirements of each protocol and the performance balance requirements, avoid excessive occupation of resources by some protocols, make full use of the computing power and bandwidth of the equipment, and reduce idleness and waste. Further, the present invention generates the abnormal protocol instructions of the gateway device in the multi-protocol operation based on the threshold deviation, which can achieve accurate fault location, accurately judge the abnormal protocol through the threshold deviation, quickly locate the root cause of the problem, reduce the troubleshooting time, optimize resource allocation, and after identifying the abnormal protocol, the resource allocation of the protocol can be adjusted in a targeted manner to ensure the efficiency and stability of the gateway device under the multi-protocol operation. Therefore, the multi-protocol compatibility test method and system of the gateway device proposed by the present invention can improve the compatibility requirements of the gateway device. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of a flow chart of a multi-protocol compatibility testing method for a gateway device provided by an embodiment of the present invention; Figure 2 A schematic diagram of modules of a multi-protocol compatibility testing system for implementing a gateway device provided in one embodiment of the present invention.
[0017] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0018] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0019] An embodiment of the present application provides a multi-protocol compatibility testing method for a gateway device. The execution subject of the multi-protocol compatibility testing method for a gateway device includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the multi-protocol compatibility testing method for a gateway device can be executed by software or hardware installed in a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0020] Embodiment 1: Reference Figure 1 FIG. 1 is a flow chart of a method for testing the multi-protocol compatibility of a gateway device according to an embodiment of the present invention. In this embodiment, the method for testing the multi-protocol compatibility of a gateway device includes: S1. Obtain device specification information of a gateway device, analyze the adaptation communication protocol corresponding to the gateway device according to the device specification information, construct a protocol test case set corresponding to the gateway device based on the adaptation communication protocol, and standardize the test cases in the protocol test case set to obtain a standard protocol test case set.
[0021] By acquiring the device specification information of the gateway device, the present invention can accurately lock the adapted communication protocol, thereby constructing a targeted protocol test case set, laying a solid foundation for subsequent multi-protocol compatibility testing, and efficiently troubleshooting potential communication and conversion problems. The network access port characteristics are clarified through specification information, and different scenarios are simulated to be more in line with the actual device. The protocol interaction data is accurately collected, which is conducive to quickly capturing key compatibility indicators, providing strong support for evaluating overall compatibility and locating root causes.
[0022] Among them, the gateway device refers to a device in the Internet of Things architecture that acts as a key connection hub between different networks and various types of devices. It is commonly used in scenarios such as smart homes, industrial automation, and smart cities. It is responsible for connecting devices using different protocols such as Wi-Fi, Bluetooth, ZigBee, etc., breaking down communication barriers, and achieving smooth interaction and conversion of data, so that different devices can work together; the device specification information refers to the key details of the hardware and software levels of the gateway device. In terms of hardware, it includes parameters such as processor model, memory capacity, storage specifications, network interface type and quantity, which determine the basic capabilities of the device for data processing, storage, and access to the network; in terms of software, it includes the operating system version carried by the device, built-in driver information, and pre-set communication protocol stack details, etc. Optionally, the device specification information of the gateway device can be obtained through a network scanning tool, such as: Nmap and other tools, which can scan the open ports of the gateway device, and can also infer the protocols supported by the device by identifying the port services, thereby obtaining the device specification information.
[0023] Furthermore, the present invention analyzes the adaptation communication protocol corresponding to the gateway device based on the device specification information, can match the gateway hardware performance, accurately match the protocol, prevent the protocol load from exceeding the hardware load, and cause malfunctions such as freezing and freezing, thereby maintaining stable operation of the device. At the software level, the adaptation protocol can be selected based on the operating system and protocol stack details to ensure smooth software interaction, reduce the probability of data conversion errors, and improve communication accuracy.
[0024] Among them, the adapted communication protocol refers to a set of communication protocol combinations that are screened and determined to best match the gateway device based on its own hardware performance, software architecture and application scenario requirements. Optionally, the analysis of the adapted communication protocol corresponding to the gateway device can be achieved through a protocol analysis tool, such as using tools such as Wireshark to capture the communication data packets between the gateway device and the industrial controller, and observing the protocol identification field in the data packet header to determine the best adapted communication protocol.
[0025] Furthermore, based on the adaptation communication protocol, the present invention constructs a set of protocol test cases corresponding to the gateway device, which can ensure the actual performance of the device, simulate the operation of the adaptation protocol in real scenarios, and ensure that the gateway device can stably and smoothly connect devices in multiple application scenarios such as smart homes and industrial control to achieve efficient collaboration.
[0026] The protocol test case set refers to the test case used to comprehensively verify the compatibility, functional correctness and performance of the gateway device and the adapted communication protocol. Each test case contains a specific test scenario description, input data, expected output results and verification method.
[0027] As an embodiment of the present invention, the construction of a protocol test case set corresponding to the gateway device based on the adaptation communication protocol includes: determining the core protocol elements in the adaptation communication protocol; analyzing the functional characteristics corresponding to the core protocol elements; building a protocol test architecture corresponding to the adaptation communication protocol based on the functional characteristics; determining the test data requirements corresponding to the gateway device based on the protocol test architecture; and constructing a protocol test case set corresponding to the gateway device based on the test data requirements.
[0028] Among them, the core protocol elements refer to the basic components in the adapted communication protocol that play a key supporting role in realizing the communication function. For example, in the TCP / IP protocol, IP address, port number, data packet format definition, etc. are core protocol elements; the functional characteristics refer to the unique capabilities and behavioral performances of the core protocol elements. Taking the Bluetooth protocol as an example, its low power consumption characteristics determine the energy consumption mode of the device in the connected state, affecting the power management strategy of the gateway device; the broadcast functional characteristics enable the device to actively send information, providing a way for the gateway device to discover surrounding Bluetooth devices. Different functional characteristics determine the specific implementation of the gateway device in communication, connection management, data interaction, etc. Methods and capabilities; The protocol test architecture refers to an organized test system built according to the characteristics and requirements of the adapted communication protocol. For example, for the MQTT protocol test architecture, it can be divided into a connection test layer, a message publishing and subscription test layer, etc. In the connection test layer, the connection establishment, maintenance and disconnection mechanism between the gateway device and the client are checked; the message publishing and subscription test layer focuses on functional tests such as accurate message transmission and topic matching; The test data requirements refer to the various types of input data and their characteristic requirements required to fully test the performance and functions of the gateway device under the adapted communication protocol. For example, when testing the HTTP protocol, it is necessary to cover different types of request methods (GET, POST, etc.) data, request content in multiple formats (text, JSON, XML, etc.), and response data corresponding to different status codes.
[0029] Furthermore, the determination of the core protocol elements in the adaptation communication protocol can be achieved through a protocol packet capture analysis method, such as: capturing protocol data packets in an actual network environment, and counting the fields that appear frequently and have a decisive role in the communication logic as core protocol elements; the analysis of the functional characteristics corresponding to the core protocol elements can be achieved through a network simulator, such as: NS3, OMNeT++ and other tools; the construction of the protocol test architecture corresponding to the adaptation communication protocol can be achieved through a test management tool, such as: TestRail, JIRA and other tools; the determination of the test data requirements corresponding to the gateway device can be achieved through an equivalence class division method, such as: dividing the input data into equivalence classes according to valid values, boundary values, etc. to determine the requirements; the construction of the protocol test case set corresponding to the gateway device can be achieved through an automated testing framework tool, such as: Pytest, JUnit and other tools.
[0030] The present invention obtains a standard protocol test case set by standardizing the test cases in the protocol test case set, which is beneficial to the reuse and maintenance of the use cases. The standardized use cases can be conveniently reused in subsequent projects or similar equipment tests, and the modification and adjustment are more efficient, saving manpower and time costs, and can enhance the standardization of the overall test process, making the connection between each link smoother.
[0031] Among them, the standard protocol test case set refers to a set of test cases that, after standardization, fully meet the requirements of the standard process template in terms of content format structure, logical composition, data expression, etc. It has a clear and unified structure, rigorous and reasonable logic, and accurate and standardized data representation.
[0032] As an embodiment of the present invention, the test cases in the protocol test case set are standardized to obtain a standard protocol test case set, including: identifying a content format structure corresponding to the test cases in the protocol test case set; based on the content format structure, determining original use case information corresponding to the test cases in the protocol test case set; analyzing the logical structure in the original use case information; determining a standard process template corresponding to the logical structure; mapping and matching the data in the original use case information with the standard process template to obtain mapping difference points; based on the mapping difference points, standardizing the test cases in the protocol test case set to obtain a standard protocol test case set.
[0033] Among them, the content format structure refers to the external organization form and layout of the test case, covering the arrangement and combination of sections such as title, preconditions, operation steps, expected results, postconditions, and the expression form of information in each section, such as text format, data type representation, symbol usage specifications, etc.; the original use case information refers to the specific content description of the test scenario, operation details, data application, expected output, etc. parsed from the test case set according to its content format structure. For example, in a test case for the HTTP protocol of a gateway device, the original use case information includes the requested URL, request method, request header fields and their values, request body data format and content, as well as the expected HTTP status code, response header and key information of the response body, etc.; the logical structure refers to the internal steps and condition judgments of the test case. The inherent logical association and execution sequence between interruption, data flow, function call, etc. For example, in a test case involving multi-protocol switching of gateway devices, the logical structure includes the conditional logic of triggering protocol switching based on network status, the logic of data preservation and recovery during switching, the sequential logic of device connection and communication under different protocols, etc.; the standard process template refers to an idealized test case model pre-formulated according to industry best practices, protocol standard specifications and project-specific requirements, which clearly stipulates the standardized expression of the test content at each stage, the standard steps of the operation process, the standard methods of data processing and result verification, etc.; the mapping difference refers to the mismatch between the original use case information and the standard process template in terms of content, format, logic, etc., such as the absence or redundancy of test steps, inconsistent data format, inaccurate logical judgment conditions, etc.
[0034] Further, the identification of the content format structure corresponding to the test case in the protocol test case set can be implemented by a text editor, such as: Sublime Text, Visual Studio Code and other tools; the determination of the original use case information corresponding to the test case in the protocol test case set can be implemented by a data crawling tool, such as: BeautifulSoup and other tools can help parse HTML or XML documents, and conveniently extract the original use case information such as table data, text content, attribute values, etc.; the analysis of the logical structure in the original use case information can be implemented by a flowchart drawing tool, such as: drawing a simple flowchart according to the operation steps and condition judgments in the original use case information to intuitively display the logical relationship; the determination of the standard process template corresponding to the logical structure can be implemented by a standard management platform, such as: Doors, Confluence, etc.; the mapping and matching of the data in the original use case information with the standard process template can be implemented by a test management tool, such as: the test case association and comparison functions of tools such as TestRail can be used to perform data mapping and matching; the standardization of the test cases in the protocol test case set can be implemented by an automated testing framework, such as: using the template and keyword functions provided in the RobotFramework tool to reconstruct test cases that do not meet the standards into test cases that meet the standard process template.
[0035] S2. Determine the network access port corresponding to the gateway device, simulate the network transmission scenarios of the network access port under different protocols, collect the protocol interaction data under the network transmission scenarios, analyze the preliminary compatibility performance corresponding to the gateway device based on the protocol interaction data, and extract key performance indicators in the preliminary compatibility performance.
[0036] The present invention determines the network access port corresponding to the gateway device and simulates the network transmission scenarios of the network access port under different protocols. It can simulate different protocol scenarios, replicate diverse and complex real network environments, and expose compatibility issues of devices during protocol conversion and data reception and transmission in advance, greatly reducing the failure rate after actual deployment, thereby allowing the device to be efficiently networked in scenarios such as smart homes and industrial Internet of Things, and smoothly interconnect multiple devices.
[0037] Among them, the network access port refers to the key interface for establishing a physical or logical connection between the gateway device and the external network, which is responsible for the inflow and outflow of data. From a physical point of view, it includes the common Ethernet interface (RJ45 port), which uses the network cable to achieve high-speed and stable wired connection, and is often used in enterprise-level network deployment; there is also a USB interface, which can be connected to an external 4G / 5G Internet access module to broaden the mobile network access capability of the gateway; the wireless level covers the frequency band interface corresponding to the Wi-Fi module, allowing the device to connect to the local area network wirelessly; the network transmission scenario refers to the various actual conditions faced by the gateway device during data transmission in different communication protocol environments relying on the network access port. For example, in the Wi-Fi protocol transmission scenario in the smart home scenario, Consider the signal interference and bandwidth preemption issues when multiple devices in the home are connected at the same time; in industrial scenarios, the wired transmission scenario using the Modbus protocol focuses on the accuracy and real-time of data transmission in long-distance, strong electromagnetic interference environments, and whether packet loss and bit errors occur. Optionally, the determination of the network access port corresponding to the gateway device can be achieved through a network scanning tool, such as: tools such as Nmap can scan the network where the gateway device is located, and determine the network access port by identifying open ports and corresponding services; the simulation of the network transmission scenarios of the network access port under different protocols can be achieved through a Monte Carlo simulation algorithm, such as: using a Monte Carlo simulation algorithm, a large number of corresponding network transmission scenarios can be generated by random sampling.
[0038] Furthermore, the present invention can accurately locate equipment problems by collecting protocol interaction data in the network transmission scenario, and by analyzing the interaction data, it can find out protocol conversion loopholes, data packet loss or disorder anomalies, quickly identify the root cause of the fault, and provide key clues for repairing gateway devices, thereby avoiding communication obstacles caused by protocol incompatibility in advance and ensuring that gateway devices operate stably in complex network environments.
[0039] Among them, the protocol interaction data refers to all information data generated by various communication protocols when the gateway device communicates with the connected devices or network nodes in a specific network transmission scenario. From the perspective of content composition, it covers key information at the data packet level, such as the header of the data packet, which contains basic elements such as the source address, destination address, protocol type identifier, and port number, so as to clarify the source and destination of the data, as well as the communication protocol used. From a dynamic process perspective, it also includes data from the entire protocol interaction process, including handshake information when the connection is established, such as the request and confirmation packets of the TCP protocol three-way handshake; traffic information in the data transmission stage, reflecting the transmission rate and data volume; termination signal when the connection is disconnected, etc. Optionally, the collection of protocol interaction data in the network transmission scenario can be achieved through a DPI algorithm, such as: the DPI algorithm can be used to identify the application layer protocol in the data packet and extract protocol interaction data.
[0040] Furthermore, the present invention analyzes the initial compatibility performance corresponding to the gateway device based on the protocol interaction data, can quickly troubleshoot hidden dangers, and accurately identify incompatibilities between the device and the protocol by analyzing abnormal information such as packet loss, delay, and error frames in the data, and resolve communication failures in actual applications in advance, which is conducive to efficient allocation of resources. According to the transmission rate and throughput performance of the device under different protocols, bandwidth and computing power are allocated in a targeted manner to avoid waste of resources and ensure smooth operation of key businesses.
[0041] Among them, the preliminary compatibility performance refers to the phased evaluation conclusion of the compatibility of gateway devices in a multi-protocol environment after comprehensive consideration of key interaction features, communication behavior patterns, compatibility anomalies and their impact range and correlation relationships. It covers the degree of support for each protocol (full compatibility, partial compatibility, incompatibility), stability in common and extreme scenarios (data transmission stability, connection reliability), performance (throughput, delay affected by compatibility issues) and other dimensions.
[0042] As an embodiment of the present invention, the analysis of the preliminary compatibility performance corresponding to the gateway device based on the protocol interaction data includes: extracting key interaction features in the protocol interaction data; analyzing the communication behavior patterns corresponding to the key interaction features; identifying the compatibility anomalies existing in the gateway device based on the communication behavior patterns; analyzing the abnormal impact range corresponding to the compatibility anomaly points; based on the abnormal impact range, determining the potential association relationship corresponding to the compatibility anomaly points; based on the potential association relationship, analyzing the preliminary compatibility performance corresponding to the gateway device.
[0043] Among them, the key interaction features refer to information elements in the protocol interaction data that have a significant indicative effect on judging the compatibility of gateway devices, such as specific field values of data packets (such as flag bit combinations in the TCP protocol, request methods and version numbers of the HTTP protocol), the time interval regularity of data transmission, and the frequent change pattern of device addresses; the communication behavior pattern refers to the habitual action logic of the gateway device in network communication presented based on the key interaction features. For example, continuous high-frequency sending of small data packets with fixed intervals can indicate that the device is performing a scheduled status reporting task; for example, after a large number of concurrent connection attempts in a certain period of time, there is no data interaction for a long time, and there is a connection management anomaly or resource occupation is not released; the compatibility anomaly point refers to the gateway device's interaction with other devices or networks. When interacting according to a specific protocol, deviations from standard protocol specifications or expected behaviors may occur, such as frequent data verification errors, indicating problems in data integrity assurance. Protocol handshake timeout means that there are obstacles in protocol synchronization between the device and the other device at the initial stage of connection establishment. The impact range of the exception refers to the breadth and depth of the impact of the compatible exception point on the gateway device's own functions, connected devices, and the overall network communication ecosystem. The potential correlation relationship refers to the hidden cause and effect, triggering or collaborative connection between different compatible exception points, such as a protocol parsing error caused by memory overflow, which leads to a series of subsequent abnormal operations that depend on the parsing results, such as the inability to update the routing table, resulting in chaotic data forwarding. For example, frequent retransmissions at a certain protocol layer and slow response of upper-layer applications affect each other, forming a vicious circle.
[0044] Furthermore, the extraction of key interaction features in the protocol interaction data can be achieved through feature extraction tools, such as Wireshark, Tcpdump and other tools; the analysis of the communication behavior patterns corresponding to the key interaction features can be achieved through time series analysis methods, such as using the tseries package to perform autocorrelation analysis, spectrum analysis, etc. on the network traffic data of the gateway device (such as the number of data packets per second) to reveal the communication behavior patterns behind the time series; the identification of compatible anomalies in the gateway device can be achieved through protocol analysis tools, such as using the Wireshark tool to automatically detect some common protocol problems, such as checksum errors, excessive retransmissions, etc., and mark them as abnormal; the analysis of the abnormal impact range corresponding to the compatible anomaly point can be achieved through system analysis tools, such as when a compatible anomaly point occurs, through SystemTap Check the call status and resource usage changes of related functional modules, and analyze the impact on other modules; the potential correlation relationship corresponding to the compatible anomaly point can be determined through system monitoring tools, such as: using tools such as Zabbix to monitor various performance indicators and events of gateway devices in real time, and analyzing the correlation relationship between compatible anomaly points by checking event history records and indicator change trends; the analysis of the preliminary compatibility performance corresponding to the gateway device can be achieved through a weighted scoring method, such as: assigning weights to different compatibility factors (such as protocol support integrity, number of anomaly points, anomaly impact range, etc.), and then scoring each factor according to the analysis results of the protocol interaction data, and finally calculating the weighted total score to evaluate the preliminary compatibility performance.
[0045] By extracting key performance indicators from the preliminary compatibility performance, the present invention can quickly identify the weak links in protocol adaptation, data transmission, and connection stability of gateway devices, point out the direction for optimization and upgrading, and lay a solid foundation for long-term operation and maintenance. By continuously monitoring key indicators, the compatibility status of equipment can be controlled in real time, and abnormalities can be responded to quickly, thereby reducing fault downtime and ensuring smooth and stable network communications.
[0046] Among them, the key performance indicators refer to a series of quantitative or qualitative parameters and characteristics that can accurately and effectively reflect the core compatibility characteristics of gateway devices in a multi-protocol environment. From the perspective of protocol support, they include the number of supported protocol types and the degree of complete support for each functional subset of mainstream protocols (such as TCP / IP, Wi-Fi protocol, etc.) (such as whether all features of HTTP / 2 are fully supported); in terms of data transmission, the key performance indicators include data transmission rate, throughput (the amount of data successfully transmitted per unit time), data loss rate (the proportion of data lost during transmission), data delay (the time delay of the data packet from the sender to the receiver), etc. Optionally, the extraction of key performance indicators in the preliminary compatibility performance can be achieved through performance testing tools, such as: Iperf, JPerf and other tools.
[0047] S3. Based on the key performance indicators, evaluate the overall compatibility data corresponding to the gateway device, analyze the compatibility problem type corresponding to the overall compatibility data, trace the root factors corresponding to the gateway device based on the compatibility problem type, and analyze the performance balance point corresponding to the root factors.
[0048] The present invention evaluates the overall compatibility data corresponding to the gateway device based on the key performance indicators, analyzes the compatibility problem types corresponding to the overall compatibility data, and quantitatively presents the device performance through key indicators to quickly identify weak links. It is a key guide for repair and optimization, which can greatly reduce the troubleshooting time and facilitate the targeted investment of resources. According to the evaluation results and problem types, technical, human and material resources are deployed in a targeted manner to avoid blind investment and reduce operation and maintenance costs.
[0049] Among them, the overall compatibility data refers to a series of data sets that comprehensively reflect the compatibility performance of gateway devices in various communication protocol environments, covering data at the protocol support level, such as the types and versions of protocols that enable the device to run stably and achieve full functionality, as well as the adaptation to emerging protocols; performance-related data is also included, such as data transmission rate and throughput under different protocols, which are used to measure the efficiency of data transmission and reception, as well as packet loss rate and delay time, which are used to judge the reliability and timeliness of transmission; connection stability data is also critical, including connection establishment success rate, connection interruption frequency, time required for reconnection, etc., which intuitively demonstrates the device's ability to maintain a communication link; the compatibility problem type refers to the type of problem that is summarized and divided based on the anomalies and shortcomings exposed by the overall compatibility data. There are different types of problems. From the perspective of protocol adaptation, there are problems with missing protocol functions, that is, the device fails to fully implement the functions specified in the protocol standard, such as some gateways cannot support the multiplexing characteristics of HTTP / 2; poor version compatibility is also a category, which is manifested as frequent errors when docking with a specific protocol version. Optionally, the evaluation of the overall compatibility data corresponding to the gateway device can be achieved through a fuzzy comprehensive evaluation algorithm, such as: first determine the evaluation factor set (such as protocol support, data transmission, connection stability) and the evaluation level set (such as excellent, good, medium, poor), establish a fuzzy relationship matrix, and obtain the overall compatibility data through fuzzy operations; the analysis of the compatibility problem types corresponding to the overall compatibility data can be achieved through data analysis tools, such as: Excel, SPSS and other tools.
[0050] Furthermore, based on the type of compatibility problem, the present invention traces the root factors corresponding to the gateway device, can achieve accurate repair, and quickly identify the root cause of the problem. Whether it is a protocol loophole, hardware shortcoming, or software algorithm defect, it can directly hit the key point and avoid blind debugging, greatly saving manpower and time costs, which is conducive to long-term optimization, improving equipment compatibility, and reducing the occurrence of similar problems in the future.
[0051] Among them, the root factors refer to the fundamental reasons that ultimately cause the compatibility problems of gateway devices, involving multiple levels of software, hardware and design architecture. At the software level, there are operating system kernel vulnerabilities, protocol stack code defects, driver incompatibility, etc.; at the hardware level, there are chip performance bottlenecks, insufficient memory resources, RF module failures, etc.; at the design architecture level, there are problems such as complex and error-prone protocol conversion logic, and unreasonable design of inter-module communication interfaces.
[0052] As an embodiment of the present invention, tracing the root factors corresponding to the gateway device based on the compatibility problem type includes: identifying a behavioral performance feature set corresponding to the compatibility problem type; analyzing the occurrence frequency and distribution of features in the behavioral performance feature set; determining an operation abnormality area corresponding to the gateway device based on the occurrence frequency and the distribution; extracting operation factor segments in the operation abnormality area; and tracing the root factors corresponding to the gateway device based on the operation factor segments.
[0053] Among them, the behavioral performance feature set refers to a set of observable and identifiable abnormal behaviors and phenomena presented from multiple dimensions when a compatibility problem occurs in a gateway device. For example, at the network protocol level, it manifests as frequent connection timeouts under a specific protocol, incorrect checksums of data packets, no response or incorrect response to protocol commands, etc.; in terms of data transmission, it presents characteristics such as a sudden drop in data transmission rate, periodic regularity of data packet loss, and disordered transmitted data; the frequency of occurrence refers to the number of times each behavioral performance feature is detected or occurs during the operation of the gateway device, such as within a period of time, the data packet loss feature appears 50 times, while the protocol command error response feature appears 20 times; the distribution status refers to the distribution status of the behavioral performance feature in different operating time periods, different functional modules, and different protocol interactions of the gateway device. For example, the data transmission rate drop feature appears mainly in the network The problem mainly occurs during peak hours and mainly in several specific data forwarding functional modules; the connection timeout feature frequently appears in the first few minutes after the device is started and at specific protocol switching moments after long-term operation; the abnormal operation area refers to a specific range of problems and abnormalities in the gateway device that is delineated based on the frequency and distribution of occurrences, covering aspects such as functional modules, operating hours, and protocol processing flow fragments. For example, it is determined that within a certain period of time, the specific period when the wireless access module of the gateway device processes a large number of concurrent connection requests is the abnormal operation area; the operating factor segment refers to the key operating steps, data processing flow fragments, resource calling links, etc. that are closely related to the abnormal behavior, which are further subdivided within the abnormal operation area. For example, in the abnormal operation area of the wireless access module, the execution segment of the device address allocation algorithm and the operating flow segment of signal strength detection and adjustment are extracted as the operating factor segment.
[0054] Further, the identification of the behavioral performance feature set corresponding to the compatibility problem type can be achieved through a network performance testing tool, such as using tools such as Iperf to help identify behavioral feature sets such as transmission rate lower than expected, packet loss, etc.; the analysis of the frequency and distribution of features in the behavioral performance feature set can be achieved through data visualization tools, such as tools such as Tableau and Grafana, which display the frequency and distribution of behavioral performance features in the form of intuitive charts; the determination of the abnormal operation area corresponding to the gateway device can be achieved through a network diagnostic tool, such as tools such as Ping and Traceroute are used to diagnose network connection problems and determine abnormal nodes or areas in the network path; the extraction of the operation factor segment in the abnormal operation area can be achieved through a resource call tracking method, such as observing the read and write operations of the data cache, the scheduling process of the CPU, the sending and receiving operations of the network interface, etc. in the data forwarding function module, and taking the key links in these resource call processes as the operation factor segment; the tracing of the root cause factors corresponding to the gateway device can be achieved through a fault tree analysis algorithm, such as determining the most basic cause of the top event, that is, the root cause factor, by analyzing the minimum cut set of the fault tree.
[0055] The present invention is conducive to efficient allocation of resources by analyzing the performance balance points corresponding to the root factors. According to the performance balance points, the hardware computing power, bandwidth and software running memory are reasonably allocated to ensure that the gateway device runs stably and smoothly under different working conditions and exerts the best performance.
[0056] Among them, the performance balance point refers to a delicate performance adaptation state maintained between the key internal elements when the gateway device runs stably and efficiently and achieves ideal compatibility. From the hardware dimension, it covers the reasonable matching of chip computing speed, memory read and write rate, storage capacity and network interface bandwidth. For example, the network chip must be able to adapt to high-speed data inflow and outflow, and the response speed of the memory must keep up with the data temporary storage and retrieval requirements. Once unbalanced, compatibility problems such as data cache overflow and transmission jams will occur. Optionally, the performance balance point corresponding to the analysis of the root cause can be achieved through an analysis algorithm, such as: PSO, GA and other algorithms.
[0057] S4. Based on the performance balance point, determine the resource allocation channel of the gateway device when running multiple protocols, detect the channel load situation corresponding to the resource allocation channel, calculate the channel resource utilization corresponding to the resource allocation channel based on the channel load situation, optimize the monitoring threshold of the gateway device in the resource monitoring process based on the channel resource utilization, and calculate the threshold deviation corresponding to the monitoring threshold.
[0058] Based on the performance balance point, the present invention determines the resource allocation channel of the gateway device when multiple protocols are running, which can achieve efficient use of resources, accurately allocate hardware and software resources according to the requirements of each protocol and performance balance requirements, avoid excessive occupation of resources by some protocols, make full use of device computing power, bandwidth, etc., and reduce idleness and waste.
[0059] Among them, the resource allocation channel refers to the resource delivery path and rule system from the resource pool to each protocol running instance constructed inside the gateway device, including the physical level hardware resource connection and data flow path, such as the link from the network interface to the protocol processing chip; the logical level has a resource scheduling strategy based on the adaptive allocation ratio, such as CPU task queues sorted by protocol priority, memory management allocated to different areas according to protocol requirements and set access rights.
[0060] As an embodiment of the present invention, determining the resource allocation channel of the gateway device when multiple protocols are running based on the performance balance point includes: analyzing the key performance dimensions corresponding to the performance balance point; screening the resource core elements corresponding to the key performance dimensions; determining the resource consumption mode of the gateway device in different protocol operation scenarios based on the resource dependency elements; querying the adaptation allocation ratio corresponding to the hardware resources in the resource consumption mode; and determining the resource allocation channel of the gateway device when multiple protocols are running based on the adaptation allocation ratio.
[0061] Among them, the key performance dimension refers to the performance category that plays a key role in supporting the overall performance of the gateway device and is closely related to performance balance. From the perspective of computing power, it covers the CPU's computing speed, instruction processing capability, and multi-core collaborative efficiency, which directly affects the parsing, encapsulation, and forwarding rates of protocol data, and determines the smoothness of high-load protocol operation; the storage performance dimension involves memory read and write speed, storage capacity, and data access stability, and is related to protocol configuration, operation logs, and storage efficiency of temporary data; the resource core elements refer to the key components that play a leading role in the key performance dimensions and have a direct impact on resource allocation. For computing resources, the core elements are the number and frequency of CPU cores, and their configuration determines the amount and complexity of protocol tasks that can be efficiently processed at the same time; in storage resources, the physical capacity of the memory, the cache mechanism, and the read and write speed of the storage chip are the core, affecting data temporary storage and rapid call to match the coordination The resource consumption mode refers to the dynamic rules and characteristic combinations of various resources (hardware and software) consumed by the gateway device in scenarios where different protocols are run separately or mixed. For example, when running the lightweight MQTT protocol, low-frequency small data packet transmission is the main method, which consumes a small amount of CPU computing resources for message distribution, and the network bandwidth occupancy is stable but low, and the memory demand is concentrated on maintaining the connection status and simple message caching; the adaptation allocation ratio refers to the precise allocation ratio determined for various hardware resources (such as CPU time slice, memory space, and network bandwidth share) after weighing the performance balance point for different protocol operation scenarios. For example, in the multi-protocol operation of the smart home gateway, in order to ensure the real-time ZigBee device control protocol, a higher CPU real-time scheduling priority and a certain memory fast response area are allocated, accounting for 20% of the CPU time slice and 30% of the specific memory partition.
[0062] Further, the analysis of the key performance dimensions corresponding to the performance balance point can be achieved through a performance indicator decomposition method, such as: subdividing the overall performance indicators of the gateway device according to functional modules and processing flows, and determining dimensions closely related to performance balance; the screening of the core resource elements corresponding to the key performance dimensions can be achieved through a performance bottleneck positioning method, such as: by gradually increasing the multi-protocol business load or simulating a complex network environment, observing the performance degradation of the gateway device, and locating the resource elements that cause the performance bottleneck; the determination of the resource consumption mode of the gateway device in different protocol operation scenarios can be achieved through a mode determination tool, such as: accurately simulating a variety of complex network protocols and large-scale traffic scenarios, and comprehensively testing the performance and resource consumption of the gateway device when different protocols are running; the query of the adaptation allocation ratio corresponding to the hardware resources in the resource consumption mode can be achieved through an intelligent operation and maintenance platform, such as: real-time monitoring of the hardware resource status, protocol operation performance and configuration information of the gateway device, automatically analyzing the resource consumption mode based on a machine learning algorithm and a built-in performance model, and recommending an adaptation hardware resource allocation ratio; the determination of the resource allocation channel of the gateway device when multiple protocols are running can be achieved through a network function virtualization tool, such as VMware NSX, Cisco ACI and other tools.
[0063] The present invention detects the channel load corresponding to the resource allocation channel, which is conducive to accurate resource scheduling, and provides real-time insight into the proportion and dynamic changes of resources occupied by each protocol. It can quickly detect load imbalances, flexibly allocate as needed, prevent some protocols from being stuck due to lack of resources, and improve overall operating efficiency.
[0064] Among them, the channel load condition refers to the comprehensive status of various aspects such as the size of data traffic, the busyness of processing tasks, and the proportion of resource occupancy in each resource allocation channel when the gateway device is running multiple protocols. It reflects the actual usage and demand level of hardware resources such as CPU, memory, network bandwidth, etc. for different protocols during operation. Optionally, the detection of the channel load condition corresponding to the resource allocation channel can be achieved through performance testing tools, such as: JMeter, LoadRunner and other tools.
[0065] Furthermore, the present invention calculates the channel resource utilization rate corresponding to the resource allocation channel based on the channel load condition, thereby realizing refined resource management, accurately grasping the actual utilization efficiency of each channel resource, quickly locating idle or over-consumed parts, and timely adjusting resource allocation strategies to reduce waste and reduce the risk of sudden equipment failures and performance bottlenecks.
[0066] The channel resource utilization rate refers to the degree to which the resource allocation channel is actually used within a specific time range, and measures the efficiency of resource utilization by comparing the actual load of the channel with the channel capacity.
[0067] As an embodiment of the present invention, the calculating the channel resource utilization corresponding to the resource allocation channel based on the channel load condition includes: The channel resource utilization rate corresponding to the resource allocation channel is calculated using the following formula: in, The channel resource utilization rate corresponding to the resource allocation channel, Indicates the total number of samples of monitoring samples corresponding to the channel load condition, Indicates the number index of monitoring samples, Indicates The weight coefficient corresponding to the monitoring samples is: Indicates The load value corresponding to the monitoring sample is and Respectively represent the start time and end time of the allocation time corresponding to the resource allocation channel, Indicates at time Channel capacity indicator at the moment.
[0068] In detail, the monitoring sample refers to a series of representative data points collected in the process of measuring the channel load, and these data points are used to describe the load status of the channel at different times; the weight coefficient refers to a parameter used to adjust the importance of different monitoring samples in calculating the channel resource utilization. Different monitoring samples have different influences on the calculation of the final utilization due to factors such as their collection time and collection environment, and the weight coefficient is used to quantify this influence; the load value refers to the actual workload carried by the resource allocation channel at a specific moment, which can be measured in a variety of ways, such as data flow, number of processing tasks, resource occupancy, etc.; the allocation time refers to the start time and end time of the resource allocation operation of the resource allocation channel, which defines the time range for calculating the channel resource utilization; the channel capacity indicator refers to the maximum load that the resource allocation channel can carry at a specific moment, which reflects the theoretical maximum processing capacity of the channel.
[0069] The present invention optimizes the monitoring threshold of the gateway device during resource monitoring based on the channel resource utilization rate, thereby improving monitoring accuracy, reasonably setting the threshold according to the actual resource utilization situation, avoiding misjudgment caused by too high or too low a threshold, accurately capturing abnormal resource status, and facilitating reasonable resource allocation. By optimizing the threshold, the resource usage pattern can be better understood, resources can be allocated to different protocols as needed, and resource waste can be reduced.
[0070] Among them, the monitoring threshold refers to one or a group of critical values pre-set when monitoring resources of the gateway device. These critical values are used to determine whether the resource usage is in a normal, warning or abnormal state. For example, when monitoring the CPU utilization of the gateway device, a 70% threshold may be set. When the CPU utilization exceeds 70%, the monitoring system will issue a warning. Optionally, the optimization of the monitoring threshold of the gateway device during the resource monitoring process can be achieved through a machine learning algorithm, such as: by training a large amount of resource usage data, the machine learning algorithm can automatically discover patterns and regularities in the data, and then predict reasonable monitoring thresholds.
[0071] Furthermore, the present invention can accurately evaluate the accuracy of monitoring by calculating the threshold deviation corresponding to the monitoring threshold. The deviation can intuitively tell whether the current threshold setting is reasonable, avoiding misjudgment or missed judgment due to inappropriate threshold, and helping to adjust resource strategies in time. When the deviation exceeds a certain range, it can quickly detect and optimize the threshold in a targeted manner, thereby reasonably allocating the resources of the gateway device.
[0072] The threshold deviation refers to an indicator used to measure the degree of deviation between the monitoring threshold and the actual monitoring data, which reflects the accuracy of the monitoring threshold setting.
[0073] As an embodiment of the present invention, the calculating the threshold deviation corresponding to the monitoring threshold includes: The threshold deviation corresponding to the monitoring threshold is calculated using the following formula: in, represents the threshold deviation corresponding to the monitoring threshold, and They represent the end time and start time of calculating the threshold deviation, Indicates at time The monitoring data change rate at each moment, represents the number of data samples corresponding to the monitoring threshold, Represents the number index of data samples, Indicates The sample difference between a data sample and the monitoring threshold, Indicates the stability coefficient of the monitoring environment corresponding to the monitoring threshold.
[0074] Specifically, the monitoring data change rate refers to the change rate at a specific time point. , the speed of change of monitoring data, which describes the dynamic change of monitoring data over time. For example, it can be the change in monitoring data such as resource utilization and traffic within a unit time; the data sample refers to the actual data points collected during the monitoring process for analyzing and evaluating the monitoring threshold. These data samples can be data such as resource usage and performance indicators obtained at different time points; the sample difference refers to the difference between each data sample and the monitoring threshold, which reflects the degree to which the data sample deviates from the monitoring threshold; the monitoring environment refers to the overall environment in which data collection and monitoring operations are performed on the monitored object (such as gateway devices, network resources, etc.), which includes hardware environment, software environment, network environment and other aspects; the stability coefficient refers to an indicator used to quantify the stability of the monitoring environment, which indicates the stability of the monitoring environment over a period of time. The higher the stability coefficient, the more stable the monitoring environment and the higher the reliability of the monitoring data.
[0075] S5. Based on the threshold deviation, generate an abnormal protocol instruction of the gateway device in multi-protocol operation, query the instruction configuration protocol corresponding to the abnormal protocol instruction, extract the protocol compatibility factor in the instruction configuration protocol, and generate a compatibility test detail list corresponding to the gateway device based on the protocol compatibility factor.
[0076] The present invention generates abnormal protocol instructions for the gateway device in multi-protocol operation based on the threshold deviation, can realize accurate fault location, accurately judge the abnormal protocol through the threshold deviation, quickly locate the root cause of the problem, reduce the troubleshooting time, optimize resource allocation, and after identifying the abnormal protocol, can adjust the resource allocation of the protocol in a targeted manner to ensure the efficiency and stability of the gateway device under multi-protocol operation.
[0077] Among them, the abnormal protocol instructions refer to operation instructions generated for the protocol that has abnormalities in the multi-protocol operation. These instructions are intended to correct the abnormalities in the protocol operation, such as adjusting protocol parameters, reallocating resources, suspending or restarting specific protocols, etc.
[0078] As an embodiment of the present invention, the generation of abnormal protocol instructions for the gateway device in multi-protocol operation based on the threshold deviation includes: querying the key deviation value in the threshold deviation; analyzing the deviation fluctuation trend corresponding to the threshold deviation based on the key deviation value; determining the abnormal deviation interval in the deviation fluctuation trend; extracting the extreme deviation point in the abnormal deviation interval; locating the abnormal fluctuation point of the gateway device in multi-protocol operation based on the extreme deviation point; and generating abnormal protocol instructions for the gateway device in multi-protocol operation based on the abnormal fluctuation point.
[0079] Among them, the key deviation value refers to the value in the threshold deviation data that has a significant impact on the overall deviation. These values usually have a large deviation value or are at a key turning point in the deviation change process; the deviation fluctuation trend refers to the trend of the threshold deviation over time or other related factors (such as protocol operation cycle, data traffic change, etc.), which describes how the threshold deviation rises, falls, remains stable or shows periodic fluctuations; the abnormal deviation interval refers to the time period in the deviation fluctuation trend when the threshold deviation exceeds the normal fluctuation range. In these intervals, the value of the threshold deviation is significantly higher or lower than the normal level, indicating that the operation of the gateway device may be abnormal; the extreme deviation point refers to the point in the abnormal deviation interval where the threshold deviation reaches the maximum or minimum value. These points represent the most extreme deviation under abnormal conditions, and usually correspond to the most unstable moment in the operation of the gateway device; the abnormal fluctuation point refers to the specific time point or protocol operation state point in the multi-protocol operation process of the gateway device corresponding to the extreme deviation point. These points indicate that the gateway device has abnormal fluctuations at a specific time or protocol operation condition.
[0080] Furthermore, the query of the key deviation value in the threshold deviation can be achieved through the LOF algorithm, such as: applying the LOF algorithm to the data set containing the threshold deviation of the gateway device at different times, the algorithm will calculate a LOF value for each data point, and the data point with a higher LOF value is the key deviation value; the analysis of the deviation fluctuation trend corresponding to the threshold deviation can be achieved through the moving average method, such as: as the time window moves, a series of average values are obtained, and the change trend of these average values is observed, and the deviation fluctuation trend can be analyzed; the determination of the abnormal deviation interval in the deviation fluctuation trend can be achieved through the control chart method, such as: the commonly used Shewhart control chart, by calculating the center line (such as the average value) and the upper and lower control limits (such as the center line ± 3 times the standard deviation) of the threshold deviation data, the data interval exceeding the control limit is the abnormal deviation interval; the extraction of the extreme deviation point in the abnormal deviation interval can be achieved through the extreme value search method, such as: within the determined abnormal deviation interval, directly compare Compare the values of the data points to find the maximum and minimum values, which are the extreme deviation points; the positioning of the abnormal fluctuation points of the gateway device in the multi-protocol operation can be achieved through the protocol association analysis method, such as: recording the relevant information of the gateway device when running under different protocols, and when the time corresponding to the extreme deviation point is found, checking the protocol being run at this time, and determining these protocols as protocols related to the abnormal fluctuation; the generation of abnormal protocol instructions for the gateway device in the multi-protocol operation can be achieved through a decision tree algorithm, such as: by training a large number of gateway device protocol anomalies and processing result data, the decision tree algorithm can generate a decision model, and when the abnormal fluctuation points and abnormal protocols are located, appropriate processing instructions are generated according to the decision model.
[0081] The present invention queries the instruction configuration protocol corresponding to the abnormal protocol instruction and extracts the protocol compatibility factor in the instruction configuration protocol, which helps to accurately grasp the adaptation of the instruction to each protocol, and knows which protocols can better execute the instruction based on the compatibility factor, avoiding execution failure caused by the application of the instruction on incompatible protocols, and can optimize the collaborative work of the protocols. By analyzing the compatibility factor, it reasonably arranges the operation of multiple protocols, reduces conflicts caused by compatibility issues, and improves the overall operation efficiency of the gateway device.
[0082] Among them, the instruction configuration protocol refers to a series of configuration rules and parameter sets set for specific abnormal protocol instructions in the multi-protocol operating environment of the gateway device. For example, in a gateway device that supports multiple protocols such as TCP / IP, HTTP, MQTT, etc., for an abnormal protocol instruction, its instruction configuration protocol will separately specify the IP address allocation, port setting, data packet header format, etc. of the instruction under the TCP / IP protocol; the protocol compatibility factor refers to a quantitative indicator or characteristic parameter in the instruction configuration protocol used to measure and characterize the degree of compatibility between the abnormal protocol instruction and different protocols. For example, the value range can be a real number between 0 and 1, and 0 means complete incompatibility. , 1 indicates full compatibility. Optionally, the query of the instruction configuration protocol corresponding to the abnormal protocol instruction can be implemented through an instruction parsing method, such as: deeply parsing the abnormal protocol instruction, extracting the key operation code, data type, target address and other core elements in the instruction, and then searching and matching in a pre-established instruction-protocol mapping table to find the corresponding instruction configuration protocol; the extraction of the protocol compatibility factor in the instruction configuration protocol can be implemented through a rule-based method, such as: analyzing and judging the instruction configuration protocol according to clear rules and standards established in advance, extracting the key factors related to protocol compatibility, and determining the protocol compatibility factor according to the satisfaction of these factors.
[0083] Furthermore, the present invention generates a compatibility test detail list corresponding to the gateway device based on the protocol compatibility factor, which can realize accurate test planning, clarify key test areas and key links according to the compatibility factor, avoid blind testing, save time and resources, and can efficiently check compatibility risks. It can focus on detection of parts with low compatibility factors, resolve protocol conflict risks in advance, and ensure stable operation of gateway devices in complex protocol environments.
[0084] Among them, the compatibility test details list refers to a detailed test plan and record document for the compatibility of the gateway device in a multi-protocol operating environment, including but not limited to: basic function test items of each protocol, clarifying whether functions such as data transmission, connection establishment and disconnection can be normally implemented in the gateway device; performance test content of the protocol, such as test points of indicators such as data transmission rate, response time, throughput, etc.; boundary condition testing of the protocol, such as the maximum number of connections, minimum data volume, and operating status testing under extreme network environments; and test planning for the mutual influence between protocols, checking whether there are abnormal situations caused by resource preemption and conflicts when multiple protocols are running at the same time, etc. Optionally, the generation of the compatibility test details list corresponding to the gateway device can be achieved through a details list generation tool, such as: LaTeX, TestLink and other tools.
[0085] First of all, by acquiring the device specification information of the gateway device, the present invention can accurately lock the adapted communication protocol, thereby constructing a targeted set of protocol test cases, laying a solid foundation for subsequent multi-protocol compatibility testing, efficiently troubleshooting potential communication and conversion problems, clarifying the characteristics of the network access port through the specification information, and simulating different scenarios to be more in line with the actual device, accurately collecting protocol interaction data, and facilitating the rapid capture of key compatibility indicators, providing strong support for evaluating overall compatibility and locating root problems. At the same time, by determining the network access port corresponding to the gateway device and simulating the network transmission scenarios of the network access port under different protocols, the present invention can simulate different protocol scenarios, replicate diverse and complex real network environments, and expose the compatibility problems of the device during protocol conversion and data transmission and reception in advance, greatly reducing the failure rate after actual deployment, so that the device can be efficiently networked in scenarios such as smart homes and industrial Internet of Things, and smoothly interconnect multiple devices. Based on the key performance indicators, the present invention evaluates the overall compatibility data corresponding to the gateway device, analyzes the compatibility corresponding to the overall compatibility data The problem type is quantified by key indicators to present the performance of the equipment, and the weak links are quickly locked. It is a key guide for repair and optimization, which can greatly reduce the troubleshooting time and facilitate the targeted investment of resources. According to the evaluation results and the problem type, the technology, manpower and material resources are deployed in a targeted manner to avoid blind investment and reduce the operation and maintenance cost. The present invention is based on the performance balance point to determine the resource allocation channel of the gateway device when multiple protocols are running, which can achieve efficient resource utilization, accurately allocate hardware and software resources according to the requirements of each protocol and the performance balance requirements, avoid excessive occupation of resources by some protocols, make full use of the computing power and bandwidth of the equipment, and reduce idleness and waste. Further, the present invention generates the abnormal protocol instructions of the gateway device in the multi-protocol operation based on the threshold deviation, which can achieve accurate fault location, accurately judge the abnormal protocol through the threshold deviation, quickly locate the root cause of the problem, reduce the troubleshooting time, optimize resource allocation, and after identifying the abnormal protocol, the resource allocation of the protocol can be adjusted in a targeted manner to ensure the efficiency and stability of the gateway device under the multi-protocol operation. Therefore, the multi-protocol compatibility test method and system of the gateway device proposed by the present invention can improve the compatibility requirements of the gateway device.
[0086] Embodiment 2: like Figure 2 FIG. 1 is a schematic diagram of a module of a multi-protocol compatibility testing system for a gateway device provided by an embodiment of the present invention.
[0087] The multi-protocol compatibility test system 200 of a gateway device described in the present invention can be installed in an electronic device. According to the functions implemented, the multi-protocol compatibility test system 200 of a gateway device can include a standard processing module 201, an index extraction module 202, a balance point extraction module 203, a deviation calculation module 204 and a detailed list generation module 205. The module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0088] In this embodiment, the functions of each module / unit are as follows: The standard processing module 201 is used to obtain device specification information of the gateway device, analyze the adapted communication protocol corresponding to the gateway device according to the device specification information, construct a protocol test case set corresponding to the gateway device based on the adapted communication protocol, and perform standardization processing on the test cases in the protocol test case set to obtain a standard protocol test case set; An indicator extraction module 202 is used to determine the network access port corresponding to the gateway device, simulate the network transmission scenarios of the network access port under different protocols, collect protocol interaction data under the network transmission scenarios, analyze the preliminary compatibility performance corresponding to the gateway device based on the protocol interaction data, and extract key performance indicators from the preliminary compatibility performance; The balance point extraction module 203 is used to evaluate the overall compatibility data corresponding to the gateway device based on the key performance indicators, analyze the compatibility problem type corresponding to the overall compatibility data, trace the root cause corresponding to the gateway device based on the compatibility problem type, and analyze the performance balance point corresponding to the root cause; The deviation calculation module 204 is used to determine the resource allocation channel of the gateway device when multiple protocols are running based on the performance balance point, detect the channel load corresponding to the resource allocation channel, calculate the channel resource utilization corresponding to the resource allocation channel based on the channel load, optimize the monitoring threshold of the gateway device in the resource monitoring process based on the channel resource utilization, and calculate the threshold deviation corresponding to the monitoring threshold; The detailed list generation module 205 is used to generate abnormal protocol instructions of the gateway device in multi-protocol operation based on the threshold deviation, query the instruction configuration protocol corresponding to the abnormal protocol instruction, extract the protocol compatibility factor in the instruction configuration protocol, and generate a compatibility test detailed list corresponding to the gateway device based on the protocol compatibility factor.
[0089] In detail, the modules described in the multi-protocol compatibility testing system 200 of a gateway device described in an embodiment of the present invention adopt the same technical means as the multi-protocol compatibility testing method of a gateway device described in the accompanying drawings when used, and can produce the same technical effects, which will not be repeated here.
[0090] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features invented herein.
Claims
1. A multi-protocol compatibility testing method for a gateway device, characterized in that: The method comprises: Acquire device specification information of a gateway device, analyze the adapted communication protocol corresponding to the gateway device according to the device specification information, construct a protocol test case set corresponding to the gateway device based on the adapted communication protocol, and standardize the test cases in the protocol test case set to obtain a standard protocol test case set; Determine the network access port corresponding to the gateway device, simulate the network transmission scenarios of the network access port under different protocols, collect protocol interaction data under the network transmission scenarios, analyze the preliminary compatibility performance corresponding to the gateway device based on the protocol interaction data, and extract key performance indicators in the preliminary compatibility performance; Based on the key performance indicators, evaluate the overall compatibility data corresponding to the gateway device, analyze the compatibility problem type corresponding to the overall compatibility data, trace the root cause of the gateway device based on the compatibility problem type, and analyze the performance balance point corresponding to the root cause; Based on the performance balance point, determine the resource allocation channel of the gateway device when multiple protocols are running, detect the channel load corresponding to the resource allocation channel, calculate the channel resource utilization corresponding to the resource allocation channel based on the channel load, optimize the monitoring threshold of the gateway device in the resource monitoring process based on the channel resource utilization, and calculate the threshold deviation corresponding to the monitoring threshold; Based on the threshold deviation, an abnormal protocol instruction of the gateway device in multi-protocol operation is generated, the instruction configuration protocol corresponding to the abnormal protocol instruction is queried, the protocol compatibility factor in the instruction configuration protocol is extracted, and based on the protocol compatibility factor, a compatibility test detail list corresponding to the gateway device is generated.
2. A multi-protocol compatibility testing method for a gateway device as claimed in claim 1, characterized in that: The step of constructing a protocol test case set corresponding to the gateway device based on the adapted communication protocol includes: Determining core protocol elements in the adapted communication protocol; Analyze the functional characteristics corresponding to the core protocol elements; According to the functional characteristics, a protocol test architecture corresponding to the adapted communication protocol is constructed; Based on the protocol test architecture, determining the test data requirements corresponding to the gateway device; Based on the test data requirements, a protocol test case set corresponding to the gateway device is constructed.
3. A multi-protocol compatibility testing method for a gateway device as claimed in claim 1, characterized in that: The step of standardizing the test cases in the protocol test case set to obtain a standard protocol test case set includes: Identify the content format structure corresponding to the test case in the protocol test case set; Based on the content format structure, determining original test case information corresponding to the test case in the protocol test case set; Analyze the logical structure of the original use case information; Determine a standard process template corresponding to the logic structure; Mapping and matching the data in the original use case information with the standard process template to obtain mapping differences; Based on the mapping difference points, the test cases in the protocol test case set are standardized to obtain a standard protocol test case set.
4. A multi-protocol compatibility testing method for a gateway device as claimed in claim 1, characterized in that: The analyzing the preliminary compatibility performance corresponding to the gateway device based on the protocol interaction data includes: Extracting key interaction features from the protocol interaction data; Analyzing the communication behavior patterns corresponding to the key interaction features; Based on the communication behavior pattern, identifying compatibility anomalies existing in the gateway device; Analyze the abnormal impact range corresponding to the compatible abnormal point; Based on the abnormal impact range, determining the potential association relationship corresponding to the compatible abnormal point; Based on the potential association relationship, the preliminary compatibility performance corresponding to the gateway device is analyzed.
5. A multi-protocol compatibility testing method for a gateway device as claimed in claim 1, characterized in that: The tracing back the root cause of the gateway device based on the compatibility problem type includes: Identify a set of behavioral performance characteristics corresponding to the compatibility problem type; Analyze the occurrence frequency and distribution of the characteristics of the behavioral performance characteristics; Based on the occurrence frequency and the distribution status, determining an abnormal operation area corresponding to the gateway device; Extracting the operation factor segment in the operation abnormality area; Based on the operation factor segment, the root cause factor corresponding to the gateway device is traced back.
6. A multi-protocol compatibility testing method for a gateway device as claimed in claim 1, characterized in that: The determining, based on the performance balance point, a resource allocation channel of the gateway device when multiple protocols are running, includes: Analyze the key performance dimensions corresponding to the performance balance point; Screening the core elements of resources corresponding to the key performance dimensions; Based on the resource dependency factors, determining resource consumption patterns of the gateway device in different protocol operation scenarios; Querying the adaptation allocation ratio corresponding to the hardware resources in the resource consumption mode; Based on the adaptation allocation ratio, a resource allocation channel of the gateway device when multiple protocols are running is determined.
7. A multi-protocol compatibility testing method for a gateway device as claimed in claim 1, characterized in that: The calculating, based on the channel load condition, the channel resource utilization rate corresponding to the resource allocation channel comprises: The channel resource utilization rate corresponding to the resource allocation channel is calculated using the following formula: in, The channel resource utilization rate corresponding to the resource allocation channel, Indicates the total number of samples of monitoring samples corresponding to the channel load condition, Indicates the number index of monitoring samples, Indicates The weight coefficient corresponding to the monitoring samples is: Indicates The load value corresponding to the monitoring sample is and Respectively represent the start time and end time of the allocation time corresponding to the resource allocation channel, Indicates at time Channel capacity indicator at the moment.
8. A multi-protocol compatibility testing method for a gateway device as claimed in claim 1, characterized in that: The calculating the threshold deviation corresponding to the monitoring threshold includes: The threshold deviation corresponding to the monitoring threshold is calculated using the following formula: in, represents the threshold deviation corresponding to the monitoring threshold, and They represent the end time and start time of calculating the threshold deviation, Indicates at time The monitoring data change rate at each moment, represents the number of data samples corresponding to the monitoring threshold, Represents the number index of data samples, Indicates The sample difference between a data sample and the monitoring threshold, Indicates the stability coefficient of the monitoring environment corresponding to the monitoring threshold.
9. A multi-protocol compatibility testing method for a gateway device as claimed in claim 1, characterized in that: The generating, based on the threshold deviation, an abnormal protocol instruction of the gateway device in multi-protocol operation includes: Querying a key deviation value in the threshold deviation; Based on the key deviation value, analyzing the deviation fluctuation trend corresponding to the threshold deviation; Determining an abnormal deviation interval in the deviation fluctuation trend; Extracting extreme deviation points in the abnormal deviation interval; Based on the extreme deviation point, locate the abnormal fluctuation point of the gateway device in the multi-protocol operation; Based on the abnormal fluctuation point, an abnormal protocol instruction of the gateway device in the multi-protocol operation is generated.
10. A multi-protocol compatibility testing system for a gateway device, characterized in that: A method for performing a multi-protocol compatibility test of a gateway device as claimed in any one of claims 1 to 9, the system comprising: A standard processing module is used to obtain device specification information of a gateway device, analyze the adapted communication protocol corresponding to the gateway device according to the device specification information, construct a protocol test case set corresponding to the gateway device based on the adapted communication protocol, and perform standardization processing on the test cases in the protocol test case set to obtain a standard protocol test case set; An indicator extraction module is used to determine the network access port corresponding to the gateway device, simulate the network transmission scenarios of the network access port under different protocols, collect protocol interaction data under the network transmission scenarios, analyze the preliminary compatibility performance corresponding to the gateway device based on the protocol interaction data, and extract key performance indicators from the preliminary compatibility performance; A balance point extraction module is used to evaluate the overall compatibility data corresponding to the gateway device based on the key performance indicators, analyze the compatibility problem type corresponding to the overall compatibility data, trace the root cause of the gateway device based on the compatibility problem type, and analyze the performance balance point corresponding to the root cause; A deviation calculation module is used to determine the resource allocation channel of the gateway device when multiple protocols are running based on the performance balance point, detect the channel load corresponding to the resource allocation channel, calculate the channel resource utilization corresponding to the resource allocation channel based on the channel load, optimize the monitoring threshold of the gateway device in the resource monitoring process based on the channel resource utilization, and calculate the threshold deviation corresponding to the monitoring threshold; A detailed list generation module is used to generate abnormal protocol instructions for the gateway device in multi-protocol operation based on the threshold deviation, query the instruction configuration protocol corresponding to the abnormal protocol instruction, extract the protocol compatibility factor in the instruction configuration protocol, and generate a compatibility test detailed list corresponding to the gateway device based on the protocol compatibility factor.
Citation Information
Patent Citations
Multi-protocol compatible network equipment adaptive test system and method
CN118101532A
Multi-protocol compatible method and system for cloud edge-end architecture of engineering machinery
CN118714208A
Cross-platform compatibility automatic testing method
CN119336650A
Efficient end-to-end proposal / agreement messaging for spanning tree convergence in a computer network
US20090190503A1
Data link service processing system and method for networked encrypted transmission
WO2023216424A1
Cited By
Cloud platform control system for data acquisition and remote monitoring
CN119987268A
Control method and system of Internet of Things gateway based on AI computing power
CN120090950A
Control Method and System for Internet of Things Gateway Based on AI Computing Power
CN120090950B
Network security protection method and system based on flow analysis
CN120321044A
Method for automatically testing interconnection and intercommunication of heterogeneous terminals of mobile internet operating system
CN121644415A