Method and system for processing communication abnormity of vehicle-mounted power amplifier test software equipment
By adopting a modular architecture and message queue mechanism in the on-board amplifier testing software, the test process lag or unresponsive problems caused by communication exceptions in the prior art are solved, and the system can operate stably and respond efficiently when communication exceptions are achieved.
Patent Information
- Application Number
- CN202411642767.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-28
AI Technical Summary
The existing vehicle-mounted amplifier testing software is difficult to effectively identify the specific equipment that occurs when communication abnormalities are abnormal, resulting in lag or unresponsiveness in the test process. The software architecture does not independently modularly manage each test device, and the timeout handling mechanism for communication abnormalities is incomplete.
Using a modular architecture, each device in the test system is packaged as an independent module. Each submodule and the main module communicate and operate through independent loops, pass information using the message queue mechanism, and set different execution cycles for each module to establish an independent program block diagram to realize independent communication and data processing between modules.
Through the modular architecture and message queue mechanism, the interdependence between modules is reduced, the system stability and scalability is improved, the system can be maintained stable during communication abnormalities, avoid long-term waiting, and improve system fault tolerance and response speed.
Smart Images

Figure CN119728466A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of data processing, and in particular relates to a method and a system for handling communication anomalies of vehicle-mounted power amplifier testing software equipment. Background Art
[0002] The car amplifier test software is used to detect the audio signal output by the car amplifier to ensure that its power output meets the predetermined requirements. To achieve this goal, a variety of test equipment is usually used, such as AP audio analyzer and digital multimeter. The communication method between these test equipment and the computer is mostly RS232, USB, RS485, etc., and the car amplifier test software needs to establish communication with these devices for control.
[0003] Car amplifier testing needs to simulate the performance under various harsh conditions in the car environment, including voltage instability, temperature changes, vibration, voltage fluctuations, etc. The communication and power supply of the equipment fluctuate greatly. General amplifier testing focuses more on sound quality and power performance in a relatively stable environment. Therefore, the complexity and difficulty of car amplifier testing are usually higher than those of general amplifier testing.
[0004] Although the test software of the prior art can detect communication anomalies and issue error prompts when running, when a communication anomaly occurs, the software usually gets stuck in processing the communication anomaly of the device, causing the entire test process to be stuck or unresponsive. In addition, the existing software architecture does not perform independent modular management of each test device, and the timeout processing mechanism for communication anomalies is imperfect. Especially when serious communication anomalies occur, it is difficult for the software to effectively identify the specific device where the anomaly occurs, which in turn affects the overall test efficiency and system response speed.
[0005] Based on the above technical problems, a method and system for handling communication anomalies of power amplifier testing software equipment is proposed. Summary of the invention
[0006] The purpose of the present invention is to provide a method and system for handling communication anomalies of power amplifier testing software equipment, thereby improving the system response speed.
[0007] To solve the above technical problems, the present invention is achieved through the following technical solutions:
[0008] A method for handling communication anomalies of vehicle-mounted power amplifier test software equipment, the method adopts a modular architecture, each device in the test system is packaged as an independent module, and each submodule communicates and operates with the vehicle-mounted power amplifier test software main module through an independent cycle;
[0009] The submodules include an audio generator module, a power supply module, a digital multimeter module, and an audio analyzer module.
[0010] Furthermore, the submodules transmit information to the main module of the vehicle amplifier test software through a message queue mechanism, and different modules are set with different execution cycles.
[0011] Furthermore, the method establishes independent program flowcharts for the vehicle amplifier test software main module, the audio generator module, the power supply module, the digital multimeter module, and the audio analyzer module;
[0012] The program flowchart of the vehicle amplifier test software is the main program flowchart and the others are slave program flowcharts; each test device corresponds to an independent program flowchart, and the main program flowchart is responsible for controlling and scheduling each slave program flowchart;
[0013] The slave program flowchart communicates with the corresponding test equipment, and after executing the instructions, the results are fed back to the main program flowchart through operator messages.
[0014] The present invention discloses another implementation scheme; a vehicle-mounted power amplifier test software device communication abnormality processing system, the system comprising:
[0015] The main module of the vehicle amplifier test software is used to process the user's operation instructions and exchange data with other modules through queues to control the entire test process;
[0016] The submodule communicates and operates with the vehicle amplifier test software main module through an independent loop;
[0017] The power module is used to provide a stable power supply to other test equipment modules, monitor the power status and communicate independently with the main module;
[0018] The audio generator module is used to generate audio signals of different frequencies and amplitudes to simulate the audio input environment. The audio signals are used to perform functional tests on the input of the vehicle amplifier.
[0019] Digital multimeter module, used to measure the electrical parameters of the car amplifier, including voltage, current and resistance, and pass the measured data to the main module through the queue:
[0020] The audio analyzer module is used to analyze the characteristics of the audio output by the vehicle amplifier, including frequency response, distortion and signal-to-noise ratio.
[0021] Beneficial effects:
[0022] 1. This application uses a modular architecture to enable each device to operate independently, and communicates through a message queue mechanism to reduce the mutual dependence between modules. When communication abnormalities occur, other modules can still work normally to ensure stable operation of the system;
[0023] 2. The main module of this application starts timing while sending the task instruction. If no feedback is received within the preset time, the system automatically triggers the timeout processing mechanism, avoiding long waiting times and improving the system's fault tolerance in the event of communication anomalies.
[0024] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0026] Figure 1 Device connection diagram;
[0027] Figure 2 It is the test module diagram;
[0028] Figure 3 This is a module relationship diagram using queue communication;
[0029] Figure 4 This is a module relationship diagram that uses the operator message mechanism for communication;
[0030] Figure 5 Software testing flowchart. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] like Figure 1-Figure 2 As shown in the figure, in the vehicle amplifier test system, the vehicle amplifier test software needs to establish a stable communication connection with multiple test equipment to ensure the normal operation and data transmission of each test equipment. In this system, the vehicle amplifier test software collects equipment data and executes corresponding test instructions through real-time communication with various test equipment (such as power supply equipment, audio analyzer, audio generator and digital multimeter, etc.). The stability of communication is the key to ensure the normal operation of the system. Once a communication abnormality occurs, it may cause the software performance to decline, or even cause unresponsiveness or freeze.
[0033] Against the above background, the present invention discloses a method for handling communication exceptions in power amplifier test software equipment. The method adopts a modular architecture, packages each device in the test system as an independent module, and each module communicates and operates through an independent loop: under this architecture, data is transmitted between modules through queues, allowing each module to execute tasks independently without directly relying on the execution status or results of other modules, thereby improving the stability and scalability of the system.
[0034] like Figure 3 As shown, the architecture of the vehicle amplifier test software equipment communication exception handling system constructed according to the above method is as follows;
[0035] The vehicle amplifier test system includes the following modules:
[0036] The main module of the vehicle amplifier test software is mainly responsible for processing the user's operations through the front panel, and the processing results are transmitted to each test equipment module through the queue.
[0037] The power module is responsible for communicating and controlling the power supply in the test system, and is mainly used to provide a stable power supply for other equipment modules. It can monitor the power supply status, such as voltage, current and other parameters, and execute related control instructions as needed. When the system is running, the execution cycle of the power module is relatively long, which can be set to 1003ms, and it maintains independent communication with other modules. Even if an abnormality occurs, the overall execution of the test system will not be significantly affected.
[0038] The audio generator module is used to generate various test audio signals, which are used as inputs to the vehicle amplifier under test, so as to perform audio-related functional tests. It can output audio signals of different frequencies and amplitudes to simulate the actual audio input environment. The audio generator module exchanges signal data with the main module through a queue.
[0039] The digital multimeter module is used to measure the electrical parameters of the tested vehicle amplifier, such as voltage, current, resistance, etc. By accurately measuring these electrical characteristics, the performance and stability of the device can be evaluated. The digital multimeter module communicates independently with other modules, and the measurement results are transmitted to the main module through a queue for further analysis and judgment.
[0040] The audio analyzer module is mainly used to analyze the quality and characteristics of the audio output by the tested vehicle amplifier, including parameters such as frequency response, distortion, signal-to-noise ratio, etc. The audio analyzer module can operate independently by exchanging data with the main module through the queue, ensuring the reliability and accuracy of the test process.
[0041] Each module runs independently in cycles, for example, the execution cycle of the main module is 20ms, and the execution cycle of the power module is 1003ms. Data interaction between modules is achieved through message queues, thus ensuring that the task execution of each module does not affect each other and has efficient concurrent processing capabilities.
[0042] The power module, audio generator module, digital multimeter module, and audio analyzer module are defined as having the same priority, and the specific execution is defined in the main module according to the usage scenario.
[0043] In order to verify the response speed of the above method, the communication line of the power supply end is disconnected to conduct an experiment. In actual operation, the communication line of the power module is disconnected to conduct the following experiment:
[0044] When the power module loses communication with the rest of the test system, the power module is no longer under control.
[0045] The execution cycle of the main module of the vehicle amplifier test software was not affected by the abnormal communication of the power module, and each module of the system continued to operate according to the predetermined cycle.
[0046] The test shows that the abnormal communication between the power module and the main module of the vehicle amplifier test software and other devices will not affect the overall execution cycle of the vehicle amplifier test software. In the case of abnormal communication with the power module, the main module of the vehicle amplifier test software can still execute tasks according to the cycle of 20ms, while the execution cycle of the power module is 1003ms, remaining independent.
[0047] Furthermore, the data transmission and communication in the above system can adopt RS232, USB, RS485 and the like.
[0048] like Figure 5 As shown, the test steps of the above system are as follows:
[0049] Initialization: Before running the vehicle amplifier test software, you need to power on the device in advance. After running the software, the software stays in the main module of the vehicle amplifier test software. The main module receives the execution instruction and sends the instruction to the sub-module.
[0050] The power module, audio generator module, digital multimeter module, and audio analyzer module in the submodule define priorities. They can be set to the same priority, and the specific execution depends on the usage scenario and is defined in the main module.
[0051] After the test is completed, close the software and power off the device.
[0052] One solution disclosed herein, such as Figure 4As shown in the figure, a vehicle amplifier test software equipment communication abnormality processing system adopts a program flowchart and an operator message mechanism to realize the independent communication and data processing of each test module. In this system, the vehicle amplifier test software acts as the main control unit, and manages and coordinates the work of each test equipment module through operator messages, thereby ensuring that the system can still maintain stable operation when a module has abnormal communication.
[0053] The power amplifier test software equipment communication exception handling system consists of multiple test equipment modules, including:
[0054] Car amplifier test software program flowchart, power module program flowchart, audio generator module program flowchart, digital multimeter module program flowchart, audio analyzer module program flowchart, among which the car amplifier test software program flowchart is the main program flowchart and the others are slave program flowcharts;
[0055] Furthermore, in some implementations, the communication data between modules is transmitted using a cluster data structure, and the cluster contains two variables: a string variable and a variant variable. The string is used to cache and transmit instructions, such as operation commands such as "start test"; the variant is used to store corresponding data or results, such as the voltage value of the power amplifier device, audio signal parameters, etc. Through this structure, different types of instructions and data transmission requirements can be flexibly responded to.
[0056] When each module receives a cluster containing instructions from the main module or other modules, it will parse and convert the instruction content into the specific instructions required by the device, and then start to execute the corresponding operation or test task, ensuring the stability and efficiency of the system.
[0057] Each test device corresponds to an independent flowchart. The master flowchart is responsible for controlling and scheduling each slave flowchart. Communication and data transfer between modules are achieved through operator messages to ensure the independence of each module.
[0058] The main flowchart sends operator messages to the slave flowchart according to system requirements, indicating specific operation tasks;
[0059] The slave program flowchart communicates with the corresponding test equipment, and after executing the instructions, the results are fed back to the main program flowchart through operator messages.
[0060] Furthermore, in order to prevent the system from waiting for a long time in the event of abnormal communication, the main program flowchart sets a timeout mechanism:
[0061] Whenever the master block diagram sends a task instruction to the slave block diagram, the timing starts at the same time. If the slave block diagram does not feedback data within the set time, the master block diagram will trigger the timeout processing mechanism, stop waiting and continue to execute other tasks. This mechanism ensures that the system will not stop the execution of the entire process due to abnormal communication of a module.
[0062] Effect test: Perform an abnormality test by disconnecting the communication line of the power module:
[0063] The results show that when the power module communication is abnormal, the power module cannot be controlled, but other test equipment modules can still perform tasks normally and maintain communication with the main program flowchart through operator messages.
[0064] When the serial port line at the power supply end is disconnected, the power supply cannot receive the instructions sent from the computer end, and the software cannot receive data. It will remain in the data receiving state until it times out and the data receiving function returns an error. During this period, the entire data stream is blocked in the data receiving function, which also verifies that the data receiving function is used for too long, affecting the efficiency of software execution, resulting in slow response or no response. With the current solution, even if communication anomalies occur, the software will not respond slowly or unresponsively.
[0065] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0066] The preferred embodiments of the present invention disclosed above are only used to help illustrate the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method for handling communication anomalies of vehicle-mounted power amplifier test software equipment, characterized in that: The method adopts a modular architecture, and each device in the test system is packaged as an independent module, and each submodule communicates and operates with the main module of the vehicle amplifier test software through an independent loop; The submodules include an audio generator module, a power supply module, a digital multimeter module, and an audio analyzer module.
2. The method for handling communication anomalies of vehicle-mounted power amplifier test software equipment according to claim 1, characterized in that: The submodules transmit information to the main module of the vehicle amplifier test software through a message queue mechanism, and different modules are set with different execution cycles.
3. The method for handling communication anomalies of vehicle-mounted power amplifier test software equipment according to claim 1, characterized in that: The method establishes independent program flowcharts for the vehicle amplifier test software main module, the audio generator module, the power supply module, the digital multimeter module, and the audio analyzer module; The program flowchart of the vehicle amplifier test software is the main program flowchart and the others are slave program flowcharts; each test device corresponds to an independent program flowchart, and the main program flowchart is responsible for controlling and scheduling each slave program flowchart; The slave program flowchart communicates with the corresponding test equipment, and after executing the instructions, the results are fed back to the main program flowchart through operator messages.
4. The method for handling communication anomalies of vehicle-mounted power amplifier test software equipment according to claim 3, characterized in that: The main program flowchart starts timing while sending task instructions to the slave program flowchart; If the slave flowchart does not feedback data within the preset time, the master flowchart triggers the timeout processing mechanism; After the timeout mechanism is triggered, the main program flowchart stops waiting for the response from the slave program flowchart and continues to execute other tasks.
5. The method for handling communication anomalies of vehicle-mounted power amplifier test software equipment according to claim 2, characterized in that: The execution cycle of the power module is set to 1003ms, and the execution cycle of the main module is set to 20ms.
6. The method for handling communication anomalies of vehicle-mounted power amplifier test software equipment according to claim 2 or 3, characterized in that: The power supply module is used to communicate and control the power supply equipment in the test system to provide a stable power supply.
7. The method for handling communication anomalies of vehicle-mounted power amplifier test software equipment according to claim 2 or 3, characterized in that: The audio generator module is used to generate audio signals of different frequencies and amplitudes, and simulate an audio input environment to perform a functional test on the vehicle amplifier.
8. The method for handling communication anomalies of vehicle-mounted power amplifier test software equipment according to claim 2 or 3, characterized in that: The digital multimeter module is used to measure the electrical parameters of the vehicle-mounted power amplifier, including voltage, current and resistance parameters, and evaluate the performance and stability of the power amplifier.
9. The method for handling communication anomalies of vehicle-mounted power amplifier test software equipment according to claim 2 or 3, characterized in that: The audio analyzer module is used to analyze the output audio signal of the vehicle amplifier, including frequency response, distortion and signal-to-noise ratio, to ensure the quality of the audio output.
10. A vehicle-mounted power amplifier test software equipment communication abnormality processing system, characterized in that: The system comprises: The main module of the vehicle amplifier test software is used to process the user's operation instructions and exchange data with other modules through queues to control the entire test process; The submodule communicates and operates with the vehicle amplifier test software main module through an independent loop; The power module is used to provide a stable power supply to other test equipment modules, monitor the power status and communicate independently with the main module; The audio generator module is used to generate audio signals of different frequencies and amplitudes to simulate the audio input environment. The audio signals are used to perform functional tests on the input of the vehicle amplifier. Digital multimeter module, used to measure the electrical parameters of the car amplifier, including voltage, current and resistance, and pass the measured data to the main module through the queue: The audio analyzer module is used to analyze the characteristics of the audio output by the vehicle amplifier, including frequency response, distortion and signal-to-noise ratio.