A method, device and TBOX for remotely controlling an ECU

Through an asynchronous and parallel remote control method, the first thread sends remote control commands and the second thread tracks execution results, the user wait problem caused by serial execution of remote control commands in the prior art is solved, and the user's real-time operation of the remote control process and the improvement of experience is realized.

CN116909256BActive Publication Date: 2025-07-18CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202311072325.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-24
Publication Date
2025-07-18
Estimated Expiration
2043-08-24

AI Technical Summary

Technical Problem

The existing remote control method adopts the "Request-Response" model, which causes the remote control command to wait for the previous command to be executed and the results are feedback before the next one can be issued. Users cannot use the vehicle functions in a timely manner during the long-term operation, which affects the experience.

Method used

The asynchronous parallel remote control method is adopted, and the first thread receives and sends remote control commands through the first thread. Combined with the notification model, the second thread tracks the execution results and uses the result check timer to read the cache table, realizing the asynchronous execution of multiple remote control commands.

Benefits of technology

The user has no delay perception of the remote control process and can perform multiple operations in a short time, which improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116909256B_ABST
    Figure CN116909256B_ABST
Patent Text Reader

Abstract

The present application relates to the field of new energy vehicles, and provides a method, a device and a TBOX for remotely controlling an ECU. The method includes: invoking a first thread to receive a first remote control command and send a first execution notice to a first controlled ECU, waiting for and receiving an Nth remote control command and sending an Nth execution notice to an Nth controlled ECU, where N is an integer greater than 2; invoking a second thread to track a first execution result reported by the first controlled ECU and an Nth execution result reported by the Nth controlled ECU, and refreshing a local message cache table; in the second thread, reading an execution result set in the local message cache table through a result check timer; based on the execution result set, returning a first remote control result for the first remote control command and an Nth remote control result for the Nth remote control command to the remote control end. The present application can asynchronously and parallelly execute the remote control commands issued by the remote control end, and users have no delay perception of the entire remote control process, with a good experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of new energy vehicles, and in particular, to a method, device, and TBOX for remotely controlling an ECU. Background Art

[0002] In recent years, remote control technology has been one of the research hotspots in the field of new energy vehicles. The remote control of new energy vehicles not only includes the control of a large number of in-vehicle electrical architectures, but also includes the control of some unique electronic functions, and at the same time involves the sending and receiving of a large amount of real-time data. Therefore, the amount of data interaction is very large, no less than that of a medium-sized portal website.

[0003] The existing remote control method adopts the "Request-Response" model. The general execution process of this "Request-Response" model is: when a remote control command is issued, the TBOX synchronously serially (blockingly) sends the remote control command to the ECU on the vehicle side, and then blockingly loops to check whether the ECU has reported the execution result of executing the remote control command. The characteristic of this "Request-Response" model is that only one remote control command can be executed at the same time. The TBOX will return the execution result of the ECU on the vehicle side to the remote control end only after knowing that the execution result is updated or the execution times out, and then the execution of the next remote control command is allowed.

[0004] In some remote control scenarios that take a long time (for example, scenarios such as remotely controlling the opening / closing state of the window and remotely controlling the opening / closing state of the tailgate), using the existing "Request-Response" model, it is necessary to wait for the previous remote control instruction to be executed by the ECU on the vehicle side and the execution result to be fed back to the TBOX before the next remote control instruction can be continued. Therefore, the user needs to wait for a long time to perform other remote operations, resulting in the user being unable to use a certain function of the vehicle for a long time, thus affecting the user experience. Summary of the Invention

[0005] In view of this, the embodiments of this application provide a method, device, and TBOX for remotely controlling an ECU to solve the problem that the existing remote control method adopts the "Request-Response" model, which can only support the synchronous serial execution of remote control commands, easily resulting in the user being unable to use a certain function of the vehicle for a long time, thus affecting the user experience.

[0006] In the first aspect of the embodiments of this application, a method for remotely controlling an ECU is provided, including:

[0007] Invoke the first thread, receive the first remote control command for the first controlled ECU, send the first execution notice for the first remote control command to the first controlled ECU, wait for and receive the Nth remote control command for the Nth controlled ECU, and send the Nth execution notice for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than 2;

[0008] Invoke the second thread, track the first execution result reported by the first controlled ECU for the first execution notice, refresh the local message cache table based on the first execution result, track the Nth execution result reported by the Nth controlled ECU for the Nth execution notice, and refresh the local message cache table based on the Nth execution result;

[0009] In the second thread, start a result check timer to read the set of execution results in the local message cache table at a preset time interval through the result check timer, and the set of execution results includes at least one execution result;

[0010] Based on the set of execution results, return the first remote control result for the first remote control command for the first controlled ECU and the Nth remote control result for the Nth remote control command for the Nth controlled ECU to the remote control end.

[0011] In the second aspect of the embodiments of the present application, another method for remotely controlling an ECU is provided, including:

[0012] Invoke the first thread, receive the first remote control command for the first controlled ECU, send the first query request for the first remote control command to the first controlled ECU, wait for and receive the Nth remote control command for the Nth controlled ECU, and send the Nth query request for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than 2;

[0013] Invoke the second thread, collect the public status information and private status information of the vehicle end. If it is confirmed based on the public status information and private status information that the current vehicle status of the vehicle end meets the preset remote control switching condition, then compare the first query result fed back by the first controlled ECU for the first query request with the first remote control command to obtain the first comparison result, and compare the Nth query result fed back by the Nth remote control command for the Nth query request to obtain the Nth comparison result;

[0014] Based on the first comparison result and the Nth comparison result, return the first remote control result for the first remote control command for the first controlled ECU and the Nth remote control result for the Nth remote control command for the Nth controlled ECU to the remote control end.

[0015] In the third aspect of the embodiments of the present application, a device for remotely controlling an ECU is provided, including:

[0016] The first call module is configured to call a first thread, receive a first remote control command for a first controlled ECU, send a first execution notice for the first remote control command to the first controlled ECU, wait for and receive an Nth remote control command for an Nth controlled ECU, and send an Nth execution notice for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than 2;

[0017] The second call module is configured to call a second thread, track a first execution result reported by the first controlled ECU for the first execution notice, refresh a local message cache table based on the first execution result, track an Nth execution result reported by the Nth controlled ECU for the Nth execution notice, and refresh the local message cache table based on the Nth execution result;

[0018] The result reading module is configured to, in the second thread, start a result check timer to read an execution result set in the local message cache table at a preset time interval through the result check timer, where the execution result set includes at least one execution result;

[0019] The result returning module is configured to, based on the execution result set, return a first remote control result for the first remote control command for the first controlled ECU and an Nth remote control result for the Nth remote control command for the Nth controlled ECU to the remote control end.

[0020] In a fourth aspect of the embodiments of the present application, another device for remotely controlling an ECU is provided, including:

