Vehicle-mounted remote debugging method, debugging device, equipment and medium

By establishing a virtual local area network through a cloud server to connect the vehicle-mounted terminal and the debugging terminal, and using the ADB protocol to transmit and encrypt debugging commands, the problems of cumbersome debugging and security risks in traditional vehicle-mounted systems are solved, and efficient and secure remote debugging is achieved.

CN121334209APending Publication Date: 2026-01-13BEI DOU ZHI LIAN KE JI YOU XIAN GONG SI
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511662620.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Traditional vehicle-mounted system debugging requires on-site operation, which is cumbersome and time-consuming. Remote debugging commands and data are easily intercepted or tampered with, posing security risks.

Method used

A virtual local area network is established through a cloud server to connect the vehicle-mounted terminal and the debugging terminal. The vehicle-mounted terminal is controlled to start the ADB server, and debugging commands are transmitted and encrypted using the ADB protocol. When the connection is disconnected, the network configuration is cleared.

Benefits of technology

It enables efficient debugging without on-site operation, ensures the security of debugging commands and data, avoids data leakage and malicious use, and solves the security risks of remote debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121334209A_ABST
    Figure CN121334209A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle-mounted remote debugging method, a debugging device, equipment and a medium. The debugging method comprises the following steps: establishing a virtual local area network for realizing internet connection between a vehicle-mounted end and a debugging end; controlling the vehicle-mounted terminal to start an ADB server, and controlling the debugging terminal to establish TCP connection with the ADB service of the vehicle-mounted terminal; controlling the debugging end to send various debugging instructions to the vehicle-mounted end through a preset ADB protocol, and encrypting all the debugging instructions sent to the vehicle-mounted end by the debugging end; and when it is detected that debugging of the vehicle-mounted terminal is completed, controlling the debugging terminal and the vehicle-mounted terminal to disconnect the connection of the virtual local area network. According to the scheme, the virtual local area network is established, so that the vehicle-mounted end and the debugging end are safely connected, and debugging personnel are prevented from operating on site; after the connection is established, the ADB protocol is utilized to realize the transmission of the debugging instruction, the realization of the debugging function is ensured, the debugging instruction is encrypted, and the debugging instruction and data are effectively prevented from being intercepted or tampered in the network transmission process.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of vehicle remote debugging, and in particular to a vehicle remote debugging method, a debugging device, equipment and a medium. BACKGROUND

[0002] Debugging a vehicle can verify the functions of various systems of the vehicle; for example, for the electronic control system of the vehicle, such as the engine management system, the automatic transmission control system, etc., debugging can check whether such systems work normally according to the design requirements.

[0003] Traditional vehicle system debugging usually requires the vehicle to be connected to a local network or to be debugged using a physical connection (such as a USB cable). This debugging method requires the debugging personnel to operate on site, and the debugging environment setup process (such as network configuration, device connection, etc.) is tedious and time-consuming. If remote debugging is used, the debugging instructions and data are transmitted in the network, which can be intercepted or tampered with, resulting in leakage of debugging data or malicious use, which poses a security risk. SUMMARY

[0004] In order to overcome the deficiencies of the prior art, the embodiments of the present application provide a vehicle remote debugging method, a debugging device, equipment and a medium.

[0005] The technical solution adopted by the present application to solve its technical problems is: In a first aspect, the present application provides a vehicle remote debugging method, which is applied to a cloud server, the cloud server is in signal transmission connection with a vehicle end and a debugging end, and the debugging method comprises: establishing a virtual local area network for realizing Internet connection of the vehicle end and the debugging end; controlling the vehicle end to start an ADB server, and controlling the debugging end to establish a TCP connection with the ADB service of the vehicle end; controlling the debugging end to send various debugging instructions to the vehicle end through a preset ADB protocol, and simultaneously performing encryption processing on all the debugging instructions sent by the debugging end to the vehicle end; when it is detected that the vehicle end is completed, the debugging end and the vehicle end are controlled to disconnect the connection of the virtual local area network.

[0006] In a second aspect, the present application provides a vehicle remote debugging device, which is arranged in a cloud server, the cloud server is in signal transmission connection with a vehicle end and a debugging end, and the debugging device comprises: an establishing module for establishing a virtual local area network for realizing Internet connection of the vehicle end and the debugging end; The startup module is used to control the vehicle-mounted terminal to start the ADB server and to control the debugging terminal to establish a TCP connection with the ADB service of the vehicle-mounted terminal. The encryption module is used to control the debugging terminal to send various debugging commands to the vehicle terminal through a preset ADB protocol, and to encrypt all debugging commands sent by the debugging terminal to the vehicle terminal. The detection module is used to control the debugging terminal and the vehicle terminal to disconnect the virtual local area network when it is detected that the debugging of the vehicle terminal has been completed.

