An interaction method, device, and electronic device for an in-vehicle application.

By designing the interaction logic of an in-vehicle application based on script files, listening for changes in task content and generating program code, the problems of long development cycles and high maintenance costs of traditional in-vehicle applications are solved, enabling rapid development and low-cost maintenance.

CN116010063BActive Publication Date: 2026-05-26AVATR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AVATR CO LTD
Filing Date
2023-01-31
Publication Date
2026-05-26

Smart Images

  • Figure CN116010063B_ABST
    Figure CN116010063B_ABST
Patent Text Reader

Abstract

This invention relates to the field of vehicle technology and discloses an interaction method, device, and electronic device for an in-vehicle application. The method includes: launching the in-vehicle application; loading and parsing a script file corresponding to the in-vehicle application, the script file including task information of at least one task node; monitoring whether the task content corresponding to the task node has changed; if it is determined that the task content has changed, and the change in the task content satisfies a target execution condition among at least one execution condition, then obtaining the target control action corresponding to the target execution condition; and executing the target control action. This invention designs the interaction logic of the in-vehicle application through scripting, thus eliminating the need to write a large amount of program code and shortening the development cycle of the in-vehicle application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle technology, specifically to an interaction method, device, and electronic device for an in-vehicle application. Background Technology

[0002] With the continuous development of vehicle networking technology, the level of intelligence in automobiles is also increasing, and more and more in-vehicle applications are emerging, thus providing intelligent services for users.

[0003] However, traditional in-vehicle applications mostly follow product-defined processes and are implemented through fixed logic coding. This requires writing a large amount of program code to implement the various functions in the in-vehicle application.

[0004] Therefore, in-vehicle applications currently suffer from long development cycles. Summary of the Invention

[0005] In view of the above problems, embodiments of the present invention provide an interaction method for in-vehicle applications to solve the problem of long development cycles for in-vehicle applications in the prior art.

[0006] According to one aspect of the present invention, an interaction method for an in-vehicle application is provided, the method comprising:

[0007] The in-vehicle application is launched, and the script file corresponding to the in-vehicle application is loaded and parsed. The script file includes a task set, and the task set includes task information of at least one task node. The task information of the task node includes: task content, at least one execution condition, and control action corresponding to each execution condition. The system monitors whether the task content corresponding to the task node has changed. If it is determined that the task content has changed and the change in the task content satisfies the target execution condition included in the at least one execution condition, the system obtains the target control action corresponding to the target execution condition and executes the target control action.

[0008] In one optional approach, the task set includes multiple task nodes arranged in a tree structure. The step of monitoring whether the task content corresponding to the task node has changed includes: creating a state machine based on the task information and the arrangement of the multiple task nodes; and using the state machine, monitoring whether the task content corresponding to the task node has changed, starting from the root node among the multiple task nodes.

[0009] In one alternative approach, executing the target control action includes: generating program code corresponding to the target control action; and running the program code.

[0010] In one optional approach, monitoring whether the task content corresponding to the task node has changed includes: receiving task status information sent by the vehicle controller, wherein the task status information includes parameter values ​​of the task content at a first moment and / or status indication information, and the status indication information is used to indicate that the task content corresponding to the task node has changed.

[0011] In one optional approach, monitoring whether the task content corresponding to the task node has changed includes: receiving task status information sent by the vehicle controller, the task status information including parameter values ​​of the task content at a first time and parameter values ​​of the task content at a second time, the second time being a time before the first time; if the parameter values ​​of the task content at the first time are different from the parameter values ​​of the task content at the second time, then it is determined that the task content corresponding to the task node has changed.

[0012] In one alternative approach, the task information of the task node further includes the priority of the at least one execution condition, and determining the target execution condition included in determining that the change in the task content satisfies the at least one execution condition includes: if the change in the task content is determined to satisfy multiple execution conditions among the at least one execution condition, then the target execution condition is determined among the multiple execution conditions according to the priority of the at least one execution condition.

[0013] In one alternative approach, before loading and parsing the script file corresponding to the in-vehicle application, the method further includes: determining the local script version number and the cloud script version number of the script file corresponding to the in-vehicle application; if the cloud script version number is higher than the local script version number, then upgrading the script file corresponding to the in-vehicle application to obtain an upgraded script file.

[0014] In one alternative approach, the task content includes at least one of vehicle status information, environmental parameter information, and button status information.

[0015] According to another aspect of the present invention, an interactive device for an in-vehicle application is provided. The device includes: a script management module, configured to launch the in-vehicle application, load and parse a script file corresponding to the in-vehicle application, wherein the script file includes a task set, the task set includes task information of at least one task node, and the task information of the task node includes: task content, at least one execution condition, and a control action corresponding to each execution condition.

[0016] The script arbitration module is used to monitor whether the task content corresponding to the task node has changed.

[0017] The task execution module is configured to, upon determining that the task content has changed and the change in the task content satisfies the target execution condition included in at least one execution condition, obtain the target control action corresponding to the target execution condition; and execute the target control action.

[0018] In one optional approach, the task set includes multiple task nodes arranged in a tree structure. A script arbitration module is used to create a state machine based on task information and the arrangement of the multiple task nodes. Using the state machine, the module listens for changes in the task content corresponding to the task node, starting from the root node among the multiple task nodes.