[0021] The third call module is configured to call a first thread, receive a first remote control command for a first controlled ECU, send a first query request for the first remote control command to the first controlled ECU, wait for and receive an Nth remote control command for an Nth controlled ECU, and send an Nth query request for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than 2;

[0022] The fourth call module is configured to call a second thread, collect public status information and private status information of the vehicle end. If it is confirmed based on the public status information and the private status information that the current vehicle status of the vehicle end meets a preset remote control switching condition, then compare a first query result fed back by the first controlled ECU for the first query request with the first remote control command to obtain a first comparison result, and compare an Nth query result fed back by the Nth remote control command for the Nth query request to obtain an Nth comparison result;

[0023] The result feedback module is configured to, based on the first comparison result and the Nth comparison result, return a first remote control result for the first remote control command for the first controlled ECU and an Nth remote control result for the Nth remote control command for the Nth controlled ECU to the remote control end.

[0024] In the fifth aspect of the embodiments of the present application, a TBOX is provided. The TBOX includes an MCU and an MPU; the MPU includes the device of the remote control ECU in the third aspect or the fourth aspect.

[0025] In the sixth aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above method are implemented.

[0026] In the seventh aspect of the embodiments of the present application, a readable storage medium is provided. The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0027] Compared with the prior art, the beneficial effects of the embodiments of the present application at least include: by calling the first thread to receive remote control commands for multiple controlled ECUs, and combining the use of the Notify model to send execution notifications for the remote control commands to each controlled ECU, the efficiency of the remote control commands being executed by the controlled ECUs can be greatly improved. At the same time, by calling the second thread and cooperating with the result check timer to intermittently track the execution status of the remote control commands by each controlled ECU, the remote control commands sent by the remote control end can be executed asynchronously and in parallel. The user has no sense of delay in the entire remote control process and can perform multiple remote operations in a short time to flexibly control and use each function of the vehicle, thereby greatly enhancing the user experience of remotely controlling the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0029] Figure 1 is a schematic diagram of an application scenario of the embodiments of the present application;

[0030] Figure 2 is a schematic flowchart of a method for remotely controlling an ECU provided by the embodiments of the present application;

[0031] Figure 3 is a schematic diagram of the principle of refreshing the local message cache table in the method for remotely controlling an ECU provided by the embodiments of the present application;

[0032] Figure 4 is a schematic diagram of reading a message in the method for remotely controlling an ECU provided by the embodiments of the present application;

[0033] Figure 5 It is a schematic flowchart of another method for remotely controlling an ECU provided by an embodiment of the present application;

[0034] Figure 6 It is a schematic diagram of the refresh principle of the configuration structure of the TSP module in the method for remotely controlling an ECU provided by an embodiment of the present application;

[0035] Figure 7 It is a schematic diagram of a device for remotely controlling an ECU provided by an embodiment of the present application;

[0036] Figure 8 It is a schematic diagram of a device for remotely controlling an ECU provided by an embodiment of the present application;

[0037] Figure 9 It is a schematic structural diagram of a TBOX provided by an embodiment of the present application;

[0038] Figure 10 It is a schematic structural diagram of a TBOX provided by an embodiment of the present application;

[0039] Figure 11 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0040] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0041] A method, a device, and a TBOX for remotely controlling an ECU according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0042] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application. This application scenario may include a remote control terminal 101, a cloud platform 102, a TBOX 103, an ECU 104, an ECU 105, and an ECU 106. The remote control terminal 101 and the cloud platform 102 can be connected through a 4G / 5G network, etc.; the cloud platform 102 and the TBOX 103 can be connected through an Ethernet, a 4G / 5G network, etc.; the TBOX 103 and the ECU 104, the ECU 105, and the ECU 106 can be connected through a CAN bus.

[0043] The remote control terminal 101 can be hardware or software. When the remote control terminal 101 is hardware, it can be various electronic devices with a display screen and supporting communication with the cloud platform 102, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc.; when the remote control terminal 101 is software, it can be installed in the above-mentioned electronic devices. The remote control terminal 101 can be implemented as multiple software or software modules, or can be implemented as a single software or software module, and the embodiments of the present application do not limit this. Further, various applications can be installed on the remote control terminal 101, for example, data processing applications, instant messaging tools, remote control applications, etc.

[0044] The cloud platform 102 can be a TSP (Telematics Service Provider) platform or a cloud computing service center, etc., and the embodiments of the present application do not limit this.

[0045] The TBOX 103 generally refers to a remote information processor installed in a vehicle and can also be called an intelligent vehicle terminal. Among them, the TBOX 103 includes an MCU (Microcontroller Unit) and an MPU (Microprocessor Unit); among them, the MPU can include a TSP module, a remote module, a CAN parsing module, and an IPC (InterProcessCommunication) communication module.

[0046] The ECUs 104, 105, and 106 can be each ECU component connected under the TBOX 103. The ECU can also be called a body controller.

[0047] In an application scenario, a user can send a first remote control command for a first controlled ECU (e.g., ECU 104) to a cloud platform 102 through a remote control terminal 101; after receiving the first remote control command, the cloud platform 102 forwards the first remote control command to a TBOX 103; the TBOX 103 calls a first thread to receive the first remote control command, and sends a first execution notice for the first remote control command to the first controlled ECU, and then waits for and receives an Nth remote control command for an Nth controlled ECU (e.g., ECU 105, ECU 106) sent by the remote control terminal 101 and forwarded by the cloud platform 102, and sends an Nth execution notice for the Nth remote control command to the Nth controlled ECU; the TBOX 103 calls a second thread to track a first execution result reported by the first controlled ECU for the first execution notice, refresh a local message cache table based on the first execution result, track an Nth execution result reported by the Nth controlled ECU for the Nth execution notice, and refresh the local message cache table based on the Nth execution result; in the second thread, a result check timer is started to read an execution result set in the local message cache table at a preset time interval through the result check timer; finally, based on the execution result set, a first remote control result for the first remote control command of the first controlled ECU and an Nth remote control result for the Nth remote control command of the Nth controlled ECU are returned to the remote control terminal 101 via the cloud platform 102. Through the above method, the remote control commands sent by the remote control terminal can be executed asynchronously and in parallel, and the user has no delay perception of the entire remote control process, and multiple remote operations can be performed in a short time to flexibly control and use various functions of the vehicle, thereby greatly improving the user experience of remotely controlling the vehicle.

[0048] It should be noted that the specific types, quantities, and combinations of the remote control terminal 101, the cloud platform 102, the TBOX 103, the ECU 104, the ECU 105, and the ECU 106 can be adjusted according to the actual requirements of the application scenario, and the embodiments of the present application do not limit this. For example, the number of ECUs can be one or more; the remote control terminal 101 can directly send a remote control command to the TBOX 103, and the TBOX 103 directly returns the remote control results of each ECU after executing the remote control command to the remote control terminal 101, etc.

