System and method for testing communication simulator equipment

By adopting B/S architecture and embedded Web servers in communication simulator devices, the problems of high deployment and maintenance costs and poor cross-platformity of traditional test systems are solved, and convenient device information interaction and efficient instruction control are achieved.

CN119854279APending Publication Date: 2025-04-18杭州长望智创科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411762772.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

Traditional testing systems have high deployment and maintenance costs, poor cross-platform performance, and limited user usage, making it difficult to achieve convenient device information interaction and command control.

Method used

The communication simulator device test system adopts B/S architecture. Through the embedded Web server and CGI interface module, users access the Web server on the hardware platform in a standard browser to realize device information interaction.

Benefits of technology

It reduces deployment and maintenance costs, improves cross-platform usability and user experience, and realizes convenient device information interaction and efficient command control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119854279A_ABST
    Figure CN119854279A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of test systems, and particularly relates to a test system and method for communication simulator equipment, and the system comprises an embedded hardware platform which comprises a processor, a memory and a plurality of interface modules. The embedded Web server and the CGI interface module are deployed on the processor; and a client browser; wherein the embedded Web server is used for receiving a static file request and a dynamic file request sent by the client browser, directly returning stored file content for the static file request, processing the dynamic file request through the CGI interface module and then returning a processing result. A B / S architecture mode is adopted, a user opens a standard browser on a computer display terminal to input a website to access an embedded Web server constructed on a hardware platform, and information interaction of equipment is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of test systems, and in particular relates to a test system and method for communication simulator equipment. Background Art

[0002] The parameter configuration and status monitoring of traditional test systems mostly use the communication between the host computer and the slave computer to realize the information interaction and command control of the equipment. The host computer is mainly responsible for the issuance of parameters, the collection, analysis, display and storage of the data collected by the slave computer, etc. The slave computer is mainly responsible for the collection of sensor signals, the reception and forwarding of I / O port signals or other external data, etc. The main disadvantages of this test system composed of a host computer and a slave computer are as follows: 1. High deployment and maintenance costs: There are high requirements for the hardware configuration of the host computer (usually a general-purpose computer), and the host computer software needs to be installed on each computer used, and the software update and maintenance are relatively cumbersome; 2. Poor cross-platform performance: It is usually developed for a specific operating system and is difficult to be used between different operating systems; 3. User use is limited: users can only operate on specific computers with the host computer software installed. Summary of the invention

[0003] Purpose of the invention: The purpose of the present invention is to address the deficiencies in the prior art and to provide a testing system and method for a communication simulator device, which adopts a B / S architecture. Users open a standard browser on a computer display terminal and enter a URL to access an embedded Web server that has been built on a hardware platform, thereby facilitating information interaction with the device.

[0004] Technical solution: The communication simulator device test system and method of the present invention include: an embedded hardware platform, the embedded hardware platform includes a processor, a memory and a plurality of interface modules; an embedded Web server and a CGI interface module deployed on the processor; and a client browser; The embedded Web server is used to receive static file requests and dynamic file requests sent by the client browser, directly return the stored file content for static file requests, and return the processing result after processing the dynamic file request through the CGI interface module.

[0005] To further improve the above technical solution, the processor of the embedded hardware platform is an AM3354 processor, the memory includes 1GB DDR3 memory and 256MB Nand Flash, and the AM3354 processor runs a Linux operating system.

[0006] Furthermore, the various interface modules include: an Ethernet interface for data communication; a storage interface for data storage; an audio interface for audio processing; a keyboard interface for input; a 16-bit TFT display interface for display; an 8-way digital I / O interface for signal acquisition; and an RS-232 serial port for serial communication.

[0007] Furthermore, the embedded Web server is a Boa server, including: a server configuration module, used to load configuration files and set access permissions; a static file service module, used to process static file requests; a dynamic request processing module, used to manage CGI processes and process dynamic requests; a server status monitoring module, used to monitor the operating parameters of the server in real time, and judge the load status of the server according to a preset response time ratio threshold; and a task scheduling and weight adjustment module, used to dynamically adjust the task scheduling strategy and weight distribution according to the real-time load conditions of the server.

