Data transmission method, vehicle, storage medium and program product

By configuring the port maintenance module and service monitoring module in the vehicle controller, monitoring port maintenance instructions and creating a second designated port, the security and stability issues of vehicle log data transmission are solved, safe and reliable data transmission is achieved, and vehicle safety and troubleshooting efficiency is improved.

CN120455482APending Publication Date: 2025-08-08BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510401005.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the prior art, there are security problems in the transmission of vehicle log data, which is easily illegally acquired or tampered with, affecting vehicle security and privacy protection, and insufficient transmission stability, affecting troubleshooting and system monitoring.

Method used

By configuring the port maintenance module and the service monitoring module in the first controller, listening to port maintenance instructions, creating a second designated port, and connecting to the second controller through this port, shielding the SSH default port to ensure the security and stability of data transmission.

Benefits of technology

Improve the security and transmission stability of log data, prevent data leakage, ensure safe operation of vehicles, meet legal requirements, and improve troubleshooting efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455482A_ABST
    Figure CN120455482A_ABST
Patent Text Reader

Abstract

The invention relates to a data transmission method, a vehicle, a storage medium and a program product, and the method comprises the steps: responding to a first designated port, monitoring a port maintenance instruction sent by a second controller, and instructing the second controller to access the first controller based on a second designated port to obtain data sent by the first controller. According to the invention, the second controller is connected with the first controller through the second specified port created by the first controller, so that the log data can be obtained from the first controller more safely.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle communication technology, and in particular, to a data transmission method, a vehicle, a storage medium, and a program product. Background Art

[0002] With the development of the automotive industry, the collection and processing of various vehicle data has become increasingly important. This data can include information about the vehicle's operating status, driving environment, and driving habits. This data can be recorded in logs. Logs play a crucial role in system development, and developers and testers often make extensive use of logging interfaces to record system runtime status. However, data transmission poses security issues, making optimal access to log data a pressing technical challenge. Summary of the Invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides a data transmission method, a vehicle, a storage medium and a program product.

[0004] A first aspect of the present disclosure provides a data transmission method, which is applied to a first controller and includes: In response to the first designated port monitoring the port maintenance instruction sent by the second controller, the second controller is instructed to access the first controller based on the second designated port to obtain data sent by the first controller.

[0005] Optionally, the method further includes: When the first designated port monitors a port maintenance instruction sent by the second controller, a process of creating a second designated port is created; Sending creation result information including the second designated port information to the second controller.

[0006] Optionally, the first controller is configured with a port maintenance module; The process of creating a second designated port when the first designated port monitors the port maintenance instruction sent by the second controller includes: When the port maintenance module monitors the port maintenance instruction sent by the second controller, the port maintenance module is controlled to create a process of the second designated port.

[0007] Optionally, the first controller is further configured with a service monitoring module, and the method further includes: Controlling the service monitoring module to monitor the status of the port maintenance module; When it is determined that the state of the port maintenance module is the running state, the state of the port maintenance module is continuously monitored.

[0008] Optionally, the port maintenance module and / or the service monitoring module are automatically started when the first controller is powered on.

[0009] Optionally, the method further includes: When it is determined that the state of the port maintenance module is a terminated state, the service corresponding to the port maintenance module is added to a restart service list, and the services in the restart service list are traversed and restarted; If it is determined that the service corresponding to the port maintenance module is restarted successfully, the service in the restart service list is deleted.

[0010] Optionally, the method further includes: If it is determined that the service corresponding to the port maintenance module fails to restart, an alarm prompt message is output.

[0011] Optionally, controlling the service monitoring module to monitor the status of the port maintenance module includes: Receiving the registration request sent by the port maintenance module based on the service monitoring module, and sending response information to the port maintenance module; Receive the heartbeat information sent by the port maintenance module, and determine whether the sending of the heartbeat information has timed out; If it is determined that the sending of the heartbeat information has not timed out, it is determined that the state of the port maintenance module is a running state.

[0012] Optionally, the method further includes: If it is determined that the sending of the heartbeat information has timed out, the state of the port maintenance module is determined to be a terminated state.

[0013] Optionally, the method further includes: receiving a port recovery instruction sent by the second controller, and terminating the process of the second designated port; Send process termination information to the second controller.

[0014] Optionally, the method further includes: After detecting that the vehicle is powered off, the process of the second designated port is terminated.

[0015] A second aspect of the present disclosure provides a data transmission method, which can be applied to a second controller, the method comprising: Sending a port maintenance instruction to a first controller, where the first controller is configured to monitor the port maintenance instruction based on a first designated port; Access the first controller based on the second designated port to obtain data sent by the first controller.