[0049] Figure 2 is a schematic flowchart of a method for remotely controlling an ECU provided by an embodiment of the present application. Figure 2 The method for remotely controlling an ECU can be executed by Figure 1 the TBOX 103 of Figure 2 As shown in

[0050] Step S201: Invoke the first thread to receive the first remote control command for the first controlled ECU, send the first execution notice for the first remote control command to the first controlled ECU, wait for and receive the Nth remote control command for the Nth controlled ECU, and send the Nth execution notice for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than 2.

[0051] The first remote control command and the Nth remote control command can be various commands related to the vehicle remote control function. For example, they can be commands such as remote vehicle start command, remote window open / close command, remote air conditioner on / off command, etc.

[0052] Normally, the first remote control command and the Nth remote control command respectively correspond to commands of different vehicle remote control functions, and their corresponding command executors (i.e., controlled ECUs) are different. For example, the first remote control command is a remote window opening command, and its controlled ECU is the ECU related to window control. The Nth remote control command can be a remote air conditioner on command, and its controlled ECU is the ECU related to in-vehicle air conditioner control.

[0053] The preset time interval can be flexibly set according to the actual situation. For example, it can be 10 seconds, 15 seconds, etc., without specific limitation.

[0054] As an example, please refer to Figure 1 , TBOX 103 can invoke the first thread to receive the first remote control command for the first controlled ECU (such as ECU 104) sent by the remote control terminal 101 (such as the mobile phone APP used by the user) via the cloud platform 102, and send the first execution notice for this first remote control command to ECU 104, that is, send the first execution notice to ECU 104 using the Notify model, so that ECU 104 can learn that it needs to execute the first remote control command. In an example, TBOX 103 can encapsulate the received first remote control command and the first execution notice into a CAN message, and then transmit it to ECU 104 through the AUTOSAR protocol stack.

[0055] AUTOSAR (AUTomotive Open System Architecture), is a collaborative development framework for automotive electronic systems jointly participated by global automotive manufacturers, component suppliers, and various research and service institutions, and has established an open standard software architecture for automotive controllers (ECUs). The entire architecture is hierarchically divided from top to bottom into: Application Software Layer, Runtime Environment (RTE), Basic Software Layer (BSW), and Microcontroller. To maintain independence between each layer, each layer can only call the interfaces of the next layer and provide interfaces for the layer above it.

[0056] Meanwhile, the TBOX 103 can store all information related to the first remote control command of the first controlled ECU (including but not limited to the identification information of the first controlled ECU, the command type of the first remote control command, the command issuance timestamp, etc.) in the local message cache table.

[0057] Next, the first thread continues to wait and receive the Nth remote control command of the Nth controlled ECU (for example, receiving the second remote control command for the second controlled ECU (such as ECU 105), and receiving the third remote control command for the third controlled ECU (such as ECU 106) (here, N = 2 and N = 3 respectively)).

[0058] Step S202, call the second thread to track the first execution result reported by the first controlled ECU for the first execution notice, refresh the local message cache table based on the first execution result, track the Nth execution result reported by the Nth controlled ECU for the Nth execution notice, and refresh the local message cache table based on the Nth execution result.

[0059] The local message cache table generally refers to the local CAN message cache table of the TBOX 103.

[0060] Continuing with the above example, please continue to refer to Figure 1 , the TBOX 103 calls the second thread to track the first execution result reported by the first controlled ECU for the first execution notice, refresh the local message cache table based on the first execution result, track the Nth execution result reported by the Nth controlled ECU for the Nth execution notice, and refresh the local message cache table based on the Nth execution result.

[0061] In one example, the first controlled ECU may encapsulate the first execution result corresponding to the first remote control command in the first execution notification it executes into a CAN message, and report the CAN message to the TBOX 103 through the AUTOSAR protocol stack.

[0062] Similarly, the Nth controlled ECU can also report its Nth execution result to the TBOX 103 based on a reporting method similar to that of the first controlled ECU.

[0063] Exemplarily, assuming the first execution notification is an execution notification of "remotely closing the window", then the first execution result may be "window closed successfully", "window closing failed", "window opening / closing function abnormal", etc.

[0064] Step S203, in the second thread, start a result check timer to read the execution result set in the local message buffer table at a preset time interval through the result check timer. The execution result set includes at least one execution result.

[0065] The execution result includes the identification information of the controlled ECU, the remote control command information, the execution result (success / failure) of the remote control command, etc.

[0066] Continuing with the above example, please continue to refer to Figure 1 , while the TBOX 103 calls the second thread to track the execution results reported by each controlled ECU for their respective remote control commands, it will start a result check timer (which can be a regular timer) to time. In the second thread, read the execution result set in the local message buffer table at a preset time interval through this result check timer; finally, the TBOX 103 is based on this execution result set.

[0067] Step S204, based on the execution result set, return the first remote control result for the first remote control command of the first controlled ECU and the Nth remote control result for the Nth remote control command of the Nth controlled ECU to the remote control end.

[0068] Continuing with the above example, please continue to refer to Figure 1 , the TBOX 103 returns the first remote control result for the first remote control command of the first controlled ECU and the Nth remote control result for the Nth remote control command of the Nth controlled ECU to the remote control end based on the above read execution result set.

[0069] Exemplarily, assuming the first remote control command is "close the window" and the first execution result is "window closed successfully", then the first remote control result is "remote window closing successful".

[0070] The technical solution provided by the embodiments of this application can greatly improve the execution efficiency of remote control commands by controlled ECUs. By calling the first thread to receive remote control commands for multiple controlled ECUs and using the Notify model to send execution notifications for the remote control commands to each controlled ECU, at the same time, by calling the second thread and cooperating with the result check timer to intermittently track the execution status of remote control commands by each controlled ECU, it is possible to execute the remote control commands sent by the remote control end asynchronously and in parallel. The user has no perception of delay in the entire remote control process and can perform multiple remote operations in a short time to flexibly control and use various functions of the vehicle, thereby greatly enhancing the user experience of remotely controlling the vehicle.

[0071] In some embodiments, in step S202 above, refreshing the local message cache table based on the first execution result specifically includes:

[0072] Determine whether there is message storage content corresponding to the first controlled ECU in the local message cache table;

[0073] If there is message storage content corresponding to the first controlled ECU, extract the most recent execution result corresponding to the first remote control command from the message storage content;

[0074] Refresh the local message cache table based on the most recent execution result and the first execution result.

[0075] Among them, the message storage content includes information related to remote control such as the identification information of the first controlled ECU, the remote control command, and the execution result.