[0008] Furthermore, the CGI interface module includes: an input processing unit, which is used to parse HTTP requests and extract request parameters; an environment variable processing unit, which is used to parse HTTP request headers, extract environment variable information, set response headers as needed, and pass the environment variable information to the embedded Web server and the output generation module; an output generation unit, which is used to receive the processing results of the embedded Web server, generate dynamic response content according to the processing results, format the response content and return an HTML response; and an error processing unit, which captures abnormal situations in the request processing process and generates an error response according to the type of abnormal situation.

[0009] The working method of the test system using the above communication simulator device comprises the following steps: The embedded hardware platform starts and loads the Linux operating system; Compile the BOA server source code in a virtual machine environment and port the compiled executable file to the embedded hardware platform; Configure the BOA server operating environment and deploy static files and CGI interface programs; Receive requests sent by client browsers; Determine the request type and perform corresponding processing: for static file requests, directly return the file content; for dynamic file requests, create a CGI process for processing; the creation of the CGI process for processing includes: parsing request parameters, executing corresponding control commands or status queries, formatting processing results, and generating HTML format responses; The processing result is returned to the client browser.

[0010] Furthermore, the compilation of the BOA server source code and the porting of the compiled executable file to the embedded hardware platform include: downloading and decompressing the specified version of the BOA server source code package to obtain the source code file; installing the ARM architecture cross-compilation tool chain to support the compilation of executable files suitable for the target hardware platform in a non-ARM environment, the cross-compilation tool is arm-linux-gnueabi-gcc; modifying the source code file of the BOA server to ensure that the source code is correctly compiled and run on the target platform; generating a Makefile file adapted to the target platform, and modifying the configuration of the compiler and preprocessor in the generated Makefile file to compile the executable file for the ARM architecture; customizing the behavior of the server by modifying the BOA configuration file boa.conf; and copying the cross-compiled BOA server files and configuration files to the corresponding system directory on the embedded hardware platform to ensure that the BOA server can be started and work normally in the Linux environment of the embedded hardware platform.

[0011] Furthermore, the open source tool Nginx is used to build a load balancer, and the decision tree model and genetic algorithm are integrated into the load balancer to optimize the load balancing strategy for dynamic scheduling of requests.

[0012] Further, a decision tree model is used to analyze each request to generate a prediction result of which backend server the request is distributed to; the decision tree model is obtained by training historical load data and server selection results; According to the prediction results, dynamically adjust the load distribution strategy of the backend server to optimize the distribution of requests; Among multiple load balancing strategies, a genetic algorithm is used for optimization. The genetic algorithm encodes and selects the parameters of the load balancing strategy, uses a fitness function to evaluate the effects of different strategies, and adjusts the weight and priority of the load balancing strategy according to the evaluation results to improve the overall performance and resource utilization; The optimized load balancing strategy is deployed to the load balancer, and the load balancer dynamically schedules requests according to the load balancing strategy and adjusts the requests to be distributed to different backend servers in real time.

[0013] Furthermore, the configuration of the load balancer can be dynamically modified through external interfaces or automated scripts, and the load balancing strategy can be automatically adjusted based on real-time performance data to ensure high availability and low-latency response of the system.

[0014] The resource management and load balancing mechanism of the Boa server are improved through load balancing methods, thereby improving the client access speed and quality in high-concurrency scenarios. Server status monitoring: Real-time monitoring of the operating parameters of the back-end server (such as CPU utilization, memory usage, etc.), and judging the server load status based on the preset response time ratio threshold. Task scheduling and weight adjustment: Dynamically adjust the task scheduling strategy and weight distribution according to the real-time load of the server to ensure load balancing. Load balancing method: Dynamically allocate computing resources according to the real-time load to meet user access needs. At the same time, cache static resources such as graphics, CSS, and JavaScript files on the CDN to reduce the server's bandwidth requirements and speed up page loading.

[0015] Beneficial effects: Compared with the prior art, the advantages of the present invention are: 1. Easy deployment and maintenance. No dedicated host device and special application software are required. Using the B / S (browser / server) architecture, users can open a standard browser on a computer display terminal, enter a URL to access the embedded Web server built on the hardware platform, and then interact with the device. Only updates and maintenance are required on the server side, and no additional software needs to be installed on the user side.

