CAN signal remote vehicle control module and CAN database signal collecting and sending method
The hierarchical design of the CAN signal remote vehicle control module addresses adaptability and memory issues by using a state machine and database-based logic, ensuring efficient and maintainable remote control operations across various vehicle models.
Patent Information
- Application Number
- CN202411244418.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-06
AI Technical Summary
Existing remote vehicle control systems face issues with poor adaptability, inefficient memory usage, and chaotic code structure, leading to repetitive development and low maintainability.
A hierarchical design of a CAN signal remote vehicle control module with four layers, including a state machine for data processing and communication, a database for signal collection, and SQL-based business logic judgment, ensuring each control service is an independent code file and reducing memory consumption.
The solution provides a clear, adaptable, and maintainable code structure that reduces memory usage and eliminates the need for repetitive development, enabling efficient remote control operations across different vehicle models.
Smart Images

Figure CN119094269A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile remote control, and in particular to a CAN signal remote vehicle control module and a CAN database signal collection and sending method. Background Art
[0002] Remote control technology is a wireless network provided by TBOX, which allows car owners to control their vehicles at any time and any place through mobile phone apps when they are away from the vehicle. For example, unlocking, honking, flashing lights, starting the engine, turning on air conditioning, ventilation, and seat heating. The disadvantages of the existing technology are that the code architecture has poor adaptability, and the code needs to be redeveloped when the vehicle model and requirements are changed, and repeated development wastes resources; the structure is chaotic, the hierarchy is low, and the readability and maintainability are poor; CAN signal synchronization uses global variables, which consumes too much system memory. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide adaptability of remote control and reduce the memory occupied by CAN signals during the control process. The present invention provides a technical solution for a CAN signal remote vehicle control module, including: The first layer, VCTRL_SM, centrally processes the interaction between TSP and other modules, determines the data format and business function, and implements the remote communication function through the switching of the state machine; The second layer, VCTRL_SM_CUST, is responsible for the jump and execution of the remote control process, as well as the processing of service timeout; The third layer is the specific remote control business function layer. All remote control services are in this layer. Each control service is an independent code file. The preconditions and execution result judgments are directly judged by calling the interface provided by the database. The fourth layer, VCTRL_SM_CUST_UTIL is a public layer. The public interface called by the first layer, the second layer and the third layer includes a data parsing package, and functions are implemented in this layer.
[0004] Furthermore, the following three states are included: DEACTIVE, after the initialization starts, the initialization module enters the DEACTIVE state, obtains the bus status and network status in this state, and then switches to the IDLE state; IDLE is the state maintained under normal conditions. It receives and processes messages triggered by the platform and other modules, including bus status, network status, and remote control services. RUN is the state entered when reporting data. When the business execution is completed and the result needs to be reported, the module switches from IDLE state to RUN state to report data. After the reporting is completed and the ACK returned by the TSP platform is received, the state machine is released and switched back to IDLE state.
[0005] Furthermore, DEACTIVE does not process the received remote control service, and the acquired bus status and network connection status are processed and stored by the first layer.
[0006] Furthermore, in the IDLE state, when a service is triggered, the first layer will first receive the relevant services and filter and process the triggered services. If it is a remote control service, the parsing interface of the second layer will be called to decode the message, analyze the service type, and call the third layer through the function pointer to execute the service.
[0007] Furthermore, in the RUN state, messages triggered by the platform and other modules will be received.
[0008] The technical solution of the present invention also includes a CAN database signal collection and transmission method, including the following steps: Like the above-mentioned remote vehicle control module, this module is used to obtain and send CAN signals; CAN database, used to collect and save CAN signals.
[0009] Furthermore, during the initialization phase of the remote vehicle control module, a CAN signal collection table is created according to the configured CAN signal in the configuration table, and the CAN signal is registered with the BSW module. After successful registration, the BSW module will feed back the CAN signal to the remote vehicle control module in real time. The remote vehicle control module receives data through the VCTRL_SM layer and calls the database interface to write the CAN signal data into the CAN signal collection table.
[0010] Furthermore, there are enumeration values in the VCTRL_SM_CUST_UTIL public layer that correspond one-to-one to the business ID in the database. When the business operation needs to send a CAN signal, the CAN signal is read according to the corresponding business ID that has been configured. Changes to the sending of the CAN signal only require reconfiguration of the CAN signal ID corresponding to the business ID.
[0011] Furthermore, the database is independent of the remote vehicle control module and is an independent module, providing a calling interface for executing SQL statements, and the remote vehicle control module includes a header file of the database calling interface.
[0012] Furthermore, the vehicle control business logic judgment depends on SQL statements, including precondition judgment, result judgment, signal judgment, and logic judgment is triggered at the third layer of the remote vehicle control module.
[0013] Furthermore, the SQL statement is stored inside the database and is directly executed when called. The judgment CAN signal used in the SQL statement is directly obtained from the collection table, and the execution result is only returned to the remote vehicle control module.
[0014] Furthermore, when the database receives a remote control request, it executes the remote control process according to the business type to retrieve the enumeration value in VCTRL_SM_CUST_UTIL corresponding to the business ID in the database, and executes the LogicaISql statement configured in the corresponding LogicaID through the database call interface to perform business processing and return the processing result.
[0015] To achieve the above-mentioned purpose, the present invention provides a code hierarchical design module, each remote control business is a separate file, and finally the whole is included in the project, with clear structure, distinct levels, high readability and maintainability, easy later maintenance, high adaptability of code architecture, and no need to redevelop the code for different vehicle models and needs; the remote control CAN signal collection is completed by using a database, the CAN signal is registered in the initialization stage, and the CAN signal is written into the database in real time, reducing the system's memory consumption; the judgment condition of the remote control business is completed by using SQL statements, and when the business logic remains unchanged, subsequent maintenance and development only need to re-adapt the database and SQL statements to avoid repeated development. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a VCTRL business framework structure diagram of the present invention; Figure 2 is a state diagram of the remote control module of the present invention; Figure 3 It is a registered CAN signal table diagram of the present invention; Figure 4 It is a CAN signal collection table diagram of the present invention; Figure 5 It is the SQL business logic judgment diagram of the present invention; Figure 6 It is a CAN signal transmission diagram of the present invention. Specific implementation methods
[0017] The following describes several preferred embodiments of the present invention with reference to the drawings in the specification, so that the technical content is clearer and easier to understand. The present invention can be embodied in many different forms of embodiments, and the protection scope of the present invention is not limited to the embodiments mentioned in the text.
[0018] Explanation of terms: In this specification and claims, the terms have the following specific meanings.
[0019] State machine: a description of the operating status of the TBOX module TSP: TBOX’s cloud platform for data reporting, responsible for storing reported vehicle data SQL: A database language with multiple functions for data manipulation and data definition ACK: Confirmation character, used in computer networks to reply to received data The specific implementation methods of the present invention are as follows: Embodiment 1 Code layered design: like Figure 1 As shown: The remote vehicle control module is divided into 4 layers, which are included from top to bottom to improve the readability and maintainability of the code. The fourth layer VCTRL_SM_CUST_UTIL is a public layer, where the parsing group called by the upper layer includes the public interface, and all functions are implemented here; The third layer is the specific remote control business function layer. All remote control services are in this layer. Each control business is an independent code file. The preconditions and execution result judgments are directly called by the interface provided by the database. The second layer, VCTRL_SM_CUST, is mainly responsible for the jump and execution of the remote control process, as well as the processing of service timeout; The first layer VCTRL_SM centrally handles the interaction with TSP and other modules, determines the data format and business function, and realizes the communication function through the switching of the state machine.
[0020] like Figure 2 As shown, the module state machine of the remote vehicle control module is divided into DEACTIVE, IDLE, RUN -DEACTIVE: After INIT starts, the module initialization module enters the DEACTIVE state. In this state, the bus status, network status, and remote vehicle control module are obtained and configured, and then it switches to the IDLE state. DEACTIVE does not process the received remote control business. The obtained bus status, network connection status, and remote vehicle control module configuration are processed and saved by the VCTRL_SM layer; -IDLE: The state maintained under normal conditions, receiving and processing messages triggered by the platform and other modules, including bus status, network status, and remote control services. When a service is triggered, the VCTRL_SM layer will first receive the relevant services and filter and process the triggered services. If it is a remote control service, the parsing interface of the VCTRL_SM_CUST layer will be called to decode the message, analyze the service type, and call the third layer (the interface of the specific service layer) through the function pointer to execute the service; -RUN: The state entered when reporting data. When the business execution is completed and the result needs to be reported, the module switches from IDLE to RUN to report data. After receiving the ACK returned by the TSP platform after the report is completed, the state machine is released and switched back to the IDLE state. In the RUN state, messages triggered by the platform and other modules are also received.
[0021] Example 2 Database CAN signal database collection and transmission: - Use the database to collect and save CAN signals, unify the means for remote vehicle control modules to obtain and send CAN signals, and enable hierarchical design of modules -Database CAN signal collection such as Figure 3 As shown: During the initialization phase of the VCTRL module, according to the CAN signal configured in the configuration table, create Figure 4 The CAN signal collection table is created and the CAN signal is registered with the BSW module. After successful registration, the BSW module will feed back the CAN signal to the VCTRL module in real time. The remote vehicle control module receives the data through the VCTRL_SM layer and calls the database interface to write the CAN signal data into the VCTRL_SM layer. Figure 4 CAN signal collection table.
[0022] -Database signal sending as Figure 6 As shown in the figure: the enumeration values in VCTRL_SM_CUST_UTIL correspond one-to-one to the business ID in the database. When the business operation needs to send a CAN signal, the CAN signal is read according to the corresponding business ID that has been configured in the figure. The change of the sent CAN signal only needs to reconfigure the CAN signal ID corresponding to the business ID.
[0023] Example 3 SQL business judgment: -The database is independent of the remote vehicle control module and is an independent module. It provides a calling interface for the execution of SQL statements. The remote vehicle control module contains the header file of the database calling interface. -The logic judgment of vehicle control business depends on SQL statements, including precondition judgment, result judgment, and signal judgment. The logic judgment is triggered at the third layer of the remote vehicle control module; -SQL statements are stored in the database and run directly when called. In addition, the CAN signal used in the SQL statement is directly collected from the collection table ( Figure 4 ) and only returns the execution result to the remote vehicle control module, reducing the complexity of the third layer code of the remote vehicle control module.
[0024] -like Figure 5As shown: when a remote control request is received, the remote control process is executed according to the business type to retrieve the enumeration value in VCTRL_SM_CUST_UTIL that corresponds to the business ID in the database. Through the database call interface, the (LogicaISql) SQL statement configured in the corresponding LogicaID is executed to perform business processing and return the processing result.
[0025] The present invention provides a code hierarchical design module, each remote control business is a separate file, and finally the whole is included in the project, with clear structure, distinct layers, high readability and maintainability, easy later maintenance, high adaptability of code architecture, and no need to redevelop the code for different vehicle models and requirements; remote control CAN signal collection is completed by using a database, CAN signal is registered in the initialization stage, and CAN signal is written into the database in real time, reducing the system's memory consumption; the judgment condition of the remote control business is completed by using SQL statements, and when the business logic remains unchanged, subsequent maintenance and development only need to re-adapt the database and SQL statements, avoiding repeated development.
[0026] The remote vehicle control system of the present invention can be widely used in vehicles that require remote control functions, such as smart cars and electric cars, to remotely unlock, apply high voltage, open the air, etc. Through the system implemented by the present invention, the owner can accurately control the vehicle through the mobile phone APP at any time and any place, such as remotely unlocking, starting the engine, adjusting the temperature in the car, etc., which greatly improves the convenience and safety of using the vehicle. At the same time, the present invention can also be applied to scenarios such as fleet management and shared car rental to achieve more efficient vehicle management and operation.
[0027] The preferred specific embodiments of the present invention are described in detail above. It should be understood that ordinary technicians in the field can make many modifications and changes based on the concept of the present invention without creative work. Therefore, all technical solutions that can be obtained by technicians in the technical field through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A CAN signal remote vehicle control module, characterized in that: include: In the first layer, VCTRL_SM centrally processes the interaction between TSP and other modules, determines the data format and business function, and realizes the remote communication function through the switching of the state machine; The second layer, VCTRL_SM_CUST, is responsible for the jump and execution of the remote control process, as well as the processing of service timeout; The third layer is the specific remote control business function layer. All remote control services are in this layer. Each control service is an independent code file. The preconditions and execution result judgments are directly judged by calling the interface provided by the CAN database. The fourth layer, VCTRL_SM_CUST_UTIL is a public layer, and the public interfaces called by the first layer, the second layer and the third layer are all implemented in this layer.
2. The module according to claim 1, characterized in that There are also three states: DEACTIVE, after the initialization starts, the initialization module enters the DEACTIVE state, and after obtaining the bus status and network status in this state, it switches to the IDLE state; IDLE is the state maintained under normal conditions. It receives and processes messages triggered by the platform and other modules, including bus status, network status, and remote control services. RUN is the state entered when reporting data. When the business execution is completed and the result needs to be reported, the module switches from IDLE state to RUN state to report data. After the reporting is completed and the ACK returned by the TSP platform is received, the state machine is released and switched back to IDLE state.
3. The module according to claim 2, characterized in that DEACTIVE does not process the received remote control service, and the acquired bus status and network connection status are processed and stored by the first layer.
4. The module according to claim 2, characterized in that In the IDLE state, when a service is triggered, the first layer will first receive the relevant services and filter and process the triggered services. If it is a remote control service, the parsing interface of the second layer will be called to decode the message, analyze the service type, and call the third layer through the function pointer to execute the service.
5. The module according to claim 2, characterized in that In the RUN state, messages triggered by the platform and other modules will be received.
6. A method for collecting and sending CAN database signals, characterized in that: Includes the following steps: The remote vehicle control module according to any one of claims 1 to 5, wherein the module is used to obtain and send CAN signals; CAN database, used to collect and save CAN signals.
7. The method according to claim 6, characterized in that During the initialization phase of the remote vehicle control module, a CAN signal collection table is created according to the configured CAN signal in the configuration table, and the CAN signal is registered with the BSW module. After successful registration, the BSW module will feed back the CAN signal to the remote vehicle control module in real time. The remote vehicle control module receives data through the VCTRL_SM layer and calls the database interface to write the CAN signal data into the CAN signal collection table.
8. The method according to claim 6, characterized in that There are enumeration values in the VCTRL_SM_CUST_UTIL public layer that correspond one-to-one to the business ID in the database. When the business operation needs to send a CAN signal, the CAN signal is read according to the corresponding business ID that has been configured. The change of the sent CAN signal only requires reconfiguration of the CAN signal ID corresponding to the business ID.
9. The method according to claim 6, characterized in that The database is independent of the remote vehicle control module and is an independent module, providing a calling interface for executing SQL statements. The remote vehicle control module includes a header file of the database calling interface.
10. The method according to claim 9, characterized in that The vehicle control business logic judgment depends on SQL statements, including precondition judgment, result judgment, signal judgment, and logic judgment is triggered at the third layer of the remote vehicle control module.
11. The method according to claim 9, characterized in that The SQL statement is stored inside the database and is directly executed when called. The judgment CAN signal used in the SQL statement is directly obtained from the collection table, and the execution result is only returned to the remote vehicle control module.
12. The method according to claim 11, characterized in that When the database receives a remote control request, it executes the remote control process according to the business type to retrieve the enumeration value in VCTRL_SM_CUST_UTIL that corresponds to the business ID in the database, and executes the LogicaISql statement configured in the corresponding LogicaID through the database call interface to perform business processing and return the processing result.
