Vehicle remote control method and device, communication equipment, readable storage medium and program product
By temporarily storing remote control instructions on the communication server and deciding the issuance time based on the relationship between the time difference and the authentication time, the problem of low remote control efficiency in the prior art is solved, and parallel transmission of remote control instructions and higher control efficiency are achieved.
Patent Information
- Application Number
- CN202411254928.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-09-09
AI Technical Summary
In the existing remote control method of vehicle, after sending a remote control command, the user needs to wait for the vehicle to execute the command and feedback the results before sending the next command, resulting in inefficient control.
By obtaining the current time and the issuance time of the previous remote control instructions on the communication server, calculating the time difference, and temporarily storing the remote control instructions until the time difference is greater than or equal to the authentication time, then sending these temporary remote control instructions to the vehicle through the second middleware.
It realizes that after the user clicks to send a remote control command, he can click to send the next remote control command without waiting, which improves the efficiency of remote control of the vehicle and reduces the dependence on the execution results of the return command on the vehicle side.
Smart Images

Figure CN120017682A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a vehicle remote control method, apparatus, communication device, computer-readable storage medium, and computer program product. Background Art
[0002] Vehicle remote control, also known as remote manipulation of a vehicle, typically involves controlling vehicle functions remotely via a mobile device (such as a smartphone or tablet). A user sends a remote control command (e.g., opening a window, turning on the air conditioning, or closing the sunroof) on their mobile device. This command is then transmitted to the vehicle via multiple intermediary services. For example, a user can install an app on their phone and use it to send remote control commands to remotely control the vehicle.
[0003] However, currently, after a user clicks to send a remote control command on the user control terminal, they need to wait for the vehicle to complete the remote control command and receive feedback from the vehicle on the execution result before they can click to send the next remote control command on the user control terminal. This affects the efficiency of vehicle remote control. Summary of the Invention
[0004] Based on this, it is necessary to provide a vehicle remote control method, device, communication equipment, computer-readable storage medium and computer program product to address the above technical problems, so as to support users to click to send two or more remote control commands, thereby improving the efficiency of vehicle remote control.
[0005] In a first aspect, the present application provides a vehicle remote control method, which is applied to a communication server, wherein the communication server is used for communication between a user control terminal and a vehicle, and the method includes:
[0006] When a remote control command originating from a user control terminal is obtained from the first middleware, the current time and the issuance time of a preceding remote control command preceding the remote control command are obtained; the issuance time represents the time information when the communication service terminal sends the preceding remote control command to the second middleware; the communication distance between the second middleware and the vehicle is less than the communication distance between either the first middleware or the communication service terminal and the vehicle;
[0007] Get the time difference between the current time and the delivery time;
[0008] If the time difference is less than the authentication duration corresponding to the previous remote control command, the remote control command is temporarily stored until the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command, and the temporarily stored remote control command is sent to the vehicle through the second middleware.
[0009] In one embodiment, temporarily storing the remote control command until the time difference is greater than or equal to the authentication time length corresponding to the previous remote control command, and sending the temporarily stored remote control command to the vehicle through the second middleware includes:
[0010] The remote control command is stored in a preset queue, and a corresponding expiration time is set for the remote control command in the queue; the expiration time indicates whether the time difference between the current time and the issuance time of the previous remote control command reaches the authentication time length corresponding to the previous remote control command;
[0011] The expiration time in the query queue is checked. When the expiration time is found to have arrived, the remote control instruction is taken out from the queue and sent to the vehicle through the second middleware.
[0012] In one embodiment, obtaining the issuing time of a preceding remote control instruction includes:
[0013] In the case where the preceding remote control instruction has been sent to the second middleware, obtaining the actual time of sending the preceding remote control instruction to the second middleware as the issuing time of the preceding remote control instruction;
[0014] In the case that the preceding remote control instruction has not been sent to the second middleware, the estimated time for sending the preceding remote control instruction to the second middleware is obtained as the sending time of the preceding remote control instruction.
[0015] In one embodiment, the method further includes: obtaining a preceding remote control message including a preceding remote control instruction from the first middleware; the preceding remote control message is obtained by encapsulating the preceding remote control instruction from the user control terminal, the vehicle-side device identifier, and a pre-saved authentication duration corresponding to the preceding remote control instruction based on the TSP service;
[0016] Obtain a previous remote control instruction and an authentication duration corresponding to the previous remote control instruction from a previous remote control message, and save the authentication duration of the previous remote control instruction locally.
[0017] In one embodiment, the first middleware is a Kafka message middleware;
[0018] Obtaining the remote control command from the user control end from the first middleware, including: obtaining a remote control message containing the remote control command from the Kafka message middleware, the remote control message being obtained by encapsulating the remote control command from the user control end, the vehicle-end device identifier, and the pre-saved authentication duration corresponding to the remote control command based on the TSP service; obtaining the vehicle-end device identifier of the vehicle to be controlled, the remote control command to be processed, and the corresponding authentication duration based on the remote control message;
[0019] Acquiring the issuing time of the preceding remote control command before the remote control command includes: acquiring the issuing time of the preceding remote control command corresponding to the vehicle according to the vehicle-side device identifier.
[0020] In one embodiment, the method further comprises:
[0021] When sending each remote control command to the vehicle through the second middleware, the issuing time of each remote control command and the vehicle-end device identifier corresponding to the remote control command are stored based on the preset data structure;
[0022] The issuing time of the preceding remote control command before obtaining the remote control command includes:
[0023] When it is determined that the previous remote control instruction has been sent to the second middleware, the sending time corresponding to the vehicle-end device identifier and closest to the current time is determined from the data structure as the sending time of the previous remote control instruction.
[0024] In one embodiment, the communication service end is a gateway service, and the second middleware is an EMQ message middleware.
[0025] In a second aspect, the present application further provides a vehicle remote control device, a communication server, which is used for communication between a user control terminal and a vehicle, and the device includes:
[0026] The judgment module is configured to, upon receiving a remote control instruction from the user control terminal from the first middleware, obtain the current time and the issuing time of a preceding remote control instruction preceding the remote control instruction; the issuing time represents the time information at which the communication service terminal sends the preceding remote control instruction to the second middleware; and obtain the time difference between the current time and the issuing time;
[0027] The sending module is used to temporarily store the remote control command if the time difference is less than the authentication duration corresponding to the previous remote control command, and send the temporarily stored remote control command to the vehicle through the second middleware until the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command.
[0028] In a third aspect, the present application further provides a communication device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method of the first aspect when executing the computer program.
[0029] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method of the first aspect when executed by a processor.
[0030] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which implements the steps of the method of the first aspect when executed by a processor.
[0031] In the above-mentioned vehicle remote control method, device, communication equipment, computer-readable storage medium and computer program product, the user control end can send multiple remote control instructions simultaneously or successively. When the communication service end obtains the remote control instruction from the user control end from the first middleware, it determines the time difference between the current time and the issuance time of the previous remote control instruction, and determines how to process the currently obtained remote control instruction based on the relationship between the time difference and the authentication duration. If the time difference is less than the authentication duration, the remote control instruction is temporarily stored until it is confirmed again that the time difference is greater than or equal to the authentication duration corresponding to the previous remote control instruction. The temporarily stored remote control instruction is sent to the vehicle through the second middleware. Therefore, after the user clicks to send a remote control instruction, he can click to send the next remote control instruction without waiting, that is, the remote control instructions are sent in parallel, and the communication server can determine whether to issue the currently obtained remote control instruction based on the instruction execution result information returned by the vehicle end, which improves the efficiency of vehicle remote control. Furthermore, in this vehicle remote control method, the communication server is located between the user control terminal and the vehicle. Compared to a user control terminal, such as an app, the communication server takes less time to exchange information with the vehicle, allowing remote control commands temporarily stored on the communication server to be issued to the vehicle more quickly, thereby improving the efficiency of vehicle remote control. Furthermore, compared to developing and implementing parallel solutions for remote control commands on the vehicle or user control terminal, this method can be implemented by simply improving the hardware or software of the communication server, requiring lower costs and a shorter development cycle. It is not constrained by differences in vehicle models or apps, and is more versatile. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 A diagram showing an application environment of a vehicle remote control method according to an embodiment;
[0034] Figure 2 1 is a flow chart of a vehicle remote control method according to an embodiment;
[0035] Figure 3 A flowchart of remote control command execution related to a vehicle remote control method according to an embodiment;
[0036] Figure 4 A flowchart of a parallel solution related to a vehicle remote control method in one embodiment;
[0037] Figure 5 is another flowchart of a vehicle remote control method according to an embodiment;
[0038] Figure 6 Schematic diagram of a data storage method in a vehicle remote control method according to an embodiment;
[0039] Figure 7 is a structural block diagram of a vehicle remote control device in one embodiment;
[0040] Figure 8 FIG. 4 is a diagram showing the internal structure of a communication device in one embodiment. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application. To facilitate understanding and subsequent description, the following is an explanation of relevant technical terms:
[0042] APP: Mobile software, mainly refers to software installed on smartphones, such as the vehicle remote control APP, through which users can send control commands to their vehicles, that is, remotely control the vehicle.
[0043] TSP services primarily serve as a bridge for interaction between the vehicle and the app. TSP (Telematics Service Provider) stands for Telematics Service Provider. Telematics is a portmanteau of telecommunications (long-distance communication) and information science (informatics). It can be understood as a service system that provides information through the vehicle's built-in computer systems, wireless communication technologies, satellite navigation devices, and internet technologies for exchanging text, voice, and other information. Simply put, it connects the vehicle to the internet via wireless networks, providing drivers with essential information for driving and daily life. This article refers to TSP services as TSPs.
[0044] Vehicle Equipment Center Service: Mainly stores basic information data of the vehicle.
[0045] Kafka message middleware: mainly a component for storing messages.
[0046] Protocol adapter service: converts and adapts the protocol for interaction between the vehicle and the cloud.
[0047] Device gateway service: mainly interacts with EMQ on the vehicle side.
[0048] EMQ: A unified IoT messaging solution based on the MQTT open standard, delivering high performance at the million-level per second and low latency to reliably move IoT data between IoT devices and cloud services in real time.
[0049] Remote control commands, remote control requests, and remote control messages: refer to parameters required for a vehicle to perform remote control.
[0050] Vehicle side: refers to the software and hardware contained in the vehicle that interacts with the cloud.
[0051] TBOX: An in-vehicle communication module used to connect a vehicle to external networks. It typically includes components such as a GPS positioning system, a wireless communication interface, and a microcontroller. It can monitor the vehicle's operating status in real time and exchange data with other devices.
[0052] Redis: Remote Dictionary Server. Redis is a key-value storage system that supports a wider range of value types, including string, list, set, zset (sorted set), and hash.
[0053] The vehicle remote control method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown, a user control terminal 101 communicates with a vehicle 103 via a communication service 102. User control terminal 101 may be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices may include smart speakers, smart TVs, smart air conditioners, projectors, and the like. Portable wearable devices may include smart watches, smart bracelets, head-mounted devices, and the like. Head-mounted devices may include virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, and the like. Vehicle 103 may be, but is not limited to, a sedan, SUV (sport utility vehicle or suburban utility vehicle), MPV (multi-purpose vehicle), sports car, truck, off-road vehicle, dump truck, tractor, agricultural vehicle, or specialized vehicle (such as a sanitation vehicle, snowplow, or bulldozer). For example, the vehicle may be a new energy electric vehicle. The communication service 102 can be understood as one or more of TSP service, vehicle equipment center service, protocol adapter service, device gateway service, and EMQ. For example, the communication service 102 can be understood as the device gateway service, or the integration of the protocol adapter service and the device gateway service.
[0054] In an exemplary embodiment, Figure 2 As shown, a vehicle remote control method is provided, which is applied to Figure 1 The communication service 102 (specifically, the device gateway service) in FIG. 1 is taken as an example to illustrate, including steps S201 to S203, which are specifically as follows:
[0055] Step S201: When a remote control instruction originating from a user control terminal is obtained from the first middleware, the current time and the issuing time of the preceding remote control instruction before the remote control instruction are obtained; the issuing time represents the time information when the communication service terminal sends the preceding remote control instruction to the second middleware; the communication distance between the second middleware and the vehicle is less than the communication distance between the first middleware and the communication service terminal and the vehicle.
[0056] Because the vehicle remote control method in this embodiment is applied to a communication server between a user control terminal and a vehicle, and multiple middleware may exist between the user control terminal and the vehicle, such as message middleware, more specifically, Kafka message middleware, EMQ middleware, etc., the first middleware and the second middleware are both middleware used for data transmission between the user control terminal and the vehicle. Therefore, the communication server can interact with other middleware. The user control terminal is the control terminal used by the user to issue various commands (remote control commands), such as an app on a mobile phone or a vehicle remote control. Remote control commands are commands that instruct the vehicle to perform a specific action, such as turning on the air conditioning or lights. A predecessor remote control command is a remote control command that precedes the current remote control command. In this embodiment of the present application, the predecessor remote control command can be understood as the remote control command that precedes the currently acquired remote control command, and this predecessor remote control command and the currently acquired remote control command are commands for the same vehicle.
[0057] Exemplarily, the communication distance between the above-mentioned communication server and the vehicle is shorter than the communication distance between the communication server and the user control terminal. The communication server obtains the remote control instruction from the user control terminal from the first middleware. At this time, the communication server needs to obtain the current time and the issuance time of the previous remote control instruction. The issuance time represents the time information of the communication server sending the previous remote control instruction to the second middleware. There is no limitation on the way the communication server obtains the current time and the issuance time. It can be obtained from the first middleware, or it can be recorded by the communication server itself, etc. For example, when the communication server issues the previous remote control instruction, it records the corresponding time information and saves it to the local database, and then it can be directly obtained from the database.
[0058] Step S202: Obtain the time difference between the current time and the sending time.
[0059] For example, after obtaining the current time and the issuance time of the previous remote control command, the communication service end can obtain the time difference between the two. For example, by subtracting the issuance time of the previous remote control command from the current time, the time difference can be obtained. The time difference can reflect the length of time the previous remote control command has been authenticated on the vehicle side.
[0060] Step S203: If the time difference is less than the authentication duration corresponding to the previous remote control command, the communication server can temporarily store the remote control command until the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command, and then send the temporarily stored remote control command to the vehicle through the second middleware.
[0061] Authentication refers to the authentication required before a vehicle executes a remote control command, such as anti-theft authentication for a remote control command. Correspondingly, authentication duration refers to, for example, the duration from the start time of the remote control command anti-theft authentication to the end time of the authentication. The authentication duration for each remote control command can be pre-set or derived based on the actual authentication duration recorded from the vehicle. This is not a limitation.
[0062] It should be noted that remote control command authentication for a vehicle is serial, meaning it is performed one by one and cannot be executed in parallel. However, authenticated remote control commands can be executed in parallel by the vehicle. For example, only the anti-theft authentication process is serial; the specific remote control command execution can run in parallel. For example, after obtaining the time difference, the communication server can compare it with the authentication duration corresponding to the previous remote control command. If the time difference is less than the authentication duration, the remote control command can be temporarily stored. This temporary storage can be achieved by various methods, such as storing it in memory or disk, or in a memory-based database, more specifically, in a Redis database. While or after temporarily storing the remote control command, the relationship between the time difference and the authentication duration can be determined in real time or periodically until it is determined that the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command. At this point, the remote control command no longer needs to be stored, and the communication server can send the temporarily stored remote control command to the vehicle via the second middleware. It should be noted that the first middleware and the second middleware can both interact with data in real time, and the communication service end can obtain information from the first middleware and send information to the second middleware at any time, without being affected by the remote control command issuance logic; at the same time, the communication content between the user control end and the vehicle may involve other information in addition to remote control commands, such as the remote control results returned by the vehicle after executing the remote control commands, etc. The transmission of other information does not affect the transmission of the remote control commands. Specifically, the temporary storage / issuance logic of the remote control commands and the receiving and acquisition logic of other information can be parallel.
[0063] In this embodiment, the user control end can send multiple remote control commands simultaneously or successively. When the communication service end obtains the remote control command from the user control end from the first middleware, it determines how to process the remote control command from the user control end by determining the time difference between the current time and the issuance time of the previous remote control command, and according to the relationship between the time difference and the authentication duration, it determines if the time difference is less than the authentication duration, and temporarily stores the remote control command until the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command, and then sends the temporarily stored remote control command to the vehicle through the second middleware. Therefore, after the user clicks to send a remote control command, he can click to send the next remote control command without waiting, that is, the remote control commands are sent in parallel, and the communication service end can determine whether to send the currently obtained remote control command without the need to rely on the command execution result information returned by the vehicle end, which improves the efficiency of vehicle remote control. Furthermore, in this vehicle remote control method, the communication server is located between the user control terminal and the vehicle. Compared to a user control terminal, such as an app, the communication server takes less time to exchange information with the vehicle, allowing remote control commands temporarily stored on the communication server to be issued to the vehicle more quickly, thereby improving the efficiency of vehicle remote control. Furthermore, compared to developing and implementing parallel solutions for remote control commands on the vehicle or user control terminal, this method can be implemented by simply improving the hardware or software of the communication server, requiring lower costs and a shorter development cycle. It is not constrained by differences in vehicle models or apps, and is more versatile.
[0064] In an exemplary embodiment, the aforementioned step of "temporarily storing the remote control command until the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command, and sending the temporarily stored remote control command to the vehicle through the second middleware" includes: storing the remote control command in a preset queue, and setting a corresponding expiration time for the remote control command in the queue; the expiration time indicates whether the time difference between the current time and the issuance time of the previous remote control command reaches the authentication duration corresponding to the previous remote control command; querying the expiration time in the queue, and when it is found that the expiration time has arrived, taking out the remote control command from the queue, and sending the remote control command to the vehicle through the second middleware.
[0065] Among them, the preset queue, that is, a pre-set data storage queue, can be used to store remote control instructions, for example, a delay queue (delay queue). Exemplarily, the communication server can temporarily store remote control instructions through the preset queue and set a corresponding expiration time for the remote control instructions in the queue; the expiration time represents whether the time difference between the current time and the issuance time of the previous remote control instruction reaches the authentication time corresponding to the previous remote control instruction. For example, the expiration time can be equal to the absolute value of the difference between the time difference and the authentication time. When the expiration time arrives, it is considered that the time difference between the current time and the issuance time of the previous remote control instruction reaches the authentication time corresponding to the previous remote control instruction. After saving the remote control instruction and setting the expiration time, the communication server can query the expiration time in the queue in real time. If it is found that the expiration time has arrived, the remote control instruction is taken out of the queue and sent to the vehicle through the second middleware. It should be pointed out that, in addition to the above-mentioned characterization, the expiration time itself can still be a technical term in the computer information technology environment. From a technical principle perspective, for example, the expiration time (Expiration) in Redis can be a time limit for storing a key value (key) in the Redis database. When the storage time of the key value reaches the corresponding expiration time, the key value will be cleared. Specifically in this embodiment, the remote control instructions temporarily stored in the preset queue are set with a corresponding expiration time, for example, 800ms. The expiration time can be counted from the time of setting. When the count reaches 800ms, the expiration time is reached. At this time, the corresponding remote control instruction is taken out from the preset queue, which corresponds to the "cleaning" in the aforementioned Redis example. The following is an example:
[0066] Example 1: Assume the current time is 18:00 and the previous remote control command was issued at 17:59. The corresponding time difference is +1 minute, and the corresponding authentication duration is 2 minutes. The expiration time is: 2-1 = 1 minute. Then, at 18:01 or later, the expiration time is considered to have been reached, and the time difference between the current time and the issuance time of the previous remote control command reaches the corresponding authentication duration of the previous remote control command.
[0067] Example 2: Assume the current time is 6:00 PM and the previous remote control command was issued at 6:30 PM. The corresponding time difference is -30 minutes, and the corresponding authentication duration is 2 minutes. The expiration time is: 2 - (-30) = 32 minutes. At 6:32 PM or later, the expiration time is considered reached, and the time difference between the current time and the issuance time of the previous remote control command reaches the authentication duration corresponding to the previous remote control command.
[0068] It should be noted that the preceding remote control command may have already been issued or may not have been issued yet. For example, in the scenario described in Example 2 above, the preceding remote control command that has not yet been issued may be temporarily stored in a preset queue. Accordingly, the issuing time of the preceding remote control command may be the actual issuing time or an estimated issuing time. Furthermore, the addition and subtraction signs and operation rules in this embodiment may vary depending on the selected benchmark and actual needs.
[0069] In this embodiment, the communication service end temporarily stores remote control instructions by utilizing a preset queue and an expiration time, and takes out the remote control instructions from the queue after the expiration time is reached, and sends the remote control instructions to the vehicle through the second middleware. The expiration time can reflect whether the time difference between the previous time and the issuance time of the previous remote control instruction reaches the authentication time corresponding to the previous remote control instruction, so as to reflect whether the time consumed for the previous remote control instruction to be authenticated on the vehicle side has basically reached the usual authentication time of the previous remote control instruction. Therefore, it helps to ensure the real-time nature of issuing remote control instructions and improve the efficiency of vehicle remote control.
[0070] In an exemplary embodiment, the "obtaining the issuing time of the preceding remote control instruction before the remote control instruction" in the aforementioned step includes: when the preceding remote control instruction has been sent to the second middleware, the communication server obtains the actual time of sending the preceding remote control instruction to the second middleware as the issuing time of the preceding remote control instruction; when the preceding remote control instruction has not yet been sent to the second middleware, the communication server obtains the predicted estimated time of sending the preceding remote control instruction to the second middleware as the issuing time of the preceding remote control instruction.
[0071] For example, as described above, the preceding remote control instruction may have been issued or may not have been issued yet. In the case where the preceding remote control instruction has been sent to the second middleware, the actual time of sending the preceding remote control instruction to the second middleware can be obtained as the issuing time of the preceding remote control instruction; in the case where it has not yet been sent to the second middleware, it is necessary to obtain an estimated time as the issuing time of the preceding remote control instruction, wherein the estimated time can be predicted based on the number of remote control instructions that have been temporarily stored and the corresponding authentication time, or can be predicted based on the expiration time corresponding to the preceding remote control instruction and the current time; at the same time, the issuing time of the preceding remote control instruction can be updated in real time, for example, after the preceding remote control instruction is actually issued, the issuing time of the preceding remote control instruction is updated to the actual time.
[0072] In this embodiment, a method for determining the delivery time of a preceding remote control command is provided based on two scenarios: whether the preceding remote control command has been delivered or not. If the preceding remote control command has not yet been delivered, the communication server obtains the estimated time for sending the preceding remote control command to the second middleware as the delivery time of the preceding remote control command. This allows the corresponding delivery time to be obtained for different delivery scenarios of the preceding remote control command, thereby ensuring the smooth execution of subsequent steps such as determining the time difference.
[0073] In an exemplary embodiment, the aforementioned steps of "setting a corresponding expiration time for the remote control instruction" include: when the previous remote control instruction is temporarily stored in the queue, the communication server sets a corresponding expiration time for the remote control instruction according to the corresponding expiration time of the previous remote control instruction and the corresponding authentication duration.
[0074] For example, as mentioned above, the preceding remote control instruction may be temporarily stored in a preset queue. In this case, it is explained that the remote control instruction before the preceding remote control instruction, specifically the preceding remote control instruction of the preceding remote control instruction, hereinafter referred to as the "previous remote control instruction", has a time difference between its issuance time and the current time that is greater than or equal to its corresponding authentication duration. Therefore, the preceding remote control instruction is temporarily stored in the preset queue and is set with a corresponding expiration time to indicate whether the time difference between the current time and the issuance time of the previous preceding remote control instruction reaches the authentication duration corresponding to the previous preceding remote control instruction. In this case, the communication service end can obtain the expiration time required to set for the remote control instruction based on the expiration time corresponding to the preceding remote control instruction and the corresponding authentication duration. The following example is used to illustrate:
[0075] Assume that the current time is 6:00 PM, the previous remote control command was issued at 5:59 PM, the authentication duration for the previous remote control command was 2 minutes, and the authentication duration for the previous remote control command was 1 minute. Since the difference between the current time and the previous remote control command's issuance time (1 minute) is less than the authentication duration for the previous remote control command (2 minutes), the previous remote control command is temporarily stored in a preset queue and assigned a corresponding expiration time (2-1 = 1 minute). Combining this expiration time with the current time, the previous remote control command's issuance time can be predicted as: 6:00 PM + 1 minute = 6:01 PM. Then, based on the predicted issuance time of the previous remote control command (6:01 PM), the current time (6:00 PM), and the corresponding authentication duration (1 minute), an expiration time can be set for the remote control command: 6:01 PM minus 6:00 PM plus 1 minute, i.e., 1 minute + 1 minute = 2 minutes. In this example, the following rules can be summarized:
[0076] Rule 1: The expiration time of the previous remote control command = the authentication time of the previous remote control command - (current time - the issuance time of the previous remote control command).
[0077] Rule 2: The issuing time of the previous remote control command = the current time + the expiration time of the previous remote control command;
[0078] Rule 3: Expiration time of a remote control command = issuance time of the previous remote control command - current time + authentication duration of the previous remote control command = current time + expiration time of the previous remote control command - current time + authentication duration of the previous remote control command = expiration time of the previous remote control command + authentication duration of the previous remote control command.
[0079] From the above rules, we can know that according to the expiration time corresponding to the previous remote control instruction and the authentication duration corresponding to the previous remote control instruction, we can get the expiration time required to set the remote control instruction; and according to the expiration time corresponding to the previous remote control instruction and the current time, we can get the issuance time of the previous remote control instruction, and according to the predicted issuance time of the previous remote control instruction, the current time and the corresponding authentication duration, we can get the expiration time required to set the remote control instruction. This is essentially the same as the above content, or in other words, it at least falls within the scope of "setting the corresponding expiration time for the remote control instruction according to the expiration time corresponding to the previous remote control instruction and the corresponding authentication duration." It should be noted that this example is based on the fact that the previous remote control instruction has been actually issued. If the previous remote control instruction has not been actually issued, it can be traced back and deduced backwards according to the same principle as this case.
[0080] In this embodiment, if a previous remote control command may not have been issued and is temporarily stored in a preset queue, the communication server sets an expiration time for the remote control command based on the expiration time of the previous remote control command and the corresponding authentication duration. This allows for accurate setting of the expiration time for the remote control command, ensuring that the remote control command is issued on time, thereby helping to improve the accuracy and efficiency of vehicle remote control.
[0081] In an exemplary embodiment, the aforementioned vehicle remote control method also includes: the communication service end obtains a remote control message containing a preceding remote control instruction from the first middleware; the remote control message is obtained by encapsulating the remote control instruction from the user control end, the vehicle-end device identification, and the pre-saved authentication duration corresponding to each type of remote control instruction based on the TSP service; the communication service end obtains the preceding remote control instruction and the authentication duration corresponding to the preceding remote control instruction from the remote control message, and saves the authentication duration locally.
[0082] For example, the communication service end can obtain a remote control message containing a preceding remote control instruction from the first middleware. The remote control message is described below. The user issues a remote control instruction and a corresponding vehicle-side device identifier from the user control end. The TSP service receives the remote control instruction and the corresponding vehicle-side device identifier. The TSP service then encapsulates the corresponding authentication duration, the remote control instruction, and the corresponding vehicle-side device identifier based on the remote control instruction and the corresponding vehicle-side device identifier to form a remote control message, which is then transmitted to the first middleware. Similarly, the preceding remote control instruction and the corresponding authentication duration can also be obtained from the remote control message.
[0083] In this embodiment, the communication service end obtains the remote control instructions and the corresponding authentication duration, the previous remote control instructions and the authentication duration corresponding to the previous remote control instructions from the first intermediate, thereby serving the implementation of subsequent steps (determining the relationship between the time difference and the authentication duration), thereby helping to improve the efficiency of vehicle remote control.
[0084] In an exemplary embodiment, the first middleware in the aforementioned vehicle remote control method is Kafka message middleware; the aforementioned step of "obtaining remote control instructions from the user control end from the first middleware" includes: the communication server obtains the remote control message containing the remote control instruction from the Kafka message middleware; based on the remote control message, obtains the vehicle-side device identification of the vehicle to be controlled, the current remote control instruction to be processed and its corresponding authentication duration; the aforementioned step of "obtaining the issuance time of the preceding remote control instruction before the remote control instruction" includes: the communication server obtains the issuance time of the preceding remote control instruction corresponding to the vehicle based on the vehicle-side device identification.
[0085] Among them, Kafka message middleware is Kafka message middleware. The vehicle-side device identifier is an identifier used to identify and distinguish vehicles, such as the TBOX device number on the vehicle side. For example, the remote control instruction and the corresponding vehicle-side device identifier are sent to the TSP service via the user control terminal, and the TSP service sends the remote control message containing the remote control instruction and the vehicle-side device identifier to the Kafka message middleware. As a result, the communication service end can obtain the remote control message from the Kafka message middleware, thereby obtaining the vehicle-side device identifier and remote control instruction. For example, the remote control message (binary data) is converted to obtain the vehicle-side device identifier and remote control instruction. Then, the communication service end can find the issuance time of the previous remote control instruction that belongs to the same vehicle-side device identifier as the remote control instruction based on the vehicle-side device identifier.
[0086] In this embodiment, since there may be more than one user control terminal and more than one vehicle, the communication service can be a communication service between multiple user control terminals and multiple vehicles. To avoid confusion, the communication service can obtain remote control messages from the Kafka message middleware. Since the remote control message is obtained by encapsulating the remote control command from the user control terminal and the vehicle-side device identifier through the TSP service, the communication service can accordingly obtain the vehicle-side device identifier and remote control command. Therefore, based on the vehicle-side device identifier, it can obtain the issuance time of the previous remote control command corresponding to the vehicle. Therefore, the use of the vehicle-side device identifier can achieve differentiation. Therefore, the technical solution provided by this embodiment helps to improve the accuracy of vehicle remote control.
[0087] In an exemplary embodiment, the aforementioned vehicle remote control method also includes: when the communication server sends a remote control command to the vehicle through the second middleware, it stores the issuance time of the remote control command and the vehicle-end device identifier corresponding to the remote control command based on a preset data structure; the "obtaining the issuance time of the preceding remote control command before the remote control command" in the aforementioned step includes: when it is determined that the preceding remote control command has been sent to the second middleware, the communication server determines from the data structure the issuance time corresponding to the vehicle-end device identifier and closest to the current time as the issuance time of the preceding remote control command.
[0088] Among them, the preset data structure, that is, the data structure pre-set for storing the time when the communication server sends the remote control command and the corresponding vehicle-end device identifier, is, for example, a String data structure in Redis. For example, the communication server can use a preset String data structure to store the time when the remote control command is sent to the second middleware and the corresponding vehicle-end device identifier. Since different vehicles may correspond to different remote control commands, previous remote control commands, etc., there may be multiple remote control commands and previous remote control commands corresponding to the same vehicle-end device identifier, and there may also be multiple corresponding issuance times. For this, based on the order of the vehicle-end device identifier and the issuance time, the issuance time corresponding to the aforementioned vehicle-end device identifier and closest to the current time can be determined as the issuance time of the previous remote control command. At the same time, the previous remote control command here should have been sent to the second middleware. For example, the expiration time corresponding to the previous remote control command can be used to determine whether the previous remote control command has been sent to the second middleware. When its expiration time is reached, it means that it has been sent.
[0089] In this embodiment, the communication server uses a data structure to store the time when the remote control command was sent to the vehicle via the second middleware and the corresponding vehicle-side device identifier. Based on the vehicle-side device identifier, the communication server determines from the data structure the sending time corresponding to the aforementioned vehicle-side device identifier and closest to the current time as the sending time of the previous remote control command. This allows the communication server to quickly and accurately obtain the sending time, thereby facilitating the rapid determination of time differences and improving the efficiency of vehicle remote control.
[0090] In an exemplary embodiment, the communication server in the aforementioned vehicle remote control method is a gateway service, and the second middleware is EMQ message middleware; the aforementioned vehicle remote control method also includes: if the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command, the communication server sends a remote control command to the vehicle through the EMQ message middleware.
[0091] Among them, the gateway service is the service that provides gateway functions, such as Figure 3 Device gateway service that interacts with EMQ. For example, the communication server in the vehicle remote control method may be a gateway service, and the second middleware may be an EMQ message middleware. If the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command, the remote control command may be sent to the vehicle via the EMQ message middleware.
[0092] In this embodiment, since the gateway service is used as the communication service end used in the vehicle remote control method, and the EMQ message middleware is used as the second middleware to send target remote control instructions to the vehicle, this makes the communication distance with the vehicle shorter, and also helps to reduce the time consumption of vehicle remote control and improve the efficiency of vehicle remote control.
[0093] To facilitate further understanding of the vehicle remote control method provided by this embodiment, the following Figure 3 As shown, a flowchart of non-parallel execution of remote control instructions is first given, and the description of the flowchart is as follows:
[0094] 1. The user uses the app to determine the remote control command that the vehicle needs to execute, i.e., the remote control request. The app then sends the remote control request data to the TSP service.
[0095] 2. After receiving the request, the TSP service further encapsulates the request and sends it to the vehicle equipment center;
[0096] 3. After receiving the request, the vehicle equipment center processes it and sends it to the Kafka message middleware;
[0097] 4. Return the result;
[0098] 5. The vehicle equipment center returns to the TSP service the unique identifier of this remote control request;
[0099] 6. The TSP service returns the unique identifier of this remote control request to the APP;
[0100] 7. The APP periodically obtains the remote control execution results from the TSP service based on the request unique identifier;
[0101] 8. The protocol adapter service obtains remote control messages from the Kafka message middleware;
[0102] 9. Protocol adapter service to adapt vehicle transport protocols;
[0103] 10. The protocol adapter service adapts the remote control request data and sends it to the Kafka message middleware;
[0104] 11. The device gateway service obtains remote control messages from the Kafka message middleware;
[0105] 12. The device gateway service forwards the request to EMQ. The forwarding here is usually direct forwarding only, without temporary storage and forwarding.
[0106] 13. The vehicle side obtains vehicle control information from EMQ;
[0107] 14. The vehicle side analyzes and executes the corresponding instructions according to the remote control request;
[0108] 15. The vehicle sends the execution results to EMQ;
[0109] 16. The device gateway service obtains the vehicle control execution results from EMQ;
[0110] 17. The device gateway service sends the remote control results to the Kafka message middleware;
[0111] 18. The protocol adapter service obtains remote control results from the Kafka message middleware;
[0112] 19. After parsing the protocol, the protocol adapter will call the TSP service interface to inform the remote control result;
[0113] 20. The APP calls the TSP service interface to obtain the remote control execution result.
[0114] After introducing the non-parallel execution process of the above remote control instructions, the following Figure 4, introduces the parallel solution process related to the vehicle remote control method provided by the example of this application. The vehicle remote control method is applied to the "device gateway service" in the figure that directly interacts with "EMQ" for data. The "some other services in the middle" in the figure refer to some services involved in the middle, such as vehicle equipment center service, protocol adapter service, etc. This abbreviation is used for the purpose of simply explaining the entire interaction process. In addition, the arrows in the figure are not absolutely the logical relationship that reflects the flow of remote control instructions and related messages. Some arrows can be used to reflect the execution subjects of the corresponding steps. The description of the parallel solution flow chart is as follows:
[0115] 1. The user determines the remote control command that the vehicle needs to execute through the APP, that is, the remote control request, and then the APP sends the remote control request to the TSP service;
[0116] 2. The TSP service calls other services. Here, the TSP service can send remote control requests and other related data to other services, such as the authentication time mentioned above;
[0117] 3. Some other services in the middle return to the TSP the unique identifier of the remote control request;
[0118] 4. The TSP service returns the unique identifier of the remote control request to the APP;
[0119] 5. Some other services in the middle will push messages to the Kafka message middleware;
[0120] 6. The device gateway service obtains the remote control request message from the Kafka message middleware;
[0121] 7. The device gateway service sends the remote control message to EMQ. The message can be sent directly or stored for a certain period of time before being sent.
[0122] 8. The vehicle side obtains remote control information from EMQ;
[0123] 9. Remote control on the vehicle side;
[0124] 10. The APP sends a remote control request to the TSP service for the second time;
[0125] 11. The TSP service calls other services. Here, the TSP service can send remote control requests and other related data to other services, such as the authentication time mentioned above;
[0126] 12. Some other services return to the TSP the unique identifier of the remote control request;
[0127] 13. The TSP service returns the unique identifier of the second remote control request to the APP;
[0128] 14. Some other services in the middle will push messages to the Kafka message middleware;
[0129] 15. The device gateway service obtains the remote control request message from the Kafka message middleware;
[0130] 16. The device gateway service determines whether the vehicle has any instructions being executed;
[0131] 17. Device gateway service remotely controls and stores messages for the second time;
[0132] 18. The vehicle returns the result of the first remote control request to EMQ;
[0133] 19. The device gateway service receives the result of the first remote control request;
[0134] 20. The device gateway service updates the remote control status of the vehicle execution.
[0135] 21. Send the second remote control request message of the vehicle to EMQ;
[0136] 22. The vehicle receives the remote control request message from EMQ;
[0137] 23. The device gateway service sends the result of the first remote control request to the Kafka message middleware;
[0138] 24. Some other services in the middle obtain the first remote control results from the Kafka message middleware;
[0139] 25. Some other services call the update remote control results provided by the TSP service to update;
[0140] 26. The APP obtains the final remote control result of the vehicle based on the unique identifier of the first remote control request.
[0141] In conjunction with the above flow chart and corresponding description, it can be understood that the vehicle remote control method provided in the embodiment of the present application includes steps S501 to S503. Figure 5 As shown, the details are as follows:
[0142] Step S501: The communication service receives and processes the remote control message. This step corresponds to the relevant content such as "when a remote control instruction originating from the user control end is obtained from the first middleware, the current time and the issuance time of the preceding remote control instruction before the remote control instruction are obtained." Specifically, the device gateway service receives the binary data of the remote control message from the kafka message middleware and converts it into a remote control object. The TBOX device number of the vehicle end is obtained from the remote control object and recorded as pdid. According to pdid, the issuance time when the current vehicle is executing remote control is obtained from Redis: the key in the String structure is pdid, and the value is the start time (timestamp) of the previous remote control being executed, that is, the preset data structure.
[0143] Step S502: The communication server determines the time difference between the current time and the delivery time. This step corresponds to "obtaining the time difference between the current time and the delivery time" and other related content. Specifically, the device gateway service obtains the difference between the last remote control timestamp and the current timestamp, recording it as diffTimes.
[0144] Step S503: The communication server processes the remote control message based on the time difference and the duration of the anti-theft authentication. This step corresponds to the following: "If the time difference is less than the authentication duration corresponding to the previous remote control command, the remote control command is temporarily stored until the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command, at which point the temporarily stored remote control command is sent to the vehicle via the second middleware."
[0145] Specifically, the device gateway service records the anti-theft authentication time in the previous remote control command message as antiTheftTimes; if diffTimes is greater than or equal to antiTheftTimes, it means that the anti-theft authentication of the previous remote control command request has passed when the current remote control command request is sent to the vehicle-side anti-theft authentication, then the current remote control message is immediately sent to EMQ and then forwarded to the vehicle's TBOX; if diffTimes is less than antiTheftTimes, it means that the anti-theft authentication of the previous remote control command request has not passed when the current remote control command request is sent to the vehicle-side anti-theft authentication, so you can refer to Figure 6As shown, the current remote control request is placed in a distributed delay queue and set to an expiration time of: antiTheftTimes - diffTimes. When antiTheftTimes - diffTimes is equal to or less than 0, the remote control request is retrieved and sent to the EMQ for forwarding to the vehicle's TBOX. The "antiTheftTimes - diffTimes" formula is used here to calculate the desired expiration time in real time. Based on the real-time calculation results of this formula, the corresponding expiration time can be updated in real time, thus helping to obtain a more accurate expiration time.
[0146] The corresponding content here is "storing the remote control command in a preset queue and setting a corresponding expiration time for the remote control command in the queue", "when it is found that the expiration time has arrived, taking out the remote control command from the queue and sending the remote control command to the vehicle through the second middleware" and other related content.
[0147] The following provides a possible specific method for obtaining the anti-theft authentication time. Before executing the corresponding steps in the vehicle remote control method provided in this embodiment, the following preparations can be made in advance:
[0148] Preparation Step 1: Analyze and record the anti-theft authentication execution time. Specifically, various types of remote controls issued by the TSP are sent to the vehicle-side TBOX via EMQ. TBOX records the anti-theft authentication execution start time and anti-theft authentication completion time of each type of remote control to obtain the anti-theft authentication duration for each type of remote control. After executing the remote control command and sending the execution result to the TSP, the anti-theft authentication duration of the remote control is also transmitted to the TSP. The TSP service records the device's PDID and anti-theft authentication duration in the database.
[0149] Preparation step two: Analyze the anti-theft authentication time of various types of remote controls for each vehicle. Specifically, the maximum time consumed for various types of remote control anti-theft authentication can be obtained from the database every day or every week through a scheduled task. For example, the maximum time consumed for remote control anti-theft authentication can be used as the anti-theft authentication time consumed for subsequent use. When issuing a remote control command, the TSP service obtains the anti-theft authentication time consumed based on the vehicle's TBOX device number pdid and encapsulates it into the request. This corresponds to "the remote control message is obtained based on the TSP service encapsulating the remote control command from the user control end, the vehicle-end device identifier, and the authentication time corresponding to the pre-saved types of remote control commands" and other related content.
[0150] With the above preparations, the communication server can obtain the corresponding anti-theft authentication time from the received remote control message. It should be noted that the vehicle-side anti-theft authentication is serial, while the specific remote control command can be run in parallel. Therefore, as long as the anti-theft authentication time has passed, the next remote control command can be sent to the vehicle through EMQ.
[0151] In this embodiment, the user control terminal can send multiple remote control commands simultaneously or sequentially. The communication server determines how to process the remote control command from the user control terminal by determining the time difference between the current time and the issuance time of the previous remote control command, and based on the relationship between the time difference and the authentication time, determines how to handle the remote control command from the user control terminal. If the time difference is less than the authentication time, the remote control command is temporarily stored until the time difference is greater than or equal to the authentication time corresponding to the previous remote control command. The temporarily stored remote control command is then sent to the vehicle via the second middleware. As a result, after the user clicks to send one remote control command, they can click to send the next remote control command without waiting, thus achieving parallel execution of remote control commands, which improves the efficiency of vehicle remote control. At the same time, in the vehicle remote control method provided by this embodiment, the communication server is located between the user control terminal and the vehicle. Compared with the user control terminal, such as an app, the communication server takes less time to exchange information with the vehicle, so that the remote control commands temporarily stored on the communication server can be sent to the vehicle more quickly, thereby improving the efficiency of vehicle remote control. Furthermore, compared to developing and implementing remote control commands in parallel on the vehicle or user side, this method can be implemented by simply improving the hardware or software of the communication server. This approach requires lower costs and a shorter development cycle, is unconstrained by differences in vehicle models or apps, and is more versatile. Remote control commands are temporarily stored using a preset queue and expiration time. Upon reaching the expiration time, the remote control command is removed from the queue and sent to the vehicle via a second middleware. The expiration time reflects whether the time difference between the current remote control command and the previous remote control command's issuance time has reached the corresponding authentication duration. This helps ensure the real-time issuance of remote control commands and improves the efficiency of vehicle remote control. By obtaining the remote control command and its corresponding authentication duration, as well as the previous remote control command and its corresponding authentication duration from the first middleware, the subsequent steps (determining the relationship between the time difference and the authentication duration) are facilitated, further improving the efficiency of vehicle remote control. Using a vehicle-side device identifier allows for differentiation, helping to ensure the accuracy of vehicle remote control.
[0152] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0153] Based on the same inventive concept, embodiments of the present application also provide a vehicle remote control device for implementing the aforementioned vehicle remote control method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more vehicle remote control device embodiments provided below can be found in the above-described limitations of the vehicle remote control method and will not be further elaborated here.
[0154] In an exemplary embodiment, Figure 7 As shown, a vehicle remote control device 700 is provided, which is applied to a communication service end between a user control end and a vehicle, and the device includes:
[0155] The judgment module 701 is configured to obtain, when a remote control instruction originating from a user control terminal is obtained from the first middleware, the current time and the issuance time of a preceding remote control instruction preceding the remote control instruction; the issuance time represents the time information when the communication service terminal sends the preceding remote control instruction to the second middleware;
[0156] The sending module 702 is used to temporarily store the remote control command if the time difference is less than the authentication duration corresponding to the previous remote control command, and send the temporarily stored remote control command to the vehicle through the second middleware until the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command.
[0157] In one embodiment, the sending module 702 is also used to store the remote control command in a preset queue and set a corresponding expiration time for the remote control command in the queue; the expiration time indicates whether the time difference between the current time and the issuance time of the previous remote control command reaches the authentication time corresponding to the previous remote control command; the expiration time in the queue is queried, and when it is found that the expiration time has arrived, the remote control command is taken out of the queue and the remote control command is sent to the vehicle through the second middleware.
[0158] In one embodiment, the judgment module 701 is also used to obtain the actual time of sending the preceding remote control instruction to the second middleware as the time of issuing the preceding remote control instruction when the preceding remote control instruction has been sent to the second middleware; and to obtain the predicted estimated time of sending the preceding remote control instruction to the second middleware as the time of issuing the preceding remote control instruction when the preceding remote control instruction has not yet been sent to the second middleware.
[0159] In one embodiment, the judgment module 701 is also used to obtain a remote control message containing a preceding remote control instruction from the first middleware; the remote control message is obtained by encapsulating the remote control instruction from the user control end, the vehicle-end device identifier, and the pre-saved authentication duration corresponding to each type of remote control instruction based on the TSP service; the preceding remote control instruction and the authentication duration corresponding to the preceding remote control instruction are obtained from the remote control message, and the authentication duration is saved locally.
[0160] In one embodiment, the first middleware is Kafka message middleware; the judgment module 701 is also used to obtain a remote control message containing a remote control instruction from the Kafka message middleware; based on the remote control message, obtain the vehicle-side device identification of the vehicle to be controlled, the remote control instruction to be processed and its corresponding authentication duration; according to the vehicle-side device identification, obtain the issuance time of the previous remote control instruction corresponding to the vehicle.
[0161] In one embodiment, the judgment module 701 is also used to store the issuance time of the remote control command and the vehicle-end device identifier corresponding to the remote control command based on a preset data structure when sending a remote control command to the vehicle through the second middleware; when it is determined that the previous remote control command has been sent to the second middleware, the issuance time corresponding to the vehicle-end device identifier and closest to the current time is determined from the data structure as the issuance time of the previous remote control command.
[0162] In one embodiment, the communication service end is a gateway service, and the second middleware is an EMQ message middleware; the sending module 702 is also used to send a remote control command to the vehicle through the EMQ message middleware if the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command.
[0163] Each module in the vehicle remote control device 700 may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0164] In an exemplary embodiment, a communication device is provided. The communication device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The communication device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the communication device is used to provide computing and control capabilities. The memory of the communication device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the communication device is used to store data required for implementing vehicle remote control. The input / output interface of the communication device is used to exchange information between the processor and an external device. The communication interface of the communication device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a vehicle remote control method is implemented.
[0165] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the communication device to which the scheme of the present application is applied. The specific communication device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0166] In an exemplary embodiment, a communication device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0167] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0168] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0169] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0170] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0171] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A vehicle remote control method, characterized in that: Applied to a communication server, the communication server is used for communication between a user control terminal and a vehicle, the method comprises: When a remote control instruction originating from the user control terminal is obtained from the first middleware, the current time and the issuing time of the preceding remote control instruction before the remote control instruction are obtained; the issuing time represents the time information when the communication service terminal sends the preceding remote control instruction to the second middleware; Obtaining the time difference between the current time and the sending time; If the time difference is less than the authentication duration corresponding to the previous remote control command, the remote control command is temporarily stored until the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command, and the temporarily stored remote control command is sent to the vehicle through the second middleware.
2. The method according to claim 1, characterized in that The temporarily storing the remote control command until the time difference is greater than or equal to the authentication duration corresponding to the previous remote control command, and sending the temporarily stored remote control command to the vehicle through the second middleware, comprises: The remote control instruction is stored in a preset queue, and a corresponding expiration time is set for the remote control instruction in the queue; the expiration time indicates whether the time difference between the current time and the issuance time of the previous remote control instruction reaches the authentication time corresponding to the previous remote control instruction; The expiration time in the queue is queried, and when it is found that the expiration time has arrived, the remote control instruction is taken out from the queue, and the remote control instruction is sent to the vehicle through the second middleware.
3. The method according to claim 1, characterized in that Obtaining the issuing time of the preceding remote control instruction before the remote control instruction includes: In the case where the preceding remote control instruction has been sent to the second middleware, acquiring the actual time of sending the preceding remote control instruction to the second middleware as the issuing time of the preceding remote control instruction; In the case that the preceding remote control instruction has not been sent to the second middleware, a predicted estimated time for sending the preceding remote control instruction to the second middleware is obtained as the sending time of the preceding remote control instruction.
4. The method according to claim 1, characterized in that The method further comprises: Acquire a preceding remote control message including the preceding remote control instruction from the first middleware; the preceding remote control message is obtained by encapsulating the preceding remote control instruction from the user control terminal, the vehicle-side device identifier, and the pre-saved authentication duration corresponding to the preceding remote control instruction based on the TSP service; The preceding remote control instruction and the authentication duration corresponding to the preceding remote control instruction are obtained from the preceding remote control message, and the authentication duration of the preceding remote control instruction is stored locally.
5. The method according to claim 4, characterized in that The first middleware is Kafka message middleware; The obtaining of the remote control instruction from the user control end from the first middleware comprises: obtaining a remote control message containing the remote control instruction from the Kafka message middleware, wherein the remote control message is obtained by encapsulating the remote control instruction from the user control end, the vehicle-end device identifier, and the pre-saved authentication duration corresponding to the remote control instruction based on the TSP service; obtaining the vehicle-end device identifier of the vehicle to be controlled, the remote control instruction to be processed, and the corresponding authentication duration based on the remote control message; The obtaining of the issuing time of the preceding remote control instruction before the remote control instruction comprises: obtaining the issuing time of the preceding remote control instruction corresponding to the vehicle according to the vehicle-side device identifier.
6. The method according to claim 1, characterized in that The method further comprises: When sending each remote control command to the vehicle through the second middleware, storing the issuing time of each remote control command and the vehicle-side device identifier corresponding to the remote control command based on a preset data structure; The obtaining of the issuing time of the preceding remote control instruction before the remote control instruction includes: When it is determined that the preceding remote control instruction has been sent to the second middleware, the sending time corresponding to the vehicle-end device identifier and closest to the current time is determined from the data structure as the sending time of the preceding remote control instruction.
7. The method according to any one of claims 1 to 6, characterized in that: The communication service end is a gateway service, and the second middleware is an EMQ message middleware.
8. A vehicle remote control device, characterized in that: Applied to a communication server, the communication server is used for communication between a user control terminal and a vehicle, the device comprises: A judgment module, configured to obtain, when a remote control instruction originating from the user control terminal is obtained from the first middleware, the current time and the issuing time of a preceding remote control instruction before the remote control instruction; the issuing time represents the time information when the communication service terminal sends the preceding remote control instruction to the second middleware; and obtain the time difference between the current time and the issuing time; A sending module is used to temporarily store the remote control instruction if the time difference is less than the authentication duration corresponding to the previous remote control instruction, until the time difference is greater than or equal to the authentication duration corresponding to the previous remote control instruction, and then send the temporarily stored remote control instruction to the vehicle through the second middleware.
9. A communication device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Instruction processing method and device
CN110505127A
Remote control method and device of vehicle, server and storage medium
CN114844931A
Information processing method and device and vehicle
CN115314530A
Control instruction sending method, equipment, storage medium and device
CN115685771A
Message processing method and device, equipment, storage medium and computer program product
CN117312011A