[0076] In an example, when TBOX 103 receives a CAN message containing the first execution result transmitted by the first controlled ECU through the AUTOSAR protocol stack, it can first determine whether there is message storage content corresponding to the first controlled ECU in the local message cache table. Specifically, it can first obtain the identification information of the first controlled ECU, such as ECU ID, etc., and then query whether there is remote control-related information such as the remote control command and the execution result corresponding to the identification information of the first controlled ECU in the local message cache table.

[0077] If there is remote control-related information such as the remote control command and the execution result corresponding to the identification information of the first controlled ECU, further extract the most recent execution result corresponding to the first remote control command (i.e., the execution result with the latest reporting timestamp) from this remote control-related information.

[0078] In some embodiments, in order to save cache memory, only the most recent execution result of each remote control command of each controlled ECU may be retained in the local message cache table.

[0079] In one embodiment, the local message cache table is refreshed based on the most recent execution result and the first execution result. Specifically, the exclusive OR operation can be performed on the most recent execution result and the first execution result to obtain an operation result. If the operation result is the first operation value, a write lock on the local message cache table is executed; based on the first execution result, the most recent execution result is modified, and after the modification is completed, the refresh of the local message cache table is completed, and the write lock on the local message cache table is released.

[0080] The exclusive OR operation (exclusive OR, abbreviated as "XOR") is a mathematical operator applied to logical operations. Its operation rule is: If the two values a and b are different, the exclusive OR result is 1; if the two values a and b are the same, the exclusive OR result is 0.

[0081] A write lock, also known as an exclusive lock (Exclusive Locks, abbreviated as X lock) or an exclusive lock, is a basic type of lock. If transaction T adds an X lock to data object A, only T is allowed to read and modify A, and no other transaction can add any type of lock to A until T releases the lock on A. This ensures that other transactions cannot read and modify A until T releases the lock on A.

[0082] Figure 3 It is a schematic diagram of the principle of refreshing the local message cache table in the method for remotely controlling the ECU provided by the embodiments of the present application.

[0083] Please refer to Figure 3 , in one embodiment, both the most recent execution result and the first execution result are binary data. By performing the exclusive OR operation on them, an operation result with an exclusive OR result of 0 or 1 can be obtained. When the operation result is the first operation value (i.e., 1), it indicates that the most recent execution result is different from the first execution result. A write lock on the local message cache table is executed, that is, an X lock is added to the data object of the local message cache table. Then, the most recent execution result is modified to the first execution result to complete the refresh of the local message cache table. After the refresh of the local message cache table is completed, the X lock on the data object of the local message cache table is released.

[0084] In another embodiment, by performing the exclusive OR operation on the most recent execution result and the first execution result, if the exclusive OR result is 1, a write lock on the local message cache table is executed, and the first execution result is added to the next line of the most recent execution result in the local message cache table to complete the refresh of the local message cache table. After the refresh of the local message cache table is completed, the X lock on the data object of the local message cache table is released.

[0085] In another embodiment, if the operation result is the second operation value, extract the first timestamp of the first execution result and the second timestamp of the most recent execution result; execute a write lock on the local message cache table, replace the second timestamp with the first timestamp; release the write lock on the local message cache table, discard the first execution result, and complete the refresh of the local message cache table.

[0086] When the operation result of the exclusive OR operation is the second operation value (i.e., 0), it indicates that the most recent execution result is the same as the first execution result. At this time, the first timestamp (i.e., the reported timestamp) of the first execution result and the second timestamp (i.e., the reported timestamp) of the most recent execution result can be extracted respectively. Then, execute a write lock on the local message cache table and only replace the second timestamp with the first timestamp, which can reduce the amount of data changes and is conducive to improving the data refresh efficiency. After that, release the write lock on the local message cache table and discard the first execution result, which can save more cache memory space.

[0087] By performing exclusive OR operations on a large number of cyclic reported data and modifying and refreshing the data with non-zero exclusive OR results, a large amount of repeatedly reported data can be filtered, reducing the I / O consumption of data writing and the resource consumption of user mode and kernel mode for opening and closing write locks by 50% in the TBOX.

[0088] Similarly, the method for refreshing the local message cache table based on the Nth execution result is basically the same as the method for refreshing the local message cache table based on the first execution result, so it will not be elaborated here.

[0089] In some embodiments, the local message cache table includes an index content area and a data storage area, and there is an association relationship between the index content area and the data storage area. In the above step S203, the result check timer reads the execution result set in the local message cache table, which specifically includes:

[0090] Read the first message information set and the second message information set from the index content area of the local message cache table. The first message information set includes at least one first message information, and the second message information set includes at least one second message information;

[0091] Based on the first message information set and the second message information set, locate the data storage positions corresponding to the first message information set and the second message information set in the data storage area of the local message cache table;

[0092] Read out the execution result set in the data storage positions.

[0093] The local message cache table can be a two-dimensional static global array (or "two-dimensional data table"). Each dimension member in this two-dimensional static global array is a structure. In the C language, a structure refers to a data structure, which is a type of aggregate data type in the C language. A structure can be declared as a variable, pointer, or array, etc., to implement a more complex data structure. A structure is also a collection of some elements, and these elements are called members of the structure, and these members can be of different types, and the members are generally accessed by name.

[0094] These structures need to record CAN message information, the corresponding Hex value of the message, the number of signals carried by the CAN message, and a flexible array char[1].

[0095] CAN message information uses an enumeration type (which means listing the values of a variable one by one, and the value of the variable is only within the range of the listed values) to distinguish each message.

[0096] The corresponding Hex value (hexadecimal value) of the message is stored using an integer data type.

[0097] The number of signals carried by the CAN message is used to mark the signal length in the message when refreshing the CAN message.

[0098] The flexible array char[1] is used to bind all the received message data physically to the structure to improve the storage efficiency.

[0099] The first message information set usually refers to the message enumeration value, that is, the CAN message information.

[0100] The second message information set usually refers to the signal value in the message, that is, the number of signals carried by the CAN message.

[0101] In one embodiment, please refer to Figure 4 , when reading a message, only the first message information set and the second message information set in the index content area of the local message cache table need to be read to locate the physical storage index position of the two-dimensional data. After that, all the data can be read out at once through the flexible array char[1], and the algorithm time complexity is 0(1). Exemplarily, assuming that the message "(Msg2, sigm)" needs to be read, ① First, locate the row where "Msg2" is located in the local message cache table according to the message enumeration value "Msg2", ② Then, locate the column where "sigm" is located in the row where "Msg2" is located in the local message cache table according to the signal value "sigm" in the message. After that, call the mencpy function to start copying from the flexible array to obtain the execution result set.

[0102] Through the above method, the data in the local message cache table can be quickly stored, read, and written, thereby improving the storage, reading, and writing efficiency of the data.

[0103] In some embodiments, in step S204 above, based on the execution result set, returning a first remote control result of a first remote control command for the first controlled ECU to the remote control end includes:

[0104] Filtering out a first result set corresponding to the first remote control command of the first controlled ECU from the execution result set, where the first result set includes at least one first result;

[0105] Determining the first result with the latest timestamp in the first result set as the first remote control result, and returning the first remote control result to the remote control end.

[0106] As an example, assuming the first remote control command is "close the left front door window", then a first result set corresponding to the first remote control command "close the left front door window" of the first controlled ECU can be filtered out from the above-read execution result set; then, the first result with the latest timestamp is selected from the first result set as the first remote control result. For example, there are 3 first results 01, 02, and 03 in the first result set, and their timestamps are in ascending order from the earliest to the latest: first result 01 > first result 03 > first result 02, then the first result 01 can be determined as the first remote control result and returned to the remote control end.

[0107] Similarly, with reference to the above example, based on the execution result set, the Nth remote control result of the Nth remote control command for the Nth controlled ECU can be returned to the remote control end, which will not be elaborated here.

[0108] In the embodiments of the present application, by filtering out the first remote control result corresponding to the first remote control command of the first controlled ECU and the Nth remote control result of the Nth remote control command of the Nth controlled ECU from the execution result set read by the result check timer in the second thread, the user can timely know the execution results of the corresponding remote control commands, and the user has no delay perception of the entire remote control process, which can greatly improve the user experience of remotely controlling the vehicle.

[0109] Figure 5 It is a schematic flowchart of another method for remotely controlling an ECU provided by the embodiments of the present application. Figure 5 The method for remotely controlling an ECU can be executed by Figure 1 the TBOX 103 as shown in Figure 5 The method for remotely controlling an ECU includes the following steps:

[0110] Step S501: Invoke the first thread to receive the first remote control command for the first controlled ECU, send a first query request for the first remote control command to the first controlled ECU, wait for and receive the Nth remote control command for the Nth controlled ECU, and send an Nth query request for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than 2.

[0111] As an example, when TBOX 103 monitors that the remote control end 101 issues a remote control command (such as the first remote control command for the first controlled ECU), it will not directly send the first remote control command to the first controlled ECU. Instead, it invokes the first thread to receive the first remote control command for the first controlled ECU, and sends a first query request for the first remote control command to the first controlled ECU in the form of a query (Query), and immediately refreshes it to the local cache of the CAN message. Among them, the first query request is to request the first controlled ECU to actively report the status of the command type of the first remote control command once.

[0112] After refreshing the local cache of the CAN message, continue to wait for and receive the Nth remote control command for the Nth controlled ECU, and send an Nth query request to the Nth controlled ECU. The specific implementation process is basically the same as the above process of sending the first query request for the first remote control command to the first controlled ECU, so it will not be elaborated here.

[0113] It should be noted that the storage and reading / writing methods of the local cache of the CAN message can refer to the storage and reading / writing methods of the local message cache table described above. When refreshing the data to the local cache of the CAN message, it can refer to the operation method of refreshing the local message cache table described above to filter the data and then cache it to reduce the subsequent data calculation volume and storage volume, which will not be elaborated here.

[0114] Step S502: Invoke the second thread to collect the public status information and private status information of the vehicle end. If it is confirmed based on the public status information and private status information that the current vehicle status of the vehicle end meets the preset remote control switching condition, then compare the first query result feedback by the first controlled ECU for the first query request with the first remote control command to obtain a first comparison result, and compare the Nth query result feedback by the Nth remote control command for the Nth query request to obtain an Nth comparison result.

[0115] The public status information is mainly information used to represent the real-time status of the vehicle end, including common information such as power status and voltage status that are not affected by remote control commands.

[0116] Private status information is mainly used to represent the status information of the controlled components corresponding to the remote control commands of the controlled ECU. For example, the open / close status of the left front window of the vehicle corresponding to the first remote control command (such as "close the left front window") of the first controlled ECU. For example, "1" can be used to represent that the window is fully open, "0" represents that the window is fully closed, "-1" represents that the window is half down, "2" represents that the window is half up, etc.

[0117] The preset remote control switching condition can be that the current status of the vehicle end (including the power status, power supply status, etc.) is in a normal state, and the switching status of the controlled component corresponding to the current vehicle end and the controlled ECU is allowed to be switched.

[0118] The first query result refers to the status information of the controlled component corresponding to the first remote control command returned by the first controlled ECU to the TBOX after receiving the first query request sent by the TBOX.

[0119] Continuing with the above example, after refreshing the local cache of the CAN message, call the second thread to collect the public status information such as the power status and voltage status of the vehicle end, and the window open / close status information (i.e., private status information) of the left front window corresponding to "close the left front window"; then, determine whether these public status information are all in a normal state. If the public status information such as the power status and voltage status of the vehicle end are all in a normal state, and the window status of the left front window is in the open state, that is, the switching is allowed, then confirm that the current vehicle status of the vehicle end meets the preset remote control switching condition; next, compare the first query result reported by the first controlled ECU with the first remote control instruction issued by the remote control end 101 to obtain the first comparison result, that is, the result of whether the first query result matches the first remote control instruction.

[0120] Similarly, the specific implementation manner of obtaining the Nth comparison result is basically the same as the above manner of obtaining the first comparison result, so it will not be elaborated here.

[0121] Step S503, based on the first comparison result and the Nth comparison result, return the first remote control result for the first remote control command of the first controlled ECU and the Nth remote control result for the Nth remote control command of the Nth controlled ECU to the remote control end.

[0122] As an example, if the first comparison result is that the first query result matches the first remote control instruction, return the response information indicating that the execution of the first remote control command for the first controlled ECU is successful to the remote control end; if the first comparison result is that the first query result does not match the first remote control instruction, return the response information indicating that the execution of the first remote control command for the first controlled ECU fails to the remote control end.

[0123] Similarly, the Nth remote control result of returning the Nth remote control command for the Nth controlled ECU to the remote control end based on the Nth comparison result is basically the same as the above-mentioned manner of returning the first remote control result of the first remote control command for the first controlled ECU to the remote control end based on the first comparison result, so it will not be elaborated here.

[0124] The technical solution provided by the embodiment of the present application can greatly improve the execution efficiency of each remote control command by each controlled ECU by calling the first thread to receive the remote control commands for multiple controlled ECUs and combining with using the Query model to send query requests for the remote control commands to each controlled ECU. At the same time, by calling the second thread and collecting the public state information and private state information of the vehicle end, and when it is confirmed that the current vehicle state of the vehicle end meets the preset remote control switching condition, by comparing the query results reported by the controlled ECU with the remote control instructions sent by the remote control end to confirm the execution situation of each controlled ECU for the remote control command, it is possible to asynchronously and parallelly execute the remote control commands sent by the remote control end. The user has no perception of delay in the entire remote control process and can perform multiple remote operations in a short time to flexibly control and use each function of the vehicle, thereby greatly enhancing the user experience of remotely controlling the vehicle.