[0016] 2. One computer can access multiple communication simulator devices at the same time. The client can access different IP addresses to achieve convenient switching or simultaneous access to communication simulator devices with different IP addresses.

[0017] 3. Flexible dynamic content generation. It can generate dynamic web pages in real time to meet the needs of real-time information display and command interaction.

[0018] 4. Cross-platform use. The client can run across operating systems and devices (as long as the operating system has a standard browser and network interface).

[0019] 5. By introducing a model algorithm based on machine learning, the Boa server can achieve better resource management and load balancing mechanisms in high-concurrency scenarios. This not only improves the system's response speed and throughput, but also enhances the system's scalability and fault tolerance. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a composition diagram of the communication simulator test system of the present invention; Figure 2 It is a hardware architecture diagram of the communication simulator test system of the present invention; Figure 3 It is a communication simulator test system web software workflow diagram of the present invention; Figure 4 It is a working principle diagram of the embedded boa server of the present invention; Figure 5 It is a CGI interface executable file workflow diagram of the present invention; Figure 6 It is a schematic diagram of a login interface of a communication simulator test system of the present invention; Figure 7 It is a scanning schematic diagram of the communication simulator test system of the present invention. DETAILED DESCRIPTION

[0021] The technical solution of the present invention is described in detail below with reference to the accompanying drawings, but the protection scope of the present invention is not limited to the embodiments.

[0022] Example 1: The test system of this communication simulator adopts a front-end and back-end separation design (B / S architecture). Users access the embedded web server built into the communication simulator device through a standard browser to achieve device parameter setting and status monitoring. The system mainly consists of an embedded hardware platform with an embedded web server (boa server) and a computer with a standard browser and Ethernet interface, such as Figure 1 shown.

[0023] 1. System hardware platform design The hardware platform of this test system uses TI's AM3354 processor as the main controller, which runs at a frequency of up to 1GHz, provides 1GB of DDR3 memory, 256MB of NandFlash, and is equipped with Linux3.2 operating system. The hardware architecture is as follows: Figure 2 As shown, the following interfaces are implemented through corresponding external extensions: 1. Ethernet interface: information interaction with the user's computer (browser), reception and transmission of external data are realized through the Ethernet port; 2. Storage interface: File storage is achieved through built-in Nand Flash and extended SD interface with additional storage; 3. Audio interface: control and output of audio signals through the audio interface; 4. Keyboard interface: keyboard information processing is realized through the keyboard interface; 5. Display interface: control and output of 16-bit TFT display signal is realized through the display interface; 6. Power interface: The power interface is used to realize power on, power off and power management of the hardware platform; 7. I / O interface: realize signal acquisition and processing through 8-channel digital I / O; 8. Serial port: Serial data is sent, received and processed through the RS-232 serial port.

[0024] 2. System Software Design The web server implanted in this test system uses the Boa server, which is an open source server with the advantages of being lightweight, easy to configure and deploy, and fast in response. The Boa server includes: a server configuration module for loading configuration files and setting access permissions; a static file service module for processing static file requests; a dynamic request processing module for managing CGI processes and processing dynamic requests; a server status monitoring module for real-time monitoring of the server's operating parameters and judging the server's load status based on a preset response time ratio threshold; and a task scheduling and weight adjustment module for dynamically adjusting the task scheduling strategy and weight distribution based on the server's real-time load.

[0025] The Boa server is deployed in the Linux system based on the hardware platform of TI's AM3354 processor. At the same time, static HTML web pages, CSS, pictures and other files are also stored in the Linux system to respond to the browser's static file requests. When there is a browser dynamic file reading request, the Boa server forks a new process for the CGI request (dynamic file) to execute the CGI script and return the output to the browser. The CGI general gateway interface module is an external extension application. It is a standard interface for interacting with the embedded Web server. It can process the data input by the client browser and feed back the generated information to the user end in the form of HTML document format, thereby completing the interaction between the user end and the Web server.