[0016] Optionally, after accessing the first controller based on the second designated port, the method includes: Sending a port recovery instruction to the first controller, instructing the first controller to terminate the process of the second designated port; Receive process termination information sent by the first controller.

[0017] A third aspect of the present disclosure provides a data transmission method, which can be applied to a data transmission system. The data transmission system includes a first controller and a second controller. The method includes: The second controller sends a port maintenance instruction to the first controller; The first controller monitors the port maintenance instruction based on the first designated port and sends data to the second controller through the second designated port.

[0018] A fourth aspect of the present disclosure provides a vehicle, comprising: a memory having a computer program stored thereon; A processor is used to execute the computer program in the memory to implement the steps of the method described in the first aspect.

[0019] In a fifth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the computer program is executed by a processor.

[0020] In a sixth aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the method described in the first aspect when executed by a processor.

[0021] The present invention can monitor the port maintenance instructions sent by the second controller through the first designated port in the first controller, and when the port maintenance instructions are monitored, the first controller can access the first controller based on the second designated port created by it, and then through the access, the data on it can be safely and effectively sent to the second controller, thereby improving the security of data transmission.

[0022] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following detailed description, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings: Figure 1 This is an example diagram of related technologies for obtaining domain controller logs.

[0024] Figure 2The figure is a flowchart showing a data transmission method according to an exemplary embodiment.

[0025] Figure 3 This is an example diagram of interaction between a second controller and a first controller when obtaining a domain controller log in a data transmission method according to an exemplary embodiment.

[0026] Figure 4 This is an example diagram showing closing a second designated port process in a data transmission method according to an exemplary embodiment.

[0027] Figure 5 This is an example diagram showing a self-starting registration process of a port maintenance module in a data transmission method according to an exemplary embodiment.

[0028] Figure 6 This is a diagram illustrating an example process of monitoring a port maintenance module by a service monitoring module in a data transmission method according to an exemplary embodiment.

[0029] Figure 7 The figure is a flowchart showing a data transmission method according to an exemplary embodiment.

[0030] Figure 8 The diagram is an example of an interaction diagram showing a data transmission method according to an exemplary embodiment.

[0031] Figure 9 The figure is a block diagram showing a data transmission device according to an exemplary embodiment.

[0032] Figure 10 The figure is a block diagram showing a data transmission device according to an exemplary embodiment.

[0033] Figure 11 The figure is a block diagram of a data transmission system according to an exemplary embodiment.

[0034] Figure 12 is a block diagram of a vehicle according to an exemplary embodiment. DETAILED DESCRIPTION

[0035] The following describes the specific embodiments of the present disclosure in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure and are not intended to limit the present disclosure.

[0036] The following describes the specific embodiments of the present disclosure in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure and are not intended to limit the present disclosure.

[0037] The following describes the specific embodiments of the present disclosure in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure and are not intended to limit the present disclosure.

[0038] The following describes the specific embodiments of the present disclosure in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure and are not intended to limit the present disclosure.

[0039] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0040] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0041] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0042] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0043] As a core component of a vehicle's electronic systems, the domain controller is primarily responsible for controlling and managing critical vehicle functions. Illegal access or tampering with log data could seriously impact the vehicle's safe operation and even cause a breakdown or accident. Therefore, ensuring the security of log data is crucial to maintaining vehicle safety.

[0044] Furthermore, logs often contain sensitive information, such as vehicle location, driving habits, and system failure records. If exploited maliciously, this information could infringe on the owner's privacy or even be used for illegal activities. Therefore, protecting log data from leakage is crucial. Furthermore, with the continuous advancement of automotive electronics and intelligence, governments and industry organizations around the world are placing increasingly stringent requirements on automotive data security and privacy protection. Therefore, ensuring the security of log data is a crucial prerequisite for complying with relevant regulations.

[0045] When a vehicle breaks down, technicians often need to analyze log data to determine the cause and location of the malfunction. A stable and reliable method for acquiring log data can significantly improve repair efficiency, shorten repair time, and reduce repair costs. Furthermore, a stable and reliable data transmission mechanism not only helps ensure the normal operation of the vehicle and timely repairs, but also enhances the overall user experience. When a vehicle malfunction occurs, users can receive a solution more quickly, reducing the inconvenience and frustration caused by the problem.

[0046] When acquiring log data, related technologies do not block the default SSH (Secure Shell) port. This allows others to use automated tools or scripts to conduct brute force attacks, such as attempting to log in to the first controller using different username and password combinations, and then perform malicious activities such as data theft and system damage. For example, the first controller cannot be a domain controller.

[0047] Furthermore, if the SSH service configuration file is modified or the SSH process on the first controller fails while acquiring log data, data transmission will fail, impacting troubleshooting and system monitoring. SSH is a network protocol that allows for encrypted remote login to another computer, such as a vehicle computer or electronic device.

