Vehicle remote control method, electronic device and computer-readable storage medium
By using the method of correlation between task identifiers and preset clocks in remote control of vehicles, the continuous call of user terminals to the remote control interface is reduced, and the problem of excessive system resource consumption is solved and system performance and security is improved.
Patent Information
- Application Number
- CN202411268947.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-09-11
AI Technical Summary
When the vehicle is remotely controlled, the user terminal continuously calls the cloud system interface to obtain execution results, resulting in excessive system resource consumption, which may lead to system downtime and reduced performance in processing requests.
By generating a task identifier and associating the request task to obtain the remote control result with the preset clock, the remote control interface is called according to the first call time and the loop call time, reducing the number of accesses to the system.
Improve system performance, save system resources, reduce the risk of system downtime and reduced processing request performance, and promptly feedback on the vehicle execution results of remote control instructions.
Smart Images

Figure CN118802995B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a vehicle remote control method, a corresponding electronic device, and a corresponding computer-readable storage medium. Background Art
[0002] With the development of the Internet of Vehicles, it is possible to send control instructions to the vehicle through user terminals, such as mobile phone APP (Application), to operate the vehicle. However, the vehicle feedback results are not immediately returned to the user terminal. To obtain the execution results of vehicle control, the user terminal needs to cyclically call the cloud system interface to obtain the execution results of vehicle control, and then prompt the execution results to the user.
[0003] However, the continuous cyclic calling of the cloud system interface by the user terminal will consume a large amount of system resources, causing great pressure on the system, which may lead to system downtime. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a vehicle remote control method, a corresponding electronic device, and a corresponding computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0005] An embodiment of the present invention discloses a vehicle remote control method, which is applied to a user terminal. The method includes:
[0006] Generate a remote control instruction and send the remote control instruction to a remote service provider TSP system, and receive a task identifier generated by the TSP system based on the remote control instruction;
[0007] Generate a remote control result acquisition request task according to the task identifier;
[0008] Receiving the calling time for the remote control interface sent by the TSP system based on the remote control instruction, and associating the remote control result acquisition request task with a preset clock table according to the calling time; the calling time includes the first calling time and the cyclic calling time after the first calling time;
[0009] The remote control interface is called according to the first calling time and the cyclic calling time after the first calling time through the preset clock table to obtain the vehicle execution result of the remote control instruction.
[0010] The embodiment of the present invention further discloses a vehicle remote control method, which is applied to a remote service providing TSP system, and the method includes:
[0011] receiving a remote control instruction sent by a user terminal, generating a task identifier based on the remote control instruction, and sending the task identifier to the user terminal;
[0012] Acquire a calling time for a remote control interface, and send the calling time of the remote control interface to the user terminal;
[0013] Among them, the calling time includes the first calling time and the cyclic calling time after the first calling time; the user terminal is used to generate a remote control result request task based on the task identifier, and associate the remote control result request task with a preset clock table according to the calling time, and call the remote control interface of the TSP system through the preset clock table according to the first calling time and the cyclic calling time after the first calling time to obtain the vehicle execution result of the remote control instruction.
[0014] An embodiment of the present invention further discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, any one of the vehicle remote control methods is implemented.
[0015] An embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, any one of the vehicle remote control methods is implemented.
[0016] The embodiments of the present invention include the following advantages:
[0017] In an embodiment of the present invention, a user terminal can receive a task identifier generated by a remote service provider TSP system based on a remote control instruction initiated by the remote service provider TSP system, and generate a remote control request task based on the obtained task identifier. At this time, the task terminal can associate the remote control result request task with the preset clock table according to the call time based on the received call time, so that the user terminal can call the remote control interface of the TSP system according to the first call time and the cyclic call time after the first call time associated with the remote control result request task with the help of the preset clock table, and obtain the vehicle execution result of the remote control instruction. The user terminal associates the remote control result request task with the preset clock table according to the call time, so that the user terminal can determine the time point of calling the remote control interface of the TSP system with the help of the clock table, and call the remote control interface according to the first call time and the cyclic call time after the first call time, so as to avoid the continuous cyclic call of the remote control interface by the user terminal after successfully initiating the remote control instruction, and reduce the number of system accesses by the user terminal in the process of calling the remote control interface, thereby improving system performance, saving system resources, and greatly reducing the risk of system downtime and reduced request processing performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic diagram of an application scenario of vehicle remote control in the prior art;
[0019] Figure 2 is a schematic diagram of a vehicle remote control process provided by an embodiment of the present invention;
[0020] Figure 3 is a flowchart of a vehicle remote control method embodiment of the present invention;
[0021] FIG. 4A to FIG. 4B is a schematic diagram of the association of a clock table provided by an embodiment of the present invention;
[0022] Figure 5 is a flowchart of another vehicle remote control method embodiment of the present invention;
[0023] Figure 6 It is a schematic diagram of the process of collecting and analyzing time-consuming data provided by an embodiment of the present invention;
[0024] Figure 7 is a structural block diagram of an embodiment of a vehicle remote control device of the present invention;
[0025] Figure 8 It is a structural block diagram of another embodiment of a vehicle remote control device of the present invention. DETAILED DESCRIPTION
[0026] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] In the scenario where the user terminal remotely controls the vehicle, the vehicle execution results need to be obtained by the user terminal continuously and cyclically calling relevant cloud interfaces, such as the remote control interface.
[0028] Reference Figure 1, shows a schematic diagram of an application scenario of vehicle remote control in the prior art, involving communication between a user terminal, a TSP (Telematics Service Provider) system and a vehicle terminal. Exemplarily, a user initiates a remote control command, such as a door opening command, through a user terminal. After the TSP system forwards the request for the remote control command to the vehicle's on-board terminal, it can return information to the user terminal to inform that the relevant remote control command has been successfully issued to the vehicle. At this time, the user terminal begins to continuously call the cloud interface of the TSP system, that is, the remote control interface queries the vehicle for the vehicle execution result of the relevant remote control command initiated by the user terminal. Assuming that there are currently 100,000 people using the relevant remote control APP, and the time for the vehicle to respond to the remote control command and execute the corresponding vehicle control is approximately 4 to 5 seconds, and the cyclic call interval is 0.5 seconds / time, then for obtaining the vehicle execution result of the remote control command, each user terminal needs to continuously call the remote control interface of the TSP system 8 to 10 times, and for the remote control APP used by 100,000 people, 800,000 to 1 million users need to be processed within 4 to 5 seconds, that is, the continuous cyclic call of the interface by the user terminal consumes a particularly large amount of system resources, which is easy to increase system pressure and thus easily cause system crashes.
[0029] In addition, the frequency of cyclically calling the remote control interface will also have an impact. Specifically, the smaller the interface call interval period of the cyclically calling the remote control interface, that is, the higher the call frequency of the remote control interface within the preset unit time, the greater the pressure on the system; and if the interface call interval period of the cyclically calling the remote control interface is large, that is, the call frequency of the remote control interface within the preset unit time is low, it will cause the user to have a greater delay in the feedback of the vehicle execution result. For example, assuming that a remote control instruction is sent from the user terminal to the vehicle via the TSP system, the vehicle executes a remote control instruction and feeds back the vehicle execution result to the user terminal via the TSP system. The request takes 5.1 seconds. Assuming that the user terminal calls the remote control interface once every 0.5 seconds, it is necessary to call 11 times to obtain the vehicle execution result, which is a relative delay of 0.4 seconds. If the user terminal calls the remote control interface once every 1 second, it is necessary to call 6 times to obtain the vehicle execution result, which is delayed by 0.9 seconds, that is, the user waits 0.5 seconds longer, and there is a greater feedback delay.
[0030] In the embodiment of the present invention, the user terminal associates the task of obtaining the remote control result request with the preset clock table according to the calling time, so that the user terminal can determine the time point of calling the remote control interface of the TSP system with the help of the clock table, and call the remote control interface according to the first calling time and the cyclic calling time after the first calling time, thereby avoiding the user terminal from continuously cyclically calling the remote control interface after successfully initiating the remote control instruction, and reducing the number of times the user terminal accesses the system during the process of calling the remote control interface, thereby improving system performance, saving system resources, and greatly reducing the risk of system downtime and reduced request processing performance.
[0031] Specifically, refer to Figure 2 , shows a schematic diagram of the process of vehicle remote control provided by an embodiment of the present invention, involving communication between a user terminal, a TSP system, a vehicle device service, a message middleware, a device gateway, a message proxy server and a vehicle-mounted terminal.
[0032] Exemplarily, the TSP system may refer to a supplier that provides telematics services; the APP of the user terminal may provide an interface for the user to interact with the TSP system, that is, the user may remotely view the vehicle status, remotely control the vehicle functions, and receive vehicle alarms and notifications through the APP of the user terminal; the vehicle device server may be a business middle platform service, which may provide service support to multiple cloud business systems including TSP services; the message middleware may be Kafka, which may be used as a message center to build real-time data pipelines and streaming applications; the message proxy server may be EMQ (Erlang MQTT Broke, a message proxy server), where MQTT is an IoT device communication design that uses a publish / subscribe message transmission protocol; the vehicle-mounted terminal may be, for example, a Tbox terminal. This is not limited in the embodiments of the present invention.
[0033] In the embodiment of the present invention, the business process of the remote control of the vehicle in the Internet of Vehicles can be expressed as a user initiating a remote control command for the vehicle through the APP of the user terminal. At this time, the TSP service of the TSP system can call the device center of the vehicle device service to send the remote control command to it, such as Figure 2As shown, there may be two communication links at this time: Communication link 1 may be expressed as a vehicle equipment service or TSP service generating a task identifier, such as a task ID, for initiating a remote control request task and obtaining a remote control result request task based on the remote control instruction, and may return the generated task ID to the TSP service, and then the TSP service may return the generated task ID to the user terminal's APP, so that the user terminal's APP may generate a remote control result request task based on the task ID, and the generated remote control result request task mainly calls the remote control interface of the TSP system to obtain the vehicle execution result of the remote control instruction.
[0034] Communication link 2 can be manifested as the vehicle device service sending the remote control instruction to the message center, such as Kafka. The device gateway can usually subscribe to the relevant instruction message of the vehicle control request. After sending the remote control instruction to the message center, the message center can notify the device gateway. At this time, the device gateway can encapsulate the vehicle control request protocol for the aforementioned relevant instruction message, and send the encapsulated vehicle control request message to the message proxy server, such as EMQ; the vehicle terminal, that is, the Tbox terminal can usually subscribe to the vehicle control request message. After receiving the notification, the Tbox terminal can respond to the relevant remote control instructions of the vehicle control request message and perform corresponding vehicle control. After the vehicle terminal completes the corresponding control of the vehicle, it can send the vehicle execution result of the remote control instruction through the message proxy server; the device gateway can usually subscribe to the vehicle execution result message. After receiving the notification, the device gateway can send the obtained vehicle execution result message to the message center, so that the message center sends the obtained vehicle execution result to the TSP service that subscribes to the vehicle execution result message, and the TSP service can store the received vehicle execution result message in the memory of the TSP service.
[0035] It should be noted that the cyclic calling process of the user terminal APP obtaining the vehicle execution result for the remote control instruction according to the task ID can occur after the Tbox terminal responds to the relevant remote control instruction of the vehicle control request message and executes the corresponding vehicle control; in communication link 1, the user terminal APP generates a remote control result request task according to the task ID, and calls the remote control interface of the TSP system based on the execution of the remote control result request task to obtain the vehicle execution result of the remote control instruction. The vehicle execution result obtained by calling the remote control interface is actually the vehicle execution result message received by the TSP service in communication link 2 and stored in its memory. After obtaining the vehicle execution result, the user terminal APP can display the vehicle execution result on the page to inform the user of the vehicle execution result such as the success or failure of the remote control instruction.
[0036] In an embodiment of the present invention, a task identifier generated by a remote service providing TSP system based on a remote control instruction initiated by the remote service providing TSP system can be received through a user terminal, and a remote control result obtaining request task can be generated based on the task identifier, and the remote control result obtaining request task can be associated with a preset clock table according to the calling time, so that the user terminal can determine the time point of calling the remote control interface of the TSP system with the help of the clock table, and call the remote control interface according to the first calling time and the cyclic calling time after the first calling time, so as to avoid the user terminal from continuously cyclically calling the remote control interface after successfully initiating the remote control instruction, and reduce the number of times the user terminal accesses the system during the process of calling the remote control interface, thereby improving system performance, saving system resources, and greatly reducing the risk of system downtime and reduced request processing performance.
[0037] And, the task of obtaining the remote control result request is associated with the preset clock table, so that the remote control interface can be called according to the associated call time through the preset clock table, which can not only prevent useless interface calls, bring performance improvement to the user terminal, and help the terminal thread obtain more processors to perform other tasks, but also can be based on the call of the remote control interface of the preset clock table, and the vehicle execution result of the remote control instruction can be fed back to the user terminal in time to reduce data delay. Furthermore, on the basis of relying on the preset clock table to realize the call of the remote control interface, the relevant data of the remote control interface can be further obtained in time through the cyclic call algorithm strategy and fed back to the user terminal to inform the user. In addition, the TSP system can also collect the request time data of the vehicle execution result of each remote control instruction to predict the call time when the user terminal should call the remote control interface in different scenarios (such as different time periods), and determine the cyclic call algorithm strategy that the user terminal should adopt.
[0038] Reference Figure 3 , shows a flowchart of a vehicle remote control method embodiment of the present invention, which is applied to a user terminal and may specifically include the following steps:
[0039] Step S301, generating a remote control instruction and sending the remote control instruction to a remote service provider TSP system, and receiving a task identifier generated by the TSP system based on the remote control instruction;
[0040] In the scenario of vehicle remote control, users can remotely control the vehicle function through the TSP service provided by the TSP system through the mobile phone APP or related software of the user terminal. Specifically, the user initiates a remote control command to the vehicle through the user terminal. For example, the user can click on the corresponding vehicle control control on the APP interface to generate a remote control command for the vehicle. The remote control command may include, for example, opening the door, opening the window, opening the sunroof, opening the trunk, honking the horn, etc. Then, the APP will forward the remote control command to the TSP system.
[0041] After forwarding the request for the remote control command to the vehicle's on-board terminal, the TSP system can return information to the user terminal to inform that the relevant remote control command has been successfully issued to the vehicle, such as generating a random number and returning it to the APP. The returned random number can be used to inform that the remote control command has been successfully issued to the vehicle. In order to obtain the vehicle execution result, the APP can call the cloud interface used for the TSP system, such as the remote control interface, to obtain the vehicle execution result of the on-board terminal for the remote control command, and know whether the remote control command has been executed successfully or failed.
[0042] Step S302, generating a remote control result request task according to the task identifier;
[0043] The vehicle execution result fed back by the vehicle is not immediately returned to the user terminal. In one embodiment of the present invention, the user terminal can receive the task ID generated by the TSP system based on the remote control instruction, and generate a remote control result acquisition request task based on the task ID. The execution of the remote control result acquisition request task can mainly be manifested as the user terminal calling the remote control interface of the TSP system.
[0044] Among them, the remote control instruction can be encapsulated by the user terminal as a remote control request task. The user terminal serves as the initiator of the remote control request task, and the TSP system serves as the receiver of the remote control request task. After receiving the remote control request task, the TSP system can generate a task ID in response to the remote control request task and return the generated task ID to the initiator.
[0045] Step S303, receiving the calling time for the remote control interface sent by the TSP system based on the remote control instruction, and associating the remote control result obtaining request task with the preset clock table according to the calling time;
[0046] The user terminal has a need to obtain the vehicle execution results of the remote control instructions given by the on-board terminal. This need can be encapsulated by the user terminal to obtain the remote control result request task. The user terminal also serves as the initiator of the remote control result request task. At this time, the user terminal can associate the remote control result request task with the preset clock table according to the calling time for the remote control interface returned by the TSP system, so that the execution of the remote control result request task can be combined with the preset clock table to call the remote control interface according to the calling time.
[0047] Among them, the calling time can be used to indicate the request time data from the user terminal initiating the remote control command to receiving the vehicle execution result. Based on the aforementioned request time data, the waiting time for the user terminal to call the remote control interface is set.
[0048] Specifically, the calling time may include the first calling time and the cyclic calling time after the first calling time. The first calling time can be used to indicate the waiting time for the user terminal to call the remote control interface for the first time after the remote control instruction is successfully sent; the cyclic calling time after the first calling time can be used to indicate the calling frequency of the user terminal's subsequent calls to the remote control interface after the first call to the remote control interface.
[0049] It should be noted that a clock may refer to a clock with corresponding time scales and pointers, such as a clock with pointers for seconds, minutes, and hours and corresponding time scales. In an embodiment of the present invention, the preset clock may involve the following types: a stopwatch and a millisecond watch, wherein the stopwatch is mainly manifested as a clock running a circle for 60 seconds, each scale represents 1 second, and there are 60 scales in total; the millisecond watch is mainly manifested as dividing 1 second into multiple scales, such as a scale of 100 milliseconds, and there are 10 scales in total. It should be noted that the preset clock can also be based on the actual adoption of a minute watch, an hour watch, a day watch, etc., and the embodiment of the present invention does not limit this.
[0050] Step S304, calling the remote control interface according to the first calling time and the cyclic calling time after the first calling time through the preset clock table to obtain the vehicle execution result of the remote control instruction.
[0051] The user terminal has a demand to obtain the vehicle execution results of the remote control instructions of the on-board terminal. This demand can be encapsulated by the user terminal to obtain the remote control result request task. The user terminal serves as the initiator of the remote control result request task, and the TSP system serves as the receiver of the remote control result request task. After the user terminal associates the remote control result request task with the calling time, the remote control result request task can be executed according to the associated calling time to call the remote control interface of the TSP system.
[0052] Specifically, the user terminal can use a preset clock table to determine the time point for calling the remote control interface of the TSP system, and call the remote control interface according to the first call time and the cyclic call time after the first call time, so as to avoid the user terminal from continuously cyclically calling the remote control interface after successfully initiating the remote control command. While reducing the number of times the user terminal accesses the system during the process of calling the remote control interface, the time accuracy of the remote control interface call can also be ensured based on the call time returned by the TSP system.
[0053] In one embodiment of the present invention, step S303, associating the remote control result request task with a preset clock table according to the calling time, includes:
[0054] The remote control result request task is associated with the preset clock table according to the first call time.
[0055] In order to ensure that the first call time of the APP calling the remote control interface is determined by the clock calling algorithm, and the remote control interface is called for the first time based on the determined first call time, the task of obtaining the remote control result request can be first associated with the preset clock table according to the first call time.
[0056] Assuming that the preset clock table associated with the remote control result request task can be a millisecond table and a stopwatch, the remote control result request task can be classified into a specific associated clock table based on different situations in which the value obtained after converting the call time in seconds carries an integer value and / or a decimal value.
[0057] In one embodiment of the present invention, when the value obtained after converting the call time with seconds as the time unit contains an integer value and a decimal value, the remote control result request task can be associated with the corresponding scale of the stopwatch according to the integer value obtained by the aforementioned conversion, and the associated remote control result request task can be associated with the corresponding scale of the millisecond watch of the current time according to the decimal value.
[0058] Specifically, first, the remote control result request task can be associated with the corresponding scale of the stopwatch according to the aforementioned integer value. When the stopwatch time moves to a certain time scale, it is found that the remote control result request task is associated with the scale. At this time, the associated remote control result request task can be asynchronously obtained, and then, the obtained remote control result request task can be asynchronously associated with the corresponding scale of the millisecond watch according to the aforementioned decimal value.
[0059] For example, assuming that the calling time of the remote control result request task is 2.1 seconds, the remote control result request task can be associated with the corresponding scale in the stopwatch according to the 2-second scale. When the stopwatch moves to the associated scale, the remote control result request task can be asynchronously retrieved. If the value obtained after the call time of the retrieved remote control result request task is converted to seconds as the time unit still contains a decimal value, that is, it is found that it is necessary to wait for 0.1 seconds. At this time, the retrieved remote control result request task can be asynchronously associated with the corresponding scale in the millisecond table again according to the 100-millisecond scale to realize the association between the remote control result request task and the clock table.
[0060] In one embodiment of the present invention, when the value obtained after converting the call time in seconds contains a decimal value but does not contain an integer, it means that there is no integer second. The remote control result request task can be associated with the stopwatch. Specifically, the remote control result request task can be associated with the corresponding scale of the millisecond watch according to the decimal value.
[0061] For example, assuming that the calling time of the remote control result request task is 0.6 seconds, that is, the calling time does not include an integer second, then the remote control result request task can be directly associated with the corresponding scale in the millisecond table according to the 600 millisecond scale to realize the association between the remote control result request task and the clock table.
[0062] In one embodiment of the present invention, step S303, associating the remote control result request task with a preset clock table according to the calling time, includes:
[0063] After the user terminal makes the first call to the remote control interface, the remote control result request task is associated with the preset clock table according to the preset call frequency.
[0064] The cyclic call time can be determined based on a preset call frequency. After the APP of the user terminal makes the first call to the remote control interface based on the determined first call time, it can also be based on a cyclic call algorithm strategy, such as associating the remote control result request task with a preset clock table at the preset call frequency after the first call is initiated, so as to facilitate the subsequent cyclic call of the remote control interface according to the preset call frequency until the user terminal successfully obtains the vehicle execution result. This is not limited by the embodiments of the present invention.
[0065] In practical applications, the preset call frequency can be used to indicate the interface interval call cycle, which can be manifested as after the remote control interface is called for the first time according to the associated first call time, the next call time is determined according to the call time of the previous call and the interface interval call cycle, and at this time, the remote control result request task can be associated with the preset clock table again according to the next call time determined based on the interface interval call cycle. Repeatedly iterate the association in the above manner to perform subsequent iterative calls to the remote control interface until the user terminal successfully obtains the vehicle execution result.
[0066] Regarding the method of associating remote control result request tasks according to a preset frequency, the remote control result request tasks can be classified into association strategies for specific associated clock tables according to the different situations based on the values obtained after the call time is converted in seconds as the time unit. The embodiments of the present invention will not be elaborated here.
[0067] In order to facilitate those skilled in the art to understand the specific association process between the remote control result request task and the clock table in the embodiment of the present invention, see FIG. 4A to FIG. 4B , showing a schematic diagram of the association of a clock table provided in an embodiment of the present invention, the following description is given here in conjunction with the accompanying drawings and examples:
[0068] In this example, it is assumed that the user clicks on the corresponding vehicle control control through the APP interface provided by the user terminal to generate the following five remote control instructions, such as remotely opening the door, remotely opening the window, remotely opening the sunroof, remotely opening the trunk, and remotely opening the horn. The user terminal has a need to obtain the vehicle execution result of the remote control instruction by the on-board terminal. The user terminal can receive the task ID generated by the TSP system based on the remote control instruction, and generate a remote control result request task based on the task ID, that is, the user terminal can obtain the aforementioned opening of the door, opening of the window, opening of the sunroof, opening of the trunk The tasks of vehicle execution results of remote control commands such as opening the trunk and honking the horn are encapsulated to obtain the remote control result request tasks, for example, obtain remote control result request task 1 (referred to as request task 1) = obtain the execution result of opening the door, obtain remote control result request task 2 (referred to as request task 2) = obtain the execution result of opening the window, obtain remote control result request task 3 (referred to as request task 3) = obtain the execution result of opening the sunroof, obtain remote control result request task 4 (referred to as request task 4) = obtain the execution result of opening the trunk, obtain remote control result request task 5 (referred to as request task 5) = obtain the execution result of honking the horn.
[0069] The call time is the time it takes for the user terminal to initiate a remote control command and receive the vehicle execution result.
[0070] Assuming that the calling time of request task 1 is 5.1 seconds, the calling time of request task 2 is 0.1 seconds, the calling time of request task 3 is 5.6 seconds, the calling time of request task 4 is 0.6 seconds, and the calling time of request task 5 is 4 seconds, the calling time of each of the above-mentioned remote control result request tasks can be matched using a regular expression function to execute the above two clock association logics, such as Figure 4A As shown, the request task 5 is associated with the corresponding scale of the millisecond watch according to the integer value of 4 seconds included in its call time, and the request task 1 and the request task 3 are associated with the corresponding scale of the stopwatch according to the integer value of 5 seconds included in their call time; Figure 4B As shown, request tasks 1 and 2 are associated with the corresponding scale of the millisecond table according to the decimal value of 0.1 seconds (i.e. 100 milliseconds) contained in their call time, and request tasks 3 and 4 are associated with the corresponding scale of the millisecond table according to the decimal value of 0.6 seconds (i.e. 600 milliseconds) contained in their call time.
[0071] It should be noted that the clock is always moving. When the clock is associated with the remote control result request task, the specific associated scale needs to be determined based on the current time scale of the stopwatch and the millisecond watch. For example, for 2.6 seconds, assuming that the current time scale of the stopwatch moves to the scale corresponding to 3 seconds, if there is a clock association requirement for the remote control result request task at this time, and the call time in seconds is 2.6 seconds, since it contains an integer value, that is, 2 seconds, but since the stopwatch has reached the corresponding scale of 3 seconds at this time, it is necessary to associate the remote control result request task with the aforementioned call time of 2.6 seconds with the scale corresponding to 5 seconds in the stopwatch based on the current time scale of the stopwatch. This is not elaborated in the embodiment of the present invention.
[0072] In one embodiment of the present invention, step S304, calling the remote control interface according to the first call time and the cyclic call time after the first call time through the preset clock table to obtain the vehicle execution result of the remote control instruction includes:
[0073] Determine the time scale of the first call time as the current time scale through the preset clock table, obtain the remote control result request task associated with the current time scale, execute the associated remote control result request task, and call the remote control interface of the TSP system; and, after the user terminal calls the remote control interface for the first time, call the remote control interface of the TSP system according to the preset calling frequency through the preset clock table.
[0074] The cyclic calling time may be determined based on a preset calling frequency, and the preset calling frequency may be a fixed calling frequency or a variable calling frequency, which is not limited in the embodiment of the present invention.
[0075] For example, assuming that the first call time of the remote control interface is 4 seconds, and the preset call frequency is 7 calls within the time period from 4 seconds to 4.8 seconds, then when the user terminal makes the first call to the remote control interface, it can be shown that the remote control interface of the TSP system is called 4 seconds after the user terminal successfully initiates the remote control command, and then the remote control interface can be called 7 times in a cycle from 4.8 seconds according to the preset call frequency, that is, within 0.8 seconds after the first call to the remote control interface. In addition, it is also allowed that the preset call frequency increases in an exponential form of 100 milliseconds starting from 4.8 seconds, for example, the remote control interface is called once within 200 milliseconds, 400 milliseconds, and 800 milliseconds starting from 4.8 seconds, respectively, and this is not limited by the embodiment of the present invention.
[0076] In actual applications, when the user initiates a remote control command through the APP of the user terminal, the TSP system will return the unique number of the command, as well as the first call time used to identify the first call to the remote control interface after the command is initiated, and the preset call frequency for initiating the interface call after the first call to the remote control interface. For example, the first call is initiated at 4 seconds, and 7 calls are initiated at intervals of 100 milliseconds until 4.8 seconds. Then, starting from 4.8 seconds, the preset call frequency increases exponentially by 100 milliseconds, for example, starting from 4.8 seconds, calls are made once every 200 milliseconds, 400 milliseconds, and 800 milliseconds, etc.
[0077] In an embodiment of the present invention, a remote control request task is generated by a user terminal based on a task ID returned by a TSP system, and the remote control result request task is associated with a preset clock table according to a calling time, so that the user terminal can determine the time point for calling the remote control interface of the TSP system with the help of the clock table, and call the remote control interface according to the first calling time and the cyclic calling time after the first calling time, thereby avoiding continuous cyclic calling of the remote control interface by the user terminal after successfully initiating a remote control instruction, and reducing the number of system accesses by the user terminal during the process of calling the remote control interface, thereby improving system performance, saving system resources, and greatly reducing the risk of system downtime and reduced request processing performance.
[0078] Reference Figure 5 , shows a flowchart of another vehicle remote control method embodiment of the present invention, which is applied to a remote service providing TSP system, and specifically may include the following steps:
[0079] Step S501, receiving a remote control instruction sent by a user terminal, generating a task identifier based on the remote control instruction, and sending the task identifier to the user terminal;
[0080] In the scenario of vehicle remote control, users can remotely control vehicle functions through the TSP service provided by the TSP system via the mobile phone APP or related software of the user terminal.
[0081] The TSP system can receive the remote control instruction initiated by the user terminal, and can generate a task ID based on the remote control instruction, and return the generated user ID to the user terminal, so that the user terminal generates a remote control result acquisition request task based on the user ID. Among them, the execution of the remote control result acquisition request task can mainly be manifested as the user terminal calling the remote control interface of the TSP system.
[0082] In an embodiment of the present invention, the task ID may be a unique number assigned by the TSP system to the request task, so as to uniquely identify the subsequent remote control result acquisition request task encapsulated and generated by the user terminal.
[0083] Step S502: Acquire the calling time of the remote control interface, and send the calling time of the remote control interface to the user terminal.
[0084] In order to clarify the time point when the user terminal calls the remote control interface of the TSP system, the TSP system can obtain the calling time of the remote control interface and return it to the user terminal.
[0085] Among them, the calling time may include the first calling time and the cyclic calling time after the first calling time. After the TSP system returns the task ID to the user terminal, it generates a remote control result request task based on the task ID; after the TSP system sends the calling time of the remote control interface to the user terminal, the user terminal can associate the remote control result request task with the preset clock table according to the calling time, and call the remote control interface of the TSP system according to the first calling time and the cyclic calling time after the first calling time through the preset clock table to obtain the vehicle execution result.
[0086] In an embodiment of the present invention, step S502, obtaining the calling time for the remote control interface, includes:
[0087] Obtain the timestamp and instruction type of the remote control instruction, where the timestamp is used to indicate the instruction initiation time of the remote control instruction; obtain the remote control time distribution data of the target time period from the preset database according to the instruction initiation time of the remote control instruction; determine the calling time of the remote control interface based on the remote control time distribution data of the target time period.
[0088] The determination of the calling time of the requested task can be achieved by predicting based on pre-collected time consumption distribution data for each remote control instruction.
[0089] The remote control time distribution data of the target time period usually refers to the remote control time distribution data of the same time period as the previous time period and the current instruction initiation time. That is, the calling time can be predicted based on the remote control time distribution data of the same time period as the previous time period and the current instruction initiation time. For example, assuming that the current instruction initiation time belongs to the peak time period, the remote control time distribution data of the previous time period, such as the peak time period of the previous day, can be obtained to predict the calling time of the current call to the remote control interface to obtain the vehicle execution result.
[0090] It should be noted that the previous time period and the current time period can be divided according to the time periods corresponding to different scheduled tasks, thereby obtaining the remote control time consumption distribution data of the target time period, which is not limited by the embodiments of the present invention.
[0091] Optionally, the remote control time distribution data for the target time period may include target request time data of the remote control command corresponding to the command type from command initiation to acquisition of the vehicle execution result, request time data within the target data quantity ratio, and average request time.
[0092] The determination of the first call time may be expressed as taking the target request time-consuming data as the first call time of the remote control result acquisition request task.
[0093] In an embodiment of the present invention, the target request timing data of a remote control instruction corresponding to a certain instruction type may generally refer to the fastest request timing data among all request timing data of the remote control instruction corresponding to the target instruction type, that is, at this time, the fastest request timing data among the target instruction type may be used as the first call time of the task of obtaining the remote control result request.
[0094] The determination of the preset call frequency can be performed by using the target request time consumption data and the request time consumption data within the target data quantity ratio, or by obtaining the target request time consumption data and the average request time consumption, calculating the call frequency within the time period of the target data quantity ratio, and using the call frequency to calculate the call cycle call time within the time period of the target data quantity ratio. In addition, the call frequency can also directly use the preset fixed call frequency, which is not limited in the embodiment of the present invention.
[0095] In an embodiment of the present invention, the request time consumption data of the target data quantity ratio may be 95%, 90%, 85%, 80%, etc. proportions of the request time consumption data of all the request time consumption data of the remote control instructions corresponding to the target instruction type, and the average request time consumption can be mainly calculated based on the request time consumption data within the target data quantity ratio. Among them, the larger the target data quantity ratio, the more accurate the subsequent average request time consumption data calculated based on these quantities of request time consumption data will be, which may affect the accuracy of the current call time predicted based on the remote control time consumption distribution data of the previous time period.
[0096] Exemplarily, assuming that 95% is currently adopted as the calculation accuracy, the remote control command initiated by the user terminal is a remote control command for the target command type of the trunk, the fastest request time consumption data among all request time consumption data for the remote control commands of the target command type for the trunk is 4 seconds, the slowest request time consumption data among all request time consumption data for the remote control commands of the target command type for the trunk is 5 seconds, the 95th% request time consumption data among all request time consumption data for the corresponding remote control commands of the target command type for the trunk is 4.8 seconds, and the average request time consumption calculated from 95% of the request time consumption data among all request time consumption data for the corresponding remote control commands of the target command type for the trunk is 4.4 seconds.
[0097] In the above example, the fastest request time data among all request time data for the remote control instructions of the target instruction type for the trunk can be used as the first call time, and then the fastest target request time data among all request time data for the remote control instructions of the target instruction type for the trunk and the 95th request time data of all request time data for the remote control instructions corresponding to the target instruction type for the trunk can be used to obtain the average request time, or the fastest target request time data among all request time data for the remote control instructions of the target instruction type for the trunk and the 95th request time data of all request time data for the remote control instructions corresponding to the target instruction type for the trunk can be used to calculate the preset call frequency within the time period of the target data quantity.
[0098] It should be noted that obtaining the 95th request time data of all request time data of the remote control instructions corresponding to the target instruction type for the trunk is to determine the calling frequency in the time period from the first call time (i.e. 4 seconds) to the 95th request time data (i.e. 4.8 seconds).
[0099] As an example, for the calculation process of the preset call frequency, specifically for the calculation of the preset call frequency in the period from the first call time (i.e. 4 seconds) to the 95% request time data (i.e. 4.8 seconds), it can be expressed as (the average request time calculated by the 95% request time data - the fastest time to obtain the remote control result) / 100 milliseconds (indicating a maximum delay of 100 milliseconds for the APP to receive the result, and this value can be freely configured according to the system), that is, (4.4-4) / 0.1=4 times; for the calculation from the 95% request time data The time period from the average request time (i.e., 4.4 seconds) to the 95% request time (i.e., 4.8 seconds), that is, for (the average request time calculated from the 95% request time - the 95% request time), 4.8-4.4=0.4 seconds, assuming that the call frequency can be set to an increment of 100 to 200 milliseconds with an interval of 0.4 seconds, for example, once in 100 milliseconds for 0.4 seconds, the call frequency at this time can be that the user terminal calls the remote control interface 4 times within 0.4 seconds; for another example, the increment of the increment frequency Using 20%, within the aforementioned 0.4 seconds, the user terminal can call the remote control interface once when the increase is 100 milliseconds, once when the increase is 120 milliseconds, once when the increase is 140 milliseconds, and so on; for the average request time calculated based on 95% of the request time data (i.e. 4.8 seconds), the subsequent interface loop call strategy can be expressed as using a fixed call frequency, for example, 200 milliseconds, the user terminal calls the remote control interface once; at the user terminal, according to the fixed call frequency After the remote control interface is called cyclically for a preset number of times, an exponentially increasing interface cyclic calling strategy can also be adopted, such as 2n times, specifically 200 milliseconds, 400 milliseconds, 800 milliseconds, etc., to cyclically call the remote control interface until the task execution time threshold of the remote control result request task is reached. If the task execution time threshold is exceeded and the vehicle execution result is not successfully obtained, it means that the remote control result request task has timed out. At this time, the remote control result request task can be canceled, that is, the timed-out remote control result request task will no longer be executed, and the remote control interface will no longer be called.
[0100] As another example, for the calculation process of the preset call frequency, specifically for the calculation of the call frequency in the time period from the first call time (i.e., 4 seconds) to the 95% request time data (i.e., 4.8 seconds), it can be expressed as (95% request time data-fastest time to obtain remote control results) / 100 milliseconds (indicating that the APP receives the result with a maximum delay of 100 milliseconds, and this value can be freely configured according to the system), that is, (4.8-4) / 0.1=8 times; for the call frequency after the average request time (i.e., 4.8 seconds) calculated from 95% of the request time data, it can be expressed as using a fixed call frequency, such as 200 milliseconds, for the user terminal to call the remote control interface once; after the user terminal cyclically calls the remote control interface at a fixed call frequency for a preset number of times, an exponentially increasing interface cyclic call strategy can also be adopted, such as 2n powers, specifically 200 milliseconds, 400 milliseconds, 800 milliseconds, etc., to cyclically call the remote control interface until the task execution time threshold of the task of obtaining the remote control result request is reached.
[0101] It should be noted that, in the case of a large gap in the distribution of remote control time consumption data, the former algorithm is called less times, and the latter algorithm is called more times, so the system has little impact on the user terminal when calling the remote control interface, which is conducive to improving the system's request processing capability; however, the former solution will be slightly delayed as the average request time is reached, but the user has no perception of the delay, that is, the delay can be ignored. According to the traditional calling solution, when the maximum time required for the user terminal to call the remote control interface is 4.8 seconds, assuming that it is called once every 100 milliseconds, it needs to be called 48 times. Compared with the traditional calling solution, the number of times of this solution can be completed in about 8 times. It can be seen that the cyclic calling algorithm proposed in this solution has little impact on the system, and can avoid the problem of slow request processing, serious impact on user experience, high system resource cost, and high risk of system downtime caused by the TSP system always processing the user terminal's call request for the remote control interface.
[0102] In an optional embodiment of the present invention, the TSP system may collect time consumption data of each remote control command for the vehicle in advance, and analyze and obtain remote control time consumption distribution data in different time periods for subsequent prediction of the calling time of the remote control interface.
[0103] Specifically, the statistical analysis process of the time consumption of remote control commands involves the process of remote control time consumption distribution data collection, remote control time consumption distribution data analysis and remote control time consumption distribution data storage. Among them, the remote control time consumption distribution data collection process involves the use of mathematical statistical analysis methods to obtain the traffic distribution information of each remote control command, and the remote control time consumption distribution data analysis process involves the process of using different strategies for data analysis in different time periods.
[0104] For the remote control time consumption distribution data collection process, the request time consumption data of each remote control command of the user terminal from the initiation of the command to the acquisition of the vehicle execution result can be collected.
[0105] The request time consumption data can be specifically calculated based on the instruction initiation time and the instruction execution end time of each remote control instruction.
[0106] For example, Figure 6 As shown, when the user terminal initiates a remote control command, it can specifically call the relevant interface of the TSP system that can be used to initiate the remote control command, such as v0 / public / vehicle-remote-control / send-vehicle-control-command. The specific commands mainly passed in by this interface can be window (WINDOW), window ventilation (WINDOW_VENTILATE), trunk (TAILGATE) and other remote control commands, etc. The specific action (ON / OFF) can represent opening or closing, and the vehicle unique mark or frame number can also be used in the aforementioned interface to identify the specific vehicle, and the interface can also be based on some other additional parameters of security; then the TSP system generates a unique command number for the aforementioned remote control command to identify the remote control command. Assuming that the taskId variable is used to save it, the taskId can be expressed as: current timestamp + vehicle number, where the current timestamp indicates the command initiation time of the remote control command. Specifically, the System.currentTimeMillis() function in the system can be used to obtain the millisecond value data of the current time.
[0107] When the TSP system forwards the remote control command to the vehicle terminal, such as the Tbox terminal installed in the vehicle, through a series of other services, such as vehicle equipment service and device gateway service, the Tbox terminal can convert the remote control command into a command that can be recognized by each controller of the vehicle, and then forward the converted command to each controller unit (Electronic Control Unit, referred to as ECU), then, the TSP system can return taskId to the user terminal for subsequent acquisition and recording of the instruction execution end time of the remote control instruction corresponding to taskId to obtain the vehicle execution result; and, the Tbox terminal forwards the converted remote control instruction to each vehicle controller. After executing the remote control instruction it can recognize, the vehicle controller can notify the Tbox terminal of the vehicle execution result, and the Tbox terminal can notify the TSP system of the vehicle execution result. At this time, the TSP system can obtain the vehicle execution result of the remote control instruction initiated by the Tbox terminal for the user terminal, and can parse the remote control instruction unique number, i.e., taskId, from the content of the vehicle execution result, and then record an end timestamp for the taskId. Specifically, the System.currentTimeMillis function can be used to obtain the current timestamp. At this time, the taskId, instruction initiation time, instruction execution end time, request execution time (instruction execution end time-instruction initiation time) and instruction type can be stored in the Kafka message middleware, so as to facilitate the subsequent collection of request time data of each remote control instruction from instruction initiation to receipt of the vehicle execution result.
[0108] The process of using mathematical statistical analysis methods to obtain the traffic distribution information of each remote control command can be expressed as counting the number of requests for each remote control command within a preset time based on the command initiation time of each remote control command, and obtaining the traffic distribution information of each remote control command. The traffic distribution information can be used to indicate the traffic distribution in different time periods; then, for the traffic distribution in different time periods, the time-consuming statistical data is obtained by collecting data at different collection frequencies.
[0109] Specifically, in order to ensure data collection efficiency, the collection frequency can be positively correlated with the traffic distribution, which is manifested as the greater the traffic in a certain time period, the higher the frequency of data collection in the time period; the smaller the traffic in a certain time period, the lower the frequency of data collection in the time period. For example, for most users, the peak travel time is 8:30-9:30 and 18:00-19:00. It can be assumed that the flow of people using remote control instructions in these two time periods is the largest, and the traffic borne by the TSP system is also the largest. The processing request may be slower than in other time periods. The embodiment of the present invention needs to analyze and statistically process the time distribution of each remote control instruction in different time periods.
[0110] For example, for the sake of system performance, the data collection period should not be too short. In this example, 10 minutes is used as the scale. When the user clicks on the relevant vehicle control control on the APP interface provided by the user terminal, the TSP system can use the provided message middleware to intercept the instructions initiated by the current user terminal. When it is determined that the intercepted instructions are remote control instructions, the remote control instructions initiated by the user terminal can be counted. Specifically, the map data structure provided by the system can be used for storage, where the key in the map data can be used to indicate the instruction initiation time, and the value in the map data can be used to indicate the number of instruction initiation times. Assuming that it is divided into scales of 10 minutes, for example, according to 2024-03-31 17:00, 2024-03-31 17:10, and so on, according to the aforementioned division method, the storage format in the map data can be divided into (24*60) / 10=144 scales, and the divided scales can be stored in the map data. Then, there can be 144 groups of data in the map, and the initial value corresponding to the key in each group of data, that is, the initial number of times, can be empty; when the TSP system receives the remote control instruction initiated by the user terminal, it can obtain the current instruction initiation time accurate to the minute. Assuming that the instruction initiation time accurate to the minute is 2024-03-31 17:05, then the remote control instruction can be recorded in the map for a time period of 2024-03-31. In the key at the corresponding scale of 17:00, the value corresponding to the key can be added by one, so as to accumulate the total number of instructions initiated in the corresponding time period.
[0111] It should be noted that the map data can be stored in a distributed middleware, such as Redis, to prevent loss during system restart. Optionally, after obtaining the remote data, the data can also be plotted as a time-consuming distribution bar graph through a web page or other terminal page, such as using a bar graph or a histogram to display the data, where the x-axis is the corresponding readability of the time period, and the y-axis is the total number of instructions initiated in the time period, which is not limited by the embodiments of the present invention.
[0112] For the process of data analysis using different strategies in different time periods, the instruction type of the remote control instruction can be obtained, and multiple time-consuming statistical data can be classified according to the instruction type to obtain multiple data linked lists corresponding to each instruction type; then, based on the time-consuming statistical data contained in each data linked list, the target request time-consuming data of the remote control instruction of the corresponding instruction type from the initiation of the instruction to the acquisition of the vehicle execution result, the request time-consuming data within the proportion of the target data quantity, and the average request time can be calculated.
[0113] Among them, the target request time data of the remote control instruction of the corresponding instruction type includes the request time data at the first position and the request time data at the last position after the time statistics data under the data linked list corresponding to the target instruction type are arranged in a preset order. For example, after arranging in a preset order from small to large, the request time data at the first position may refer to the fastest request time data among all request time data of the remote control instruction of the target instruction type, and the request time data at the last position may refer to the slowest request time data among all request time data of the remote control instruction of the target instruction type.
[0114] The data linked list corresponding to the target instruction type may be, for example, a data linked list constructed for the remote control instructions of the target instruction type for the trunk, and the data linked list may include all time-consuming data of all remote control instructions of the target instruction type for the trunk.
[0115] For example, after knowing the time periods with high traffic and the time periods with low traffic by using mathematical statistical analysis, different strategies can be used for data analysis for different time periods, which can be manifested as performing analysis of different scales for the time periods with high traffic and the time periods with low traffic. For example, the data analysis scale for the time periods with high traffic is as short as possible (for example, once every 1 minute), and the data analysis scale for the time periods with low traffic is as large as possible (for example, once every 10 minutes).
[0116] In practical applications, different scale analyses of data can be implemented through a real-time data analysis system, which can be deployed in a TSP system.
[0117] For data analysis of time periods with heavy traffic, the real-time data analysis system can divide the time periods with heavy traffic into 1-minute dimensions. For example, the time period of 2024-03-31 8:30-9:30 can be split into 2024-03-31 08:30, 2024-03-31 08:31, etc. according to the 1-minute scale. The split time scales can then be stored in a map data structure. The key in the map can be 2024-03-31 08:30, and the value can be used to store information such as the command initiation time, command execution end time, and command type (such as trunk, car lock, etc.) of the remote control command in the current time period.
[0118] It should be noted that in order to avoid hindering the real-time system from receiving the remote control result data and quickly storing it in the map data structure, a new thread can be created by using the system Thread to obtain the statistical results of each minute of data from the map structure in real time, and then analyze the data stored in the map structure. At this time, the groupby function in the underlying system function can be used to classify the relevant data content of each remote control instruction stored in the map data structure according to the instruction type (such as trunk, car lock, etc.), and the relevant data content of the remote control instructions of different instruction types obtained by classification can be placed in the data linked list for different instruction types for storage, for example, all remote control instructions related to the trunk operation instruction type The information such as the instruction initiation time and the instruction execution end time are placed in the data linked list of the trunk, and then the sort function in the linked list can be used to sort all the request time-consuming data of the remote control instruction of the instruction type of the trunk, and after sorting, the min function and max function in the linked list can also be used to obtain the fastest request time-consuming data and the slowest request time-consuming data among all the request time-consuming data of the remote control instruction of the instruction type of the trunk.
[0119] In addition, it is also possible to obtain 95%, 90%, 85%, 80% and other proportions of request time data of all request time data of remote control instructions corresponding to the target instruction type, as well as the average request time calculated based on 95%, 90%, 85%, 80% and other proportions of request time data of all request time data of remote control instructions corresponding to the target instruction type, so that when the user terminal initiates the remote control instruction in the next time period, the call time when the user terminal calls the remote control interface can be predicted. Among them, the larger the proportion of the target data, the more accurate the subsequent average request time data calculated based on these numbers of request time data, which may affect the accuracy of the current call time predicted based on the remote control time distribution data of the target time period.
[0120] In addition, since the preset call frequency can be different based on different call durations, in order to facilitate the TSP system to determine the call time of the user terminal when calling its remote control interface later, the relevant data can be calculated and stored in the database, so that the TSP system can directly obtain it from the storage of the database when predicting the call time. Specifically, the 95% request time data of all request time data of the remote control instruction corresponding to the target instruction type can be obtained by adopting (all request time data of the remote control instruction corresponding to the target instruction type * 95%), so as to calculate the call frequency in the time period from the first call time to the time represented by the 95% request time data; and the calculation of the average request time of 95% of the request time data of all request time data of the remote control instruction corresponding to the target instruction type can be expressed as calculated based on the following formula: ((the calculated 95% request time data + 95% request time data of all request time data of the remote control instruction corresponding to the target instruction type) / the number of 95% time data)). It should be noted that the aforementioned 95% is the calculation accuracy set by the TSP system when performing subsequent call time prediction. It is only used as an example. The calculation accuracy can also be 90%, 85%, etc. according to the setting. The calculation process of the relevant data can refer to the data calculation process when the aforementioned calculation accuracy is 95%. The embodiment of the present invention is not limited to this.
[0121] For data analysis of time periods with low traffic, the real-time data analysis system may divide the time periods with low traffic into 10-minute dimensions. The data analysis process may refer to the above-mentioned data analysis process for time periods with high traffic, and the embodiments of the present invention will not be elaborated here.
[0122] In a preferred embodiment of the present invention, for the process of storing remote control time-consuming distributed data, database field design can be first performed, such as instruction type, statistical start time, statistical end time, request time data within different data quantity proportions (for example, 95% proportion time data, 90% proportion time data, 85% proportion time data, 80% proportion time data, etc.), average request time, fastest time to obtain remote control results, slowest time to obtain remote control results, and other fields; then, the maximum time, minimum time, 95% proportion time and other different proportion time for each instruction type within a period of time (determined based on the statistical start time and statistical end time) obtained by analyzing the time data, and calling the insert function of the database to store the analysis results of the aforementioned time data obtained in the corresponding fields of the database. This embodiment of the present invention is not limited to this.
[0123] According to the vehicle remote control solution provided by the embodiment of the present invention, assuming that there are a large number of scenarios between some systems that need to call the remote control interface at intervals, or scenarios that need to execute tasks at intervals, assuming that there are currently 10,000 tasks that will be triggered within 1-10 seconds in the future, if the system responds to the task request of the user terminal to call its remote control interface by traversing these 10,000 tasks, then there may be some tasks that take several seconds to execute, and some tasks have timed out, for example, the 100th task will take 1 second to start executing, but it takes 5 seconds to complete the execution of 10,000 tasks, so the 100th task will time out for 4 seconds before execution, and this situation is not conducive to time-sensitive business scenarios. When the APP sends a remote control instruction to the TSP system, it basically takes about 5.4-6.2 seconds for the vehicle to respond to the remote control instruction and control the vehicle to execute the corresponding vehicle control. Then, the APP of the user terminal can start calling the remote control interface of the TSP system in 5.4 seconds, and there is no need to initiate useless calls before 5.4 seconds, reducing the pressure on the system by the user terminal during the process of calling the remote control interface.
[0124] In an embodiment of the present invention, a task for obtaining a remote control request is generated by a user terminal based on a task identifier returned by a remote service provider TSP system, and the task for obtaining a remote control result request is associated with a preset clock table according to a calling time, so that the user terminal can determine the time point for calling the remote control interface of the TSP system with the help of the clock table, and call the remote control interface according to the first calling time and the cyclic calling time after the first calling time, thereby avoiding continuous cyclic calling of the remote control interface by the user terminal after successfully initiating a remote control instruction, and reducing the number of times the user terminal accesses the system during the process of calling the remote control interface, thereby improving system performance, saving system resources, and greatly reducing the risk of system downtime and reduced request processing performance.
[0125] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0126] Reference Figure 7 , shows a structural block diagram of an embodiment of a vehicle remote control device of the present invention, which is applied to a user terminal and may specifically include the following modules:
[0127] The task identifier receiving module 701 is used to generate a remote control instruction and send the remote control instruction to the remote service provider TSP system, and the receiving TSP system generates a task identifier based on the remote control instruction;
[0128] A request task generation module 702 generates a remote control result acquisition request task according to the task identifier;
[0129] The clock association module 703 is used to receive the calling time for the remote control interface sent by the TSP system based on the remote control instruction, and associate the remote control result acquisition request task with a preset clock table according to the calling time; the calling time includes the first calling time and the cyclic calling time after the first calling time;
[0130] The interface calling module 704 is used to call the remote control interface according to the first calling time and the cyclic calling time after the first calling time through the preset clock table to obtain the vehicle execution result of the remote control instruction.
[0131] In one embodiment of the present invention, the clock association module 703 may include the following submodules:
[0132] The first clock association submodule is used to associate the remote control result acquisition request task with the preset clock table according to the first call time; the first call time is used to indicate the waiting time for the user terminal to call the remote control interface for the first time after the remote control instruction is successfully sent.
[0133] In an embodiment of the present invention, the cyclic calling time is determined based on a preset calling frequency; the clock association module 703 may include the following submodules:
[0134] The second clock association submodule is used to associate the remote control result acquisition request task with the preset clock table according to the preset calling frequency after the user terminal calls the remote control interface for the first time.
[0135] In one embodiment of the present invention, the preset clock table includes a millisecond table and a stop table, and the clock association submodule may include the following units:
[0136] A clock association unit is used to associate the remote control result request task with the corresponding scale of the stopwatch according to the integer value when the value obtained after the call time is converted with seconds as the time unit contains an integer value; if the value obtained after the associated remote control result request task is converted with seconds as the time unit contains a decimal value, then the associated remote control result request task is associated with the corresponding scale of the millisecond watch moving at the current time according to the decimal value.
[0137] In one embodiment of the present invention, the clock association unit is also used to associate the remote control result request task with the corresponding scale of the millisecond table according to the decimal value when the value obtained after the call time is converted with seconds as the time unit contains a decimal value but does not contain an integer value.
[0138] In an embodiment of the present invention, the cyclic calling time is determined based on a preset calling frequency; the interface calling module 704 may include the following submodules:
[0139] The interface calling submodule is used to determine that the time scale of the first calling time is the current time scale through the preset clock table, obtain the remote control result request task associated with the current time scale, and execute the associated remote control result request task to call the remote control interface of the TSP system; and, after the user terminal calls the remote control interface for the first time, call the remote control interface of the TSP system according to the preset calling frequency through the preset clock table.
[0140] In an embodiment of the present invention, the vehicle remote control device provided by the embodiment of the present invention associates the task of obtaining the remote control result request with the preset clock table according to the calling time through the user terminal, so that the user terminal can determine the time point of calling the remote control interface of the TSP system with the help of the clock table, and call the remote control interface according to the first calling time and the cyclic calling time after the first calling time, thereby avoiding the user terminal from continuously cyclically calling the remote control interface after successfully initiating the remote control command, and reducing the number of times the user terminal accesses the system during the process of calling the remote control interface, thereby improving system performance, saving system resources, and greatly reducing the risk of system downtime and reduced request processing performance.
[0141] Reference Figure 8 , shows a structural block diagram of another embodiment of a vehicle remote control device of the present invention, which is applied to a remote service providing TSP system and may specifically include the following modules:
[0142] The calling time acquisition module 801 is used to receive a remote control instruction sent by a user terminal, generate a task identifier based on the remote control instruction, and send the task identifier to the user terminal;
[0143] A calling time sending module 802, configured to obtain a calling time for the remote control interface and send the calling time of the remote control interface to the user terminal;
[0144] Among them, the calling time includes the first calling time and the cyclic calling time after the first calling time; the user terminal is used to generate a remote control result request task based on the task identifier, and associate the remote control result request task with a preset clock table according to the calling time, and call the remote control interface of the TSP system through the preset clock table according to the first calling time and the cyclic calling time after the first calling time to obtain the vehicle execution result of the remote control instruction.
[0145] In one embodiment of the present invention, the calling time acquisition module 801 may include the following submodules:
[0146] A calling time acquisition submodule is used to obtain the timestamp and instruction type of the remote control instruction, wherein the timestamp is used to indicate the instruction initiation time of the remote control instruction; according to the instruction initiation time of the remote control instruction, the remote control time distribution data of the target time period is obtained from a preset database; based on the remote control time distribution data of the target time period, the calling time of the remote control interface is determined.
[0147] In one embodiment of the present invention, the remote control time distribution data of the target time period includes the target request time data from the initiation of the remote control command corresponding to the command type to the acquisition of the vehicle execution result, the request time data for obtaining the remote control result within the target data quantity ratio and the average request time, and the call time includes the first call time;
[0148] The call time acquisition submodule may include the following units:
[0149] The first call time determination unit is used to use the target request time-consuming data as the first call time of the remote control result acquisition request task.
[0150] In one embodiment of the present invention, the remote control time distribution data of the target time period includes target request time data from command initiation to acquisition of vehicle execution results for the remote control command corresponding to the command type, request time data within the target data quantity ratio, and average request time, wherein the average request time is calculated based on the request time data within the target data quantity ratio;
[0151] The call time acquisition submodule may include the following units:
[0152] The second call time determination unit is used to use the target request time consumption data and the request time consumption data within the target data quantity proportion, or to use the target request time consumption data and the average request time consumption to calculate the call frequency within the time period of the target data quantity proportion, and use the call frequency to calculate the call cycle call time within the time period of the target data quantity proportion.
[0153] In one embodiment of the present invention, the vehicle remote control device provided by the embodiment of the present invention may further include the following modules:
[0154] A request time consumption data collection module is used to collect request time consumption data of each remote control instruction from the initiation of the instruction to the acquisition of the vehicle execution result; the time consumption data is calculated based on the instruction initiation time and the instruction execution end time of each remote control instruction; based on the instruction initiation time of each remote control instruction, the number of requests for each remote control instruction within a preset time is counted to obtain the traffic distribution information of each remote control instruction; the traffic distribution information is used to indicate the traffic distribution in different time periods; for the traffic distribution in different time periods, the time consumption statistical data is obtained by collecting according to different collection frequencies.
[0155] In one embodiment of the present invention, the vehicle remote control device provided by the embodiment of the present invention may further include the following modules:
[0156] A request time consumption data analysis module is used to obtain the instruction type of the remote control instruction, classify the multiple time consumption statistical data according to the instruction type, and obtain multiple data linked lists corresponding to each instruction type; based on the time consumption statistical data contained in each data linked list, calculate the target request time consumption data of the remote control instruction of the corresponding instruction type from the instruction initiation to the acquisition of the vehicle execution result, the request time consumption data within the target data quantity ratio and the average request time consumption; wherein, the time for obtaining the remote control result of the remote control instruction of the corresponding instruction type includes the request time consumption data at the first place and the request time consumption data at the last place after the time consumption statistical data under the data linked list corresponding to the target instruction type are arranged in a preset order.
[0157] In an embodiment of the present invention, the vehicle remote control device provided by the embodiment of the present invention generates a remote control request task based on the task identifier returned by the remote service provider TSP system through the user terminal, and associates the remote control result request task with a preset clock table according to the calling time, so that the user terminal can determine the time point of calling the remote control interface of the TSP system with the help of the clock table, and call the remote control interface according to the first calling time and the cyclic calling time after the first calling time, thereby avoiding the user terminal from continuously cyclically calling the remote control interface after successfully initiating the remote control command, and reducing the number of times the user terminal accesses the system during the process of calling the remote control interface, thereby improving system performance, saving system resources, and greatly reducing the risk of system downtime and reduced request processing performance.
[0158] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0159] An embodiment of the present invention further provides an electronic device, including:
[0160] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned vehicle remote control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0161] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned vehicle remote control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0162] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0163] It should be understood by those skilled in the art that the embodiments of the present invention can be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0164] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0165] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0166] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0167] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0168] Finally, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0169] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0170] The vehicle remote control method, the corresponding electronic device and the corresponding computer-readable storage medium provided by the present invention are introduced in detail above. The principle and implementation mode of the present invention are explained in detail using specific examples. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and the scope of application. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A vehicle remote control method, characterized in that: Applied to a user terminal, the method comprises: Generate a remote control instruction and send the remote control instruction to a remote service provider TSP system, and receive a task identifier generated by the TSP system based on the remote control instruction; Generate a remote control result acquisition request task according to the task identifier; Receiving the calling time for the remote control interface sent by the TSP system based on the remote control instruction, and associating the remote control result acquisition request task with a preset clock table according to the calling time; the calling time includes the first calling time and the cyclic calling time after the first calling time; The remote control interface is called according to the first calling time and the cyclic calling time after the first calling time through the preset clock table to obtain the vehicle execution result of the remote control instruction.
2. The method according to claim 1, characterized in that The step of associating the remote control result acquisition request task with a preset clock table according to the calling time includes: The remote control result acquisition request task is associated with the preset clock table according to the first call time; the first call time is used to indicate the waiting time for the user terminal to call the remote control interface for the first time after the remote control instruction is successfully sent.
3. The method according to claim 1 or 2, characterized in that: The cyclic calling time is determined based on a preset calling frequency; and associating the remote control result obtaining request task with a preset clock table according to the calling time includes: After the user terminal calls the remote control interface for the first time, the remote control result obtaining request task is associated with the preset clock table according to the preset calling frequency.
4. The method according to claim 1, characterized in that: The preset clock table includes a millisecond table and a stopwatch; and associating the remote control result acquisition request task with the preset clock table according to the calling time includes: If the value obtained after converting the calling time to seconds as the time unit contains an integer value, then associating the remote control result obtaining request task with the corresponding scale of the stopwatch according to the integer value; If the value obtained after conversion of the associated remote control result request task with seconds as the time unit contains a decimal value, the associated remote control result request task is associated with the corresponding scale of the millisecond meter of the current time according to the decimal value.
5. The method according to claim 1, characterized in that The preset clock table includes a millisecond table, and associating the remote control result acquisition request task with the preset clock table according to the calling time includes: If the value obtained after converting the calling time using seconds as the time unit contains a decimal value but does not contain an integer value, the remote control result acquisition request task is associated with the corresponding scale of the millisecond table according to the decimal value.
6. The method according to claim 1, characterized in that The cyclic calling time is determined based on a preset calling frequency; The calling of the remote control interface according to the first calling time and the cyclic calling time after the first calling time by the preset clock table to obtain the vehicle execution result of the remote control instruction includes: Determine the time scale of the first call time as the current time scale through the preset clock table, obtain the remote control result request task associated with the current time scale, execute the associated remote control result request task, and call the remote control interface of the TSP system; And, after the user terminal calls the remote control interface for the first time, the remote control interface of the TSP system is called according to the preset calling frequency through the preset clock table.
7. A vehicle remote control method, characterized in that: Applied to a remote service providing TSP system, the method comprises: receiving a remote control instruction sent by a user terminal, generating a task identifier based on the remote control instruction, and sending the task identifier to the user terminal; Acquire a calling time for a remote control interface, and send the calling time of the remote control interface to the user terminal; Among them, the calling time includes the first calling time and the cyclic calling time after the first calling time; the user terminal is used to generate a remote control result request task based on the task identifier, and associate the remote control result request task with a preset clock table according to the calling time, and call the remote control interface of the TSP system through the preset clock table according to the first calling time and the cyclic calling time after the first calling time to obtain the vehicle execution result of the remote control instruction.
8. The method according to claim 7, characterized in that The obtaining of the calling time for the remote control interface includes: Acquire a timestamp and a command type of the remote control command, wherein the timestamp is used to indicate a command initiation time of the remote control command; According to the command initiation time of the remote control command, remote control time consumption distribution data in the target time period is obtained from a preset database; Based on the remote control time consumption distribution data in the target time period, the calling time of the remote control interface is determined.
9. The method according to claim 8, characterized in that The remote control time consumption distribution data of the target time period includes the target request time consumption data of the remote control command corresponding to the command type from the command initiation to the acquisition of the vehicle execution result, and the call time includes the first call time; The determining the calling time of the remote control interface based on the remote control time consumption distribution data in the target time period includes: The target request time-consuming data is used as the first call time of the remote control result acquisition request task.
10. The method according to claim 8, characterized in that The remote control time consumption distribution data of the target time period includes target request time consumption data from command initiation to acquisition of vehicle execution result for the remote control command corresponding to the command type, request time consumption data within the target data quantity ratio and average request time consumption, wherein the average request time consumption is calculated based on the request time consumption data within the target data quantity ratio; The calling time includes the cyclic calling time after the first calling time; the determining the calling time of the remote control interface based on the remote control time consumption distribution data of the target time period includes: The target request time consumption data and the request time consumption data within the target data quantity ratio are used, or the target request time consumption data and the average request time consumption are used to calculate the calling frequency within the time period of the target data quantity ratio, and the calling cycle calling time within the time period of the target data quantity ratio is calculated using the calling frequency.
11. The method according to any one of claims 7 to 10, characterized in that: The method further comprises: Collecting request time data of each remote control command from the initiation of the command to the acquisition of the vehicle execution result; the request time data is calculated based on the command initiation time and the command execution end time of each remote control command; Based on the command initiation time of each remote control command, the number of requests for each remote control command within a preset time is counted to obtain the flow distribution information of each remote control command; the flow distribution information is used to indicate the flow distribution in different time periods; For the traffic distribution in different time periods, the time-consuming statistical data are collected according to different collection frequencies.
12. The method according to claim 11, characterized in that The method further comprises: Acquire the instruction type of the remote control instruction, classify the plurality of time-consuming statistical data according to the instruction type, and obtain a plurality of data linked lists corresponding to each instruction type; Based on the time-consuming statistical data contained in each data linked list, the target request time-consuming data of the remote control command of the corresponding command type from the command initiation to the acquisition of the vehicle execution result, the request time-consuming data within the target data quantity ratio and the average request time-consuming data are calculated; Among them, the time for obtaining the remote control result of the remote control instruction of the corresponding instruction type includes the request time data at the first place and the request time data at the last place after arranging the time-consuming statistical data under the data linked list corresponding to the target instruction type in a preset order.
13. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the vehicle remote control method according to any one of claims 1 to 6 or claims 7 to 12 is implemented.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the vehicle remote control method according to any one of claims 1 to 6 or claims 7 to 12 is implemented.