[0026] The workflow of the Web service software system is as follows Figure 3 As shown, the server is initialized, the server listens to the port, and makes a connection judgment. If it fails, it returns to listening. If successful, the client sends an HTTP request through the browser, the server receives the client request, parses the request, processes the request, and judges the type of the requested file. If it is a dynamic file, the CGI program is called. If it is a static file, static HTML, CSS, pictures and other files are read, a response is generated according to the file type, a response is sent, and the connection is closed.

[0027] The working principle of embedded BOA server is as follows Figure 4 , the user's browser sends an HTTP request to the embedded boa server, which has a built-in backend server, CGI script, and file system.

[0028] The communication simulator test system based on boa server mainly includes the construction of boa server, the writing of static web page files and the writing of dynamic response program CGI files.

[0029] 1. Construction of boa server Due to the limited resources of the hardware platform, the system files of the boa server and the target files of the test system are first compiled on the virtual machine, and then transplanted to the embedded Linux system. The specific implementation method in this test system is: on the virtual machine ubuntu (version number: 22.04.1), the cross-compilation tool arm-linux-gnueabi-gcc (version number: 11.3.0) is used to compile the resource files and interface CGI files of the boa server, and then transplanted to the embedded Linux system of the hardware platform.

[0030] Production of boa server resource files on virtual machines 1) Download the boa-0.94.13.tar.gz source package and decompress it.

[0031] tar–xvzf boa-0.94.13.tar.gz 2) Install the cross-compilation tool: sudo apt-get install arm-linux-gnueabi-gcc 3) Modify system files: a. Change the #define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff statement in the compat.h file Modify to #define TIMEZONE_OFFSET(foo) (foo)->tm_gmtoff b. Comment out the following two statements in the log.c file: / *if (dup2(error_log, STDERR_FILENO) == -1) {undefined DIE("unable to dup2 the error log"); }* / c. Comment out the following two statements in the boa.c file: #if 0 if (passwdbuf == NULL) {undefined DIE("getpwuid"); } if (initgroups(passwdbuf->pw_name, passwdbuf->pw_gid) == -1){undefined DIE("initgroups"); } #endif 4) Go to the src directory and run the . / configure script, then modify the generated Makefile.

[0032] Use the . / configure command to generate the Makefile file.

[0033] Modify the Makefile: CC = gcc is changed to CC = arm-linux-gnueabi-gcc CPP = gcc -E Change to CC = arm-linux-gnueabi-gcc -E After successful compilation, the executable file boa is obtained in the src directory.

[0034] 5) Modify the boa server configuration file boa.conf as follows: a. Group modification Modify Group nogroup Group 0 b. Modification of user Modify User nobody For User 0 c. Modification of ScriptAlias Modification: ScriptAlias ​​ / cgi-bin / / usr / lib / cgi-bin / is: ScriptAlias ​​ / cgi-bin / / www / cgi-bin / d. Modification of DoucmentRoot DoucmentRoot / var / www e. Setting ServerName Modify #ServerName www.your.org.here ServerName www.your.org.here f. AccessLog modification Modify AccessLog / var / log / boa / access_log For: #AccessLog / var / log / boa / access_log 2. Transplantation of boa server 1) Create a directory / etc / boa in the Linux operating system of the hardware platform and copy the cross-compiled boa file and configuration boa.conf on the virtual machine to this directory; 2) Copy the boa file to the / bin directory of the Linux operating system on the hardware platform; 3) Copy the boa server system file mime.types to the / etc directory of the Linux operating system on the hardware platform.

[0035] 3. CGI interface executable file The CGI interface executable file mainly includes input processing module, environment variable processing module, output generation module, error processing module, etc. The basic workflow of the CGI interface executable file is as follows Figure 5 shown.

[0036] The client sends an HTTP request (a URL pointing to the CGI program) through the browser; The server receives the client request and parses it; Server environment variable settings (such as server port, query string, request method, content type, etc.); The server calls the CGI program by forking a new process; The CGI program reads the client's POST request data and outputs it to standard output; The CGI program is executed in sequence according to its functions; Add HTTP response headers back to the server; The client page is displayed.