[0048] For example, Figure 1 As shown, vehicle 100 includes a vehicle terminal 110 and a domain controller 120. To obtain log data, vehicle terminal 110 can access domain controller 120 via SSH port 22. Vehicle terminal 110 can then obtain domain controller logs from domain controller 120 via SCP (Secure Copy Protocol), a file transfer protocol based on SSH. However, accessing domain controller 120 via SSH port 22 can result in log data leakage.

[0049] Figure 2 is a flow chart showing a data transmission method according to an exemplary embodiment. Figure 2, the data transmission method may include the following steps.

[0050] In step S210 , in response to the first designated port monitoring the port maintenance instruction sent by the second controller, the second controller is instructed to access the first controller based on the second designated port to obtain data sent by the first controller.

[0051] In the disclosed embodiment, a vehicle may include a first controller and a second controller, wherein the first controller may be a domain controller and the second controller may be a vehicle-mounted computer. Here, the domain controller may monitor, via a first designated port, port maintenance commands sent by the vehicle-mounted computer (second controller). The port maintenance commands may be sent by the vehicle-mounted computer upon detecting an operation related to the domain controller. For example, upon detecting a user inputting a request to obtain a domain controller log, the vehicle-mounted computer may send a port maintenance command to the domain controller.

[0052] The first controller may include a startup component, Systemd, which may be a self-starting configuration in Linux. Specifically, Systemd may be the system launcher in a Linux system. It may be the first program launched by the Linux kernel, providing program startup services for the Linux system. Systemd may be configured with multiple services that can automatically start when the vehicle is started. Thus, Systemd in the embodiments of the present disclosure may be a set of basic building blocks for a Linux system.

[0053] In the embodiment of the present disclosure, a port maintenance module can be configured on Systemd, that is, a port maintenance module can be configured on the first controller, and the port maintenance module can be used to listen for port maintenance instructions and to create a process for the second designated port when the port maintenance instructions are listened for. Here, the service related to the port maintenance module can be a port maintenance service, that is, the port maintenance module can be a port maintenance service. By configuring the port maintenance service under Systemd, it can be ensured that the port maintenance service can perform a self-starting operation when the first controller is started based on the self-starting of the service deployed under Systemd.

[0054] It should be noted that the first designated port in the embodiments of the present disclosure may be a port designated by a port maintenance service, i.e., the first controller may monitor port maintenance instructions sent by the second controller via the first designated port designated by the port maintenance service. For example, the first controller may monitor port maintenance service instructions via port 1 designated by the port maintenance service.

[0055] In summary, the embodiment of the present disclosure can block the SSH default port (port 22) on the second controller. At the same time, the first controller can use the newly added port maintenance module (port maintenance service) to specify the first designated port to listen to the instructions sent by the second controller, so as to ensure that the second designated port created by the first controller is used to access the first controller.

[0056] Alternatively, upon detecting a port maintenance command, the first controller can instruct the second controller to access the first controller via the second designated port to retrieve data sent by the first controller. Prior to this, the first controller can create a process for the second designated port and send a creation result message including the second designated port information to the second controller.

[0057] As described above, the first controller can monitor the port maintenance instructions sent by the second controller through the first designated port of the port maintenance module. When the port maintenance instructions are monitored by the second controller, the embodiment of the present disclosure can create a process for the second designated port. The second designated port can be a designated port of SSH, such as SSH designated port 2.

[0058] On this basis, the embodiment of the present disclosure can send creation result information to the second controller, wherein the creation result information can include information of the second designated port. Specifically, the information of the second designated port can include SSH port number information and information that the process is successfully created.

[0059] As an example, when the first controller listens to the second controller sending a port maintenance instruction, the SSH port it creates is 20051. On this basis, the first controller can send the port number 20051 to the second controller, and at the same time, the first controller can send a message to the second controller indicating that the process of SSH port 20051 has been successfully created.

[0060] For example, see Figure 3 The port maintenance service (port maintenance module) of the first controller can monitor the port maintenance instruction sent by the second controller through the designated port 1, and after monitoring that the second controller sends the port maintenance instruction to the first controller, the first controller can create a designated SSH port 2 (second designated port) process, and after the process is successfully created, the first controller can return a creation result to the second controller, and the creation result can be a creation success result.

[0061] It should be noted that the second designated port can be a fixed port. For example, a historically selected port can be used as the second designated port. The historically selected port can be a port other than the default port used to connect the second controller to the first controller. The second designated port can also be determined based on actual port usage in SSH, for example, an idle port in SSH can be used as the second designated port.

[0062] Based on this, embodiments of the present disclosure can instruct the second controller to connect to the first controller based on the second designated port it created. In other words, after sending the creation result information to the second controller, the first controller can instruct the second controller to connect to the first controller, that is, the first controller can connect to the second controller via the second designated port.