[0019] In one alternative approach, a task execution module is used to generate program code corresponding to the target control action and run the program code.

[0020] In one alternative approach, a script arbitration module is used to receive task status information sent by the vehicle controller. The task status information includes parameter values ​​of the task content at a first moment and / or status indication information, wherein the status indication information is used to indicate that the task content corresponding to the task node has changed.

[0021] In one optional approach, a script arbitration module is used to receive task status information sent by the vehicle controller. The task status information includes parameter values ​​of the task content at a first time and parameter values ​​of the task content at a second time, where the second time is a time prior to the first time. If the parameter values ​​of the task content at the first time are different from the parameter values ​​of the task content at the second time, it is determined that the task content corresponding to the task node has changed.

[0022] In an optional manner, the task information of the task node further includes the priority of the at least one execution condition, and a script arbitration module, used to determine the target execution condition among the multiple execution conditions according to the priority of the at least one execution condition if it is determined that the change in the task content satisfies multiple execution conditions among the at least one execution condition.

[0023] In one alternative approach, the script management module is used to determine the local script version number and the cloud script version number of the script file corresponding to the vehicle application before loading and parsing the script file corresponding to the vehicle application; if the script version number in the cloud is higher than the local script version number, the script file corresponding to the vehicle application is upgraded to obtain an upgraded script file.

[0024] In one alternative approach, the task content includes at least one of vehicle status information, environmental parameter information, and button status information.

[0025] According to another aspect of the present invention, an electronic device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, the executable instruction causing the processor to perform the operation of the in-vehicle application interaction method as described in any of the above-described inventions.

[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing at least one executable instruction, which, when executed on an in-vehicle application interaction device / electronic device, causes the in-vehicle application interaction device / electronic device to perform the operation of the in-vehicle application interaction method as described in any of the above-described embodiments.

[0027] The in-vehicle application interaction method provided in this embodiment of the invention designs the interaction logic of the in-vehicle application through script design. This eliminates the need to write a large amount of program code, thereby shortening the development cycle of the in-vehicle application. In addition, during the execution of the in-vehicle application, some script information can be dynamically converted into corresponding program code. In this way, the corresponding functions of the in-vehicle application can be realized by running the corresponding program code.

[0028] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0029] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0030] Figure 1 A flowchart illustrating an interaction method for an in-vehicle application provided by the present invention is shown.

[0031] Figure 2 A flowchart illustrating another interaction method for an in-vehicle application provided by the present invention is shown;

[0032] Figure 3 A flowchart illustrating another interaction method for an in-vehicle application provided by the present invention is shown;

[0033] Figure 4A flowchart illustrating another interaction method for an in-vehicle application provided by the present invention is shown;

[0034] Figure 5 A flowchart illustrating another interaction method for an in-vehicle application provided by the present invention is shown;

[0035] Figure 6 A schematic diagram of the structure of an interactive device for an in-vehicle application provided by the present invention is shown;

[0036] Figure 7 A schematic diagram of the structure of an electronic device provided by the present invention is shown. Detailed Implementation

[0037] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0038] With the continuous development of vehicle-to-everything (V2X) technology, cars, as both a means of transportation and a machine, can interact with users to provide more intelligent services. Therefore, an increasing number of in-vehicle applications have emerged, enabling human-machine interaction. For example, in-vehicle applications can respond to user input and / or actions to provide services. Another example is the addition of various sensors (including voice sensors, motion sensors, and cameras) within the vehicle. In this way, in-vehicle applications can collect information from these sensors to provide services to users, such as issuing voice prompts or performing actions.

[0039] However, most in-vehicle applications currently follow product-defined processes and are implemented through fixed logic coding. This means that a large amount of code needs to be written to implement the various functions in the in-vehicle application, resulting in a long development cycle. In addition, if the product design logic changes or has problems, a large amount of code needs to be modified, leading to high maintenance costs for in-vehicle applications.

[0040] To address the issue of long development cycles for in-vehicle applications in existing technologies, this application provides an interaction method for in-vehicle applications, which can implement the interactive functions of in-vehicle applications based on script files.

[0041] Figure 1 A flowchart illustrating an interaction method for an in-vehicle application provided by an embodiment of the present invention is shown, the method being executed by an electronic device. Figure 1 As shown, the method includes the following steps:

[0042] Step 110: Launch the in-vehicle application, load and parse the script file corresponding to the in-vehicle application.

[0043] In this embodiment of the invention, the interaction logic of the in-vehicle application is designed through a script file. Then, by loading and parsing the script file, the corresponding listening, interaction, and other functions are executed. Specifically, different in-vehicle applications can be configured with their own corresponding script files to execute the interaction functions specific to those applications.

[0044] It should be noted that the interaction method of the in-vehicle application in this invention can be executed by an electronic device including an interaction device for the in-vehicle application. Specifically, the interaction device for the in-vehicle application can implement the various functions corresponding to the in-vehicle application based on the script file corresponding to the in-vehicle application.

[0045] The script file includes a set of tasks, each containing at least one task node. If the task set contains multiple task nodes, these nodes can be arranged in a tree structure, allowing interaction logic to be implemented through this tree-like arrangement.