[0037] Execution effect example: the user enters the server IP address in the computer browser, enters the user name and password on the login page, and then enters the navigation homepage to see the parameter setting and monitoring page, such as Figure 6 , Figure 7 shown.

[0038] The communication simulator test system based on the embedded BOA server adopts a lightweight web server design, which occupies less memory and CPU resources and can run on limited hardware resources, reducing the hardware procurement cost; the client of the test system does not rely on the resource configuration of the hardware device, uses a standard web browser to interact with the device, and does not need to install dedicated application software, saving operation and use costs; the server's functions and performance can be expanded relatively easily without large-scale hardware replacement, reducing the cost of upgrading.

[0039] Embodiment 2: Use the open source tool Nginx to build a load balancer, and integrate the decision tree model and genetic algorithm in the load balancer to optimize the load balancing strategy for dynamic scheduling of requests.

[0040] Install Nginx: In the embedded Linux system, install Nginx through the package manager or source code, and ensure that it supports load balancing function; Configure Nginx load balancing: In the Nginx configuration file (nginx.conf), define upstream and load balancing strategies. Assume there are two backend servers (server1 and server2); Load balancing decisions are optimized by integrating decision tree (DT) and genetic algorithm (GA).

[0041] 1. Data collection and feature extraction The load balancing model needs to make decisions based on the current status of the server. These statuses can include: CPU usage, memory usage, network bandwidth, request response time, and current number of connections of each server. These data are collected through monitoring tools (such as top, iotop, netstat, etc.) and used as input features of the machine learning model.

[0042] 2. Decision Tree (DT) Model The decision tree model can decide which server to distribute the request to based on the current load and network status: Training data: collect a certain amount of load data and corresponding server selection results for training the decision tree model; Feature selection: Select features related to server load and performance (such as CPU usage, memory usage, network bandwidth, etc.); Model training: Use historical data to train the decision tree model using Python’s scikit-learn library; Deploy the model: Export the trained decision tree model and integrate it into the control logic of the load balancer for dynamic scheduling decisions.

[0043] 3. Genetic Algorithm (GA) Optimize Load Balancing Genetic algorithms can be used to optimize the parameters of load balancing strategies (such as request distribution weights, server load thresholds, etc.): Encoding: Encode the load balancing policy parameters (e.g., the load threshold of each server) into a genome; Fitness function: The fitness function measures the quality of the current strategy. The fitness is calculated based on the following criteria: server response time, load balancing fairness (ensuring that each server is evenly loaded), processing power (CPU, memory and other resource utilization); Genetic algorithm implementation: Use genetic algorithms to select the optimal load balancing strategy, such as Python's DEAP library can be used to implement genetic algorithms; Deploy genetic algorithms: The strategy optimized by genetic algorithms can be used in conjunction with Nginx configuration to dynamically adjust request distribution under different server load conditions.

[0044] 4. Dynamic scheduling implementation Based on the results of machine learning models (such as decision trees) and genetic algorithm optimization, the Nginx configuration file can be dynamically adjusted: Decision tree scheduling: Based on the current status of the server, the decision tree model decides which server to distribute the request to; Genetic algorithm scheduling: Use genetic algorithm optimized parameters to adjust Nginx's load balancing strategy, such as modifying the weight of the upstream part; You can modify the Nginx configuration file dynamically through scripts or API, and then reload the Nginx configuration.

[0045] As described above, although the present invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the present invention itself. Various changes in form and details may be made without departing from the spirit and scope of the present invention as defined in the appended claims.

Claims

1. A test system for a communication simulator device, characterized in that: include: An embedded hardware platform, comprising a processor, a memory and a plurality of interface modules; An embedded Web server and a CGI interface module deployed on the processor; as well as Client browser; The embedded Web server is used to receive static file requests and dynamic file requests sent by the client browser, directly return the stored file content for static file requests, and return the processing result after processing the dynamic file request through the CGI interface module.

2. The test system of the communication simulator device according to claim 1, characterized in that: The processor of the embedded hardware platform is an AM3354 processor, the memory includes 1GB DDR3 memory and 256MB Nand Flash, and the AM3354 processor runs a Linux operating system.