[0063] As an optional manner, after the second controller is connected to the first controller through the second designated port of SSH, the first controller may send data to the second controller, and the data may be log data / domain controller log.

[0064] After sending data to the second controller, the first controller can listen for port recovery instructions through the port designated by the port maintenance service (port maintenance module). Upon receiving the port recovery instruction, the first controller terminates the process on the second designated port. Based on this, the first controller can send a process termination message to the second controller. The port recovery instruction primarily instructs the first controller to terminate the second designated port it previously created.

[0065] For example, Figure 4 As shown, after the first controller sends the data to the second controller, it can listen to the port recovery instruction sent by the second controller through port 1 (the first designated port) specified by the port maintenance service. After receiving the port recovery instruction, the first controller can use pkill to kill the specified SSH port 2 (the second designated port) process, and the environment recovery is completed.

[0066] Optionally, the first controller can also detect whether the vehicle is powered off. If so, the first controller can directly terminate the process for the second designated port. In other words, even if the first controller does not receive a port recovery instruction from the second controller, it can still terminate the process for the second designated port after detecting a vehicle power outage.

[0067] During the process of detecting whether the vehicle is powered off, the disclosed embodiment can detect whether the vehicle's SOC (State of Charge) is powered off. If the SOC is determined to be powered off, the process on the second designated port can be killed (terminated / shut down), thereby ensuring the safety of the environment after powering on again. The SOC can be the core processing unit of the first controller.

[0068] In the disclosed embodiment, a new boot-up auto-start service can be configured on the Systemd of the first controller. This boot-up auto-start service can be the aforementioned port maintenance service (port maintenance module). The port maintenance service can create and kill (terminate) the SSH second designated port access thread by listening to vehicle-mounted commands (port maintenance commands / port recovery commands) on the first designated port. This ensures that the vehicle-mounted terminal can securely access the first controller to obtain data.

[0069] Moreover, even if the second controller does not issue a port recovery instruction, the first controller can kill the pre-created SSH second designated port process after detecting that the vehicle is powered off, to ensure that the second controller will not access the first controller to obtain data when the vehicle is powered on again.

[0070] As another optional approach, the port maintenance module monitors port maintenance instructions, and during the process of creating the second designated port, the disclosed embodiment may also monitor the operation process of the port maintenance module through a service monitoring module. The service monitoring module may be configured on Systemd, that is, Systemd can ensure the normal startup of the port maintenance service. In other words, the first controller may be configured with a port maintenance module and / or a service monitoring module, and the port maintenance module and / or the service monitoring module may automatically start when the first controller is powered on.

[0071] In other words, in addition to the port maintenance module, Systemd can also include a service monitoring module. The service corresponding to the service monitoring module can be called a lifecycle service. The monitoring of the lifecycle service can ensure that the service on Systemd can be restarted after an exception occurs, thereby ensuring the safe and stable acquisition of data from the second controller. The data can be a domain control log.

[0072] Specifically, the disclosed embodiments can control the service monitoring module to monitor the status of the port maintenance module to determine whether the port maintenance module is in an operational state. If the port maintenance module is determined to be in an operational state, the status of the port maintenance module is continuously monitored. Here, the status of the port maintenance module can be the startup state of the port maintenance service, which can include a running state and a terminated state. If the port maintenance service is detected to be in an operational state, the startup state of the port maintenance service can continue to be periodically monitored.

[0073] On the contrary, if it is detected that the status of the port maintenance service is terminated, the embodiment of the present disclosure can add the port maintenance service to the restart service list, and subsequently restart each service in the restart service list to ensure the stable operation of the port maintenance module.

[0074] In the process of obtaining the startup status of the port maintenance module, the embodiment of the present disclosure can receive a registration request sent by the port maintenance module based on the service monitoring module, and send a response message to the port maintenance module to connect the port maintenance module and the service monitoring module. Based on this, the service monitoring module can receive a heartbeat message sent by the port service module and determine whether the sending of the heartbeat message has timed out. If it is determined that the sending of the heartbeat message has not timed out, the status of the port maintenance module is determined to be running.

[0075] On the contrary, if it is determined that the sending of the heartbeat information has timed out, the state of the port maintenance module is determined to be a terminated state.

[0076] As a specific implementation method, Figure 5 As shown, the port maintenance module (port maintenance service) can automatically start when the first controller starts. After starting, the port maintenance module can send a registration message to the service monitoring module (lifecycle service). This registration is a prerequisite for the service monitoring module to monitor the port maintenance module. After the port maintenance module successfully registers, it can periodically send heartbeat information to the service monitoring module. In other words, the port maintenance service can periodically send heartbeat packets to the lifecycle service.