[0046] Each task node may include the following task information: task content, at least one execution condition, and the control action corresponding to each execution condition.

[0047] The task content can be at least one of vehicle status information, environmental parameter information, and button status information.

[0048] Vehicle status information refers to the vehicle's own data during operation, including but not limited to the vehicle's remaining energy, overall operating status, speed and mileage, and the status of doors.

[0049] Environmental parameter information refers to environmental information inside and outside the vehicle, including but not limited to data such as temperature inside and outside the vehicle, humidity inside and outside the vehicle, and lighting inside and outside the vehicle.

[0050] Button status information refers to the status information of mechanical buttons inside and outside the vehicle.

[0051] Each task corresponds to at least one execution condition, and each execution condition corresponds to a control action. The control action refers to the action performed by the vehicle, such as providing voice prompts, reducing speed, or turning on the air conditioning.

[0052] For example, the task node includes the following information: the task content is the vehicle's speed, and the vehicle's speed corresponds to two execution conditions. The first execution condition is that the vehicle's speed is greater than 90 km / h and less than 120 km / h, and the second execution condition is that the vehicle's speed is greater than 120 km / h. The control action corresponding to the first execution condition is to issue a voice reminder to the user, "The current vehicle speed is too high"; the control action corresponding to the second execution condition is to issue a voice reminder to the user, "Activate the braking system?"

[0053] Step 120: Monitor whether the task content corresponding to the task node has changed.

[0054] This invention does not limit the specific implementation method for monitoring whether the task content corresponding to the task node has changed. For example, a state machine for performing the monitoring operation can be created first, and then the state machine can be used to monitor whether the task content corresponding to the task node has changed.

[0055] Since the vehicle controller can collect task content such as vehicle status information, environmental parameter information, and button status information, this embodiment of the invention can obtain whether the task content corresponding to the task node has changed by monitoring the vehicle controller.

[0056] Step 130: If it is determined that the task content has changed, and the change in the task content satisfies at least one of the target execution conditions, then obtain the target control action corresponding to the target execution condition.

[0057] In one feasible approach, determining that the task content corresponding to a task node has changed can be achieved by receiving task status information sent by the vehicle controller. This task status information may include parameter values ​​and / or status indication information of the task content corresponding to the task node at a first moment. The status indication information indicates that the task content corresponding to the task node has changed. In other words, when the task content changes, task status information including status indication information sent by the vehicle controller is received, thus detecting the change in the task content corresponding to the task node.

[0058] It should be noted that the vehicle controller can configure a corresponding change threshold for each task. If the vehicle controller detects a change in the task content that meets the change threshold, it determines that the task content has changed and then sends a status indication message.

[0059] In one feasible approach, determining that the task content corresponding to a task node has changed can also be achieved by: receiving task status information sent by the vehicle controller, the task status information including parameter values ​​of the task content at a first moment and parameter values ​​of the task content at a second moment, the second moment being a moment prior to the first moment; if the parameter values ​​of the task content at the first moment are different from the parameter values ​​of the task content at the second moment, then it is determined that the task content corresponding to the task node has changed.

[0060] It should be noted that if the task content is button status information, then the task content corresponding to the task node has changed if the parameter value of the task content at the first moment is different from the parameter value of the task content at the second moment. If the task content is vehicle status information or environmental parameter information, then the task content corresponding to the task node has changed if the change in the parameter value of the task content at the first moment relative to the parameter value of the task content at the second moment meets the parameter change threshold.

[0061] After determining that the task content corresponding to the task node has changed, the target execution conditions satisfied by the parameter values ​​of the task content corresponding to the task node can be determined based on the parameter values ​​of the task content at the first moment in the task status information.

[0062] For example, the task content corresponding to the task node is the vehicle interior temperature, which corresponds to two execution conditions: the vehicle interior temperature is less than 15℃ and the vehicle interior temperature is greater than 25℃. The control action corresponding to the vehicle interior temperature being less than 15℃ is a voice prompt asking "Do you want to turn on the air conditioner?", and the control action corresponding to the vehicle interior temperature being greater than 25℃ is a voice prompt asking "Do you want to turn off the air conditioner?".

[0063] Assume that the task status information received by the vehicle controller in step 120 above includes: the current interior temperature is 5°C, and status indication information indicating that the interior temperature has changed.

[0064] In this way, based on the "current vehicle interior temperature is 5℃" information in the received task status information, the target execution condition corresponding to the task node can be determined as: the vehicle interior temperature is less than 15℃.

[0065] Furthermore, the corresponding target control actions can be obtained based on the target execution conditions.

[0066] It should be noted that if it is determined that the task content corresponding to the task node has changed, but the change in the task content does not meet any of the execution conditions, then the system will listen for changes in the task content corresponding to the next task node.

[0067] Step 140: Execute the target control action.

[0068] Once the target control action corresponding to the target execution condition is obtained, the target control action can be executed. For example, if the target execution condition is that the interior temperature is less than 15°C, the corresponding control action to be executed is to issue a voice prompt "Do you want to turn on the air conditioner?"