3. The test system of the communication simulator device according to claim 1, characterized in that: The various interface modules include: Ethernet interface for data communication; Storage interface for data storage; Audio interface for audio processing; A keyboard interface for input; 16-bit TFT display interface for display; 8-channel digital I / O interface for signal acquisition; and RS-232 serial port for serial communications.

4. The test system of the communication simulator device according to claim 1, characterized in that: The embedded Web server is a Boa server, comprising: Server configuration module, used to load configuration files and set access permissions; Static file service module, used to process static file requests; Dynamic request processing module, used to manage CGI processes and process dynamic requests; A server status monitoring module is used to monitor the operating parameters of the server in real time and determine the load status of the server according to a preset response time ratio threshold; and The task scheduling and weight adjustment module is used to dynamically adjust the task scheduling strategy and weight distribution according to the real-time load of the server.

5. The test system of the communication simulator device according to claim 1, characterized in that: The CGI interface module includes: Input processing unit, used to parse HTTP requests and extract request parameters; An environment variable processing unit, used for parsing HTTP request headers, extracting environment variable information, setting response headers as needed, and passing the environment variable information to the embedded Web server and output generation module; an output generation unit, configured to receive a processing result of the embedded Web server, generate dynamic response content according to the processing result, format the response content and return an HTML response; and The error handling unit captures exceptions during request processing and generates error responses based on the type of exception.

6. The working method of the test system of the communication simulator device according to claim 1, characterized in that: The following steps are involved: The embedded hardware platform starts and loads the Linux operating system; Compile the BOA server source code in a virtual machine environment and port the compiled executable file to the embedded hardware platform; Configure the BOA server operating environment and deploy static files and CGI interface programs; Receive requests sent by client browsers; Determine the request type and process it accordingly: For static file requests, directly return the file content; For dynamic file requests, a CGI process is created to handle them; The creation of a CGI process for processing includes: parsing request parameters, executing corresponding control commands or status queries, formatting processing results, and generating HTML format responses; The processing result is returned to the client browser.

7. The working method according to claim 6, characterized in that: The step of compiling the BOA server source code and porting the compiled executable file to the embedded hardware platform includes: Download and decompress the specified version of the BOA server source code package to obtain the source code file; Install the cross-compilation tool chain for the ARM architecture to support compiling executable files suitable for the target hardware platform in a non-ARM environment. The cross-compilation tool is arm-linux-gnueabi-gcc; Modify the BOA server source code files to ensure that the source code compiles and runs correctly on the target platform; Generate a Makefile file that adapts to the target platform, and modify the configuration of the compiler and preprocessor in the generated Makefile file to compile executable files for the ARM architecture; Customize the server's behavior by modifying the BOA configuration file boa.conf; Copy the cross-compiled BOA server files and configuration files to the corresponding system directory on the embedded hardware platform to ensure that the BOA server can be started and work properly in the Linux environment of the embedded hardware platform.

8. The working method according to claim 6, characterized in that: Use the open source tool Nginx to build a load balancer, integrate the decision tree model and genetic algorithm into the load balancer to optimize the load balancing strategy for dynamic scheduling of requests.

9. The working method according to claim 8, characterized in that: Analyze each request using a decision tree model to generate a prediction result of which backend server the request will be distributed to; the decision tree model is obtained by training historical load data and server selection results; According to the prediction results, dynamically adjust the load distribution strategy of the backend server to optimize the distribution of requests; Among multiple load balancing strategies, a genetic algorithm is used for optimization. The genetic algorithm encodes and selects the parameters of the load balancing strategy, uses a fitness function to evaluate the effects of different strategies, and adjusts the weight and priority of the load balancing strategy according to the evaluation results to improve the overall performance and resource utilization; The optimized load balancing strategy is deployed to the load balancer, and the load balancer dynamically schedules requests according to the load balancing strategy and adjusts the requests to be distributed to different backend servers in real time.

10. The working method according to claim 8, characterized in that: Dynamically modify the load balancer configuration through external interfaces or automated scripts, and automatically adjust the load balancing strategy based on real-time performance data to ensure high availability and low-latency response of the system.