[0007] Thirdly, the present invention also provides a computer device, the computer device including a processor, a network interface, a memory and a communication bus, wherein the processor, the network interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; When the processor executes a program stored in memory, it implements the steps of the vehicle-mounted remote debugging method described in any one of the first aspects.

[0008] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the vehicle-mounted remote debugging method described in any one of the first aspects.

[0009] Compared with the prior art, the beneficial effects of the present invention are: This solution establishes a virtual local area network (VLAN) to enable a secure connection between the vehicle-mounted terminal and the debugging terminal in an internet environment. This eliminates the need for the vehicle to connect to a local network or use a physical connection, avoiding the inconvenience of on-site operation and the cumbersome setup process for the debugging environment, thus saving time and manpower costs. The solution controls the vehicle-mounted terminal to start the ADB server and establish an ADB connection, using the ADB protocol to transmit debugging commands, ensuring the implementation of debugging functions. Simultaneously, the debugging commands are encrypted to effectively prevent interception or tampering of debugging commands and data during network transmission, avoiding data leakage and malicious use, and resolving security risks in remote debugging. Attached Figure Description

[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a flowchart of a vehicle-mounted remote debugging method according to an embodiment of the present invention.

[0012] Figure 2 This is a schematic block diagram of a vehicle-mounted remote debugging device according to an embodiment of the present invention.

[0013] Figure 3 A schematic block diagram of a computer device according to an embodiment of the present invention. Detailed Implementation

[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0015] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0016] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0017] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0018] To address the technical problems in existing technologies, such as the cumbersome and time-consuming process of on-site debugging by debugging personnel when using vehicle-mounted systems, and the vulnerability of remote debugging commands and data to interception or tampering during network transmission, leading to data leakage or malicious use and posing security risks, this invention provides a remote vehicle-mounted debugging method.

[0019] The debugging method is applied to the cloud server, and the cloud server is connected to the vehicle terminal and the debugging terminal for signal transmission.

[0020] Specifically, the cloud server acts as the control center and gateway of the virtual local area network (VLAN), responsible for managing network connections, allocating IP addresses, and routing data packets. Vehicle devices that need to access the VLAN typically connect to the cloud server through in-vehicle network modules (such as 4G / 5G modules or Wi-Fi modules). The debugging end is the equipment used by debugging personnel (such as laptops, desktops, etc.), which connects to the cloud server via the Internet.

[0021] The following details the specific steps of a vehicle-mounted remote debugging method provided by an embodiment of the present invention, according to the appendix. Figure 1 As shown, the specific steps of this vehicle-mounted remote debugging method include the following: In step S110, a virtual local area network is established to connect the vehicle-mounted terminal and the debugging terminal to the Internet.