[0069] In summary, the in-vehicle application interaction method provided by the embodiments of the present invention has at least the following beneficial effects: First, by designing the interaction logic of the in-vehicle application through scripts, it is not necessary to write a large amount of program code, thereby shortening the development cycle of the in-vehicle application. Second, if it is necessary to change the design logic of the in-vehicle application, only the corresponding design logic in the script file needs to be changed, without modifying a large amount of program code, which can reduce the later maintenance cost of the in-vehicle application.

[0070] Figure 2 A flowchart illustrating another interaction method for an in-vehicle application in an embodiment of this application is shown. When the task set includes multiple task nodes, a state machine can be created based on the arrangement of these task nodes. Then, the created state machine is used to monitor whether the task content has changed. This allows the monitoring task to be executed according to the logical relationship between the multiple task nodes. For example... Figure 2 As shown, the method includes:

[0071] Step 210: Launch the in-vehicle application, load and parse the script file corresponding to the in-vehicle application.

[0072] Step 220: Create a state machine based on the task information and the arrangement of multiple task nodes in the script file.

[0073] Step 230: Using a state machine, start from the root node among multiple task nodes and listen for changes in the task content corresponding to the task node.

[0074] If the task set includes multiple task nodes, and the multiple task nodes are arranged in a tree structure, a state machine can be created based on the task information and the arrangement of the multiple task nodes. In this way, the created state machine can execute the listening task according to the logical relationship between the multiple task nodes.

[0075] For example, a state machine can be used to first monitor whether the task content corresponding to the root node has changed, and then sequentially monitor whether the task content corresponding to the first child node, second child node, ..., Nth child node under the root node has changed. The root node, first child node, second child node, ..., Nth child node are distributed in a tree structure. In this way, based on the task information and the arrangement of multiple task nodes, the resulting state machine can execute the monitoring task according to the logical relationship between the multiple task nodes.

[0076] It should be noted that when the task set in the script file changes, the corresponding state machine needs to be recreated based on the changed task set in order to perform a listening task on the logical relationship between the updated task nodes.

[0077] Step 240: If it is determined that the task content has changed and the change in the task content satisfies at least one of the target execution conditions, obtain the target control action corresponding to the target execution condition.

[0078] Step 250: Execute the target control action.

[0079] The execution processes of steps 210, 240, and 250 are the same as those of steps 110, 130, and 140 above. Therefore, the execution processes of steps 210, 240, and 250 will not be described again here.

[0080] The above technical solution creates a state machine based on task information and the arrangement of multiple task nodes, which can execute listening tasks according to the logical relationship between multiple task nodes.

[0081] Figure 3 A flowchart illustrating another interaction method for an in-vehicle application in this embodiment is shown. Since the business logic in this embodiment is designed through a script file, it is necessary to further convert the target control actions recorded in the script file into corresponding program code to execute the corresponding actions. For example... Figure 3 As shown, the method includes:

[0082] Step 310: Launch the in-vehicle application, load and parse the script file corresponding to the in-vehicle application.

[0083] Step 320: Monitor whether the task content corresponding to the task node has changed.

[0084] Step 330: If it is determined that the task content has changed, and the change in the task content satisfies at least one of the target execution conditions, then obtain the target control action corresponding to the target execution condition.

[0085] Step 340: Generate the program code corresponding to the target control action.

[0086] Step 350: Run the program code.

[0087] In this embodiment of the invention, program code corresponding to the target control action can be generated first; then, the program code can be run. In this way, by running the converted program code corresponding to the target control action, the corresponding function can be executed. For example, the vehicle can announce "Do you want to turn on the air conditioning?" via voice.

[0088] In this embodiment of the invention, the business logic is designed through a script file. For example, the script file might state, "When the interior temperature is less than 15°C, issue a voice prompt asking 'Do you want to turn on the air conditioning?'" Therefore, the target control action recorded in the script file needs to be further converted into program code corresponding to the target control action in order to execute the corresponding action.

[0089] Through the above technical solution, during the execution of the vehicle application, some script information can be dynamically converted into corresponding program code. In this way, the corresponding functions of the vehicle application can be realized by running the corresponding program code.

[0090] It should be noted that the execution process of steps 310 to 330 can be the same as the execution process of steps 110 to 130 above. Therefore, the execution process of steps 310 to 330 will not be described again here.

[0091] It should also be noted that step 320 can adopt the execution process provided in steps 220 to 230 above. For details, please refer to the description of steps 220 to 230 above, which will not be repeated here.

[0092] Figure 4 A flowchart illustrating another interaction method for an in-vehicle application according to an embodiment of this application is shown. In actual execution, there may be situations where changes in the task content satisfy multiple execution conditions. In such cases, a method can be adopted... Figure 4 The technical solution shown. For example... Figure 4 As shown, the method includes:

[0093] Step 410: Launch the in-vehicle application, load and parse the script file corresponding to the in-vehicle application.

[0094] The task information corresponding to the task node in the script file can also include the priority of the execution conditions. In other words, the task information corresponding to the task node includes: determining which execution condition is the target execution condition when multiple execution conditions are met simultaneously due to changes in the task content.

[0095] Step 420: Monitor whether the task content corresponding to the task node has changed.

[0096] Step 430: If it is determined that the task content has changed, and the change in the task content satisfies multiple execution conditions among at least one execution condition, then the target execution condition is determined among the multiple execution conditions according to the priority of at least one execution condition.