[0125] In some embodiments, the process of remotely controlling the ECU by hybridly using the three communication models of Query model, Notify model, and Report model is roughly as follows:

[0126] Step 1, the TSP platform sends device login information (including information such as account number and password) to the TSP module of the MPU in the TBOX.

[0127] Step 2, the TSP module of the MPU in the TBOX receives the device login information sent by the TSP platform, performs legal verification on the device login information, and when the verification passes, returns a reply message of successful device login to the TSP platform.

[0128] Step 3, the TSP platform sends a remote control command to the TSP module of the MPU in the TBOX.

[0129] Step 4, after receiving the remote control command sent by the TSP platform, the TSP module preprocesses the remote control command, initiates an active query BEFORE type message to the CAN parsing module, and immediately starts a 10-second single-shot timer; among them, the CAN parsing module of the MPU continuously refreshes the full-periodic reporting CAN messages received from the controlled ECU and forwarded in full by the MCU in the TBOX through the IPC communication module.

[0130] Step 5, when the CAN parsing module receives the active query BEFORE type message initiated by the TSP module, it returns the BEFORE type query result to the TSP module.

[0131] Step 6, when the TSP module receives the BEFORE type query result (i.e., the feedback data) returned by the CAN parsing module, it determines whether the feedback data meets the conditions for executing the remote control command, and forwards the cached remote control command to the remote control module of the MPU.

[0132] Step 7, when the remote control module receives the remote control command forwarded by the CAN parsing module, it converts the remote control command into a CAN control message that supports the CAN protocol, and issues the CAN control message to the IPC communication module of the MPU.

[0133] Step 8, when the IPC communication module receives the CAN control message issued by the remote control module, it forwards the CAN control message to the MCU of the TBOX;

[0134] Step 9, the MCU issues the CAN control message received from the IPC communication module to the corresponding controlled ECU via the CAN network, so that the controlled ECU executes the corresponding remote control command according to the CAN control message.

[0135] Step 10, the TSP module starts a 2-second cyclic timer to query CAN data, and sends an AFTER type request to the CAN parsing module.

[0136] Step 11, when the CAN parsing module receives the AFTER type request sent by the TSP module, it packets the low-frequency data and returns the AFTER type query result to the TSP module. The CAN parsing module receives the periodic reporting CAN messages received from the controlled ECU and fully forwarded by the MCU, and cyclically refreshes the CAN message cache.

[0137] Step 12, after the TSP module receives the AFTER type query result (i.e., the value of the vehicle information queried after the configuration is issued) returned by the CAN parsing module, it compares the cached expected value with the value of the vehicle information queried after the configuration is issued to obtain a comparison result, closes the single-shot / cyclic timer, and returns an ACK value to the TSP platform. If the timer expires, it indicates that the command has not been executed successfully. At this time, the TSP module executes the command timeout policy and returns a notification of execution failure to the TSP platform.

[0138] Step 13, the TSP platform determines whether the remote control command is executed successfully based on the comparison result and ACK received from the TSP module.

[0139] In the embodiments of the present application, by mixing and using three communication models: Query model, Notify model, and Report model, specifically for different processes in remote control, different communication models are adopted to achieve asynchronous issuance of remote control commands and tracking of execution results, enabling users to have no delay perception of the entire remote control process and allowing multiple remote operations to be performed in a short time to flexibly control and use various functions of the vehicle, thereby greatly enhancing the user experience of remotely controlling the vehicle.

[0140] To ensure the security of remote communication, the embodiments of the present application design a disaster recovery solution for the configuration information of the TSP module. Specifically, in the Config file, global variables are defined and data is stored in the global data area during runtime for the TSP module to use in remote configuration, remote query response, and remote configuration execution result reply. When other files need to use the TSP configuration, they read and write the configuration by calling the interfaces defined in this file.

[0141] Please refer to Figure 6 , the refresh principle of the configuration structure of the TSP module is as follows: ① Initial state: confReq refers to the pointer of the new configuration information buffer that has not been configured into the device; confOld points to the Data1 storage area, which can be understood as the old backup configuration data that has been replaced. ConfNew points to the Data2 storage area, which can be understood as the configuration data currently used by the TSP module. ② Exchange stage: TspConfData refers to a temporary pointer used to exchange the spaces pointed to by the pointers. ③ Refresh configuration stage: The new configuration memory space and the memory space pointed to by the New pointer in Data1.

[0142] By exchanging the memory spaces pointed to by the Old and New pointers, the essential purpose is to make the current configuration space Data2 become the old configuration data, freeing up the Data1 memory space for the new configuration memory space and the New pointer to use.

[0143] In the embodiments of the present application, through the above method, the core data and configuration information in the TSP module can be cross-cached, such as remote device login information, security information, etc., ensuring the security of remote communication; and, in the case of OTA upgrade failure or data write failure, the problem can be repaired in a timely and rapid manner, reducing the time cost of problem repair.

[0144] All of the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present application, which will not be elaborated one by one here.

[0145] The following are the device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0146] Figure 7 This is a schematic diagram of a device for remotely controlling an ECU provided by an embodiment of the present application. As Figure 7 shown, the device for remotely controlling the ECU includes:

[0147] A first call module 701, configured to call a first thread, receive a first remote control command for a first controlled ECU, send a first execution notice for the first remote control command to the first controlled ECU, wait for and receive an Nth remote control command for the Nth controlled ECU, and send an Nth execution notice for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than 2;

[0148] A second call module 702, configured to call a second thread, track a first execution result reported by the first controlled ECU in response to the first execution notice, refresh a local message cache table based on the first execution result, track an Nth execution result reported by the Nth controlled ECU in response to the Nth execution notice, and refresh the local message cache table based on the Nth execution result;

[0149] A result reading module 703, configured to start a result checking timer in the second thread to read an execution result set in the local message cache table at a preset time interval through the result checking timer, where the execution result set includes at least one execution result;

[0150] A result returning module 704, configured to return a first remote control result for the first remote control command for the first controlled ECU and an Nth remote control result for the Nth remote control command for the Nth controlled ECU to the remote control end based on the execution result set.

[0151] The technical solution provided by the embodiment of the present application calls a first thread through the first call module 701 to receive remote control commands for multiple controlled ECUs, and combines the use of the Notify model to send execution notices for the remote control commands to each controlled ECU, which can greatly improve the efficiency of the remote control commands being executed by the controlled ECUs. At the same time, by calling a second thread through the second call module 702 and cooperating with the result checking timer to intermittently track the execution status of the remote control commands by each controlled ECU, it is possible to asynchronously and parallelly execute the remote control commands issued by the remote control end, and the user has no delay perception of the entire remote control process and can perform multiple remote operations in a short time to flexibly control and use various functions of the vehicle, thereby greatly enhancing the user experience of remotely controlling the vehicle.