[0022] Specifically, the cloud server needs to be configured with a virtual network interface (such as a virtual Ethernet interface) to connect the vehicle-mounted device and the debugging device; this can be achieved, for example, through virtualization technologies (such as Linux's veth interface or Open vSwitch). An IP address is assigned to the virtual network interface as the gateway for the virtual local area network (VLAN); for example, the virtual gateway address can be set to 192.168.1.1. The subnet range of the VLAN is defined, for example, 255.255.255.0, indicating that this subnet can contain 254 devices. The cloud server needs to be configured with routing rules to ensure that data packets from the debugging device to the vehicle-mounted device are forwarded correctly; for example, a routing rule can be set to forward data packets destined for 192.168.1.0 / 24 to the virtual network interface. If the debugging device and the vehicle-mounted device need to access the external network, the cloud server needs to be configured with Network Address Translation (NAT) to translate the private IP addresses within the VLAN into the cloud server's public IP addresses.

[0023] When the vehicle-mounted device connects to the virtual local area network (VLAN), it connects to the cloud server through its network module (such as a 4G / 5G module or a Wi-Fi module); for example, the vehicle-mounted device can connect to the public IP address of the cloud server via a 4G network. The cloud server assigns an IP address within the VLAN to the vehicle-mounted device using Dynamic Host Configuration Protocol (DHCP); for example, assigning 192.168.1.10. A DNS server address is configured for the vehicle-mounted device, for example, using the cloud server's IP address as the DNS server. Subsequently, the vehicle-mounted device sets the cloud server's virtual network interface IP address (such as 192.168.1.1) as the default gateway, and sets the same subnet mask as the VLAN (such as 255.255.255.0).

[0024] When the debugging terminal connects to a virtual LAN, it connects to the cloud server via the internet. For example, the debugging terminal can connect to the cloud server via a VPN (Virtual Private Network) or through dedicated client software provided by the cloud server. In this case, the cloud server assigns an IP address within the virtual LAN to the debugging terminal via DHCP; for example, 192.168.1.20. The vehicle-mounted terminal is then configured with a DNS server address, using the cloud server's IP address as the DNS server. The vehicle-mounted terminal sets the cloud server's virtual network interface IP address (e.g., 192.168.1.1) as the default gateway and sets the same subnet mask as the virtual LAN (e.g., 255.255.255.0).

[0025] Through the above steps, the cloud server successfully created a virtual local area network, enabling the vehicle-mounted terminal and the debugging terminal to communicate securely and efficiently in an Internet environment.

[0026] In step S120, the vehicle terminal is controlled to start the ADB server, and the debugging terminal is controlled to establish an ADB connection with the ADB service of the vehicle terminal.

[0027] Specifically, the cloud server sends a command to the vehicle-mounted terminal to start the ADB server via network protocols (such as TCP / IP or HTTP). The command can be a simple command, such as `start_adb_service`. The cloud server sends the command to the vehicle-mounted terminal's IP address via a Virtual Local Area Network (VLAN); for example, the cloud server sends the command to the vehicle-mounted terminal's IP address 192.168.1.10. The vehicle-mounted terminal runs a network service, such as a lightweight web server or TCP service, to receive the command from the cloud server. After receiving the command, the network service parses the command content, confirms that the ADB server needs to be started, and starts the ADB server via a system call or script. After starting, the ADB server listens on a specified port, waiting for connection requests from the debugging end. When the vehicle-mounted terminal starts the ADB server, it sends a confirmation message to the cloud server, indicating that the ADB server has started successfully.

[0028] The debugging end needs to have the ADB client tool installed. Ensure the ADB client tool's path is added to the system environment variables so it can be invoked directly via command line. The cloud server sends the vehicle's IP address to the debugging end via network protocol. The debugging end uses the ADB client tool to send a connection request to the vehicle's ADB server. During the connection process, the debugging end's ADB client attempts to connect to the vehicle's IP address (192.168.1.10) and port via TCP. If the connection is successful, the ADB client establishes a TCP connection with the vehicle's ADB server. Upon receiving the connection request, the vehicle's ADB server verifies its validity, including checking if the debugging end's IP address is within the allowed range. If the verification passes, the vehicle's ADB server accepts the connection request and establishes a TCP connection with the debugging end.

[0029] It should be noted that the ADB (Android Debug Bridge) in this embodiment of the invention is a command-line tool used for communication and debugging with Android devices. It allows developers and debuggers to send commands, view device status, install applications, etc., via the command line. The ADB server runs as a daemon process on the in-vehicle device, listening on a specific port and waiting for connection requests from the debugging end.

[0030] In step S130, the control debugging terminal sends various debugging commands to the vehicle terminal through the preset ADB protocol, and at the same time, encrypts all debugging commands sent from the debugging terminal to the vehicle terminal.

[0031] Specifically, the debugging end uses an ADB client tool (such as adb.exe) to generate debugging commands. These commands are command-line instructions sent to the vehicle-mounted terminal via the ADB protocol; the command format includes the command name and parameters. The debugging end encapsulates the debugging commands into a data packet and sends it to the cloud server via a TCP connection. The data packet format includes the command content, the debugging end identifier, and a timestamp. After receiving the commands from the debugging end, the cloud server parses the data packet content, extracts the debugging commands, verifies the identity of the debugging end (e.g., including API keys or tokens and the legality of the commands), and encrypts the debugging commands. The cloud server then encapsulates the encrypted commands into a new data packet and sends it to the vehicle-mounted terminal via a virtual LAN. The vehicle-mounted terminal receives the encrypted commands from the cloud server via a network service, and then parses the data packet content to extract the encrypted commands.

[0032] It's important to note that ADB (Android Debug Bridge) is a tool used for communication and debugging with the in-vehicle system. It supports various debugging commands, such as viewing logs, running applications, and modifying system settings. The ADB protocol defines the format and process of communication between the debugger and the in-vehicle system. The debugger sends commands to the in-vehicle ADB server through an ADB client tool (such as adb.exe). The in-vehicle ADB server parses and executes the received commands and then returns the results.

[0033] Through the above steps, the debugging terminal sends various debugging commands to the vehicle terminal through the preset ADB protocol, and encrypts these commands to ensure the security, integrity and confidentiality of the debugging commands.

[0034] In step S140, after the debugging of the vehicle terminal is detected to be completed, the connection between the debugging terminal and the vehicle terminal in the virtual local area network is disconnected.

[0035] Specifically, after completing debugging, the debugging terminal sends a clear notification of debugging completion to the cloud server. For example, the debugging terminal can notify the cloud server of debugging completion via an HTTP request; alternatively, a timeout mechanism can be used, where the cloud server sets a timeout period (e.g., 30 minutes). If no instructions or data transmission are received from the debugging terminal within the timeout period, debugging is considered complete. The vehicle-mounted terminal can also send a notification of debugging completion to the cloud server after completing all debugging tasks. When the cloud server receives the notification of debugging completion from either the debugging terminal or the vehicle-mounted terminal through its API interface, the cloud server periodically checks the activity status of both terminals. If there is no activity for more than the set timeout period, it is marked as debugging complete. Simultaneously, the cloud server records the time of debugging completion and related events for subsequent auditing and troubleshooting.

[0036] Finally, when the cloud server sends a disconnect command to the debugging terminal via network protocol, it also sends a disconnect command to the vehicle terminal via the same network protocol. Upon receiving the disconnect command from the cloud server through its network service, the debugging terminal closes the network interfaces related to the virtual LAN (VLAN), clears VLAN-related configuration information such as IP address and gateway, and notifies the user that debugging is complete and they can safely exit debug mode. When the vehicle terminal receives the disconnect command from the cloud server through its network service, it closes the network interfaces related to the VLAN, clears VLAN-related configuration information such as IP address and gateway, stops the ADB server, and releases related resources. The cloud server removes the IP addresses of both the debugging terminal and the vehicle terminal from the VLAN's IP address pool. At this point, the cloud server closes the virtual network interfaces created for the VLAN and clears VLAN-related routing rules to ensure network traffic returns to normal.

[0037] With this setup, the cloud server can effectively control the connection between the debugging end and the vehicle end to the virtual local area network after debugging is completed, ensuring the security of the debugging process and the rational management of resources.

[0038] In some specific embodiments, the step of establishing a virtual local area network (VLAN) to connect the vehicle-mounted device and the debugging device to the Internet includes the following steps: The system controls the vehicle-mounted terminal and the debugging terminal to find the corresponding super node to establish an internet connection; it also controls both the vehicle-mounted terminal and the debugging terminal to send connection requests to the super node; once the super node detects that it has received a connection request, it establishes a virtual local area network connecting the debugging terminal and the vehicle-mounted terminal based on their network environment and configuration information.

[0039] Specifically, the supernode acts as an intermediary server in the network, coordinating and managing the connection between the vehicle-mounted terminal and the debugging terminal. The supernode possesses high network bandwidth and stability, capable of handling a large number of connection requests. In other words, the supernode acts as a relay point, forwarding data between the vehicle-mounted and debugging terminals. The supernode dynamically adjusts the virtual LAN settings based on the network environment and configuration information of both the vehicle-mounted and debugging terminals. Specifically, after the debugging and vehicle-mounted terminals start their N2N clients, they each send a connection request to the supernode. The request includes their respective identity information (such as device ID, user authentication information, etc.) and network status information (such as current network environment, IP address, etc.). The supernode receives the connection requests from the vehicle-mounted and debugging terminals through its network service. The supernode verifies the user authentication information in the request to ensure the request comes from a legitimate device. The supernode records the network information of the vehicle-mounted and debugging terminals (such as IP address, network type, etc.) to prepare for subsequent virtual LAN establishment. Based on the received connection requests, the supernode matches the vehicle-mounted and debugging terminals. If both have successfully connected to the supernode, the supernode will begin establishing the virtual LAN.

[0040] It should be noted that, in this embodiment of the invention, the super node assigns IP addresses within a virtual local area network to the vehicle-mounted terminal and the debugging terminal. The super node acts as the gateway of the virtual local area network, sets routing rules, and ensures that communication between the two can be forwarded through the super node.

[0041] Through the above steps, the vehicle-mounted end and the debugging end successfully established a virtual local area network (VLAN) connection through the super node. The super node, as the core node, played a relay and coordination role, ensuring that the entire VLAN connection establishment process could proceed smoothly.

[0042] In a further embodiment, after establishing a virtual local area network for connecting the vehicle-mounted terminal and the debugging terminal to the Internet, the steps further include the following: Assign corresponding virtual local area network (VLAN) IP addresses to the debugging terminal and the vehicle terminal.

[0043] Specifically, virtual IP addresses are internal IP addresses assigned to the vehicle-mounted and debugging devices for communication within a virtual local area network (VLAN). These IP addresses belong to a private IP address range and will not conflict with other devices on the internet. The cloud server or supernode maintains a VLAN IP address pool containing all available IP address ranges that can be assigned to the vehicle-mounted and debugging devices. In other words, the cloud server or supernode allocates IP addresses according to a specific strategy. When the vehicle-mounted and debugging devices connect to the cloud server or supernode, they send a connection request containing the device's unique identifier (such as device ID, MAC address, etc.) and network status information (such as current IP address, network type, etc.). The cloud server or supernode searches for available IP addresses in the IP address pool, assigns virtual IP addresses to the vehicle-mounted and debugging devices, and records the mapping relationship between the assigned IP addresses and the devices. Once the vehicle-mounted terminal and the debugging terminal receive the virtual IP address, they configure virtual network interfaces, such as TUN / TAP interfaces or virtual Ethernet interfaces. The vehicle-mounted terminal and the debugging terminal set the IP address of the cloud server or super node as the gateway so that they can communicate through the virtual local area network.

[0044] It is understood that the address allocation strategy in this embodiment of the invention includes dynamic allocation and static allocation; wherein, dynamic allocation means that the cloud server dynamically allocates IP addresses based on the device's connection request. Static allocation means that a fixed IP address is pre-allocated based on the device's unique identifier, such as device ID or MAC address.

[0045] In a further embodiment, the steps include controlling the vehicle-mounted terminal to start the ADB server and controlling the debugging terminal to establish a TCP connection with the vehicle-mounted terminal's ADB service, specifically including the following steps: Switch the communication link of the ADB on the control unit to the TCP / IP network layer and set the specified listening port.

[0046] Specifically, the cloud server sends a command to the vehicle-mounted terminal via a network protocol (such as HTTP or TCP / IP), requesting the terminal to switch the ADB communication link to TCP / IP mode and specify the listening port. The vehicle-mounted terminal receives the command from the cloud server through its network service, executes the ADB command, switches the ADB communication link to TCP / IP mode, and sets the specified listening port. Specifically, the ADB command switches the ADB service to TCP / IP mode and listens for connection requests on the specified port. In detail, the vehicle-mounted terminal first checks if the ADB service is running; if not, it starts the ADB service. Then, the vehicle-mounted terminal switches the ADB communication link from USB to TCP / IP mode, sets the ADB service to listen for connection requests on the specified port, and then sends a confirmation message to the cloud server, indicating that the ADB server has successfully switched to TCP / IP mode and started listening on the specified port.

[0047] Through the above steps, the cloud server successfully controlled the vehicle terminal to switch the ADB communication link to TCP / IP mode and started the ADB server to listen on the specified port, which ensured that the ADB service could be accessed by the debugging terminal in a network environment.

[0048] The control and debugging terminal obtains the virtual LAN IP address of the vehicle terminal and initiates a connection request to the ADB server of the vehicle terminal to connect to the virtual LAN IP address and listening port of the vehicle terminal and establish a TCP connection.

[0049] Specifically, the cloud server sends the vehicle's virtual LAN IP address and listening port to the debugging end via network protocols (such as HTTP or TCP / IP). The debugging end then receives the vehicle's virtual LAN IP address and listening port from the cloud server through its network service. The debugging end then saves the vehicle's IP address and port information for later connection establishment. The debugging end uses an ADB client tool to initiate a connection request to the vehicle's ADB server, targeting the vehicle's virtual LAN IP address and listening port. Upon receiving the connection request, the vehicle's ADB server verifies its validity, such as checking if the IP address is within the allowed range. If the verification is successful, the vehicle's ADB server accepts the connection request and establishes a TCP connection with the debugging end.

[0050] For example, when the debugging end sends a SYN packet to the vehicle end to request a connection, the vehicle end, upon receiving the SYN packet, replies with a SYN-ACK packet to acknowledge receipt of the request. The debugging end, upon receiving the SYN-ACK packet, replies with an ACK packet to acknowledge receipt of the response. At this point, the TCP connection is established.

[0051] With this setup, the debugging end successfully obtained the virtual LAN IP address of the vehicle end and initiated a connection request to the ADB server on the vehicle end, ultimately establishing a TCP connection and ensuring that the debugging end and the vehicle end can communicate securely and efficiently in the virtual LAN.

[0052] In some specific embodiments, the steps include controlling the debugging terminal to send various debugging commands to the vehicle terminal through a preset ADB protocol, and encrypting all debugging commands sent from the debugging terminal to the vehicle terminal. Specifically, the steps include the following: Establish a virtual transmission tunnel.

[0053] Specifically, a virtual transport tunnel is a technology that encapsulates data using network protocols to securely transmit data in insecure network environments. By selecting an appropriate tunneling technology based on actual needs, such as establishing an encrypted tunnel via the SSH protocol to forward traffic to specific ports, the debugging end establishes a tunnel connection through configured parameters. For example, when using an SSH tunnel, the debugging end connects to the SSH server on the vehicle-mounted terminal via SSH and establishes port forwarding. The SSH server on the vehicle-mounted terminal verifies the connection request from the debugging end, confirms the validity of the username and key, and establishes port forwarding from the debugging end's local port to the IP address of the vehicle-mounted terminal. The debugging end then connects to the ADB server on the vehicle-mounted terminal through the tunnel. At this point, the debugging end can communicate with the ADB server on the vehicle-mounted terminal through its local port.

[0054] It should be noted that the SSH protocol is an encrypted network protocol used to securely access remote servers. The SSH protocol supports port forwarding, which can forward traffic from a local port to a remote port, and vice versa.

[0055] The process of establishing an SSH tunnel involves the debugger starting an SSH client and connecting to the SSH server on the vehicle. The SSH server verifies the debugger's connection request and confirms the validity of the username and key. The SSH server then establishes a forwarding mechanism from the debugger's local port to the vehicle's remote port. The debugger sends data through the local port, and the data is transmitted to the vehicle's remote port through the SSH tunnel.

[0056] All debugging commands sent from the debugging terminal to the vehicle terminal are transmitted in a virtual transmission tunnel.

[0057] Specifically, the debugging end generates specific ADB commands based on debugging needs. For example, if the debugger needs to view the vehicle's logs, the debugging end generates a command, encapsulates it in a virtual transmission tunnel, and transmits the encapsulated command to the vehicle's terminal through the virtual transmission tunnel, ensuring that the data is encrypted during transmission. When the vehicle's terminal receives the encrypted command, it decrypts it using the same encryption algorithm. The decrypted command is then sent to the ADB server for execution. The vehicle's terminal encrypts the execution result and encapsulates it in the tunnel protocol. The encrypted execution result is returned to the debugging end through the virtual transmission tunnel. Upon receiving the encrypted execution result, the debugging end decrypts it using the same encryption algorithm. Finally, the decrypted execution result is processed by the debugging end and displayed to the debugger.

[0058] In a further embodiment, the step of transmitting all debugging commands sent from the debugging terminal to the vehicle terminal in a virtual transmission tunnel specifically includes the following steps: All debugging commands sent from the debugging terminal to the vehicle terminal are divided into multiple data blocks.

[0059] Specifically, debugging commands are commands generated by the debugging terminal to control the vehicle-mounted terminal to perform debugging operations. To improve transmission efficiency and security, debugging commands are divided into multiple smaller data blocks, the size of which can be adjusted according to network conditions and security requirements. Specifically, the debugging terminal generates specific ADB commands based on debugging needs. For example, if the debugging personnel need to view the vehicle-mounted terminal's logs, the debugging terminal generates a command and divides it into multiple smaller data blocks. The size of each block can be dynamically adjusted according to preset configurations or network conditions; for example, the data block size can range from several hundred bytes to several thousand bytes. Subsequently, based on the total length of the debugging command and the data block size, the required number of data blocks is calculated.

[0060] It should be noted that the data block size can be dynamically adjusted based on network conditions and security requirements. For example, if network conditions are poor, the data block size can be reduced to improve the transmission success rate.

[0061] Each data block is encrypted to obtain multiple encrypted data blocks.

[0062] Specifically, a suitable encryption algorithm should be selected based on actual needs. For example, symmetric encryption (such as AES) can be used for encrypting large amounts of data. Specifically, the debugging end and the vehicle end need to share a key, which can be generated and distributed in a secure manner. Moreover, the key can be distributed to the vehicle end through a secure channel (such as TLS / SSL). Each data block is encrypted using a preset encryption algorithm, and then the encrypted data block is saved for subsequent transmission.

[0063] It should be noted that the principle of symmetric encryption in this embodiment of the invention is to generate a random key, usually 16 bytes (128 bits) or 32 bytes (256 bits), then select an appropriate encryption mode, such as CBC (Cryptographic Block Chain) mode, pad the data block to make its length an integer multiple of the AES block size, encrypt the data block using the key and encryption mode, and save the initialization vector used during encryption for use during decryption.

[0064] Encrypted data blocks are encapsulated in preset tunnel protocol data packets and transmitted to the vehicle terminal in a virtual transmission tunnel.

[0065] Specifically, each encrypted data block is encapsulated into a preset tunnel protocol data packet. The encapsulation process includes adding tunnel protocol header and trailer information. The debugging end sends the encapsulated data packet to the vehicle end through a virtual transmission tunnel. The vehicle end receives the data packet sent by the debugging end through the virtual transmission tunnel. The vehicle end removes the protocol header of the virtual transmission tunnel, decrypts the data block, and restores the original debugging instructions.

[0066] During transmission, the debugging end establishes a tunnel connection based on configured parameters; for example, when using an SSH tunnel, the debugging end connects to the SSH server on the vehicle-mounted terminal via SSH and establishes port forwarding. The debugging end sends the encapsulated data packets to the vehicle-mounted terminal through the tunnel connection. The data packets are encrypted during transmission to ensure data security.

[0067] It should be noted that the encapsulation process includes adding a tunnel protocol header before each encrypted data block. The tunnel protocol header contains necessary information, such as the length of the data block and the encryption algorithm identifier. In addition, the encapsulation process also includes adding tail information after each encrypted data block, such as checksum and end marker.

[0068] In a further embodiment, the step includes encapsulating all encrypted data blocks into a preset tunnel protocol data packet, and after the virtual transmission tunnel transmits the data to the vehicle-mounted terminal, the step further includes: The control unit on the vehicle decrypts the received tunnel protocol data packets to obtain the original data blocks.

[0069] Specifically, the vehicle-mounted terminal receives tunnel protocol data packets sent by the debugging terminal through a virtual transmission tunnel. The vehicle-mounted terminal removes the header information of the tunnel protocol data packets, extracts encrypted data blocks, and uses a preset decryption algorithm to decrypt each encrypted data block. Finally, the vehicle-mounted terminal reassembles the decrypted data blocks into the original debugging instructions.

[0070] It is understood that the decryption process in this embodiment of the invention is as follows: In CBC mode, the IV is an important parameter in the decryption process and must be the same as the IV used during encryption. The encrypted data is decrypted using the same key and algorithm as the encryption. The decrypted data may contain padding bytes, which need to be removed to restore the original data. If the data blocks are out of order during transmission, they need to be sorted according to the data block number. Finally, the decrypted data blocks are concatenated in order to restore the original debugging instructions.

[0071] The present invention provides a vehicle-mounted remote debugging device 100, which is located on a cloud server. The cloud server is connected to the vehicle-mounted terminal and the debugging terminal via signal transmission. The debugging device 100 is used to execute any embodiment of the aforementioned vehicle-mounted remote debugging method. Specifically, the specific structure of the vehicle-mounted remote debugging device 100 provided by the present invention is described in detail below, according to the appendix. Figure 2 As shown, the debugging device 100 specifically includes the following: Module 110 is used to establish a virtual local area network for connecting the vehicle-mounted terminal and the debugging terminal to the Internet. The startup module 120 is used to control the vehicle terminal to start the ADB server and control the debugging terminal to establish a TCP connection with the ADB service of the vehicle terminal. The encryption module 130 is used to control the debugging terminal to send various debugging commands to the vehicle terminal through a preset ADB protocol, and to encrypt all debugging commands sent by the debugging terminal to the vehicle terminal. The detection module 140 is used to control the debugging terminal and the vehicle terminal to disconnect the virtual local area network when it is detected that the debugging of the vehicle terminal has been completed.

[0072] This invention also provides a computer device that can be used to perform a vehicle-mounted remote debugging method.

[0073] See Figure 3 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a communication bus 501. The memory may include a storage medium 503 and internal memory 504.

[0074] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it enables the processor 502 to perform a remote debugging method for the vehicle. The storage medium 503 may be a volatile storage medium or a non-volatile storage medium.

[0075] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.

[0076] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can perform the vehicle-mounted remote debugging method.

[0077] This network interface 505 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device 500 to which the present invention is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0078] The processor 502 is used to run the computer program 5032 stored in the memory to implement the corresponding functions in the above-described vehicle-mounted remote debugging method.