[0097] In the implementation of this invention, when the changes in the task content simultaneously satisfy multiple execution conditions, the target execution condition can be determined from among the multiple execution conditions based on the priority of the execution conditions in the task information.

[0098] Step 440: Obtain the target control action corresponding to the target execution condition.

[0099] Step 450: Execute the target control action.

[0100] Through the above technical solution, when the changes in the task content meet multiple execution conditions, the target execution condition can be determined from among the multiple execution conditions based on the priority of at least one execution condition.

[0101] It should be noted that the execution process of steps 410 to 420 and steps 440 to 450 can be the same as the execution process of steps 110 to 140 above. Therefore, the execution process of steps 410 to 420 and steps 440 to 450 will not be described again here.

[0102] It should also be noted that step 420 can adopt the execution process provided in steps 220 to 230 above, and step 450 can adopt the execution process provided in steps 340 to 350 above. For details, please refer to the descriptions of steps 220 to 230 and steps 340 to 350 above, which will not be repeated here.

[0103] Figure 5 A flowchart illustrating another interaction method for an in-vehicle application in an embodiment of this application is shown. To ensure the coverage of in-vehicle application upgrades, a method can be adopted... Figure 5 The technical solution shown. For example... Figure 5 As shown, the method further includes:

[0104] Step 510: Launch the in-vehicle application.

[0105] Step 520: Determine the local script version number and the cloud script version number of the script file corresponding to the in-vehicle application.

[0106] Step 530: If the script version number in the cloud is higher than the local script version number, then upgrade the script file corresponding to the vehicle application to obtain the upgraded script file.

[0107] The upgrade method for in-vehicle applications in this embodiment of the invention is as follows: When the design logic of the in-vehicle application changes or there is a problem with the logic of the in-vehicle application, the development team modifies the script file corresponding to the in-vehicle application, and then uploads the modified script file to the cloud. Thus, after the user starts the in-vehicle application, the local script version number and the cloud script version number of the script file corresponding to the in-vehicle application are first determined. If the script version number in the cloud is higher than the local script version number, the script file corresponding to the in-vehicle application is upgraded to obtain an upgraded script file, making the version of the upgraded script file the same as the script version in the cloud. If the script version number in the cloud is the same as the local script version number, then there is no need to upgrade the in-vehicle application.

[0108] It should be noted that the method for upgrading in-vehicle applications provided in this embodiment of the invention automatically upgrades the script file corresponding to the in-vehicle application when the script version number in the cloud is higher than the local script version number, without the user being aware of the script file upgrade. In other words, when an upgrade is needed, no user action is required; the in-vehicle application is automatically upgraded, thus ensuring the coverage of in-vehicle application upgrades.

[0109] Step 540: Load and parse the script file corresponding to the in-vehicle application.

[0110] After launching the in-vehicle application and before loading and parsing its corresponding script file, it's necessary to determine if an upgrade is needed. If an upgrade is required, first execute step 530 above to upgrade the script file. Then, load and parse the upgraded script file. If an upgrade is not needed, the current version of the script file for the in-vehicle application can be loaded and parsed directly.

[0111] Step 550: Monitor whether the task content corresponding to the task node has changed.

[0112] Step 560: If it is determined that the task content has changed, and the change in the task content satisfies at least one of the target execution conditions, then obtain the target control action corresponding to the target execution condition.

[0113] Step 570: Execute the target control action.

[0114] In this way, compared to the traditional method of upgrading in-vehicle applications via USB flash drive, OTA, etc., before users can obtain the updated in-vehicle application service, which cannot guarantee that all users can upgrade, this embodiment of the invention ensures that when the script version number of the script file corresponding to the in-vehicle application on the local machine is lower than the script version number on the cloud machine, the cloud server sends the latest version of the script file to the user, thus guaranteeing the coverage of in-vehicle application upgrades.

[0115] It should be noted that the execution process of steps 510 and steps 540 to 570 can be the same as the execution process of steps 110 to 140 above. Therefore, the execution process of steps 510 and steps 540 to 570 will not be described again here.

[0116] It should also be noted that step 550 can adopt the execution process provided in steps 220 to 230 above, step 560 can adopt the execution process provided in steps 430 to 440 above, and step 570 can adopt the execution process provided in steps 340 to 350 above. For details, please refer to the descriptions of steps 220 to 230, steps 340 to 350, and steps 430 to 440 above, which will not be repeated here.

[0117] The following are embodiments of the apparatus provided by the present invention, which can be used to execute embodiments of the method of the present invention. For details not disclosed in the apparatus embodiments of the present invention, please refer to the method embodiments of the present invention.

[0118] Figure 6 This diagram illustrates the structure of an interactive device for an in-vehicle application provided by an embodiment of the present invention. Figure 6 As shown, the device 600 includes:

[0119] The script management module 610 is used to start the vehicle application, load and parse the script file corresponding to the vehicle application, the script file includes a task set, the task set includes task information of at least one task node, the task information of the task node includes: task content, at least one execution condition, and control action corresponding to each execution condition.

[0120] The script arbitration module 620 is used to monitor whether the task content corresponding to the task node has changed.