[0077] Based on this, the service monitoring module can determine whether the port maintenance module is in the running state (running state) based on the heartbeat information sent by the port maintenance module, that is, whether the service is stopped. If it is determined that the service is not stopped, it is determined that the port maintenance module is in the running state. Conversely, if it is determined that the service is stopped, it is determined that the port maintenance service is in the terminated state (dead state).

[0078] As described above, once the port maintenance module is started and continues to operate, it periodically sends heartbeat packets to the service monitoring module. For example, if the service monitoring module fails to receive heartbeat packets from the port maintenance module three times in a row, the port maintenance module is determined to be in a terminated state. In other words, if the service monitoring module fails to receive heartbeat packets for more than a predetermined number of consecutive times, the port maintenance module is determined to be in a terminated state.

[0079] Figure 5 The figure shows a process of the registration life cycle after the port maintenance module is started, which may include a process of registering the service monitoring module after startup and sending heartbeats periodically. This process can be implemented through the heartbeat monitoring thread of the service monitoring module.

[0080] As described above, when the first controller monitors the status of the port maintenance module through the service monitoring module, if it detects that the status of the port maintenance module is terminated, it can add the service corresponding to the port maintenance module to the restart service list, and traverse and restart each service in the restart service list. On this basis, if it is determined that the service corresponding to the port maintenance module has been successfully restarted, it can delete the port maintenance service from the restart service list. This process can be implemented by the monitoring heartbeat thread of the service monitoring module.

[0081] In other words, after the service monitoring module is started, it can create a monitoring heartbeat thread and a monitoring restart thread. These two threads can monitor and restart (start) unstarted services. Figure 6 As shown, the heartbeat monitoring thread created by the service monitoring module can traverse the heartbeat information of the registered services since startup. For example, the heartbeat monitoring thread can receive the heartbeat information of the port maintenance module.

[0082] On this basis, the heartbeat monitoring thread can judge the heartbeat information. If it is determined that the heartbeat information sent by the port maintenance service has not timed out, the thread can continue to monitor the heartbeat information of the port maintenance service. Conversely, if it is determined that the heartbeat information of the port maintenance service has timed out, the heartbeat monitoring thread can add the timed-out port maintenance service to the restart service list in the restart monitoring thread.

[0083] In an embodiment of the present disclosure, the restart monitoring thread can periodically traverse the restart service list to perform a restart operation on the service that needs to be restarted, and obtain the service startup status after performing the restart operation. For example, when the number of restarts of the service is less than 5 times, if it is determined that the port maintenance service is started, it can be determined that the port maintenance service has been restarted successfully. On the contrary, when the number of restarts of the service is greater than 5 times, if it is determined that the port maintenance service has not been started successfully, it is necessary to report an alarm and record it, and then the current service can be deleted from the restart service list. In other words, if it is determined that the service corresponding to the port maintenance module has failed to restart, the embodiment of the present disclosure can output an alarm prompt message and delete the service from the restart service list.

[0084] Alternatively, as Figure 6 The heartbeat monitoring thread shown will continue to obtain heartbeat information after restarting the service with a heartbeat timeout through the restart thread. When it detects that the service has restored its heartbeat, it can delete the service from the restart service list. If no heartbeat is obtained, it will continue to obtain heartbeat information of registered services. For example, if it detects that the heartbeat of the port maintenance service has timed out, the service monitoring module can add the port maintenance service to the restart service list so that the port maintenance service in the restart service list can be restarted by monitoring the restart thread.

[0085] On the other hand, after the port maintenance service is added to the restart service list, the heartbeat monitoring thread will continue to monitor the heartbeat information of the port maintenance service. If it is detected that the heartbeat information of the port maintenance service resumes transmission, the port maintenance service can be deleted from the restart service list.

[0086] The restart service list may contain multiple service identifiers. In the process of traversing the restart service list, the disclosed embodiment may restart the service corresponding to each service identifier. Furthermore, during the restart process, the same service may be restarted multiple times. The service monitoring module may record the number of restarts for each service and output an alarm if it is determined that a service has not been successfully restarted after exceeding a preset number of restarts.

[0087] It should be noted that after determining that the service corresponding to the port maintenance module has been successfully restarted, the embodiment of the present disclosure can delete the service from the restart service list and then continue to monitor the heartbeat information of the service. If it is determined that the heartbeat information of the port maintenance module has timed out again, the embodiment of the present disclosure can add the port maintenance service to the restart service list to perform a restart action by monitoring the restart thread. Repeating the above process can ensure that the port maintenance service is in a running state.