[0079] Those skilled in the art will understand that Figure 3 The embodiments of the computer device shown do not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. For example, in some embodiments, the computer device may include only memory and a processor. In such embodiments, the structure and function of the memory and processor are different from those shown. Figure 3 The embodiments shown are consistent and will not be described again here.

[0080] It should be understood that, in this embodiment of the invention, the processor 502 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0081] In another embodiment of the invention, a computer-readable storage medium is provided. This computer-readable storage medium may be volatile or non-volatile. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps included in the above-described vehicle-mounted remote debugging method.

[0082] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.

[0083] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.

[0084] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0085] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0086] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, a data transmitter, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks.

[0087] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A vehicle-mounted remote debugging method, characterized in that, The debugging method is applied to a cloud server, which is connected to the vehicle-mounted terminal and the debugging terminal for signal transmission. The debugging method includes: Establish a virtual local area network to connect the vehicle-mounted terminal and the debugging terminal to the Internet; Control the vehicle terminal to start the ADB server, and control the debugging terminal to establish a TCP connection with the ADB service of the vehicle terminal; The debugging terminal is controlled to send various debugging commands to the vehicle terminal through a preset ADB protocol, and all debugging commands sent from the debugging terminal to the vehicle terminal are encrypted. Once the debugging of the vehicle-mounted terminal is detected as complete, the debugging terminal and the vehicle-mounted terminal are controlled to disconnect from the virtual local area network.

