Vehicle machine screen click simulation system and method
Through the design of the vehicle screen, click the simulation system, using serial communication and circuit control modules to realize the simulation of the vehicle screen, solve the problem that the ADB cannot take effect during the test process, and improve the test efficiency and accuracy.
Patent Information
- Application Number
- CN202411351116.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-24
AI Technical Summary
During the car test, after activating the parking function, the ADB cannot take effect. Clicks on the physical level are required to complete the test. However, manual clicks are time-consuming and labor-intensive, and you need to click on the designated area within the specified time to complete the specified function test. , click too early, click too late, or accidentally touch will cause the test to fail.
A vehicle screen click simulation system is designed, including a serial communication module, a central control module, a circuit control module and multiple screen click modules. The serial communication module receives screen click instructions sent by the host computer through the serial communication module, and the central control module parses the instructions and generates Target control signal, the circuit control module sends an activation signal to the screen click module to achieve simulated clicks on the car screen.
During the test process, the simulated click system was used to make up for the shortcomings of ADB, realizing the automation and efficiency of clicks on the car screen, improving test efficiency, and reducing the time and energy of manual clicks.
Smart Images

Figure CN119356966A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle-mounted testing technology, and in particular to a vehicle-mounted screen click simulation system and method. Background Art
[0002] As cars become increasingly electrified and intelligent, human-computer interaction methods are gradually being replaced by screens instead of buttons and knobs. At the same time, more and more functions are completed by clicking on the screen. The testing of these functions inevitably involves screen clicks. Currently, car computer systems are basically Android systems, and simulated screen clicks can be completed through ADB (Android Dedug Bridge).
[0003] However, during the actual testing process, after activating the parking function, many test items still require clicking on the large screen of the car computer, but ADB cannot take effect at this time, and physical clicks are required to complete the test. Manual clicks are time-consuming and laborious, and it is necessary to click on the designated area within the specified time to complete the specified function test. Clicking too early, clicking too late or accidentally touching will cause the test to fail. How to compensate for the shortcomings of ADB during the test process, simulate clicks on the car screen, and improve test efficiency has become an urgent problem to be solved.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of this application is to provide a vehicle screen click simulation system and method, aiming to solve the technical problem of how to compensate for the deficiencies of ADB during the test process, simulate the vehicle screen clicks, and improve the test efficiency.
[0006] To achieve the above purpose, the present application proposes a vehicle screen click simulation system, the vehicle screen click simulation system comprising a serial communication module, a central control module, a circuit control module and a plurality of screen click modules connected to the circuit control module in sequence;
[0007] The serial port communication module is used to convert the screen click instruction sent by the host computer into a target serial port instruction when receiving the screen click instruction sent by the host computer, and send the target serial port instruction to the central control module;
[0008] The central control module is used to parse the target serial port command upon receiving the target serial port command, obtain a target control signal, and send the target control signal to the circuit control module;
[0009] The circuit control module is used to send an activation signal to the corresponding screen click module based on the target control signal when receiving the target control signal;
[0010] The screen click module is used to simulate clicking on a designated position of the vehicle screen when receiving the activation signal.
[0011] In one embodiment, the central control module is further used to parse the target serial port command when receiving the target serial port command to obtain the contact control information;
[0012] The central control module is further used to generate a corresponding target control signal based on the contact control information, and send the target control signal to the circuit control module.
[0013] In one embodiment, the central control module is further used to group the target serial port commands when receiving the target serial port commands to obtain multiple command character strings;
[0014] The central control module is further used to determine contact identification information, time control information and number control information based on the instruction character string, and the contact identification information, the time control information and the number control information constitute the contact control information.
[0015] In one embodiment, the instruction string consists of a number of preset digits;
[0016] The central control module is further used to read a number of first preset digits from the instruction character string, and determine the contact identification information based on the number of first preset digits;
[0017] The central control module is further used to read a number of a second preset number of digits from the instruction character string, and determine the time control information based on the number of the first preset number of digits;
[0018] The central control module is also used to read a third preset number of digits from the instruction character string, based on the first preset number of digits and the number control information, the preset number of digits is equal to the sum of the first preset number of digits, the second preset number of digits and the third preset number of digits.
[0019] In one embodiment, the central control module is further used to determine the relay identification information and the relay on-off time information based on the target serial port instruction when receiving the target serial port instruction;
[0020] The circuit center control module is also used to generate a corresponding target control signal according to the relay identification information and the relay on-off time information.
[0021] In one embodiment, the circuit control module includes a plurality of relays, and the plurality of relays are correspondingly connected to the plurality of screen click modules;
[0022] The relay is used to disconnect or connect the connection with the screen click module when receiving the target control signal;
[0023] The relay is also used to send an activation signal to the screen click module when connected to the screen click module.
[0024] In addition, to achieve the above purpose, the present application also proposes a vehicle screen click simulation method, the vehicle screen click simulation method is applied to a vehicle screen click simulation system, the vehicle screen click simulation system includes a serial communication module, a central control module, a circuit control module and a plurality of screen click modules connected to the circuit control module in sequence;
[0025] The vehicle screen click simulation method includes:
[0026] When the serial communication module receives the screen click instruction sent by the host computer, it converts the screen click instruction into a target serial port instruction and sends the target serial port instruction to the central control module;
[0027] When receiving the target serial port instruction, the central control module parses the target serial port instruction to obtain a target control signal, and sends the target control signal to the circuit control module;
[0028] When the circuit control module receives the target control signal, the circuit control module sends an activation signal to the corresponding screen click module based on the target control signal;
[0029] When receiving the activation signal, the screen click module simulates clicking on a designated position of the vehicle screen.
[0030] In one embodiment, when the central control module receives the target serial port instruction, the step of parsing the target serial port instruction to obtain a target control signal and sending the target control signal to the circuit control module includes:
[0031] When receiving the target serial port command, the central control module parses the target serial port command to obtain contact control information;
[0032] The central control module generates a corresponding target control signal based on the contact control information, and sends the target control signal to the circuit control module.
[0033] In one embodiment, when the central control module receives the target serial port command, the step of parsing the target serial port command to obtain the contact control information includes:
[0034] When receiving the target serial port command, the central control module groups the target serial port command to obtain multiple command character strings;
[0035] The central control module determines contact identification information, time control information and number control information based on the instruction character string, and the contact identification information, the time control information and the number control information constitute the contact control information.
[0036] In one embodiment, the instruction string consists of a number of preset digits;
[0037] The step of the central control module determining the contact identification information, the time control information and the number control information based on the instruction character string includes:
[0038] The central control module reads a number of first preset digits from the instruction character string, and determines the contact identification information based on the number of first preset digits;
[0039] The central control module reads a second preset number of digits from the instruction character string, and determines the time control information based on the first preset number of digits;
[0040] The central control module reads a third preset number of digits from the instruction string, and based on the first preset number of digits and the number control information, the preset number of digits is equal to the sum of the first preset number of digits, the second preset number of digits and the third preset number of digits.
[0041] One or more technical solutions proposed in this application have at least the following technical effects:
[0042] When the serial communication module receives the screen click instruction sent by the host computer, it converts the screen click instruction into the target serial port instruction and sends the target serial port instruction to the central control module; when the central control module receives the target serial port instruction, it parses the target serial port instruction, obtains the target control signal, and sends the target control signal to the circuit control module; when the circuit control module receives the target control signal, it sends an activation signal to the corresponding screen click module based on the target control signal; when the screen click module receives the activation signal, it simulates clicking on the designated position of the vehicle screen. During the test process, the shortcomings of ADB are compensated, and the simulation of vehicle screen clicks is realized in a low-cost manner, which improves the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0045] Figure 1 This is a structural block diagram of the first embodiment of the vehicle screen click simulation system of the present application;
[0046] Figure 2 This is a test bench layout architecture diagram of the first embodiment of the vehicle screen click simulation system of the present application;
[0047] Figure 3 This is a structural block diagram of the second embodiment of the vehicle screen click simulation system of the present application;
[0048] Figure 4 This is a control principle diagram of the second embodiment of the vehicle screen click simulation system of this application;
[0049] Figure 5 This is the PCB circuit diagram of the second embodiment of the vehicle screen click simulation system of this application;
[0050] Figure 6 A three-dimensional layout of the eight-contact device of the second embodiment of the vehicle screen click simulation system of the present application;
[0051] Figure 7 This is a structural diagram of the fixed layer board of the second embodiment of the vehicle screen click simulation system of this application;
[0052] Figure 8 This is a structural diagram of the fixed layer board of the second embodiment of the vehicle screen click simulation system of this application;
[0053] Fig. 9 This is a structural diagram of the fixed layer board of the second embodiment of the vehicle screen click simulation system of this application;
[0054] Fig.10 This is a flow chart of the first embodiment of the vehicle screen simulation clicking method of the present application.
[0055] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0056] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0057] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0058] Reference Figure 1 , Figure 1 This is a structural block diagram of the first embodiment of the vehicle screen click simulation system of the present application.
[0059] like Figure 1 As shown, the vehicle screen click simulation system includes: a serial communication module 10, a central control module 20, a circuit control module 30 connected in sequence, and a plurality of screen click modules 40 connected to the circuit control module 30;
[0060] In this embodiment, the serial port communication module 10 is used to convert the screen click instruction sent by the host computer into a target serial port instruction when receiving the screen click instruction sent by the host computer, and send the target serial port instruction to the central control module 20;
[0061] It should be noted that this embodiment is used for the simulation link of the car screen click. In the process of functional testing of the car, clicking on the car screen is an indispensable link. The current car system is basically an Android system, and the simulated screen click can be completed through ADB. However, in the actual test process, before clicking "Start Parking", the simulated screen click can be completed through the ADB command. After clicking "Start Parking", the ADB command is still available, but the screen click function cannot take effect. After checking the log, the normal coordinates (x, y) are entered and executed, and the coordinates are prompted to exceed the screen range. The actual execution coordinates are changed to (-x, -y). If the input (x, y) is a negative number, it is prompted that the input value is out of range, which is suspected to be a protection mechanism of the vehicle to prevent the vehicle from being attacked during the parking process. After activating the parking function, many test items still need to click on the car screen, but ADB cannot take effect at this time, and physical level clicks are required to complete the test, but manual clicks are time-consuming and laborious, and it is necessary to click on the specified area within the specified time to complete the specified function test. Clicking too early, clicking too late or accidentally touching will cause the test to fail.
[0062] In an alternative solution, screen clicks can be performed by a robotic arm, but the robotic arm is expensive and complex to program. It may not be supported by the interactive interface of mainstream test software. It has a long adaptation cycle and a large size. It cannot adapt well to the current requirements of short vehicle development cycle, fast vehicle iteration, and heavy testing tasks. In order to solve the technical problem of how to make up for the shortcomings of ADB during the test process, simulate the clicks on the car screen, and improve the test efficiency, this application proposes a car screen click simulation system, which can make up for the shortcomings of ADB and can communicate and interact with the test software, that is, embedded in the automated test sequence of dSPACE's AutomationDesk. AutomationDesk is a software tool provided by dSPACE for automated testing and measurement tasks. It supports users to create, manage and execute automated test sequences. These test sequences can be used to verify and test the functions of electronic control units or other embedded systems.
[0063] It should be understood that the system of the present application can be integrated into the test process managed by AutomationDesk to be recognized, controlled and scheduled by AutomationDesk software as part of the automated test process. In the automated test sequence based on AutomationDesk, Python code blocks can be inserted to deploy screen click instructions in the test sequence. Figure 2 , Figure 2 This is a test bench layout diagram of the first embodiment of the vehicle screen click simulation system of this application. Figure 2 As shown, when the system of the present application runs automated testing software on a host computer and executes a test sequence through the automated testing software, it can receive instructions for clicking a specified area of the screen through serial port communication 10, parse the received instruction information, and control the corresponding screen click module 40 to click the set area, thereby completing the vehicle screen click simulation link.
[0064] It should be understood that the serial communication module 10 includes a USB to TTL interface converter, the two ends of which are connected to the host computer and the central control 20 respectively, for converting the signal of the USB interface into a serial port signal of a TTL level. When the serial communication module 10 receives the screen click instructions sent by the host computer, it converts these instructions into a format suitable for processing by the central control module 20, obtains the target serial port instructions, and sends the target serial port instructions to the central control module 20. The serial communication module 10 provides a stable, reliable and widely supported data transmission method. Through the serial communication module 10, the central control module 20 and the host computer running the automated test software can realize direct data exchange without complex network configuration or additional hardware equipment.
[0065] In this embodiment, the central control module 20 is used to parse the target serial port command when receiving the target serial port command, obtain the target control signal, and send the target control signal to the circuit control module 30;
[0066] It should be understood that the central control module 20 is a microcontroller or a small computer, which can receive the target serial port instructions sent by the serial port communication module 10, parse the content of the target serial port instructions, extract the control information about screen clicks, and generate corresponding target control signals based on these control information to turn on and off the corresponding circuits of the circuit control module 30, thereby realizing the simulated click operation on the vehicle screen.
[0067] It should be noted that the central control module 20 in this embodiment can specifically be a Raspberry Pi, which is a small single-board computer developed by the British Raspberry Pi Foundation. The Raspberry Pi developed based on Python can be well embedded in the test sequence.
[0068] In a specific implementation, the script for sending command information is inserted into the test sequence of the test software in the host computer. After being sent out through the serial communication module 10, the Raspberry Pi will continue to monitor the command information from the host computer. After receiving the command information from the host computer, the Raspberry Pi will parse the command information and convert the result of the command parsing into a corresponding control signal to control the corresponding circuit to be turned on and off.
[0069] In this embodiment, the central control module 20 is further used to parse the target serial port command when receiving the target serial port command to obtain the contact control information;
[0070] It should be understood that each screen click module 40 corresponds to a touch point, which is pre-placed at a specified position on the vehicle screen. In order to ensure the consistency and repeatability of the test results, the position and click time of the touch point are accurately controlled during the automatic execution of the predetermined click operation, and the target serial port command needs to be parsed to obtain the touch point control information.
[0071] In this embodiment, the central control target module 20 is further used to group the target serial port commands when receiving the target serial port commands to obtain multiple command character strings;
[0072] It should be understood that the target serial port command is a string consisting of a series of characters, which includes detailed parameters for executing the operation. Since a serial port command may include multiple screen click commands, it is necessary to split the received long string command into multiple command strings according to preset rules so as to process different screen click commands respectively.
[0073] In this embodiment, the central control module 20 is further used to determine contact identification information, time control information and number control information based on the instruction character string, and the contact identification information, the time control information and the number control information constitute the contact control information.
[0074] It should be noted that the contact identification information is used to identify the unique contact corresponding to each screen click module 40, and the contact identification information can be used to determine which contact needs to be activated. The time control information is used to determine the duration information and interval time information of the screen click. The number control information is used to determine the number of times the contact needs to perform the click operation. After obtaining multiple instruction strings, the contact identification information, time control information and number control information corresponding to each instruction string will be parsed one by one to accurately control the simulated click operation on the vehicle screen.
[0075] In this embodiment, the central control module 20 is also used to read a number of a first preset number of digits from the instruction string, and determine the contact identification information based on the number of the first preset number of digits; the central control module 20 is also used to read a number of a second preset number of digits from the instruction string, and determine the time control information based on the number of the first preset number of digits; the central control module 20 is also used to read a number of a third preset number of digits from the instruction string, and determine the number of times control information based on the number of the first preset number of digits, wherein the preset number of digits is equal to the sum of the first preset number of digits, the second preset number of digits and the third preset number of digits.
[0076] It should be noted that the instruction string is composed of a preset number of digits. In this embodiment, each instruction string may contain 8 digits. The first preset number of digits refers to the first and second digits of the instruction string, the second preset number of digits refers to the third to sixth digits of the instruction string, and the third preset number of digits refers to the seventh and eighth digits of the instruction string.
[0077] In a specific implementation, the multiple electronic switches included in the circuit control module 30 can be 8 relays 31, and the instruction information cmd_str of the target serial port instruction can be in the form of "01020104, 02010101, 03010102, ..., 04010101". By separating them with commas, consecutive 8-digit numbers can be used as an instruction string, representing a screen click command. The first and second bits of the eight bits are which_one, which is one of 01, 02, 03, 04, 05, 06, 07, 08, representing the contact controlled by the corresponding relay 31; the third and fourth bits of the eight bits are time1, which has a value range of 01-99, representing the interval coefficient of the time when the relay 31 is powered on and off (the specific time when the relay 31 is powered on and off is 0.25*time1); the fifth and sixth bits of the eight bits are time2, which has a value range of 01-99, representing the interval coefficient of the time when the same contact clicks the screen (the specific time when the same contact clicks the screen is 0.25*time2); the seventh and eighth bits of the eight bits are times, which has a value range of 01-99, representing the number of times a certain contact is clicked. The execution result of the above cmd_str is "contact 1 clicks 4 times, contact 2 clicks 1 time, contact 3 clicks 2 times, ..., contact 4 clicks 1 time". Among them, time1 and time2 can generally use 0101. In actual use, you only need to modify the first two digits which_one and the last two digits times. The contacts that are not executed do not need to be added to cmd_str.
[0078] In this embodiment, the central control module 20 is further configured to generate a corresponding target control signal based on the contact control information, and send the target control signal to the circuit control module 30 .
[0079] It should be understood that after obtaining the contact control information, the central control module 20 will generate a corresponding target control signal according to the contact control information, so that the corresponding electronic switch in the circuit control module 30 performs a corresponding on-off action and sends an activation signal to the corresponding screen click module 40.
[0080] In this embodiment, the circuit control module 30 is used to send an activation signal to the corresponding screen click module 40 based on the target control signal when receiving the target control signal;
[0081] It should be understood that the circuit control module 30 includes a preset number of electronic switches, each of which is connected to a corresponding screen click module 40. When one of the electronic switches receives a target control signal sent by the central control module 20, it will perform a corresponding on-off action according to the target control signal to send an activation signal to the corresponding screen click module 40.
[0082] In this embodiment, the screen clicking module 40 is used to simulate clicking on a designated position of the vehicle screen when receiving the activation signal.
[0083] It should be understood that the screen click module 40 can simulate a user click operation and physically click a designated position of the vehicle screen. It is a device that directly contacts the vehicle screen and performs a click action. The screen click module 40 in this embodiment can be a suction cup pre-placed at a designated position of the vehicle screen. When it receives an activation signal sent by the circuit control module 30, it will perform a physical click action, such as adsorbing or releasing the vehicle screen, to simulate a click on the vehicle screen.
[0084] This embodiment provides a vehicle screen click simulation system. When the serial communication module 10 receives the screen click instruction sent by the host computer, it converts the screen click instruction into a target serial port instruction and sends the target serial port instruction to the central control module 20. When the central control module 20 receives the target serial port instruction, it parses the target serial port instruction to obtain the target control signal and sends the target control signal to the circuit control module 30. When the circuit control module 30 receives the target control signal, it sends an activation signal to the corresponding screen click module 40 based on the target control signal. When the screen click module 40 receives the activation signal, it simulates clicking on the designated position of the vehicle screen. In the test process, the shortcomings of ADB are compensated, and the vehicle screen click simulation is realized in a low-cost manner, which improves the test efficiency.
[0085] Based on the first embodiment of the vehicle screen click simulation system of the present application, the second embodiment of the vehicle screen click simulation system of the present application is proposed. In the second embodiment of the vehicle screen click simulation system of the present application, the same or similar contents as those in the first embodiment of the vehicle screen click simulation system can be referred to the above introduction and will not be repeated in the following. Figure 3 , Figure 3 This is a structural block diagram of the second embodiment of the vehicle screen click simulation system of the present application.
[0086] In this embodiment, the circuit control module 30 includes a plurality of relays 31, and the plurality of relays 31 are connected to the plurality of screen click modules 40 accordingly; the relay 31 is used to disconnect or connect the connection with the screen click module 40 when receiving the target control signal;
[0087] It should be understood that the circuit control module 30 includes multiple relays 31 in order to realize the independent operation of multiple contacts and control multiple screen click modules 40 at the same time. The output end of each relay 31 is connected to a screen click module 40 to ensure that each screen click module 40 can be activated separately. When the relay 31 receives the target control signal, it will respond to the target control signal and disconnect or connect the connection with the screen click module 40.
[0088] In this embodiment, the relay 31 is also used to send an activation signal to the screen clicking module 40 when connected to the screen clicking module 40.
[0089] It should be understood that when the relay 31 is connected to the corresponding screen click module 40, it will send an activation signal to the screen click module 40 to trigger the click operation. The activation signal carries time control information. When the preset time corresponding to the screen click instruction is reached, the relay 31 will disconnect from the corresponding screen click module 40 to complete a screen click operation.
[0090] In this embodiment, the central control module 20 is also used to determine the relay 31 identification information and the relay 31 on-off time information based on the target serial port instruction when receiving the target serial port instruction; the circuit central control module 20 is also used to generate a corresponding target control signal according to the relay 31 identification information and the relay 31 on-off time information.
[0091] It should be understood that when the central control module 20 receives the target serial port instruction, it determines the relay 31 identification information and the relay 31 on-off time information based on the target serial port instruction, and generates a corresponding target control signal according to the relay 31 identification information and the relay 31 on-off time information, so that the designated relay 31 can receive the target control signal and be switched on and off according to the relay 31 on-off time information carried by the target control signal.
[0092] For example, refer to Figure 4 , Figure 4 This is the control principle diagram of the second embodiment of the vehicle screen click simulation system of this application. Figure 4As shown, the serial communication module 10 corresponds to a USB to TTL adapter, the central control module 20 corresponds to a Raspberry Pi, the circuit control module 30 corresponds to four relays 31, and the screen click module 40 corresponds to a suction cup connected to the four relays 31. Before the host computer runs the automated testing software based on the python interface, the script for sending the screen click instruction information will be inserted into the test sequence of the test software in the host computer, and the instruction information will be sent to the Raspberry Pi in the form of serial communication through the USB to TTL adapter. The Raspberry Pi continuously monitors the instruction information from the host computer. After receiving the instruction information from the host computer, it will parse the instruction information, convert the instruction information into a corresponding electrical signal, and control the on and off of the corresponding relay 31. The suction cup of the screen click module 40 will click the specified area at a specified time according to the regular on and off activity of the relay 31, completing the car screen click simulation. This application is based on a test method and device for simulating manual clicking on the car screen designed by Raspberry Pi, which can achieve the test effect with less cost and time under the premise of meeting the test requirements.
[0093] In addition, it should be noted that the vehicle screen click simulation system of the present application includes a software part and a hardware part. The software part can be divided into the communication between the Raspberry Pi and the host computer and the execution of the control circuit program by the Raspberry Pi. The hardware mainly includes a screen click module 40, a control circuit module, a serial port communication module 10, a Raspberry Pi mainboard and a fixed layer board. Among them, the hardware part can be divided into standard parts and non-standard customized parts. The standard parts mainly include Raspberry Pi, relays 31, serial port modules, terminals, etc. Non-standard customized parts include fixed layers and circuit PCB boards. If the wiring is directly on the plane and conventional wiring terminals are used for branching, the 4-contact one is already large in size and the circuit is complicated. In order to make more contacts that can be controlled to meet more complex testing requirements, and to ensure a more compact structure and a simpler circuit, illustratively, the present application uses an 8-way relay 31, a layered structure, and a PCB board to replace complex wiring. Refer to Figure 5 , Figure 5 This is the PCB circuit diagram of the second embodiment of the vehicle screen click simulation system of this application. Taking contact 1 as an example, contact 1 corresponds to screen click module 40 No. 1, which can be powered directly by the GPIO pin of the Raspberry Pi. The negative pole of screen click module 40 No. 1 is directly connected to the negative output pin of the Raspberry Pi, and the positive pole is connected to the NO1 end of the relay 31, that is, normally open, and the COM1 port of the relay 31 is connected to pin 18 of the Raspberry Pi. The positive and negative poles of the screen click module 40 correspond to P1 and N1 on the PCB board, respectively, and the COM1 and NO1 on the PCB board correspond to COM1 and NO1 on the relay 31, respectively.
[0094] In addition, refer to Figure 6 , Figure 6This is a physical diagram of the three-dimensional layout of the eight-contact device of the second embodiment of the vehicle screen click simulation system of this application. According to the known data such as the installation hole position and size of the Raspberry Pi, the relay 31 and the serial communication module 10, a reasonable layout scheme can be designed to ensure that the structure is as compact as possible without affecting the normal use of each module. Among them, the fixed layer is made of acrylic material, and the structure of the fixed layer is as follows Figure 7 , Figure 8 as well as Fig. 9 shown.
[0095] In this embodiment, when the central control module 20 receives the target serial port command, the relay 31 identification information and the on-off time information of the relay 31 are determined based on the target serial port command; the circuit central control module 20 generates a corresponding target control signal according to the relay 31 identification information and the relay 31 on-off time information; when the relay 31 receives the target control signal, it disconnects or connects the connection with the screen click module 40; when the relay 31 is connected to the screen click module 40, it sends an activation signal to the screen click module 40. Through the automated serial port command reception and analysis, the identification information and on-off time information of the relay 31 are accurately determined, so that the test operation can be accurately performed according to the predetermined parameters, thereby improving the accuracy of the test.
[0096] Based on this, the embodiment of the present application provides a method for simulating a click on a vehicle screen, referring to Fig.10 , Fig.10 This is a flow chart of the first embodiment of the vehicle screen simulation clicking method of the present application.
[0097] In this embodiment, the vehicle screen click simulation method includes steps S10 to S40:
[0098] Step S10, when the serial communication module receives the screen click instruction sent by the host computer, it converts the screen click instruction into a target serial port instruction and sends the target serial port instruction to the central control module;
[0099] It should be noted that this embodiment is used for the simulation link of the car screen click. In the process of functional testing of the car, clicking on the car screen is an indispensable link. The current car system is basically an Android system, and the simulated screen click can be completed through ADB. However, in the actual test process, before clicking "Start Parking", the simulated screen click can be completed through the ADB command. After clicking "Start Parking", the ADB command is still available, but the screen click function cannot take effect. After checking the log, the normal coordinates (x, y) are entered and executed, and the coordinates are prompted to exceed the screen range. The actual execution coordinates are changed to (-x, -y). If the input (x, y) is a negative number, it is prompted that the input value is out of range, which is suspected to be a protection mechanism of the vehicle to prevent the vehicle from being attacked during the parking process. After activating the parking function, many test items still need to click on the car screen, but ADB cannot take effect at this time, and physical level clicks are required to complete the test, but manual clicks are time-consuming and laborious, and it is necessary to click on the specified area within the specified time to complete the specified function test. Clicking too early, clicking too late or accidentally touching will cause the test to fail.
[0100] In an alternative solution, screen clicks can be performed by a robotic arm, but the robotic arm is expensive and complex to program. It may not be supported by the interactive interface of mainstream test software. It has a long adaptation cycle and a large size. It cannot adapt well to the current requirements of short vehicle development cycle, fast vehicle iteration, and heavy testing tasks. In order to solve the technical problem of how to make up for the shortcomings of ADB during the test process, simulate the clicks on the car screen, and improve the test efficiency, this application proposes a car screen click simulation system, which can make up for the shortcomings of ADB and can communicate and interact with the test software, that is, embedded in the automated test sequence of dSPACE's AutomationDesk. AutomationDesk is a software tool provided by dSPACE for automated testing and measurement tasks. It supports users to create, manage and execute automated test sequences. These test sequences can be used to verify and test the functions of electronic control units or other embedded systems.
[0101] It should be understood that the system of the present application can be integrated into the test process managed by AutomationDesk to be recognized, controlled and scheduled by AutomationDesk software as part of the automated test process. In the automated test sequence based on AutomationDesk, Python code blocks can be inserted to deploy screen click instructions in the test sequence. Figure 2 , Figure 2 This is a test bench layout diagram of the first embodiment of the vehicle screen click simulation system of this application. Figure 2As shown, when the system of the present application runs automated testing software on a host computer and executes a test sequence through the automated testing software, it can receive instructions for clicking a specified area of the screen through serial port communication, parse the received instruction information, control the corresponding screen click module to click the set area, and complete the vehicle screen click simulation link.
[0102] It should be understood that the serial communication module includes a USB to TTL interface converter, the two ends of which are connected to the host computer and the central control, respectively, for converting the USB interface signal into a serial port signal of TTL level. When the serial communication module receives the screen click instructions sent by the host computer, it converts these instructions into a format suitable for processing by the central control module, obtains the target serial port instructions, and sends the target serial port instructions to the central control module. The serial communication module provides a stable, reliable and widely supported data transmission method. Through the serial communication module, the central control module and the host computer running the automated test software can realize direct data exchange without complex network configuration or additional hardware equipment.
[0103] Step S20, when receiving the target serial port instruction, the central control module parses the target serial port instruction to obtain a target control signal, and sends the target control signal to the circuit control module;
[0104] It should be understood that the central control module is a microcontroller or a small computer, which can receive the target serial port instructions sent by the serial port communication module, parse the content of the target serial port instructions, extract the control information about screen clicks, and generate corresponding target control signals based on these control information to switch the corresponding circuits of the circuit control module on and off, thereby realizing the simulated click operation on the vehicle screen.
[0105] It should be noted that the central control module in this embodiment may specifically be a Raspberry Pi, which is a small single-board computer developed by the UK Raspberry Pi Foundation. The Raspberry Pi developed based on Python can be well embedded in the test sequence.
[0106] In the specific implementation, the script for sending command information is inserted into the test sequence of the test software in the host computer. After being sent through the serial communication module, the Raspberry Pi will continue to listen to the command information from the host computer. After receiving the command information from the host computer, the Raspberry Pi will parse the command information and convert the result of the command parsing into a corresponding control signal to control the corresponding circuit to be turned on and off.
[0107] In a feasible implementation, step S20 may include steps S21 to S22:
[0108] Step S21, when receiving the target serial port command, the central control module parses the target serial port command to obtain contact control information;
[0109] It should be understood that each screen click module corresponds to a touch point, which is pre-placed at a specified position on the vehicle screen. In order to ensure the consistency and repeatability of the test results, the position and click time of the touch point are accurately controlled during the automatic execution of the predetermined click operation, and the target serial port command needs to be parsed to obtain the touch point control information.
[0110] In a feasible implementation, step S21 may include steps A11 to A12:
[0111] Step A11, when receiving the target serial port command, the central control module groups the target serial port command to obtain multiple command character strings;
[0112] It should be understood that the target serial port command is a string consisting of a series of characters, including detailed parameters for executing the operation. Since a target serial port command may include multiple screen click commands, it is necessary to split the received long string command into multiple command strings according to preset rules so as to process different screen click commands respectively.
[0113] Step A12: the central control module determines contact identification information, time control information and number control information based on the instruction character string, wherein the contact identification information, the time control information and the number control information constitute the contact control information.
[0114] It should be noted that the contact identification information is used to identify the unique contact corresponding to each screen click module. The contact identification information can be used to determine which contact needs to be activated. The time control information is used to determine the duration information and interval time information of the screen click. The number control information is used to determine the number of times the contact needs to perform the click operation. After obtaining multiple instruction strings, the contact identification information, time control information, and number control information corresponding to each instruction string will be parsed one by one to accurately control the simulated click operation on the vehicle screen.
[0115] In a feasible implementation, the step in which the central control module determines the contact identification information, time control information and number control information based on the instruction string in step A12 may include: the central control module reads a number of a first preset number of digits from the instruction string, and determines the contact identification information based on the number of the first preset number of digits; the central control module reads a number of a second preset number of digits from the instruction string, and determines the time control information based on the number of the first preset number of digits; the central control module reads a number of a third preset number of digits from the instruction string, and determines the number of control information based on the number of the first preset number of digits, wherein the preset number of digits is equal to the sum of the first preset number of digits, the second preset number of digits and the third preset number of digits.
[0116] It should be noted that the instruction string is composed of a preset number of digits. In this embodiment, each instruction string may contain 8 digits. The first preset number of digits refers to the first and second digits of the instruction string, the second preset number of digits refers to the third to sixth digits of the instruction string, and the third preset number of digits refers to the seventh and eighth digits of the instruction string.
[0117] In a specific implementation, the multiple electronic switches included in the circuit control module can be 8 relays, and the instruction information cmd_str of the target serial port instruction can be in the form of "01020104, 02010101, 03010102, ..., 04010101". By separating them with commas, consecutive 8-digit numbers can be used as an instruction string, representing a screen click command. The first and second bits of the eight bits are which_one, which is one of 01, 02, 03, 04, 05, 06, 07, 08, representing the contact controlled by the corresponding relay; the third and fourth bits of the eight bits are time1, which has a value range of 01-99, representing the interval coefficient of the time when the relay is powered on and off (the specific time when the relay is powered on and off is 0.25*time1); the fifth and sixth bits of the eight bits are time2, which has a value range of 01-99, representing the interval coefficient of the time when the same contact clicks the screen (the specific time when the same contact clicks the screen is 0.25*time2); the seventh and eighth bits of the eight bits are times, which has a value range of 01-99, representing the number of times a certain contact is clicked. The execution result of the above cmd_str is "contact 1 clicks 4 times, contact 2 clicks 1 time, contact 3 clicks 2 times, ..., contact 4 clicks 1 time". Among them, time1 and time2 can generally use 0101. In actual use, you only need to modify the first two digits which_one and the last two digits times. The contacts that are not executed do not need to be added to cmd_str.
[0118] Step S22: the central control module generates a corresponding target control signal based on the contact control information, and sends the target control signal to the circuit control module.
[0119] It should be understood that after obtaining the contact control information, the central control module will generate a corresponding target control signal according to the contact control information, so that the corresponding electronic switch in the circuit control module performs corresponding on-off actions and sends an activation signal to the corresponding screen click module.
[0120] Step S30, when the circuit control module receives the target control signal, the circuit control module sends an activation signal to the corresponding screen click module based on the target control signal;
[0121] It should be understood that the circuit control module includes a preset number of electronic switches, each of which is connected to a corresponding screen click module. When one of the electronic switches receives a target control signal sent by the central control module, it will perform a corresponding on-off action according to the target control signal to send an activation signal to the corresponding screen click module.
[0122] Step S40: When receiving the activation signal, the screen click module simulates clicking on a designated position of the vehicle screen.
[0123] It should be understood that the screen click module can simulate a user click operation and physically click on a designated position of the vehicle screen. It is a device that directly contacts the vehicle screen and performs a click action. The screen click module in this embodiment can be a suction cup pre-placed at a designated position of the vehicle screen. When it receives an activation signal sent by the circuit control module, it will perform a physical click action, such as adsorbing or releasing the vehicle screen, to simulate a click on the vehicle screen.
[0124] This embodiment provides a method for simulating the click of a car screen. When the serial communication module receives the screen click instruction sent by the host computer, the screen click instruction is converted into a target serial port instruction and sent to the central control module. When the central control module receives the target serial port instruction, it parses the target serial port instruction to obtain a target control signal and sends the target control signal to the circuit control module. When the circuit control module receives the target control signal, it sends an activation signal to the corresponding screen click module based on the target control signal. When the screen click module receives the activation signal, it simulates clicking on the designated position of the car screen. In the test process, the shortcomings of ADB are compensated, and the simulation of the car screen click is realized in a low-cost manner, which improves the test efficiency.
[0125] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the vehicle screen click simulation method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0126] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0127] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0129] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A car screen click simulation system, characterized in that: The vehicle screen click simulation system comprises a serial communication module, a central control module, a circuit control module and a plurality of screen click modules connected to the circuit control module in sequence; The serial port communication module is used to convert the screen click instruction sent by the host computer into a target serial port instruction when receiving the screen click instruction sent by the host computer, and send the target serial port instruction to the central control module; The central control module is used to parse the target serial port command upon receiving the target serial port command, obtain a target control signal, and send the target control signal to the circuit control module; The circuit control module is used to send an activation signal to the corresponding screen click module based on the target control signal when receiving the target control signal; The screen click module is used to simulate clicking on a designated position of the vehicle screen when receiving the activation signal.
2. The system according to claim 1, characterized in that The central control module is further used to parse the target serial port command when receiving the target serial port command to obtain contact control information; The central control module is further used to generate a corresponding target control signal based on the contact control information, and send the target control signal to the circuit control module.
3. The system according to claim 2, characterized in that The central control module is further configured to group the target serial port commands upon receiving the target serial port commands to obtain a plurality of command character strings; The central control module is further used to determine contact identification information, time control information and number control information based on the instruction character string, and the contact identification information, the time control information and the number control information constitute the contact control information.
4. The system according to claim 3, characterized in that The instruction string consists of numbers of preset digits; The central control module is further used to read a number of first preset digits from the instruction character string, and determine the contact identification information based on the number of first preset digits; The central control module is further used to read a number of a second preset number of digits from the instruction character string, and determine the time control information based on the number of the first preset number of digits; The central control module is also used to read a third preset number of digits from the instruction character string, based on the first preset number of digits and the number control information, the preset number of digits is equal to the sum of the first preset number of digits, the second preset number of digits and the third preset number of digits.
5. The system according to any one of claims 1 to 4, characterized in that The central control module is further used to determine the relay identification information and the relay on-off time information based on the target serial port instruction when receiving the target serial port instruction; The circuit center control module is also used to generate a corresponding target control signal according to the relay identification information and the relay on-off time information.
6. The system according to any one of claims 1 to 4, characterized in that The circuit control module includes a plurality of relays, and the plurality of relays are correspondingly connected to the plurality of screen clicking modules; The relay is used to disconnect or connect the connection with the screen click module when receiving the target control signal; The relay is also used to send an activation signal to the screen click module when connected to the screen click module.
7. A method for simulating clicking on a vehicle screen, characterized in that: The vehicle screen click simulation method is applied to a vehicle screen click simulation system, which includes a serial communication module, a central control module, a circuit control module, and a plurality of screen click modules connected to the circuit control module in sequence; The vehicle screen click simulation method includes: When the serial port communication module receives the screen click instruction sent by the host computer, it converts the screen click instruction into a target serial port instruction and sends the target serial port instruction to the central control module; When receiving the target serial port instruction, the central control module parses the target serial port instruction to obtain a target control signal, and sends the target control signal to the circuit control module; When the circuit control module receives the target control signal, the circuit control module sends an activation signal to the corresponding screen click module based on the target control signal; When receiving the activation signal, the screen click module simulates clicking on a designated position of the vehicle screen.
8. The method according to claim 7, characterized in that When receiving the target serial port instruction, the central control module parses the target serial port instruction to obtain a target control signal, and sends the target control signal to the circuit control module, including: When receiving the target serial port command, the central control module parses the target serial port command to obtain contact control information; The central control module generates a corresponding target control signal based on the contact control information, and sends the target control signal to the circuit control module.
9. The method according to claim 8, characterized in that When the central control module receives the target serial port instruction, the step of parsing the target serial port instruction to obtain the contact control information includes: When receiving the target serial port command, the central control module groups the target serial port command to obtain multiple command character strings; The central control module determines contact identification information, time control information and number control information based on the instruction character string, and the contact identification information, the time control information and the number control information constitute the contact control information.
10. The method according to claim 9, characterized in that The instruction string consists of numbers of preset digits; The step of the central control module determining the contact identification information, the time control information and the number control information based on the instruction character string includes: The central control module reads a number of first preset digits from the instruction character string, and determines the contact identification information based on the number of first preset digits; The central control module reads a second preset number of digits from the instruction character string, and determines the time control information based on the first preset number of digits; The central control module reads a third preset number of digits from the instruction string, and based on the first preset number of digits and the number control information, the preset number of digits is equal to the sum of the first preset number of digits, the second preset number of digits and the third preset number of digits.