[0121] The task execution module 630 is configured to, upon determining that the task content has changed and the change in the task content satisfies the target execution condition included in the at least one execution condition, obtain the target control action corresponding to the target execution condition; and execute the target control action.

[0122] In one optional approach, the task set includes multiple task nodes arranged in a tree structure. The script arbitration module 620 is used to create a state machine based on the task information and the arrangement of the multiple task nodes. Using the state machine, it listens for changes in the task content corresponding to the task node, starting from the root node among the multiple task nodes.

[0123] In one alternative approach, the task execution module 630 is used to generate program code corresponding to the target control action and run the program code.

[0124] In one alternative approach, the script arbitration module 620 is used to receive task status information sent by the vehicle controller. The task status information includes parameter values ​​of the task content at a first moment and / or status indication information, wherein the status indication information is used to indicate that the task content corresponding to the task node has changed.

[0125] In one optional approach, the script arbitration module 620 is used to receive task status information sent by the vehicle controller. The task status information includes parameter values ​​of the task content at a first time and parameter values ​​of the task content at a second time, where the second time is a time prior to the first time. If the parameter values ​​of the task content at the first time are different from the parameter values ​​of the task content at the second time, it is determined that the task content corresponding to the task node has changed.

[0126] In an optional manner, the task information of the task node further includes the priority of the at least one execution condition, and the script arbitration module 620 is used to determine the target execution condition among the multiple execution conditions according to the priority of the at least one execution condition if it is determined that the change of the task content satisfies multiple execution conditions among the at least one execution condition.

[0127] In one optional approach, the script management module 610 is used to determine the local script version number and the cloud script version number of the script file corresponding to the vehicle application before loading and parsing the script file corresponding to the vehicle application; if the script version number in the cloud is higher than the local script version number, the script file corresponding to the vehicle application is upgraded to obtain an upgraded script file.

[0128] In one alternative approach, the task content includes at least one of vehicle status information, environmental parameter information, and button status information.

[0129] The technical solution of this invention has at least the following beneficial effects: First, by designing the interaction logic of the in-vehicle application through scripts, a large amount of program code is not required, thus shortening the development cycle of the in-vehicle application. Furthermore, during the execution of the in-vehicle application, some script information can be dynamically converted into corresponding program code, allowing the in-vehicle application to achieve its corresponding functions by running the program code. Second, if the design logic of the in-vehicle application needs to be changed, only the corresponding design logic in the script file needs to be changed, without modifying a large amount of program code, thus reducing the later maintenance cost of the in-vehicle application. Third, compared to the traditional method of upgrading the in-vehicle application via USB flash drive, OTA, etc., before the user can obtain the updated in-vehicle application service, which cannot guarantee that all user terminals can be upgraded, this invention, in its embodiment, when the local script version number of the script file corresponding to the in-vehicle application is lower than the script version number in the cloud, the cloud server sends the latest version of the script file to the user terminal, thus ensuring the coverage of in-vehicle application upgrades.

[0130] Figure 7 The diagram shows a structural schematic of an electronic device provided by an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the electronic device.

[0131] like Figure 7 As shown, the electronic device may include: a processor 702, a communications interface 704, a memory 706, and a communications bus 708.

[0132] The processor 702, communication interface 704, and memory 706 communicate with each other via communication bus 708. Communication interface 704 is used to communicate with other network elements such as clients or other servers. The processor 702 executes program 710, specifically performing the relevant steps in the above-described embodiment of the in-vehicle application's interaction method.

[0133] Specifically, program 710 may include program code, which includes computer-executable instructions.

[0134] Processor 702 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The electronic device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.

[0135] Memory 706 is used to store program 710. Memory 706 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0136] Specifically, program 710 can be called by processor 702 to cause the electronic device to perform the following operations:

[0137] Launch the in-vehicle application, load and parse the script file corresponding to the in-vehicle application, the script file includes a task set, the task set includes task information of at least one task node, the task information of the task node includes: task content, at least one execution condition, and control action corresponding to each execution condition;

[0138] Monitor whether the task content corresponding to the task node has changed;

[0139] If it is determined that the task content has changed and the change in the task content satisfies the target execution condition included in at least one execution condition, the target control action corresponding to the target execution condition is obtained.

[0140] Execute the target control action.

[0141] In one optional approach, the task set includes multiple task nodes arranged in a tree structure, and the monitoring of whether the task content corresponding to the task node has changed includes:

[0142] Based on the task information and the arrangement of the multiple task nodes, a state machine is created;

[0143] Using the state machine, starting from the root node among the multiple task nodes, we monitor whether the task content corresponding to the task node has changed.

[0144] In one alternative approach, performing the target control action includes:

[0145] Generate the program code corresponding to the target control action;

[0146] Run the program code.

[0147] In one optional approach, monitoring whether the task content corresponding to the task node has changed includes:

[0148] The system receives task status information sent by the vehicle controller. The task status information includes parameter values ​​of the task content at a first moment and / or status indication information. The status indication information is used to indicate that the task content corresponding to the task node has changed.