[0088] Adding the port maintenance service to the Systemd configuration ensures that the service can start automatically. After the port maintenance service is registered with the lifecycle (service monitoring module), it can ensure that the port maintenance service exception or explicit stop can be pulled up, thereby ensuring that the second controller can stably access the first controller through the second designated port of SSH to obtain data.

[0089] Configuring the port maintenance service in Systemd ensures that it automatically starts at boot time. Furthermore, this disclosed embodiment adds a registration lifecycle (service monitoring module) process. If the port maintenance service fails abnormally or is explicitly stopped, the service monitoring module can restart the port maintenance service, ensuring that the second controller can reliably access the first controller to retrieve log files.

[0090] The embodiment of the present disclosure first utilizes the first designated port to monitor the port maintenance instructions sent by the second controller, and when the port maintenance instructions are monitored, the first controller can create a process for the second designated port, and on this basis, send creation result information to the second controller, and the creation result information may include information related to the second designated port. After that, the second controller can access the first controller according to the information it receives, that is, the second controller can connect the second controller to the first controller according to the second designated port, and then through this access, the target data can be obtained from the first controller safely and effectively, thereby improving the security of log data acquisition.

[0091] The embodiment of the present disclosure can monitor the port maintenance instructions sent by the second controller through the first designated port in the first controller, and when the port maintenance instructions are monitored, the first controller can access the first controller based on the second designated port created by it, and then through this access, the data on it can be safely and effectively sent to the second controller, thereby improving the security of data transmission.

[0092] Figure 7 is a flow chart showing a data transmission method according to an exemplary embodiment. Figure 7 , the data transmission method may include the following steps.

[0093] In step S710, a port maintenance instruction is sent to a first controller, and the first controller is configured to monitor the port maintenance instruction based on a first designated port.

[0094] As an optional method, the embodiment of the present disclosure can pre-shield port 22 of the second controller SSH. When an operation related to the first controller is detected, the second controller may not access the first controller through the 22 end of SSH, but may first send a port maintenance instruction to the first controller to instruct the first controller to create a process for the second designated port through the port maintenance instruction.

[0095] In step S720 , the first controller is accessed based on the second designated port to obtain data sent by the first controller.

[0096] After sending the port maintenance instruction to the first controller, if the second controller receives the creation result information sent by the first controller, it can access the first controller according to the port information in the creation result information.

[0097] In the embodiment of the present disclosure, the second controller can access the first controller through the second designated port process. Figure 3 As shown, after receiving the creation result sent by the first controller, the second controller can access the first controller through the process of the SSH designated port 2.

[0098] In addition, after the second controller is connected to the first controller through the second designated port, it can obtain data sent by the first controller, that is, the second controller can obtain data from the first controller and save the data to the second controller.

[0099] In other words, after the second controller is connected to the first controller, it can directly pull data from the first controller, and the data can be a domain controller log. Specifically, the embodiment of the present disclosure can obtain the domain controller log through the SCP protocol.

[0100] Optionally, the disclosed embodiments may also acquire domain controller logs via the SFTP protocol (Secure File Transfer Protocol). The SFTP protocol is a network protocol for securely transferring files over a network similar to FTP (File Transfer Protocol) via SSH.

[0101] For example, Figure 3 As shown, after the second controller is connected to the designated SSH port 2, it can obtain the domain control log through SFTP, that is, pull the log data of the first controller (domain control side) to the second controller (vehicle side) for storage.

[0102] SFTP not only supports file upload and download, but also provides richer file management functions, such as remote file viewing, directory listing, file deletion, renaming, truncation, etc. In other words, SFTP can be used to perform interactive sessions and various file management operations.

[0103] In addition, SFTP supports multi-threaded transfers, which can improve the transfer efficiency of large files to a certain extent. At the same time, SFTP supports breakpoint resuming. If an interruption occurs during the transfer process, SFTP can continue the transfer when it reconnects, without having to start from the beginning, thus ensuring the efficiency of log data transmission.

[0104] In addition, after connecting to the first controller, the second controller can also send a port recovery instruction to the first controller to instruct the first controller to terminate the process of the second designated port, and disconnect from the first controller after receiving the process termination information sent by the first controller.

[0105] For example, Figure 4As shown, after the second controller retrieves the data, it can send a recovery instruction to the first controller. At this time, the first controller can listen to the recovery instruction through port 1 (the first designated port) specified by the port maintenance service. On this basis, the first controller can kill the specified SSH port 2 (the second designated port) process through pkill, and the recovery environment is completed.

[0106] In summary, the disclosed embodiments can block the default SSH port (port 22) on the second controller. This default port can be the default access port for the domain controller. By blocking the default SSH port, the second controller can prevent brute-force log theft via the default port.