2. The vehicle-mounted remote debugging method according to claim 1, characterized in that, The establishment of a virtual local area network for connecting the vehicle-mounted terminal and the debugging terminal to the Internet includes: The system controls the vehicle-mounted terminal and the debugging terminal to locate the corresponding super node in order to establish an internet connection. Both the vehicle-mounted terminal and the debugging terminal are controlled to send connection requests to the super node; When the supernode detects that it has received a connection request, it establishes a virtual local area network connecting the debugging terminal and the vehicle terminal based on the network environment and configuration information of the debugging terminal and the vehicle terminal.

3. The vehicle-mounted remote debugging method according to claim 2, characterized in that, After establishing the virtual local area network for connecting the vehicle-mounted terminal and the debugging terminal to the Internet, the method further includes: Assign corresponding virtual local area network (VLAN) IP addresses to the debugging terminal and the vehicle-mounted terminal.

4. The vehicle-mounted remote debugging method according to claim 3, characterized in that, The step of controlling the vehicle-mounted terminal to start the ADB server and controlling the debugging terminal to establish a TCP connection with the ADB service of the vehicle-mounted terminal includes: The communication link of the ADB on the vehicle terminal is switched to the TCP / IP network layer, and a specified listening port is set; The debugging terminal obtains the virtual local area network (VLAN) IP address of the vehicle terminal and initiates a connection request to the ADB server of the vehicle terminal to connect the VLAN IP address of the vehicle terminal and the listening port, thereby establishing the TCP connection.