[0152] In some embodiments, the above-mentioned second call module 702 includes a first refresh unit, and the first refresh unit is configured to refresh the local message cache table based on the first execution result.

[0153] The first refresh unit may specifically include:

[0154] A judgment component, configured to judge whether there is message storage content corresponding to the first controlled ECU in the local message cache table;

[0155] An extraction component, configured to extract the most recent execution result corresponding to the first remote control command from the message storage content if there is message storage content corresponding to the first controlled ECU;

[0156] A refresh component, configured to refresh the local message cache table based on the most recent execution result and the first execution result.

[0157] In some embodiments, the above-mentioned refresh component includes:

[0158] An arithmetic device, configured to perform an exclusive OR operation on the most recent execution result and the first execution result to obtain an operation result;

[0159] An execution device, configured to perform a write lock on the local message cache table if the operation result is a first operation value;

[0160] A modification device, configured to modify the most recent execution result based on the first execution result, and after the modification is completed, the refresh of the local message cache table is completed, and the write lock on the local message cache table is released.

[0161] In some embodiments, the above-mentioned refresh component further includes:

[0162] An extraction device, configured to extract the first timestamp of the first execution result and the second timestamp of the most recent execution result if the operation result is a second operation value;

[0163] A replacement device, configured to perform a write lock on the local message cache table and replace the second timestamp with the first timestamp;

[0164] A release device, configured to release the write lock on the local message cache table, discard the first execution result, and complete the refresh of the local message cache table.

[0165] In some embodiments, the local message cache table includes an index content area and a data storage area, and the index content area and the data storage area have an associated relationship.

[0166] Among them, the result check timer includes:

[0167] A first reading module, configured to read a first message information set and a second message information set from the index content area of the local message cache table, the first message information set includes at least one first message information, and the second message information set includes at least one second message information;

[0168] A positioning module, configured to locate a data storage location corresponding to the first message information set and the second message information set in a data storage area of a local message cache table based on a first set of message information and a second set of message information;

[0169] A second reading module, configured to read out an execution result set in the data storage location.

[0170] In some embodiments, the above result returning module 704 includes:

[0171] A screening unit, configured to screen out a first result set corresponding to a first remote control command of a first controlled ECU from the execution result set, the first result set including at least one first result;

[0172] A determining unit, configured to determine a first first result with the latest timestamp in the first result set as a first remote control result, and return the first remote control result to the remote control end.

[0173] Figure 8 It is a schematic diagram of a device for remotely controlling an ECU provided by an embodiment of the present application. As Figure 8 shown, the device for remotely controlling the ECU includes:

[0174] A third calling module 801, configured to call a first thread, receive a first remote control command for a first controlled ECU, send a first query request for the first remote control command to the first controlled ECU, wait for and receive an Nth remote control command for an Nth controlled ECU, and send an Nth query request for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than 2;

[0175] A fourth calling module 802, configured to call a second thread, collect public state information and private state information of the vehicle end, and if it is confirmed based on the public state information and the private state information that the current vehicle state of the vehicle end meets a preset remote control switching condition, then compare a first query result fed back by the first controlled ECU for the first query request with the first remote control command to obtain a first comparison result, and compare an Nth query result fed back by the Nth remote control command for the Nth query request to obtain an Nth comparison result;

[0176] A result feedback module 803, configured to return a first remote control result for the first remote control command of the first controlled ECU and an Nth remote control result for the Nth remote control command of the Nth controlled ECU to the remote control end based on the first comparison result and the Nth comparison result.

[0177] The technical solution provided by the embodiment of the present application uses the third calling module 801 to call the first thread to receive remote control commands for multiple controlled ECUs, and combines the use of the Query model to send query requests for the remote control commands to each controlled ECU, which can greatly improve the execution efficiency of each remote control command by each controlled ECU. At the same time, the fourth calling module 802 is used to call the second thread and collect the public status information and private status information of the vehicle end. And when it is confirmed that the current vehicle status of the vehicle end meets the preset remote control switching conditions, by comparing the query results reported by the controlled ECU with the remote control instructions issued by the remote control end to confirm the execution status of each controlled ECU for the remote control command, it is possible to asynchronously and parallelly execute the remote control commands issued by the remote control end. The user has no delay perception of the entire remote control process and can perform multiple remote operations in a short time to flexibly control and use various functions of the vehicle, thereby greatly improving the user experience of remotely controlling the vehicle.

[0178] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0179] Figure 9 It is a schematic structural diagram of a TBOX provided by an embodiment of the present application. As Figure 9 shown, the TBOX includes an MCU and an MPU, and the MPU includes a device for remotely controlling an ECU as Figure 7 shown.

[0180] Figure 10 It is a schematic structural diagram of a TBOX provided by an embodiment of the present application. As Figure 10 shown, the TBOX includes an MCU and an MPU, and the MPU includes a device for remotely controlling an ECU as Figure 8 shown.

[0181] Figure 11 It is a schematic diagram of the electronic device 11 provided by an embodiment of the present application. As Figure 11 shown, the electronic device 11 of this embodiment includes: a processor 1101, a memory 1102, and a computer program 1103 stored in the memory 1102 and executable on the processor 1101. When the processor 1101 executes the computer program 1103, it implements the steps in the above various method embodiments. Alternatively, when the processor 1101 executes the computer program 1103, it implements the functions of each module / unit in the above various device embodiments.

[0182] The electronic device 11 can be a desktop computer, a notebook, a palm computer, a cloud server, or other electronic devices. The electronic device 11 may include, but is not limited to, a processor 1101 and a memory 1102. Those skilled in the art can understand that Figure 11 merely examples of the electronic device 11, which do not constitute a limitation on the electronic device 11, may include more or fewer components than shown in the figure, or different components.

[0183] The processor 1101 can be a central processing unit (CPU), or 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.

[0184] The memory 1102 can be an internal storage unit of the electronic device 11, for example, the hard disk or memory of the electronic device 11. The memory 1102 can also be an external storage device of the electronic device 11, for example, a plug-in hard disk equipped on the electronic device 11, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. The memory 1102 can also include both the internal storage unit and the external storage device of the electronic device 11. The memory 1102 is used to store computer programs and other programs and data required by the electronic device.