[0107] In addition, when the second controller obtains the domain control log, it can use the port maintenance service in the first controller to start automatically with the first controller. After that, the port maintenance service can actively register the life cycle (service monitoring module), and after successful registration, it can send port maintenance and recovery instructions through the second controller to enable the port maintenance service to create and kill the process of the second designated port of SSH, so that log data can be obtained safely and stably.

[0108] Figure 8 is an interactive example diagram showing a data transmission method according to an exemplary embodiment, see Figure 8 , the data transmission method may include the following steps.

[0109] In step S810 , the second controller sends a port maintenance instruction to the first controller.

[0110] In step S820, the first controller receives a port maintenance instruction based on monitoring of the first designated port, and sends data to the second controller through the second designated port.

[0111] Figure 9 is a block diagram of a data transmission device according to an exemplary embodiment. Figure 9 As shown, the data transmission device 900 may include an access module 910 .

[0112] The access module 910 is configured to, in response to the first designated port monitoring a port maintenance instruction sent by the second controller, instruct the second controller to access the first controller based on the second designated port to obtain data sent by the first controller.

[0113] In some embodiments, the data transmission device 900 may further include: a creation module configured to create a process of the second designated port when the first designated port monitors a port maintenance instruction sent by the second controller; The sending module is configured to send creation result information including second designated port information to the second controller.

[0114] In some embodiments, the first controller is configured with a port maintenance module, and the creation module is further configured to control the port maintenance module to create a process of the second designated port based on when the port maintenance module monitors the port maintenance instruction sent by the second controller.

[0115] In some embodiments, the first controller is further configured with a service monitoring module, and the data transmission device 900 may further include: The monitoring module is configured to control the service monitoring module to monitor the status of the port maintenance module; when it is determined that the status of the port maintenance module is a running state, continuously monitor the status of the port maintenance module.

[0116] In some implementations, the port maintenance module and / or the service monitoring module are automatically started when the first controller is powered on.

[0117] In some embodiments, the monitoring module is also configured to add the service corresponding to the port maintenance module to the restart service list and traverse and restart the services in the restart service list when it is determined that the status of the port maintenance module is a terminated state; and delete the service from the restart service list if it is determined that the service corresponding to the port maintenance module is restarted successfully.

[0118] In some embodiments, the data transmission device 900 may further include: The output module is configured to output an alarm prompt message when determining that the service corresponding to the port maintenance module fails to be restarted.

[0119] In some embodiments, the monitoring module is also configured to receive a registration request sent by the port maintenance module based on the service monitoring module, and send a response message to the port maintenance module; receive a heartbeat message sent by the port maintenance module, and determine whether the sending of the heartbeat message has timed out; if it is determined that the sending of the heartbeat message has not timed out, determine that the status of the port maintenance module is a running state.

[0120] In some embodiments, the monitoring module is further configured to determine that the state of the port maintenance module is a terminated state if it is determined that the sending of the heartbeat information has timed out.

[0121] In some embodiments, the data transmission device 900 may further include: The termination module is configured to receive the port recovery instruction sent by the second controller, terminate the process of the second designated port, and send process termination information to the second controller.

[0122] In some embodiments, the termination module is further configured to terminate the process of the second designated port after detecting that the vehicle is powered off.

[0123] Figure 10 is a block diagram of a data transmission device according to an exemplary embodiment. Figure 10 As shown, the data transmission device 1000 may include a sending module 1010 and an acquiring module 1020 .

[0124] The acquisition module 1010 is configured to send a port maintenance instruction to the first controller, and the first controller is configured to monitor the port maintenance instruction based on the first designated port; The acquisition module 1020 accesses the first controller based on the second designated port to acquire data sent by the first controller.

[0125] In some embodiments, the data transmission device 1000 may further include: The termination module is configured to send a port recovery instruction to the first controller, instructing the first controller to terminate the process of the second designated port; and receive process termination information sent by the first controller.

[0126] Figure 11 is a block diagram of a data transmission system 1100 according to an exemplary embodiment. Figure 11 As shown, the data transmission system may include a first controller 1110 and a second controller 1120 .

[0127] The second controller 1120 sends a port maintenance instruction to the first controller; the first controller 1110 monitors the port maintenance instruction based on the first designated port and sends data to the second controller 1120 through the second designated port.

[0128] Figure 12 FIG. 1 is a block diagram of a vehicle 1200 according to an exemplary embodiment. Figure 12 As shown, the vehicle 1200 may include a processor 1201 and a memory 1202 . The vehicle 1200 may also include one or more of a multimedia component 1203 , an input / output (I / O) interface 1204 , and a communication component 1205 .