[0149] In one optional approach, monitoring whether the task content corresponding to the task node has changed includes: receiving task status information sent by the vehicle controller, the task status information including parameter values ​​of the task content at a first time and parameter values ​​of the task content at a second time, the second time being a time before the first time; if the parameter values ​​of the task content at the first time are different from the parameter values ​​of the task content at the second time, then it is determined that the task content corresponding to the task node has changed.

[0150] In one alternative approach, the task information of the task node further includes the priority of the at least one execution condition, and determining that the change in the task content satisfies the target execution condition among the at least one execution condition includes:

[0151] If it is determined that the changes in the task content satisfy multiple execution conditions among the at least one execution condition;

[0152] The target execution condition is determined from among the plurality of execution conditions based on the priority of the at least one execution condition.

[0153] In an alternative approach, before loading and parsing the script file corresponding to the in-vehicle application, the method further includes:

[0154] Determine the local script version number and the cloud script version number of the script file corresponding to the in-vehicle application.

[0155] If the script version number in the cloud is higher than the script version number in the local machine, the script file corresponding to the in-vehicle application is upgraded to obtain the upgraded script file.

[0156] In one alternative approach, the task content includes at least one of vehicle status information, environmental parameter information, and button status information.

[0157] The technical solution of this invention has at least the following beneficial effects: First, by designing the interaction logic of the in-vehicle application through scripts, a large amount of program code is not required, thus shortening the development cycle of the in-vehicle application. Furthermore, during the execution of the in-vehicle application, some script information can be dynamically converted into corresponding program code, allowing the in-vehicle application to achieve its corresponding functions by running the program code. Second, if the design logic of the in-vehicle application needs to be changed, only the corresponding design logic in the script file needs to be changed, without modifying a large amount of program code, thus reducing the later maintenance cost of the in-vehicle application. Third, compared to the traditional method of upgrading the in-vehicle application via USB flash drive, OTA, etc., before the user can obtain the updated in-vehicle application service, which cannot guarantee that all user terminals can be upgraded, this invention, in its embodiment, when the local script version number of the script file corresponding to the in-vehicle application is lower than the script version number in the cloud, the cloud server sends the latest version of the script file to the user terminal, thus ensuring the coverage of in-vehicle application upgrades.

[0158] This invention provides a computer-readable storage medium storing at least one executable instruction that, when executed on an in-vehicle application's interactive device / electronic device, causes the in-vehicle application's interactive device / electronic device to perform the in-vehicle application's interactive method in any of the above method embodiments.

[0159] Specifically, the executable instructions can be used to cause the interactive device / electronic device of the in-vehicle application to perform the following operations:

[0160] Launch the in-vehicle application, load and parse the script file corresponding to the in-vehicle application, the script file includes a task set, the task set includes task information of at least one task node, the task information of the task node includes: task content, at least one execution condition, and control action corresponding to each execution condition;

[0161] Monitor whether the task content corresponding to the task node has changed;

[0162] If it is determined that the task content has changed and the change in the task content satisfies the target execution condition included in at least one execution condition, the target control action corresponding to the target execution condition is obtained.

[0163] Execute the target control action.

[0164] In one optional approach, the task set includes multiple task nodes arranged in a tree structure, and the monitoring of whether the task content corresponding to the task node has changed includes:

[0165] Based on the task information and the arrangement of the multiple task nodes, a state machine is created;

[0166] Using the state machine, starting from the root node among the multiple task nodes, we monitor whether the task content corresponding to the task node has changed.

[0167] In one alternative approach, performing the target control action includes:

[0168] Generate the program code corresponding to the target control action;

[0169] Run the program code.

[0170] In one optional approach, monitoring whether the task content corresponding to the task node has changed includes:

[0171] The system receives task status information sent by the vehicle controller. The task status information includes parameter values ​​of the task content at a first moment and / or status indication information. The status indication information is used to indicate that the task content corresponding to the task node has changed.

[0172] In one optional approach, monitoring whether the task content corresponding to the task node has changed includes: receiving task status information sent by the vehicle controller, the task status information including parameter values ​​of the task content at a first time and parameter values ​​of the task content at a second time, the second time being a time before the first time; if the parameter values ​​of the task content at the first time are different from the parameter values ​​of the task content at the second time, then it is determined that the task content corresponding to the task node has changed.

[0173] In one alternative approach, the task information of the task node further includes the priority of the at least one execution condition, and determining that the change in the task content satisfies the target execution condition among the at least one execution condition includes:

[0174] If it is determined that the changes in the task content satisfy multiple execution conditions among the at least one execution condition;

[0175] The target execution condition is determined from among the plurality of execution conditions based on the priority of the at least one execution condition.

[0176] In an alternative approach, before loading and parsing the script file corresponding to the in-vehicle application, the method further includes:

[0177] Determine the local script version number and the cloud script version number of the script file corresponding to the in-vehicle application.

[0178] If the script version number in the cloud is higher than the script version number in the local machine, the script file corresponding to the in-vehicle application is upgraded to obtain the upgraded script file.

[0179] In one alternative approach, the task content includes at least one of vehicle status information, environmental parameter information, and button status information.