[0185] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0186] When the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (such as a computer-readable storage medium). Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of this application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. The computer program can include computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable storage medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0187] The above embodiments are only used to illustrate the technical solutions of this application, rather than to limit it; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for remotely controlling an ECU, characterized in that, Including: Invoke the first thread, receive the first remote control command for the first controlled ECU, send the first execution notice for the first remote control command to the first controlled ECU, wait for and receive the Nth remote control command for the Nth controlled ECU, and send the Nth execution notice for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than or equal to 2; Invoke the second thread, track the first execution result reported by the first controlled ECU for the first execution notice, refresh the local message cache table based on the first execution result, track the Nth execution result reported by the Nth controlled ECU for the Nth execution notice, and refresh the local message cache table based on the Nth execution result; In the second thread, start a result check timer to read the set of execution results in the local message cache table at a preset time interval through the result check timer, and the set of execution results includes at least one execution result; Based on the set of execution results, return the first remote control result for the first remote control command for the first controlled ECU and the Nth remote control result for the Nth remote control command for the Nth controlled ECU to the remote control end.

2. The method according to claim 1, wherein Refreshing the local message cache table based on the first execution result includes: Determine whether there is message storage content corresponding to the first controlled ECU in the local message cache table; If there is message storage content corresponding to the first controlled ECU, extract the most recent execution result corresponding to the first remote control command from the message storage content; Refresh the local message cache table based on the most recent execution result and the first execution result.

3. The method according to claim 2, wherein Refreshing the local message cache table based on the most recent execution result and the first execution result includes: Perform an exclusive OR operation on the most recent execution result and the first execution result to obtain an operation result; If the operation result is the first operation value, perform a write lock on the local message cache table; Modify the most recent execution result based on the first execution result, and after the modification is completed, the refresh of the local message cache table is completed, and the write lock on the local message cache table is released.

4. The method according to claim 3, wherein After performing an exclusive OR operation on the most recent execution result and the first execution result to obtain an operation result, it further includes: If the operation result is the second operation value, extract the first timestamp of the first execution result and the second timestamp of the most recent execution result; Perform a write lock on the local message cache table, and replace the second timestamp with the first timestamp; Release the write lock on the local message cache table, discard the first execution result, and complete the refresh of the local message cache table.

5. The method according to claim 1, characterized in that, The local message cache table includes an index content area and a data storage area, and the index content area and the data storage area have an associated relationship; Reading the set of execution results in the local message cache table includes: Read a first message information set and a second message information set from the index content area of the local message cache table, where the first message information set includes at least one first message information, and the second message information set includes at least one second message information; Based on the first message information set and the second message information set, locate the data storage positions in the data storage area of the local message cache table corresponding to the first message information set and the second message information set; Read out the execution result set in the data storage position.

6. The method according to claim 1 or 5, characterized in that, Based on the execution result set, return a first remote control result for the first remote control command of the first controlled ECU to the remote control end, including: Filter out a first result set corresponding to the first remote control command of the first controlled ECU from the execution result set, where the first result set includes at least one first result; Determine the first result with the latest timestamp in the first result set as the first remote control result, and return the first remote control result to the remote control end.

7. A method for remotely controlling an ECU, characterized in that, Include: Invoke a first thread to receive a first remote control command for a first controlled ECU, send a first query request for the first remote control command to the first controlled ECU, wait for and receive an Nth remote control command for an Nth controlled ECU, and send an Nth query request for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than 2; Invoke a second thread to collect public state information and private state information of the vehicle end. If it is confirmed based on the public state information and the private state information that the current vehicle state of the vehicle end meets a preset remote control switching condition, then compare the first query result feedback by the first controlled ECU for the first query request with the first remote control command to obtain a first comparison result, and compare the Nth query result feedback by the Nth remote control command for the Nth query request to obtain an Nth comparison result; the public state information is information used to represent the real-time state of the vehicle end; the state information is information used to represent the state of the controlled component corresponding to the remote control command of the controlled ECU; the preset remote control switching condition is that the current state of the vehicle end is in a normal state, and the switching state of the controlled component corresponding to the vehicle end and the controlled ECU is allowed to be switched; Based on the first comparison result and the Nth comparison result, return a first remote control result for the first remote control command of the first controlled ECU and an Nth remote control result for the Nth remote control command of the Nth controlled ECU to the remote control end.

8. A device for remotely controlling an ECU, characterized in that, Include: A first invocation module configured to invoke a first thread to receive a first remote control command for a first controlled ECU, send a first execution notice for the first remote control command to the first controlled ECU, wait for and receive an Nth remote control command for an Nth controlled ECU, and send an Nth execution notice for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than or equal to 2; A second calling module, configured to call a second thread to track a first execution result reported by the first controlled ECU for the first execution notice, refresh a local message cache table based on the first execution result, track an Nth execution result reported by the Nth controlled ECU for the Nth execution notice, and refresh the local message cache table based on the Nth execution result; A result reading module, configured to start a result checking timer in the second thread to read an execution result set in the local message cache table at a preset time interval through the result checking timer, where the execution result set includes at least one execution result; A result returning module, configured to return a first remote control result of a first remote control command for the first controlled ECU and an Nth remote control result of an Nth remote control command for the Nth controlled ECU to a remote control end based on the execution result set.

9. A device for remotely controlling an ECU, characterized in that, including: A third calling module, configured to call a first thread to receive a first remote control command for a first controlled ECU, send a first query request for the first remote control command to the first controlled ECU, wait for and receive an Nth remote control command for an Nth controlled ECU, and send an Nth query request for the Nth remote control command to the Nth controlled ECU, where N is an integer greater than 2; A fourth calling module, configured to call a second thread to collect public status information and private status information of a vehicle end. If it is confirmed based on the public status information and the private status information that the current vehicle status of the vehicle end meets a preset remote control switching condition, then compare a first query result fed back by the first controlled ECU for the first query request with the first remote control command to obtain a first comparison result, and compare an Nth query result fed back by the Nth remote control command for the Nth query request to obtain an Nth comparison result; the public status information is information used to characterize the real-time status of the vehicle end; the status information is information used to characterize the status of a controlled component corresponding to a remote control command of a controlled ECU; the preset remote control switching condition is that the current status of the vehicle end is in a normal state, and the switching status of the controlled component corresponding to the current vehicle end and the controlled ECU is allowed to be switched; A result feedback module, configured to return a first remote control result of a first remote control command for the first controlled ECU and an Nth remote control result of an Nth remote control command for the Nth controlled ECU to a remote control end based on the first comparison result and the Nth comparison result.

10. A TBOX, characterized in that, The TBOX includes an MCU and an MPU; the MPU includes the device of the remote control ECU as claimed in claim 8 or 9.

Citation Information

Patent Citations

  • Method and apparatus for controlling movable devices, electronic device, and storage medium

    CN110609545A

  • Remote driving mobile terminal, remote driving system and remote driving method

    CN112492094A

  • Vehicle remote control instruction execution method and device, electronic equipment and medium

    CN118192505A

  • Message processing method and device in new energy automobile, new energy automobile and storage medium

    CN118394543A

  • Vehicle remote control method, electronic equipment and computer readable storage medium

    CN118802995A