5. The vehicle-mounted remote debugging method according to claim 1, characterized in that, The control terminal sends various debugging commands to the vehicle terminal via a preset ADB protocol, and simultaneously encrypts all debugging commands sent from the control terminal to the vehicle terminal, including: Establish a virtual transmission tunnel; All debugging commands sent from the debugging terminal to the vehicle terminal are transmitted in the virtual transmission tunnel.

6. The vehicle-mounted remote debugging method according to claim 5, characterized in that, The step of transmitting all the debugging commands sent from the debugging terminal to the vehicle terminal in the virtual transmission tunnel includes: All debugging commands sent from the debugging terminal to the vehicle terminal are divided into multiple data blocks; Each of the data blocks is encrypted to obtain multiple encrypted data blocks; Each of the encrypted data blocks is encapsulated in a preset tunnel protocol data packet and transmitted to the vehicle terminal through the virtual transmission tunnel.

7. The vehicle-mounted remote debugging method according to claim 6, characterized in that, The step of encapsulating each of the encrypted data blocks into a preset tunnel protocol data packet, and after the virtual transmission tunnel transmits the data to the vehicle-mounted terminal, further includes: The vehicle-mounted terminal is controlled to decrypt the received tunnel protocol data packets to obtain the original data blocks.

8. A vehicle-mounted remote debugging device, characterized in that, The debugging device is located on a cloud server, and the cloud server is connected to the vehicle-mounted terminal and the debugging terminal for signal transmission. The debugging device includes: A module is established to create a virtual local area network for connecting the vehicle-mounted terminal and the debugging terminal to the Internet. The startup module is used to control the vehicle-mounted terminal to start the ADB server and to control the debugging terminal to establish a TCP connection with the ADB service of the vehicle-mounted terminal. The encryption module is used to control the debugging terminal to send various debugging commands to the vehicle terminal through a preset ADB protocol, and to encrypt all debugging commands sent by the debugging terminal to the vehicle terminal. The detection module is used to control the debugging terminal and the vehicle terminal to disconnect the virtual local area network when it is detected that the debugging of the vehicle terminal has been completed.

9. A computer device, characterized in that, The computer device includes a processor, a network interface, a memory, and a communication bus, wherein the processor, network interface, and memory communicate with each other through the communication bus; Memory, used to store computer programs; When a processor executes a program stored in a memory, it implements the steps of the vehicle-mounted remote debugging method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the vehicle-mounted remote debugging method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and system for remotely testing vehicle machine, vehicle-mounted equipment and computer storage medium

    CN115348555A

  • Vehicle remote debugging system and method

    CN116828009A

  • Vehicle-mounted terminal remote debugging method, server, device, terminal and system

    CN116996548A

  • Equipment connection method and equipment

    CN117640717A

  • Vehicle remote diagnosis and debugging method and system

    CN117826760A