[0180] The technical solution of this invention has at least the following beneficial effects: First, by designing the interaction logic of the in-vehicle application through scripts, a large amount of program code is not required, thus shortening the development cycle of the in-vehicle application. Furthermore, during the execution of the in-vehicle application, some script information can be dynamically converted into corresponding program code, allowing the in-vehicle application to achieve its corresponding functions by running the program code. Second, if the design logic of the in-vehicle application needs to be changed, only the corresponding design logic in the script file needs to be changed, without modifying a large amount of program code, thus reducing the later maintenance cost of the in-vehicle application. Third, compared to the traditional method of upgrading the in-vehicle application via USB flash drive, OTA, etc., before the user can obtain the updated in-vehicle application service, which cannot guarantee that all user terminals can be upgraded, this invention, in its embodiment, when the local script version number of the script file corresponding to the in-vehicle application is lower than the script version number in the cloud, the cloud server sends the latest version of the script file to the user terminal, thus ensuring the coverage of in-vehicle application upgrades.

[0181] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Furthermore, the embodiments of this invention are not directed to any particular programming language.

[0182] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. Similarly, for the sake of brevity and to aid in understanding one or more aspects of the invention, in the description of exemplary embodiments of the invention above, various features of the embodiments are sometimes grouped together in a single embodiment, figure, or description thereof. The claims, which follow the detailed description, are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.

[0183] Those skilled in the art will understand that the modules in the device of the embodiment can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiment can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components, except that at least some of such features and / or processes or units are mutually exclusive.

[0184] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. An interaction method for an in-vehicle application, characterized in that, The method includes: The vehicle application is launched, and the script file corresponding to the vehicle application is loaded and parsed. The script file includes a task set, and the task set includes task information of multiple task nodes. The task information of each task node includes: task content, at least one execution condition, and control action corresponding to each execution condition. The multiple task nodes are arranged in a tree structure. Based on the task information and the arrangement of the multiple task nodes, a state machine is created; Using the state machine, starting from the root node among the multiple task nodes, we monitor whether the task content corresponding to the task node has changed; If it is determined that the task content has changed and the change in the task content satisfies the target execution condition included in at least one execution condition, the target control action corresponding to the target execution condition is obtained. Execute the target control action; The task information of the task node also includes the priority of the at least one execution condition, and the determination that the change in the task content satisfies the target execution condition included in the at least one execution condition includes: If it is determined that the change in the task content satisfies multiple execution conditions among the at least one execution condition, then the target execution condition is determined among the multiple execution conditions according to the priority of the at least one execution condition; Before loading and parsing the script file corresponding to the in-vehicle application, the method further includes: Determine the local script version number and the cloud script version number of the script file corresponding to the in-vehicle application. If the script version number in the cloud is higher than the script version number in the local machine, then the script file corresponding to the in-vehicle application is upgraded to obtain the upgraded script file. The step of monitoring whether the task content corresponding to the task node has changed includes: The system receives task status information sent by the vehicle controller. The task status information includes parameter values ​​and / or status indication information of the task content at a first time, and parameter values ​​of the task content at a second time. The status indication information is used to indicate that the task content corresponding to the task node has changed. The second time is a time before the first time. If the parameter value of the task content at the first moment is different from the parameter value of the task content at the second moment, then it is determined that the task content corresponding to the task node has changed. The execution of the target control action includes: Generate the program code corresponding to the target control action; Run the program code.

2. An interactive device for an in-vehicle application, characterized in that, The interactive device includes: a script management module, a script arbitration module, and a task execution module; The script management module is used to launch the in-vehicle application, load and parse the script file corresponding to the in-vehicle application. The script file includes a task set, and the task set includes task information of multiple task nodes. The task information of each task node includes: task content, at least one execution condition, and control action corresponding to each execution condition. The multiple task nodes are arranged in a tree structure. The script arbitration module is used to create a state machine based on the task information and the arrangement of the multiple task nodes; and to use the state machine to listen for changes in the task content corresponding to the task node, starting from the root node among the multiple task nodes. The task execution module is configured to, when it is determined that the task content has changed and the change in the task content satisfies the target execution condition included in the at least one execution condition, obtain the target control action corresponding to the target execution condition; and execute the target control action. The task execution module is further configured to, if it is determined that the change in the task content satisfies multiple execution conditions among the at least one execution condition, determine the target execution condition among the multiple execution conditions according to the priority of the at least one execution condition, and the task information of the task node also includes the priority of the at least one execution condition; The script management module is also used to determine the local script version number and the cloud script version number of the script file corresponding to the in-vehicle application. If the script version number in the cloud is higher than the script version number in the local machine, then the script file corresponding to the in-vehicle application is upgraded to obtain the upgraded script file. The script arbitration module is further configured to receive task status information sent by the vehicle controller. The task status information includes parameter values ​​and / or status indication information of the task content at a first time, and parameter values ​​of the task content at a second time. The status indication information is used to indicate that the task content corresponding to the task node has changed. The second time is a time before the first time. If the parameter values ​​of the task content at the first time are different from the parameter values ​​of the task content at the second time, it is determined that the task content corresponding to the task node has changed. The task execution module is also used to generate program code corresponding to the target control action and run the program code.

3. An electronic device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the in-vehicle application interaction method as described in claim 1.

4. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on the in-vehicle application interaction device / electronic device, causes the in-vehicle application interaction device / electronic device to perform the operation of the in-vehicle application interaction method as described in claim 1.