[0129] The processor 1201 is used to control the overall operation of the vehicle 1200 to complete all or part of the steps in the above-mentioned data transmission method. The memory 1202 is used to store various types of data to support the operation of the vehicle 1200. This data may include, for example, instructions for any application or method operating on the vehicle 1200, as well as application-related data such as contact information, sent and received messages, images, audio, video, etc. The memory 1202 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 1203 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 1202 or transmitted via the communication component 1205. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 1204 provides an interface between the processor 1201 and other interface modules, such as a keyboard, a mouse, and buttons. These buttons may be virtual or physical. The communication component 1205 is used for wired or wireless communication between the vehicle 1200 and other devices. Wireless communication may include Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G networks, or a combination thereof, without limitation. Accordingly, the communication component 1205 may include a Wi-Fi module, a Bluetooth module, an NFC module, and the like.

[0130] In an exemplary embodiment, the vehicle 1200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned data transmission method.

[0131] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided. When executed by a processor, the program instructions implement the steps of the above-described data transmission method. For example, the computer-readable storage medium may be the aforementioned memory 1202 including the program instructions. The program instructions may be executed by the processor 1201 of the vehicle 1200 to perform the above-described data transmission method.

[0132] It should be noted that the vehicle 1200 may also include Figure 11 The data transmission system shown.

[0133] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and has a code portion for executing the above-mentioned data transmission method when executed by the programmable device.

[0134] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments. Within the technical concept of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all fall within the scope of protection of the present disclosure.

[0135] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0136] In addition, the various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A data transmission method, characterized in that: Applied to the first controller, the method includes: In response to the first designated port monitoring the port maintenance instruction sent by the second controller, the second controller is instructed to access the first controller based on the second designated port to obtain data sent by the first controller.

2. The data transmission method according to claim 1, wherein: The method further comprises: When the first designated port monitors a port maintenance instruction sent by the second controller, a process of creating a second designated port is created; Sending creation result information including the second designated port information to the second controller.

3. The data transmission method according to claim 1, wherein: The first controller is configured with a port maintenance module; The process of creating a second designated port when the first designated port monitors the port maintenance instruction sent by the second controller includes: When the port maintenance module monitors the port maintenance instruction sent by the second controller, the port maintenance module is controlled to create a process of the second designated port.

4. The data transmission method according to claim 3, wherein: The first controller is further configured with a service monitoring module, and the method further includes: Controlling the service monitoring module to monitor the status of the port maintenance module; When it is determined that the state of the port maintenance module is the running state, the state of the port maintenance module is continuously monitored.

5. The data transmission method according to claim 4, characterized in that: The port maintenance module and / or the service monitoring module are automatically started when the first controller is powered on.

6. The data transmission method according to claim 4, characterized in that: The method further comprises: When it is determined that the state of the port maintenance module is a terminated state, the service corresponding to the port maintenance module is added to a restart service list, and the services in the restart service list are traversed and restarted; Determine that the service corresponding to the port maintenance module is restarted successfully, and delete the service from the restart service list.

7. The data transmission method according to claim 6, characterized in that: The method further comprises: If it is determined that the service corresponding to the port maintenance module fails to restart, an alarm prompt message is output.

8. The data transmission method according to claim 4, characterized in that: The controlling the service monitoring module to monitor the status of the port maintenance module includes: Receiving the registration request sent by the port maintenance module based on the service monitoring module, and sending response information to the port maintenance module; Receive the heartbeat information sent by the port maintenance module, and determine whether the sending of the heartbeat information has timed out; If it is determined that the sending of the heartbeat information has not timed out, it is determined that the state of the port maintenance module is a running state.

9. The data transmission method according to claim 8, characterized in that: The method further comprises: If it is determined that the sending of the heartbeat information has timed out, the state of the port maintenance module is determined to be a terminated state.

10. The data transmission method according to claim 1, wherein: The method further comprises: receiving a port recovery instruction sent by the second controller, and terminating the process of the second designated port; Send process termination information to the second controller.

11. The data transmission method according to claim 1, wherein: The method further comprises: After detecting that the vehicle is powered off, the process of the second designated port is terminated.

12. A data transmission method, characterized in that: Applied to the second controller, the method includes: Sending a port maintenance instruction to a first controller, where the first controller is configured to monitor the port maintenance instruction based on a first designated port; Access the first controller based on the second designated port to obtain data sent by the first controller.

13. The data transmission method according to claim 12, wherein: After accessing the first controller based on the second designated port, the method includes: Sending a port recovery instruction to the first controller, instructing the first controller to terminate the process of the second designated port; Receive process termination information sent by the first controller.

14. A data transmission method, characterized in that: Applied to a data transmission system, the data transmission system includes a first controller and a second controller, and the method includes: The second controller sends a port maintenance instruction to the first controller; The first controller monitors the port maintenance instruction based on the first designated port and sends data to the second controller through the second designated port.

15. A vehicle, characterized in that: The vehicle comprises: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 14.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.

17. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 14.