Application control method and device and vehicle
Through the connection between the main node of the vehicle system and the cloud, the application installation package is managed and optimized, the problem of insufficient resources of the vehicle system is solved, efficient resource management and application updates are realized, and the stability and safety of the vehicle are ensured.
Patent Information
- Application Number
- CN202411335176.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-03
AI Technical Summary
When multiple applications are running at the same time, the vehicle car system may lead to insufficient resources, affecting system stability and response speed, and even causing system crashes and driving safety.
Connect with the cloud through the master node, download and manage installation packages of multiple applications, detect application updates in real time, and determine the applications to be started based on the vehicle's driving status and application type, optimize resource allocation, and ensure the performance of key applications.
It realizes efficient resource management of the vehicle and machine system, ensures that the application remains up to date, avoids resource redundancy consumption, reduces unnecessary application startup, optimizes overall performance and efficiency, and ensures driving safety.
Smart Images

Figure CN119248315A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vehicles, and in particular relates to an application control method, device and vehicle. Background Art
[0002] In order to meet the diverse needs of users, vehicles are usually equipped with a variety of in-vehicle applications, such as navigation, entertainment, communication, vehicle monitoring, etc. When multiple applications are running at the same time, they may occupy a large amount of system resources (such as CPU, memory, storage space, etc.), which may lead to insufficient system resources of the vehicle, and thus affect the stability and response speed of the vehicle system. If the system resources of the vehicle are over-consumed, it may cause the system to crash, which not only affects the user experience, but may also affect the key functions of the vehicle, such as navigation, communication, etc., thereby endangering driving safety. Summary of the invention
[0003] In view of the above problems, the embodiments of the present application provide a control method, device and vehicle for an application, so as to overcome the above problems or at least partially solve the above problems.
[0004] In a first aspect of an embodiment of the present application, a control method for an application is provided, which is applied to a vehicle system of a vehicle, wherein the vehicle system includes a master node and a plurality of slave nodes connected to the master node, each of the slave nodes corresponds to at least one application in the vehicle system, and the master node is connected to a cloud. The method includes:
[0005] Based on the configuration file of the vehicle, the master node downloads and stores installation packages of multiple applications from the cloud, where the multiple applications are the applications indicated by the configuration file;
[0006] When detecting that the configuration file stored in the cloud indicates that there is an updated first application, downloading and storing an updated installation package of the first application from the cloud through the master node;
[0007] In response to a second application currently being triggered among the multiple applications, determining a third application currently to be started from the multiple applications through the master node, sending a latest installation package of the third application to a target slave node corresponding to the third application through the master node, and running the latest installation package of the third application through the target slave node;
[0008] Among them, the third application at least includes the second application.
[0009] Further, in response to the second application currently being triggered among the multiple applications, determining, by the master node, a third application currently to be started from the multiple applications includes:
[0010] Determine whether the second application currently triggered meets the start condition; wherein the start condition represents the basic condition required for the second application to run under the current driving state of the vehicle;
[0011] In a case where the second application satisfies the start-up condition, the third application is determined from the plurality of applications.
[0012] Further, the determining whether the currently triggered second application meets the start condition includes:
[0013] Acquire the operating status information of multiple components in the vehicle system in real time; wherein the multiple components at least include: a motor, wheels and a vehicle controller;
[0014] Based on the running state information, determine the current driving state of the vehicle; wherein the driving state at least includes: driving speed and driving mode;
[0015] Based on the current driving state of the vehicle, determine whether the second application meets the start-up condition.
[0016] Further, in response to the second application currently being triggered among the multiple applications, determining, by the master node, a third application currently to be started from the multiple applications includes:
[0017] Determine an application type of the second application; wherein the application type includes a firmware application type and a vehicle-mounted application type;
[0018] In a case where the second application belongs to the type of the firmware application, determining the second application as the third application;
[0019] In a case where the second application belongs to the type of the in-vehicle application, the second application and an application associated with the second application are determined as the third application.
[0020] Further, when the second application belongs to the in-vehicle application, determining the second application and an application associated with the second application as the third application includes:
[0021] determining whether an application associated with the second application is running;
[0022] If it is running, detecting through the master node whether the installation package of the application associated with the second application is updated;
[0023] If updated, determining the second application and the application associated with the second application as the third application;
[0024] If not updated, the second application is determined as the third application.
[0025] Further, sending the latest installation package of the third application to the target slave node corresponding to the third application through the master node includes:
[0026] Determine whether the third application carries a running node identifier; wherein the running node identifier is used to specify a slave node running the third application;
[0027] In a case where the third application carries the running node identifier, sending the latest installation package of the third application to the target slave node specified by the running node identifier;
[0028] In the case that the third application does not carry the running node identifier, based on the required running space of the third application, the third application is sent to a target slave node that meets the required running space.
[0029] Further, running the latest installation package of the third application through the target slave node includes:
[0030] Detecting the remaining operating space of the target slave node in real time;
[0031] When the remaining running space is less than the required running space of the third application, obtaining the priority level of a fourth application in the target slave node except the third application;
[0032] The installation package of the fourth application is transferred to other slave nodes except the target slave node in sequence according to the priority level from low to high, until the remaining running space meets the required running space.
[0033] Furthermore, before sending the latest installation package of the third application to the target slave node corresponding to the third application through the master node, the method further includes:
[0034] Detecting the remaining operating space of each slave node among the plurality of slave nodes;
[0035] When the remaining running space of each slave node is less than the preset space, the latest installation package of the third application is run through the master node.
[0036] In a second aspect of an embodiment of the present application, a control device for an application is provided, which is applied to a vehicle system of a vehicle, wherein the vehicle system includes a master node and a plurality of slave nodes connected to the master node, each of the slave nodes corresponds to at least one application in the vehicle system, and the master node is connected to a cloud. The device includes:
[0037] A download module, configured to download and store installation packages of multiple applications from the cloud through the master node based on the configuration file of the vehicle, wherein the multiple applications are the applications indicated by the configuration file;
[0038] an updating module, configured to download and store an updated installation package of the first application from the cloud through the master node when detecting that the configuration file stored in the cloud indicates that there is an updated first application;
[0039] a running module, configured to, in response to a second application currently being triggered among the multiple applications, determine a third application currently to be started from the multiple applications through the master node, send a latest installation package of the third application to a target slave node corresponding to the third application through the master node, and run the latest installation package of the third application through the target slave node;
[0040] Among them, the third application at least includes the second application.
[0041] Furthermore, the operation module includes:
[0042] A first determination module is used to determine whether the second application currently triggered meets the start condition; wherein the start condition represents the basic condition required for the second application to run under the current driving state of the vehicle;
[0043] In the case where the second application satisfies the startup condition, a third application to be currently started is determined from the multiple applications.
[0044] Furthermore, the determination module includes:
[0045] An acquisition module, used for acquiring the operation status information of multiple components in the vehicle system in real time; wherein the multiple components at least include: a motor, a wheel and a vehicle controller;
[0046] Based on the running state information, determine the current driving state of the vehicle; wherein the driving state at least includes: driving speed and driving mode;
[0047] Based on the current driving state of the vehicle, determine whether the second application meets the start-up condition.
[0048] Furthermore, the operation module includes:
[0049] A second determination module, configured to determine an application type of the second application; wherein the application type includes a firmware application type and a vehicle-mounted application type;
[0050] In a case where the second application belongs to the type of the firmware application, determining the second application as the third application;
[0051] In a case where the second application belongs to the type of the in-vehicle application, the second application and an application associated with the second application are determined as the third application.
[0052] Furthermore, the second determining module includes:
[0053] determining whether an application associated with the second application is running;
[0054] If it is running, detecting through the master node whether the installation package of the application associated with the second application is updated;
[0055] If updated, determining the second application and the application associated with the second application as the third application;
[0056] If not updated, the second application is determined as the third application.
[0057] Furthermore, the operation module includes:
[0058] A third determination module, used to determine whether the third application carries a running node identifier; wherein the running node identifier is used to specify a slave node running the third application;
[0059] In a case where the third application carries the running node identifier, sending the latest installation package of the third application to the target slave node specified by the running node identifier;
[0060] In the case that the third application does not carry the running node identifier, based on the required running space of the third application, the third application is sent to a target slave node that meets the required running space.
[0061] Furthermore, the operation module includes:
[0062] A first detection module, used for detecting the remaining operating space of the target slave node in real time;
[0063] When the remaining running space is less than the required running space of the third application, obtaining the priority level of a fourth application in the target slave node except the third application;
[0064] The installation package of the fourth application is transferred to other slave nodes except the target slave node in sequence according to the priority level from low to high, until the remaining running space meets the required running space.
[0065] Furthermore, the device also includes:
[0066] A second detection module, used to detect the remaining operating space of each slave node among the plurality of slave nodes;
[0067] When the remaining running space of each slave node is less than the preset space, the latest installation package of the third application is run through the master node.
[0068] According to a third aspect of an embodiment of the present application, a vehicle is provided, wherein the vehicle comprises the control device provided in the second aspect of an embodiment of the present application.
[0069] A control method for an application provided by this embodiment is applied to a vehicle system of a vehicle, the vehicle system includes a master node and a plurality of slave nodes connected to the master node, each slave node corresponds to at least one application in the vehicle system, and the master node is connected to the cloud. The method includes:
[0070] First, based on the vehicle configuration file, the installation packages of multiple applications are downloaded and stored from the cloud through the master node, and the multiple applications are the applications indicated by the configuration file; then, when it is detected that the configuration file stored in the cloud indicates that there is an updated first application, the updated installation package of the first application is downloaded and stored from the cloud through the master node; then, in response to the second application currently triggered among the multiple applications, the third application currently to be started is determined from the multiple applications through the master node, and the latest installation package of the third application is sent to the target slave node corresponding to the third application through the master node, and the latest installation package of the third application is run through the target slave node; wherein, the third application at least includes the second application.
[0071] Therefore, during the use of the vehicle, the master node realizes efficient centralized management of multiple applications in the vehicle system through connection with the cloud. This enables the vehicle system to download, store and update the application installation package from the cloud in a timely manner, ensuring that all vehicle applications are kept up to date, ensuring timely updates of applications, and preventing application unavailability due to outdated application versions.
[0072] Secondly, when the second application is triggered, the master node can determine the third application to be run from multiple applications, ensuring that the auxiliary functions required to run the second application are included in the third application, thereby avoiding the second application being unusable due to the lack of some auxiliary functions, and reducing the resource usage caused by running the second application but being unable to use it.
[0073] In addition, the master node sends the latest installation package of the third application to the target slave node that needs to run the application. Different third applications can be isolated and run in different target slave nodes to avoid mutual influence of different third applications during operation. At the same time, by running the latest installation package of the third application on the target slave node, the vehicle system can avoid starting unnecessary applications, thereby effectively reducing resource usage.
[0074] In addition, the master node sends the latest installation package of the selected third application to the corresponding target slave node, so that different third applications can be run on their own independent slave nodes, thereby avoiding mutual interference between applications. By running the latest installation package of the third application on the target slave node, the vehicle system can avoid unnecessary application startup, effectively reducing resource usage and optimizing the overall performance and efficiency of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0076] Figure 1 is a flowchart of a control method for an application provided by an embodiment of the present application;
[0077] Figure 2 This is a schematic diagram of an architecture between a master node and a slave node provided in an embodiment of the present application;
[0078] Figure 3 It is a schematic diagram of a control device of an application provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] The exemplary embodiments of the present application will be described in more detail below in conjunction with the accompanying drawings in the embodiments of the present application. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to enable the scope of the present application to be fully conveyed to those skilled in the art.
[0080] In response to the problems in the background technology, in order to achieve full decoupling of vehicle software and hardware and efficient integration of vehicle control functions, the relevant technology will transform the vehicle's electronic and electrical architecture from a distributed to a central architecture so that traditional controllers can be integrated into a high-performance host cluster.
[0081] In a high-performance host cluster, containerization technology is used to package the applications on the vehicle and their dependencies into image files, providing a flexible and efficient deployment method for the vehicle's central computing architecture, enhancing the system's dynamic migration and elastic scaling capabilities. The use of container technology in the vehicle-mounted system of the central computing architecture requires container orchestration tools to provide core functions such as scheduling, service discovery, load balancing, and network policies.
[0082] Container technology includes containerized orchestration tools, such as Kubernetes, an open source container orchestration platform that can automatically manage and schedule containerized applications, providing high availability and elastic expansion capabilities. However, containerized orchestration tools are all run on public cloud, private cloud, and hybrid cloud infrastructures, and are designed for large-scale configuration and deployment of applications. In the vehicle environment, device resources are limited, and native container orchestration and scheduling capabilities cannot be deployed in the vehicle host cluster.
[0083] Secondly, when the application on the vehicle runs in the vehicle-specific ECU (Electronic Control Unit), the load processes the signals converted from the input device and generates corresponding command signals, which are then transmitted to the output device. Since the ECU on the vehicle has a proprietary upgrade strategy and does not support containerized deployment, there are still limitations in using containerized technology on vehicles.
[0084] In summary, in order to solve the above problems, a control method for an application provided in this embodiment is applied to the vehicle system of the vehicle. Through the connection between the master node in the vehicle system and the cloud, each slave node in the vehicle system corresponds to at least one application in the vehicle system, which can realize the centralized update and distribution of multiple applications on the vehicle, and detect in real time whether the applications on the vehicle are updated, ensuring that the installation packages of multiple applications are kept up to date, while avoiding redundant consumption of resources. In addition, by real-time monitoring of the operating status of each node, including CPU and memory usage, resource allocation can be adjusted in time to ensure that the performance of key applications is not affected. It is also possible to flexibly start, stop or reconfigure applications according to real-time needs, significantly reducing the overall occupancy of vehicle system resources by running multiple applications.
[0085] Reference Figure 1 , Figure 1 is a flowchart of a control method for an application provided in an embodiment of the present application. Figure 1 The control method is applied to a vehicle system of a vehicle, wherein the vehicle system includes a master node and a plurality of slave nodes connected to the master node, each of the slave nodes corresponding to at least one application in the vehicle system, the master node is connected to a cloud, and the slave nodes are connected to the cloud. Figure 1 It can be seen that the method steps include:
[0086] Step S101: Based on the configuration file of the vehicle, the installation packages of multiple applications are downloaded and stored from the cloud through the master node, where the multiple applications are the applications indicated by the configuration file.
[0087] In this embodiment, the vehicle system is a system for providing information, entertainment functions, communication connections, assisted driving, software updates and other functions. In order to integrate the functions of the vehicle system and optimize resource management, containerization technology is used in the vehicle system of the vehicle, so that each application on the vehicle can run as an independent container, which can improve the isolation, security and portability of each application. Containerization minimizes the dependencies and conflicts between applications, while simplifying the deployment and maintenance of multiple applications. Containerization technology allows more efficient resource allocation and utilization. Secondly, because containers share the operating system kernel, they take up less space, start faster, and consume less resources than traditional virtual machines.
[0088] Therefore, in order to utilize containerization technology and reduce the resource occupation of the vehicle system when running multiple applications, the vehicle system may include a master node and multiple slave nodes connected to the master node, each slave node corresponding to at least one application in the vehicle system. Therefore, each slave node can run the installation packages of multiple applications or one application. The cloud stores the installation packages of multiple applications. The master node is connected to the cloud. The master node can search the cloud for a configuration file that matches the current vehicle. The configuration file includes information about the applications configured on the current vehicle. Then the master node downloads the applications indicated by the configuration file from the cloud according to the configuration file for storage, so that during the use of the vehicle, the installation packages corresponding to the applications stored in the master node can be directly distributed to the corresponding nodes for operation, which can shorten the time for running applications and eliminate the need for repeated downloads.
[0089] Step S102: when it is detected that the configuration file stored in the cloud indicates that there is an updated first application, the updated installation package of the first application is downloaded and stored from the cloud through the master node.
[0090] In this embodiment, the master node detects in real time whether the configuration file stored in the cloud indicates the existence of an updated first application. The first application in this embodiment is an application that needs to be updated among multiple applications downloaded and stored by the master node from the cloud. If the existence of the first application is detected, the master node directly downloads the updated installation package of the first application from the cloud. If an old version of the installation package of the first application exists in the master node, the old version of the installation package is replaced and the updated installation package of the first application is stored, so that when the vehicle needs to run the first application, the first application can be run with the latest version of the installation package.
[0091] Step S103: In response to a second application currently being triggered among the multiple applications, a third application currently to be started is determined from the multiple applications through the master node, and the latest installation package of the third application is sent to the target slave node corresponding to the third application through the master node, and the latest installation package of the third application is run through the target slave node; wherein the third application at least includes the second application.
[0092] In this embodiment, the second application may be a firmware application of the vehicle, and the firmware application may be an ECU of the vehicle. When an upgrade of the installation package corresponding to the ECU on the vehicle is detected in step S102, the ECU may be identified as the second application currently triggered. Secondly, the second application may also be an in-vehicle application that the user needs to start on the vehicle. The in-vehicle application may be an assisted driving, navigation system, in-vehicle game, music playback, climate control, and other applications for users to use. When the user controls the corresponding in-vehicle application to start, the in-vehicle application that currently needs to be controlled by the user is identified as the second application currently triggered.
[0093] At this time, the master node will determine the third application to be started from multiple applications. The third application can be the second application, or the second application and other applications associated with the second application. When the second application is running, if it does not need to run when other applications are running, the master node can directly determine the second application as the third application to be started. If it needs to run only when other applications are running, in order to ensure the smooth operation of the second application, the master node needs to determine the third application to be started from multiple applications based on the second application.
[0094] For example, the triggered second application is multimedia playback, which requires the music library management application, online music service and sound control system to run, so the third application will include multimedia playback, music library management application, online music service and sound control system. If the second application has no other application associated with it, the third application is the second application, so the third application at least includes the second application.
[0095] Finally, the latest installation package of the third application is sent to the target slave node corresponding to the third application through the master node, and the latest installation package of the third application is run through the target slave node, which can ensure that the vehicle's third application always runs the latest version, and by running through the target slave node corresponding to the third application, the vehicle system resources can be more effectively allocated and utilized.
[0096] Through the control method provided in this embodiment, applied to the vehicle system, the vehicle system can use containerization technology to achieve efficient and unified management of multiple applications on the vehicle. It ensures that multiple applications are isolated from each other during operation, avoids mutual influence between unrelated applications, and thus improves system stability. At the same time, the application of containerization technology allows multiple applications to share the operating system kernel, effectively reducing the occupation of memory and storage space, and optimizing resource utilization. In addition, the master node monitors the configuration files and multiple slave nodes in real time, which enhances the management ability of containerized applications running on the slave nodes, ensuring that the third application on the vehicle system always runs the latest version.
[0097] In a specific embodiment, in response to the second application currently being triggered in the multiple applications, determining, by the master node, a third application currently to be started from the multiple applications may include the following steps:
[0098] First, determine whether the second application currently triggered meets the start condition; wherein the start condition represents the basic condition required for the second application to run under the current driving state of the vehicle; then, if the second application meets the start condition, determine the third application from the multiple applications.
[0099] In this embodiment, during vehicle driving, in order to avoid triggering the wrong application to run and causing interference to the vehicle driving process, to ensure the safe driving of the vehicle, and the smooth startup of the second application, it is also necessary to determine whether the triggered second application meets the startup conditions. The startup conditions are the basic conditions required for the second application to run under the current driving state of the vehicle. The basic conditions may be the vehicle system storage space, network connection, vehicle driving state, etc. Only when the second application meets the startup conditions, will the third application to be started be determined from multiple applications.
[0100] For example, the second application triggered by the user is real-time traffic updates and online music playback, and a stable network connection is a necessary basic condition. The vehicle system will verify whether there is sufficient network signal strength and data transmission rate to support the operation of these applications, and the basic condition is whether there is sufficient network signal strength and data transmission rate.
[0101] Secondly, if the second application triggered by the user is parking assistance, the vehicle system will check whether the current driving state of the vehicle is suitable for running the application. If the vehicle is driving on a highway, the vehicle system may prohibit the launch of the parking assistance application to avoid interfering with driving safety. If the vehicle is in a parking lot and the current traffic conditions of the vehicle allow the vehicle to safely enter the parking assistance operation, the basic conditions are the traffic conditions and the current environment of the vehicle.
[0102] In a specific embodiment, determining whether the currently triggered second application meets the start condition may include the following steps:
[0103] First, the operating status information of multiple components in the vehicle system is obtained in real time; wherein the multiple components include at least: a motor, wheels and a vehicle controller; then, based on the operating status information, the current driving state of the vehicle is determined; wherein the driving state includes at least: a driving speed and a driving mode; finally, based on the current driving state of the vehicle, it is determined whether the second application meets the startup conditions.
[0104] In this embodiment, to determine whether the second application currently triggered meets the startup conditions, it is necessary to obtain the operating status information of multiple components in the vehicle system, which may include motors, wheels, and vehicle controllers. The vehicle's motor is a key component that provides power, and its speed and torque are controlled by the motor controller. The wheel speed sensor monitors the rotation of the wheels to help calculate the vehicle's driving speed. The vehicle controller coordinates the various subsystems of the vehicle, including the power system, braking system, and steering system. It determines the vehicle's driving speed and driving mode, such as high-speed driving mode, economic driving mode, energy-saving driving mode, etc., by analyzing data from the motor controller and wheel speed sensors. The vehicle system will then determine whether the second application meets the startup conditions based on the vehicle's current driving speed and driving mode.
[0105] For example, when a user wants to turn on a parking assistance application, if the vehicle's driving speed is too high and the driving mode is high-speed driving, but parking assistance is applicable to low-speed or parking scenarios, the vehicle system will determine that turning on the parking assistance application at this time does not match the current driving state of the vehicle, and the second application becomes unavailable for startup.
[0106] In a specific embodiment, in response to the second application currently being triggered in the multiple applications, determining, by the master node, a third application currently to be started from the multiple applications may include the following steps:
[0107] First, an application type of the second application is determined; wherein the application type includes a type of firmware application and a type of vehicle-mounted application; then, if the second application belongs to the type of firmware application, the second application is determined as the third application; and if the second application belongs to the type of vehicle-mounted application, the second application and an application associated with the second application are determined as the third application.
[0108] In this embodiment, in response to the second application currently being triggered among multiple applications, the third application currently to be started is determined from the multiple applications through the master node. In this embodiment, the application of the type of firmware application does not involve dependence on other applications during operation. ECU is a key component used in the vehicle to control various mechanical and electronic systems. When the ECU is updated, it does not need to rely on the startup of other applications. The ECU of the vehicle can be of the type of firmware application. Therefore, when the second application is of the type of firmware application, the second application is determined as the third application currently to be started, and then the latest installation package corresponding to the firmware application is divided and pressed to the corresponding target slave node for operation, so that the ECU can be upgraded. When the second application is of the type of vehicle-mounted application, since vehicle-mounted applications usually need to interact with other applications or system components to provide complete functions, it is necessary to ensure that all related dependent and supporting applications can be correctly started and managed. If you need to run a second application, the application associated with the second application must already be running to ensure the smooth operation of the second application. For example, the second application that needs to be run is a navigation application, but the use of the navigation application requires the support of associated applications such as map service applications, real-time traffic information applications, and GPS positioning service applications. Therefore, the second application and the application associated with the second application also need to be identified as the third application to be started.
[0109] Determining other applications associated with the second application can specifically be based on the dependency relationship of each application in the configuration file, searching for applications associated with the second application from multiple applications, and then determining the second application and applications associated with the second application as the third application to be currently started.
[0110] In a specific embodiment, when the second application belongs to the in-vehicle application, determining the second application and an application associated with the second application as the third application may include the following steps:
[0111] First, determine whether the application associated with the second application is running; if it is running, detect through the master node whether the installation package of the application associated with the second application is updated; if it is updated, determine the second application and the application associated with the second application as the third application; if not updated, determine the second application as the third application.
[0112] In this embodiment, when the second application and the application associated with the second application are determined as the third application to be currently started, it is also necessary to determine whether the application associated with the second application is running. If not, the second application and the application associated with the second application are determined as the third application to be currently started. If they are running, the master node is used to detect whether the installation package of the application associated with the second application is updated, specifically by detecting whether the installation package corresponding to the application associated with the second application in the cloud is updated.
[0113] If it has been updated, in order to ensure that the vehicle's third application always runs the latest version, the application associated with the second application needs to be updated, and the second application and the application associated with the second application are determined as the third application to be started.
[0114] If it is not updated, it indicates that the application associated with the second application is running at the latest version and does not need to be started again. At this time, only the second application is determined as the third application to be started currently.
[0115] In a specific embodiment, sending the latest installation package of the third application to the target slave node corresponding to the third application through the master node may include the following steps:
[0116] First, determine whether the third application carries a running node identifier; wherein the running node identifier is used to specify a slave node that runs the third application; then, if the third application carries the running node identifier, send the latest installation package of the third application to the target slave node specified by the running node identifier; and then, if the third application does not carry the running node identifier, based on the required running space of the third application, send the third application to the target slave node that meets the required running space.
[0117] In this embodiment, in the process of sending the latest installation package of the third application to the target slave node corresponding to the third application through the master node, it is necessary to determine whether the third application carries a running node identifier. The running node identifier is used to characterize the slave node designated to run the third application, that is, the third application has been configured to run on a specific slave node. If it exists, the latest installation package of the third application is directly sent to the target slave node corresponding to the running node identifier. If it does not exist, the master node will search for a slave node whose remaining running space meets the required running space of the third application among multiple slave nodes based on the current remaining running space of each slave node and the required running space of the third application, and use it as the target slave node, and send the latest installation package of the third application to the target slave node.
[0118] In a specific embodiment, the step of running the latest installation package of the third application through the target slave node may include the following steps:
[0119] First, the remaining operating space of the target slave node is detected in real time; then, when the remaining operating space is smaller than the required operating space of the third application, the priority level of the fourth application other than the third application in the target slave node is obtained; and then, in order of the priority levels from low to high, the installation package of the fourth application is transferred to other slave nodes other than the target slave node in sequence until the remaining operating space meets the required operating space.
[0120] In this embodiment, since the target slave node may run installation packages of other applications in addition to the latest installation package of the third application, in order to ensure the smooth operation of the latest installation package of the third application, it is also detected in real time whether the remaining running space of the target slave node meets the required running space of the latest installation package of the third application. In order to avoid the interruption of the latest installation package of the third application during operation, the installation package of the fourth application occupying the memory of the target slave node can be transferred to increase the remaining running space of the target slave node. When the installation package of the fourth application is transferred, if there are multiple installation packages of the fourth application in addition to the installation package of the third application in the target node, if only some of the installation packages of the fourth application need to be removed to meet the required space for running the third application, the priority level of the fourth application can be determined, and then the installation package of the fourth application is transferred to other slave nodes except the target slave node in order from low to high priority levels until the remaining running space of the target node meets the required running space of the third application.
[0121] In a specific embodiment, before sending the latest installation package of the third application to the target slave node corresponding to the third application through the master node, the method further includes:
[0122] Detect the remaining running space of each slave node among the multiple slave nodes; when the remaining running space of each slave node is less than the preset space, run the latest installation package of the third application through the master node.
[0123] In this embodiment, in order to balance the load between the master node and multiple slave nodes in the vehicle system, before the master node is ready to send the latest installation package of the third application to the target slave node, it is first necessary to detect the remaining operating space of all slave nodes in the vehicle system. For each slave node, the system will check whether its remaining operating space meets the preset space. The preset space is a minimum space threshold to ensure that the slave node can run the application smoothly. If the remaining space of each slave node is lower than the preset space, it means that each slave node is already fully loaded and it is no longer possible to transfer the installation package between the slave nodes.
[0124] Therefore, when it is detected that the remaining running space of all slave nodes is less than the preset space, the master node will directly run the latest installation package of the third application.
[0125] For example, referring to 2, Figure 2 This is a schematic diagram of an architecture between a master node and a slave node provided in an embodiment of the present application. Figure 2 The provided workload distribution, container orchestration and professional ECU upgrade services are applied in the vehicle system to illustrate the control method provided in this embodiment:
[0126] Figure 2 The system includes master nodes, slave nodes, service agents, daemons, cluster control service programs, OTA clients, multiple vehicle applications, and ECUs. The master node is connected to the service agent of the slave node through the cluster control service program, and the service agent is connected to multiple vehicle applications and to the OTA (Over-The-Air, update) client. The service agent is used to coordinate and manage the communication between the automotive application and other system components.
[0127] The vehicle's host cluster is set as a master node, running the cluster control service program and daemon program. Service agents run on all nodes to manage the vehicle applications and firmware applications (ECUs) running on the local machine. The cluster control service program is the center for managing vehicle applications. It manages multiple slave nodes through the service agent. The service agent of each slave node is connected to one or more runtime workloads and OTA clients. It can dynamically start, stop, configure and update the containers and workloads of the vehicle application, and manage the firmware applications running on the linked ECUs through the OTA client. The daemon program running on the master node is the communication interface module of the vehicle cluster, which is responsible for the interaction between the vehicle computing platform and the cloud service. Its main function is to synchronize cloud resources, vehicle application configuration files, and installation packages of multiple applications (image files of vehicle applications and ECU upgrade packages).
[0128] The configuration file in this embodiment can define the creation and configuration of multiple applications through a configuration file template in YAML format, and the configuration information can be passed to the service agent through the service interface to build the application server of the automobile system. The configuration file consists of a list of workload specifications in the workload object. The workload specification contains the following information: Workload name: the identifier of the workload in the car cluster system, supported application types: firmware application and vehicle application.
[0129] When the vehicle system is started, the master node will download the latest installation package of the application through the daemon program for storage according to the application (on-board application and firmware application) indicated in the configuration file matching the vehicle. The daemon program will then monitor in real time whether the application indicated in the configuration file in the cloud is updated.
[0130] When the vehicle application needs to be started or the firmware application needs to be upgraded, the master node will send the latest installation package corresponding to the vehicle application or firmware application to the target slave node, so that the target slave node can run the latest installation package corresponding to the vehicle application or firmware application to complete the vehicle application startup or firmware application upgrade. When the vehicle system starts.
[0131] During the operation of the target slave node, the control service program of the master node can also instruct the service agent to start and stop running the workload of the automotive application according to the required state of the configuration. The OTA client checks whether there is an upgrade package for the corresponding ECU in the service agent, downloads the upgrade package to the local FTP service, and notifies the ECU to download the new ECU upgrade package using the FTP service protocol to complete the upgrade of the ECU-specific program.
[0132] Secondly, the latest installation package of the application can be dynamically added to the cluster at runtime, automatically update the latest installation package of the application, monitor the health status of the application, ensure the high availability of the application, and more conveniently manage and control the running status of the car application. Secondly, the vehicle's application is scheduled to meet the vehicle's needs to start specific applications only under specific circumstances, and can balance the application load of the slave node. For example, for parking assistance, when the vehicle is parked and driving normally, the application does not need to be started to occupy the vehicle system resources. Only when assisted driving is turned on, the cluster control service program is dynamically loaded and started, that is, it will only be turned on when the application that needs to be turned on meets the current driving status of the vehicle, which avoids accidental touches of the application and avoids the wrong application from occupying the resources of the vehicle system.
[0133] Secondly, the storage space used by all management programs in the containerization technology is less than 100MB, and the system can complete the system startup in 3 seconds, which is fast. It is suitable for running on vehicle computers with limited resources, greatly reducing hardware requirements and energy consumption. If the control method of this embodiment uses FTP service to manage the download and management tasks of ECU professional upgrade packages, it also supports breakpoint resumption and multi-threaded downloading of applications, thereby improving the download speed of the installation package of the downloaded application.
[0134] The present application also provides a control device for an application, referring to Figure 3 , Figure 3 1 is a schematic diagram of a control device of an application provided in an embodiment of the present application, which is applied to a vehicle system of a vehicle, wherein the vehicle system includes a master node and a plurality of slave nodes connected to the master node, each of the slave nodes corresponds to at least one application in the vehicle system, the master node is connected to the cloud, and the device includes:
[0135] A download module 301, configured to download and store installation packages of multiple applications from the cloud through the master node based on the configuration file of the vehicle, wherein the multiple applications are applications indicated by the configuration file;
[0136] An updating module 302, configured to download and store an updated installation package of the first application from the cloud through the master node when detecting that the configuration file stored in the cloud indicates that there is an updated first application;
[0137] The running module 303 is used for, in response to the second application currently being triggered among the multiple applications, determining a third application currently to be started from the multiple applications through the master node, sending the latest installation package of the third application to a target slave node corresponding to the third application through the master node, and running the latest installation package of the third application through the target slave node;
[0138] Among them, the third application at least includes the second application.
[0139] In this embodiment, the operation module 303 includes:
[0140] The first determination module is used to determine whether the second application currently triggered meets the startup condition; wherein the startup condition represents the basic condition required for the second application to run under the current driving state of the vehicle; when the second application meets the startup condition, the third application currently to be started is determined from the multiple applications.
[0141] In this embodiment, the determining module includes:
[0142] An acquisition module is used to acquire the operating status information of multiple components in the vehicle system in real time; wherein the multiple components include at least: a motor, wheels and a vehicle controller; based on the operating status information, determine the current driving state of the vehicle; wherein the driving state includes at least: a driving speed and a driving mode; based on the current driving state of the vehicle, determine whether the second application meets the startup conditions.
[0143] In this embodiment, the operation module 303 includes:
[0144] The second determination module is used to determine the application type of the second application; wherein the application types include firmware applications and vehicle-mounted applications; when the second application belongs to the firmware application, the second application is determined as the third application currently to be started; when the second application belongs to the vehicle-mounted application, the second application and an application associated with the second application are determined as the third application currently to be started.
[0145] In this embodiment, the second determining module includes:
[0146] Determine whether the application associated with the second application is running; if it is running, detect through the master node whether the installation package of the application associated with the second application is updated; if it is updated, determine the second application and the application associated with the second application as the third application currently to be started; if not updated, determine the second application as the third application currently to be started.
[0147] In this embodiment, the operation module 303 includes:
[0148] A third determination module is used to determine whether the third application carries a running node identifier; wherein the running node identifier is used to specify a slave node that runs the third application; if the third application carries the running node identifier, the latest installation package of the third application is sent to a target slave node specified by the running node identifier; if the third application does not carry the running node identifier, based on the required running space of the third application, the third application is sent to a target slave node that meets the required running space.
[0149] In this embodiment, the operation module 303 includes:
[0150] The first detection module is used to detect the remaining operating space of the target slave node in real time; when the remaining operating space is smaller than the required operating space of the third application, obtain the priority level among the fourth application other than the third application in the target slave node; and transfer the installation package of the fourth application to other slave nodes other than the target slave node in order from low to high priority levels until the remaining operating space meets the required operating space.
[0151] In this embodiment, the device further includes:
[0152] The second detection module is used to detect the remaining running space of each slave node among the multiple slave nodes; when the remaining running space of each slave node is less than the preset space, the latest installation package of the third application is run through the master node.
[0153] An embodiment of the present application also provides a vehicle, which includes the control device described in this embodiment.
[0154] 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.
[0155] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods and devices 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.
[0156] 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.
[0157] 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.
[0158] 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.
[0159] Finally, it should 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 "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0160] The control method, device and vehicle provided by the present invention are introduced in detail above. The principle and implementation mode of the present invention are explained in detail by using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present invention. 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 application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A control method for an application, characterized in that: A vehicle system applied to a vehicle, the vehicle system comprising a master node and a plurality of slave nodes connected to the master node, each of the slave nodes corresponding to at least one application in the vehicle system, the master node being connected to a cloud, and the method comprising: Based on the configuration file of the vehicle, the master node downloads and stores installation packages of multiple applications from the cloud, where the multiple applications are the applications indicated by the configuration file; When detecting that the configuration file stored in the cloud indicates that there is an updated first application, downloading and storing an updated installation package of the first application from the cloud through the master node; In response to a second application currently being triggered among the multiple applications, determining a third application currently to be started from the multiple applications through the master node, sending a latest installation package of the third application to a target slave node corresponding to the third application through the master node, and running the latest installation package of the third application through the target slave node; Among them, the third application at least includes the second application.
2. The control method according to claim 1, characterized in that: In response to the second application currently being triggered among the multiple applications, determining, by the master node, a third application currently to be started from the multiple applications, comprises: Determine whether the second application currently triggered meets the start condition; wherein the start condition represents the basic condition required for the second application to run under the current driving state of the vehicle; In a case where the second application satisfies the start-up condition, the third application is determined from the plurality of applications.
3. The control method according to claim 2, characterized in that: The determining whether the currently triggered second application meets the start condition includes: Acquire the operating status information of multiple components in the vehicle system in real time; wherein the multiple components at least include: a motor, wheels and a vehicle controller; Based on the running state information, determine the current driving state of the vehicle; wherein the driving state at least includes: driving speed and driving mode; Based on the current driving state of the vehicle, determine whether the second application meets the start-up condition.
4. The control method according to claim 1, characterized in that: In response to the second application currently being triggered among the multiple applications, determining, by the master node, a third application currently to be started from the multiple applications, comprises: Determine an application type of the second application; wherein the application type includes a firmware application type and a vehicle-mounted application type; In a case where the second application belongs to the type of the firmware application, determining the second application as the third application; In a case where the second application belongs to the type of the in-vehicle application, the second application and an application associated with the second application are determined as the third application.
5. The control method according to claim 4, characterized in that: The step of determining, when the second application belongs to the in-vehicle application, the second application and an application associated with the second application as the third application includes: determining whether an application associated with the second application is running; If it is running, detecting through the master node whether the installation package of the application associated with the second application is updated; If updated, determining the second application and the application associated with the second application as the third application; If not updated, the second application is determined as the third application.
6. The control method according to claim 1, characterized in that: The sending, by the master node, the latest installation package of the third application to the target slave node corresponding to the third application comprises: Determine whether the third application carries a running node identifier; wherein the running node identifier is used to specify a slave node running the third application; In a case where the third application carries the running node identifier, sending the latest installation package of the third application to the target slave node specified by the running node identifier; In the case that the third application does not carry the running node identifier, based on the required running space of the third application, the third application is sent to a target slave node that meets the required running space.
7. The control method according to claim 1, characterized in that: The running the latest installation package of the third application through the target slave node includes: Detecting the remaining operating space of the target slave node in real time; When the remaining running space is less than the required running space of the third application, obtaining the priority level of a fourth application in the target slave node except the third application; The installation package of the fourth application is transferred to other slave nodes except the target slave node in sequence according to the priority level from low to high, until the remaining running space meets the required running space.
8. The control method according to claim 1, characterized in that: Before sending the latest installation package of the third application to the target slave node corresponding to the third application through the master node, the method further includes: Detecting the remaining operating space of each slave node among the plurality of slave nodes; When the remaining running space of each slave node is less than the preset space, the latest installation package of the third application is run through the master node.
9. A control device for an application, characterized in that: A vehicle system applied to a vehicle, the vehicle system comprising a master node and a plurality of slave nodes connected to the master node, each of the slave nodes corresponding to at least one application in the vehicle system, the master node being connected to the cloud, and the device comprising: A download module, configured to download and store installation packages of multiple applications from the cloud through the master node based on the configuration file of the vehicle, wherein the multiple applications are the applications indicated by the configuration file; an updating module, configured to download and store an updated installation package of the first application from the cloud through the master node when detecting that the configuration file stored in the cloud indicates that there is an updated first application; a running module, configured to, in response to a second application currently being triggered among the multiple applications, determine a third application currently to be started from the multiple applications through the master node, send a latest installation package of the third application to a target slave node corresponding to the third application through the master node, and run the latest installation package of the third application through the target slave node; Among them, the third application at least includes the second application.
10. A vehicle, characterized in that: The vehicle comprises a control device as claimed in claim 9.
