Resource state synchronization method, device and equipment for multi-interconnection application of vehicle machine, and medium
The status synchronization plug-in library realizes information registration and resource application between multimedia applications, solving the problem of resource allocation status synchronization in vehicle-machine interconnection applications, and improving the resource management efficiency of vehicle-machine system.
Patent Information
- Application Number
- CN202411721570.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-11
AI Technical Summary
In the existing vehicle-machine interconnection method, each application is operated in different processes, resulting in the inability to synchronize the allocation status of vehicle-machine audio and video resources in a timely manner, reducing the operating efficiency of vehicle-machine and complicating the judgment of resource allocation status.
Through the status synchronization plug-in library, information registration and resource application between multiple multimedia applications can be realized, resource allocation status information of audio and video resources can be synchronized, and resource grabbing requests can be processed through priority comparison to ensure timely synchronization of resource allocation status.
The timely synchronization of the allocation status of vehicle audio and video resources by various interconnected applications is achieved, and the efficiency of vehicle system management of interconnected devices and in-vehicle resource status is improved.
Smart Images

Figure CN119597846A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle-machine interconnection technology, and in particular to a resource status synchronization method, device, equipment and medium for vehicle-machine multi-interconnection applications. Background Art
[0002] At present, the commonly used car-machine interconnection methods include Carplay, AndroidAuto, and mobile phone Bluetooth. Carplay and AndroidAuto both use SDKs or other resources provided by their official websites to develop functions. Bluetooth develops functions based on the protocol stack provided by the Bluetooth protocol stack supplier. In the car-machine system, Carplay, AndroidAuto, and Bluetooth usually run in different processes. Each application uses its own defined state. Since each interconnected application runs in a different process, the allocation status of the audio and video resources of the car machine cannot be synchronized in time, which reduces the operating efficiency of the car machine and brings a lot of trouble to the processing of local events of the car machine. Different interconnected devices have different definitions of the allocation status of audio and video resources, and they cannot be uniformly defined with each other, resulting in complex judgments on the resource allocation status between each interconnected application and between the local events of the car machine. Therefore, how to synchronize the resource status of multiple interconnected applications of the car machine has become a technical issue that cannot be underestimated. Summary of the invention
[0003] In view of this, the purpose of this application is to provide a resource status synchronization method, device, equipment and medium for multiple interconnected applications in a car computer, so as to achieve timely synchronization of the allocation status of the audio and video resources of the car computer when each interconnected application runs in different processes, thereby improving the efficiency of the car computer system in managing the status of interconnected devices and resources within the car computer.
[0004] The embodiment of the present application provides a resource status synchronization method for multi-interconnected applications of a vehicle, and the resource status synchronization method includes:
[0005] Multiple multimedia applications register information based on the registration interface of the state synchronization plug-in library, and determine multiple target applications after the information registration is successful; wherein the multimedia applications include interconnected applications and local applications;
[0006] The first target application sends first parameter information for applying for target audio and video resources based on the resource application interface of the state synchronization plug-in library. If the application of the first target application is successful, the resource allocation status information of the target audio and video resources is synchronized to other target applications through the state synchronization plug-in library; wherein the resource allocation status information includes resource holder information, held resource status information and priority information;
[0007] If second parameter information sent by a second target application to apply for the target audio and video resources is received, a priority comparison is performed based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resources; if the application is successful, the resource allocation status information of the target audio and video resources is updated, and the updated resource allocation status information is synchronized to other target applications.
[0008] In a possible implementation manner, performing a priority comparison based on the resource allocation state information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resource includes:
[0009] Detecting whether the priority information in the second parameter information is greater than or equal to the priority information in the resource allocation status information;
[0010] If so, the second target application successfully applies for the target audio and video resources;
[0011] If not, the second target application fails to apply for the target audio and video resources.
[0012] In a possible implementation manner, after the first target application sends first parameter information for applying for a target audio and video resource based on a resource application interface of the state synchronization plug-in library, if the first target application successfully applies, the resource allocation state information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library, the resource state synchronization method further includes:
[0013] Recording data of application result information of the first target application and event processing status information of the first target application on the target audio and video resource based on the status synchronization plug-in library;
[0014] After the next vehicle computer is started, the last event processing status information is obtained based on the status synchronization plug-in library, and whether the last event processing status information is completed is detected. If not, the target application is continuously controlled to process the last event processing status information.
[0015] In a possible implementation manner, when the second parameter information for applying for the target audio and video resource sent by the second target application is received, a priority comparison is performed based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resource. If the application is successful, the resource allocation status information of the target audio and video resource is updated, and after the updated resource allocation status information is synchronized to other target applications, the resource status synchronization method includes:
[0016] If the event processing status information of the target audio and video resource by the second target application is completed, the second target application is controlled to release the target audio and video resource, and a target application whose event processing status information is interrupted is checked in the data record of the status synchronization plug-in library;
[0017] If so, the target audio and video resources are allocated to the interrupted target application, and the event processing state of the target application is restored so that the target application continues to process the target audio and video resources.
[0018] In a possible implementation manner, after the first target application sends first parameter information for applying for a target audio and video resource based on a resource application interface of the state synchronization plug-in library, if the first target application successfully applies, the resource allocation state information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library, the resource state synchronization method further includes:
[0019] If the first target application is the local application, the type of the local event and the status of the local event are updated based on the status synchronization plug-in library, and the updated type of the local event and the status of the local event are notified to other target applications.
[0020] In a possible implementation manner, after the first target application sends first parameter information for applying for a target audio and video resource based on a resource application interface of the state synchronization plug-in library, if the first target application successfully applies, the resource allocation state information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library, the resource state synchronization method further includes:
[0021] If the first target application is an interconnected application, the resource holder information received by the other interconnected applications is the vehicle computer, and the resource holder information received by the other local applications is the interconnected device;
[0022] If the first target application is a local application, the resource holder information received by other target applications is all from the vehicle computer.
[0023] The embodiment of the present application also provides a resource status synchronization device for multi-interconnected applications of a vehicle machine, and the resource status synchronization device includes:
[0024] A registration module, used for multiple multimedia applications to register information based on the registration interface of the state synchronization plug-in library, and determine multiple target applications after the information registration is successful; wherein the multimedia applications include interconnected applications and local applications;
[0025] A resource application module, used for the first target application to send first parameter information for applying for target audio and video resources based on the resource application interface of the state synchronization plug-in library, and if the first target application succeeds, the resource allocation status information of the target audio and video resources is synchronized to other target applications through the state synchronization plug-in library; wherein the resource allocation status information includes resource holder information, held resource status information and priority information;
[0026] The resource grabbing module is used to, upon receiving the second parameter information sent by the second target application to apply for the target audio and video resources, perform a priority comparison based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resources; if the application is successful, update the resource allocation status information of the target audio and video resources, and synchronize the updated resource allocation status information to other target applications.
[0027] In a possible implementation manner, when the resource grabbing module is used to perform a priority comparison based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resource, the resource grabbing module is specifically used to:
[0028] Detecting whether the priority information in the second parameter information is greater than or equal to the priority information in the resource allocation status information;
[0029] If so, the second target application successfully applies for the target audio and video resources;
[0030] If not, the second target application fails to apply for the target audio and video resources.
[0031] An embodiment of the present application also provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the resource status synchronization method for multi-interconnected vehicle applications as described above are performed.
[0032] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the resource status synchronization method for multi-connected vehicle applications as described above are executed.
[0033] The embodiment of the present application provides a resource status synchronization method, device, equipment and medium for multiple interconnected applications of a vehicle machine, wherein the resource status synchronization method comprises: a plurality of multimedia applications register information based on a registration interface of a state synchronization plug-in library, and determine a plurality of target applications after successful information registration; wherein the multimedia applications include interconnected applications and local applications; a first target application sends first parameter information for applying for a target audio and video resource based on a resource application interface of the state synchronization plug-in library, and if the first target application successfully applies, the resource allocation status information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library; wherein the resource allocation status information comprises resource holder information, resource holding status information and priority information; if second parameter information for applying for the target audio and video resource sent by a second target application is received, a priority comparison is performed based on the resource allocation status information and the second parameter information to determine whether the second target application successfully applies for the target audio and video resource, and if the application is successful, the resource allocation status information of the target audio and video resource is updated, and the updated resource allocation status information is synchronized to other target applications. It enables timely synchronization of the allocation status of the audio and video resources of the vehicle computer when various interconnected applications are running in different processes, which can improve the efficiency of the vehicle computer system in managing the status of interconnected devices and resources within the vehicle computer.
[0034] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A flow chart of a method for synchronizing resource status of multi-connected applications of a vehicle machine provided in an embodiment of the present application;
[0037] Figure 2 One of the structural schematic diagrams of a resource status synchronization device for multi-interconnected applications of a vehicle machine provided in an embodiment of the present application;
[0038] Figure 3 A second structural diagram of a resource status synchronization device for multi-interconnected applications of a vehicle machine provided in an embodiment of the present application;
[0039] Figure 4A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0041] First, the application scenarios to which this application is applicable are introduced. This application can be applied in the field of vehicle-machine interconnection technology.
[0042] According to research, the commonly used car-machine interconnection methods include Carplay, AndroidAuto, and mobile phone Bluetooth. Carplay and AndroidAuto both use SDKs or other resources provided by their official websites to develop functions. Bluetooth develops functions based on the protocol stack provided by the Bluetooth protocol stack supplier. In the car-machine system, Carplay, AndroidAuto, and Bluetooth usually run in different processes. Each application uses its own defined state. Since each interconnected application runs in a different process, the allocation status of the audio and video resources of the car machine cannot be synchronized in time, which reduces the operating efficiency of the car machine and brings a lot of trouble to the processing of local events of the car machine. Different interconnected devices have different definitions of the allocation status of audio and video resources, and they cannot be uniformly defined with each other, resulting in complex judgments on the resource allocation status between various interconnected applications and between local events of the car machine. Therefore, how to synchronize the resource status of multiple interconnected applications of the car machine has become a technical issue that cannot be underestimated.
[0043] Based on this, an embodiment of the present application provides a method for synchronizing the resource status of multiple interconnected applications in a vehicle computer, which enables timely synchronization of the allocation status of the audio and video resources of the vehicle computer when each interconnected application runs in different processes, thereby improving the efficiency of the vehicle computer system in managing the status of interconnected devices and resources within the vehicle computer.
[0044] See also Figure 1 , Figure 1 This is a flow chart of a resource status synchronization method for multiple interconnected applications of a vehicle provided in an embodiment of the present application. Figure 1As shown in , the resource status synchronization method provided by the embodiment of the present application includes:
[0045] S101: multiple multimedia applications register information based on a registration interface of a state synchronization plug-in library, and determine multiple target applications after successful information registration; wherein the multimedia applications include interconnected applications and local applications.
[0046] In this step, multiple multimedia applications register information according to the registration interface of the state synchronization plug-in library, and multiple target applications are determined after the information registration is successful.
[0047] The multimedia applications include Internet applications and local applications.
[0048] Here, the state synchronization plug-in library is a local plug-in library. The application registers itself in the state synchronization plug-in library. Only the target application that has been successfully registered can synchronize resource status and apply for resources.
[0049] S102: The first target application sends first parameter information for applying for target audio and video resources based on the resource application interface of the status synchronization plug-in library. If the application of the first target application is successful, the resource allocation status information of the target audio and video resources is synchronized to other target applications through the status synchronization plug-in library; wherein the resource allocation status information includes resource holder information, held resource status information and priority information.
[0050] In this step, the first target application sends the first parameter information for applying for the target audio and video resources according to the resource application interface of the state synchronization plug-in library. If the first target application succeeds in the application, the resource allocation status information of the target audio and video resources is synchronized to other target applications through the state synchronization plug-in library.
[0051] The first parameter information includes the resource status and the priority of the resource being applied for. For example, if the parameter is Transient or Never, the audio resource is acquired temporarily and has the highest priority and cannot be grabbed by other applications. If it is Gain or User, it means that the audio resource is acquired and has a priority of User, which can be grabbed by "a higher level application action (never level)" or "the user actively switches the ownership of the audio resource (user level)".
[0052] Here, after the first target application successfully applies, the status synchronization plug-in library will synchronize the resource allocation status information of the current audio and video resources to other registered target applications through the callback interface. The resource allocation status information can be Accessory, Gain, and User, indicating that for each target application, the audio and video resources are now held by the vehicle computer and can be snatched by User-level applications.
[0053] The management of audio and video resources is divided into holders, resource status types, and resource grabbing priorities. The design process of resource allocation status information is shown in the following table:
[0054]
[0055] After defining the resource allocation status information, no matter it is a local event of the vehicle or an interconnected device, when applying for audio and video resources, each type of application will be recorded. At the same time, different types of interconnected devices and different interconnected devices of the same type are recorded in the vehicle file in the form of a table, which is convenient for management and restoration of the device status at the last connection.
[0056] S103: If the second parameter information sent by the second target application to apply for the target audio and video resources is received, a priority comparison is performed based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resources; if the application is successful, the resource allocation status information of the target audio and video resources is updated, and the updated resource allocation status information is synchronized to other target applications.
[0057] In this step, if the second parameter information sent by the second target application to apply for the target audio and video resources is received, a priority comparison is performed based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resources. If the application is successful, the resource allocation status information of the target audio and video resources is updated, and the updated resource allocation status information is synchronized to other target applications.
[0058] In a possible implementation manner, performing a priority comparison based on the resource allocation state information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resource includes:
[0059] A: Detect whether the priority information in the second parameter information is greater than or equal to the priority information in the resource allocation status information.
[0060] Here, it is detected whether the priority information in the second parameter information is greater than or equal to the priority information in the resource allocation state information.
[0061] B: If yes, the second target application successfully applies for the target audio and video resources; if no, the second target application fails to apply for the target audio and video resources.
[0062] Here, if yes, the second target application successfully applies for the target audio and video resources; if no, the second target application fails to apply for the target audio and video resources.
[0063] In a possible implementation manner, after the first target application sends first parameter information for applying for a target audio and video resource based on a resource application interface of the state synchronization plug-in library, if the first target application successfully applies, the resource allocation state information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library, the resource state synchronization method further includes:
[0064] (1): Based on the status synchronization plug-in library, data is recorded on the application result information of the first target application and the event processing status information of the first target application on the target audio and video resources.
[0065] Here, data is recorded based on the status synchronization plug-in library for the application result information of the first target application and the event processing status information of the first target application on the target audio and video resources.
[0066] The application result information includes the target audio and video resources applied for by the first target application and the first parameter information of the application. The event processing status information is the processing status of the target audio and video resources.
[0067] Among them, the event processing status information includes the following types: event processing status information ON represents that the event occurs normally, event processing status information OFF represents that the event ends normally, event processing status information Interrupt represents that the event is interrupted when it occurs, and event processing status information Recover represents that the event is restored after interruption.
[0068] (2): After the next vehicle computer is started, the last event processing status information is obtained based on the status synchronization plug-in library, and whether the last event processing status information is completed is detected. If not, the target application is continued to process the last event processing status information.
[0069] Here, after the next car computer is started, the last event processing status information is obtained according to the status synchronization plug-in library, and it is detected whether the last event processing status information is completed. If not, the target application corresponding to the last time continues to be controlled to process the last event processing status information.
[0070] In a specific embodiment, the status synchronization plug-in library will record the application result and event processing status information. The application result and event processing status information are saved in a local path that is not deleted when the power is off. After the next car computer is started, the last event processing status and resource type of the car computer under this path will be read. If it is found that the event has not ended, the unfinished event will be continued. At the same time, the event status and resource status will be synchronized to each application after the application is successfully registered. If an interconnected application applies for a resource, the mac address of the interconnected device will be recorded in the path that is not deleted when the power is off, and its mac address and the corresponding resource status will be associated and saved, so that the status of different interconnected devices can be remembered.
[0071] In a possible implementation manner, when the second parameter information for applying for the target audio and video resource sent by the second target application is received, a priority comparison is performed based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resource. If the application is successful, the resource allocation status information of the target audio and video resource is updated, and after the updated resource allocation status information is synchronized to other target applications, the resource status synchronization method includes:
[0072] a: If the event processing status information of the target audio and video resource by the second target application is completed, the second target application is controlled to release the target audio and video resource, and the data record of the status synchronization plug-in library is checked whether there is a target application whose event processing status information is interrupted.
[0073] Here, if the event processing status information of the target audio and video resource by the second target application is completed, the second target application is controlled to release the target audio and video resource, and the data record of the status synchronization plug-in library is checked to see whether there is a target application whose event processing status information is interrupted.
[0074] b: If yes, the target audio and video resources are allocated to the interrupted target application, and the event processing state of the target application is restored so that the target application continues to process the target audio and video resources.
[0075] Here, if yes, the target audio and video resources are allocated to the interrupted target application, and the event processing state of the target application is restored so that the target application continues to process the target audio and video resources. If no, the resource grabbing requests of other target applications are continued.
[0076] In a specific embodiment, if the second target application applies for audio resources and the first target application does not release the resources, the parameters carried by the second target application are used to determine whether the application is successful. By grabbing the priority, if the first application is not the highest priority, the second application can apply successfully as long as the priority is greater than or equal to the priority of the first application. At this time, for the first application, its event status is Interrupt: interrupted when the event occurs. At the same time, the state synchronization plug-in library will synchronize the resource status to each registered application. In addition, the interruption status will be synchronized to the first target application to trigger the processing event when the first target application is interrupted. The plug-in library will record the result of the interruption application, and record the event processing status information and resource allocation status information of the first target application and the second target application. When the second target application event is completed, its event processing status information is off, and the second target application releases the audio resources. At the same time, the state synchronization plug-in library will check whether there is an interrupted event. If it is detected that the first target application has an interrupted event processing status information, the first target application is notified to update its event processing status information to Recover, and the audio resources are given to the first target application so that the first target application can process it.
[0077] In a possible implementation manner, after the first target application sends first parameter information for applying for a target audio and video resource based on a resource application interface of the state synchronization plug-in library, if the first target application successfully applies, the resource allocation state information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library, the resource state synchronization method further includes:
[0078] If the first target application is the local application, the type of the local event and the status of the local event are updated based on the status synchronization plug-in library, and the updated type of the local event and the status of the local event are notified to other target applications.
[0079] Here, if the first target application is a local application, the type of the local event and the status of the local event are updated according to the status synchronization plug-in library, and the updated type of the local event and the status of the local event are notified to other target applications.
[0080] Among them, the types of local events include local voice, reversing image, radar alarm, local music, etc.
[0081] In a possible implementation manner, after the first target application sends first parameter information for applying for a target audio and video resource based on a resource application interface of the state synchronization plug-in library, if the first target application successfully applies, the resource allocation state information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library, the resource state synchronization method further includes:
[0082] If the first target application is an interconnected application, the resource holder information received by other interconnected applications is the vehicle computer, and the resource holder information received by other local applications is the interconnected device; if the first target application is a local application, the resource holder information received by other target applications is all the vehicle computer.
[0083] Here, if the interconnected application obtains the resource, then for other interconnected applications, the received synchronization information will show that the resource holder is the vehicle computer, and for local applications, the received synchronization information will show that the resource holder is the interconnected device; if the local application obtains the resource, the received synchronization information of the interconnected application will show that the resource holder is the vehicle computer. For local applications, the received synchronization information will show that the resource holder is also the vehicle computer.
[0084] In this application, the SDKs or resources provided by Carplay, AndroidAuto, and the Bluetooth protocol stack are grouped together to obtain the interconnection status reported by them, and convert their status into the vehicle resource status. The status of the local events of the vehicle is also updated by receiving callbacks and synchronized to the status synchronization plug-in library. The status of interconnected devices and the status of local events of the vehicle are managed uniformly, and a singleton pattern design is used to ensure the synchronization of each state. The vehicle resource status, interconnection status, and local event status of the vehicle are encapsulated and provided to the upper-level application, and the resource application, update, and viewing interfaces are provided to each interconnected application and local event application to improve the efficiency of the overall internal synchronization of the vehicle.
[0085] An embodiment of the present application provides a resource status synchronization method for multiple interconnected applications of a vehicle machine, the resource status synchronization method comprising: multiple multimedia applications register information based on a registration interface of a state synchronization plug-in library, and determine multiple target applications after successful information registration; wherein the multimedia applications include interconnected applications and local applications; a first target application sends first parameter information for applying for a target audio and video resource based on a resource application interface of the state synchronization plug-in library, and if the first target application succeeds in applying, then the resource allocation status information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library; wherein the resource allocation status information includes resource holder information, resource holding status information, and priority information; if second parameter information for applying for the target audio and video resource sent by a second target application is received, a priority comparison is performed based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resource, and if the application is successful, then the resource allocation status information of the target audio and video resource is updated, and the updated resource allocation status information is synchronized to other target applications. It enables timely synchronization of the allocation status of the audio and video resources of the vehicle computer when various interconnected applications are running in different processes, which can improve the efficiency of the vehicle computer system in managing the status of interconnected devices and resources within the vehicle computer.
[0086] See also Figure 2 , Figure 3 , Figure 2 One of the structural schematic diagrams of a resource status synchronization device for multi-interconnected applications of a vehicle machine provided in an embodiment of the present application; Figure 3 The second structural diagram of a resource status synchronization device for multi-connected applications of a vehicle machine provided in an embodiment of the present application. Figure 2 As shown in , the resource status synchronization device 200 of the vehicle-machine multi-interconnection application includes:
[0087] The registration module 210 is used for multiple multimedia applications to register information based on the registration interface of the state synchronization plug-in library, and determine multiple target applications after the information registration is successful; wherein the multimedia applications include interconnected applications and local applications;
[0088] The resource application module 220 is used for the first target application to send the first parameter information for applying for the target audio and video resources based on the resource application interface of the state synchronization plug-in library. If the first target application succeeds in the application, the resource allocation state information of the target audio and video resources is synchronized to other target applications through the state synchronization plug-in library; wherein the resource allocation state information includes resource holder information, held resource state information and priority information;
[0089] The resource grabbing module 230 is used to, upon receiving the second parameter information sent by the second target application to apply for the target audio and video resources, perform a priority comparison based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resources; if the application is successful, update the resource allocation status information of the target audio and video resources, and synchronize the updated resource allocation status information to other target applications.
[0090] Further, when the resource grabbing module 220 is used to perform a priority comparison based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resource, the resource grabbing module 220 is specifically used to:
[0091] Detecting whether the priority information in the second parameter information is greater than or equal to the priority information in the resource allocation status information;
[0092] If so, the second target application successfully applies for the target audio and video resources;
[0093] If not, the second target application fails to apply for the target audio and video resources.
[0094] Further, such as Figure 3 As shown, the resource state synchronization device 200 further includes an event recovery processing module 240, and the event recovery processing module 240 is used to:
[0095] Recording data of application result information of the first target application and event processing status information of the first target application on the target audio and video resource based on the status synchronization plug-in library;
[0096] After the next vehicle computer is started, the last event processing status information is obtained based on the status synchronization plug-in library, and whether the last event processing status information is completed is detected. If not, the target application is continuously controlled to process the last event processing status information.
[0097] Furthermore, the event recovery processing module 240 is also used for:
[0098] If the event processing status information of the target audio and video resource by the second target application is completed, the second target application is controlled to release the target audio and video resource, and a target application whose event processing status information is interrupted is checked in the data record of the status synchronization plug-in library;
[0099] If so, the target audio and video resources are allocated to the interrupted target application, and the event processing state of the target application is restored so that the target application continues to process the target audio and video resources.
[0100] Further, such as Figure 3 As shown, the resource status synchronization device 200 further includes an updating module 250, and the updating module 250 is used to:
[0101] If the first target application is the local application, the type of the local event and the status of the local event are updated based on the status synchronization plug-in library, and the updated type of the local event and the status of the local event are notified to other target applications.
[0102] Furthermore, the resource application module 220 is also used for:
[0103] If the first target application is an interconnected application, the resource holder information received by the other interconnected applications is the vehicle computer, and the resource holder information received by the other local applications is the interconnected device;
[0104] If the first target application is a local application, the resource holder information received by other target applications is all from the vehicle computer.
[0105] The embodiment of the present application provides a resource status synchronization device for multiple interconnected applications of a vehicle machine, the resource status synchronization device comprising: a registration module, for multiple multimedia applications to register information based on a registration interface of a state synchronization plug-in library, and determine multiple target applications after successful information registration; wherein the multimedia applications include interconnected applications and local applications; a resource application module, for a first target application to send first parameter information for applying for a target audio and video resource based on the resource application interface of the state synchronization plug-in library, and if the first target application succeeds in applying, then the resource allocation status information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library; wherein the resource allocation status information includes resource holder information, resource holding status information and priority information; a resource grabbing module, for, when receiving second parameter information sent by a second target application for applying for the target audio and video resource, performing a priority comparison based on the resource allocation status information and the second parameter information, determining whether the second target application has successfully applied for the target audio and video resource, and if the application is successful, then updating the resource allocation status information of the target audio and video resource, and synchronizing the updated resource allocation status information to other target applications. It enables timely synchronization of the allocation status of the audio and video resources of the vehicle computer when various interconnected applications are running in different processes, which can improve the efficiency of the vehicle computer system in managing the status of interconnected devices and resources within the vehicle computer.
[0106] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown in , the electronic device 400 includes a processor 410 , a memory 420 and a bus 430 .
[0107] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, the above-mentioned Figure 1 The steps of the resource status synchronization method for multiple interconnected applications of the vehicle machine in the method embodiment shown in the embodiment, the specific implementation method can be referred to the method embodiment, and will not be repeated here.
[0108] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 The steps of the resource status synchronization method for multiple interconnected applications of the vehicle machine in the method embodiment shown in the embodiment, the specific implementation method can be referred to the method embodiment, and will not be repeated here.
[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0110] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0111] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0112] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0113] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0114] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A resource status synchronization method for multi-interconnected applications of a vehicle, characterized in that: The resource status synchronization method comprises: Multiple multimedia applications register information based on the registration interface of the state synchronization plug-in library, and determine multiple target applications after the information registration is successful; wherein the multimedia applications include interconnected applications and local applications; The first target application sends first parameter information for applying for target audio and video resources based on the resource application interface of the state synchronization plug-in library. If the application of the first target application is successful, the resource allocation status information of the target audio and video resources is synchronized to other target applications through the state synchronization plug-in library; wherein the resource allocation status information includes resource holder information, held resource status information and priority information; If second parameter information sent by a second target application to apply for the target audio and video resources is received, a priority comparison is performed based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resources; if the application is successful, the resource allocation status information of the target audio and video resources is updated, and the updated resource allocation status information is synchronized to other target applications.
2. The resource status synchronization method according to claim 1, characterized in that: The performing priority comparison based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resource includes: Detecting whether the priority information in the second parameter information is greater than or equal to the priority information in the resource allocation status information; If so, the second target application successfully applies for the target audio and video resources; If not, the second target application fails to apply for the target audio and video resources.
3. The resource status synchronization method according to claim 1, characterized in that: After the first target application sends first parameter information for applying for a target audio and video resource based on a resource application interface of the state synchronization plug-in library, and if the first target application succeeds, the resource allocation state information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library, the resource state synchronization method further includes: Recording data of application result information of the first target application and event processing status information of the first target application on the target audio and video resource based on the status synchronization plug-in library; After the next vehicle computer is started, the last event processing status information is obtained based on the status synchronization plug-in library, and whether the last event processing status information is completed is detected. If not, the target application is continuously controlled to process the last event processing status information.
4. The resource status synchronization method according to claim 1, characterized in that: When receiving the second parameter information sent by the second target application to apply for the target audio and video resource, a priority comparison is performed based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resource, and if the application is successful, the resource allocation status information of the target audio and video resource is updated, and after the updated resource allocation status information is synchronized to other target applications, the resource status synchronization method includes: If the event processing status information of the target audio and video resource by the second target application is completed, the second target application is controlled to release the target audio and video resource, and a target application whose event processing status information is interrupted is checked in the data record of the status synchronization plug-in library; If so, the target audio and video resources are allocated to the interrupted target application, and the event processing state of the target application is restored so that the target application continues to process the target audio and video resources.
5. The resource status synchronization method according to claim 3, characterized in that: After the first target application sends first parameter information for applying for a target audio and video resource based on a resource application interface of the state synchronization plug-in library, and if the first target application succeeds, the resource allocation state information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library, the resource state synchronization method further includes: If the first target application is the local application, the type of the local event and the status of the local event are updated based on the status synchronization plug-in library, and the updated type of the local event and the status of the local event are notified to other target applications.
6. The resource status synchronization method according to claim 1, characterized in that: After the first target application sends first parameter information for applying for a target audio and video resource based on a resource application interface of the state synchronization plug-in library, and if the first target application succeeds, the resource allocation state information of the target audio and video resource is synchronized to other target applications through the state synchronization plug-in library, the resource state synchronization method further includes: If the first target application is an interconnected application, the resource holder information received by the other interconnected applications is the vehicle computer, and the resource holder information received by the other local applications is the interconnected device; If the first target application is a local application, the resource holder information received by other target applications is all from the vehicle computer.
7. A resource status synchronization device for multi-connected applications of a vehicle, characterized in that: The resource status synchronization device comprises: A registration module, used for multiple multimedia applications to register information based on the registration interface of the state synchronization plug-in library, and determine multiple target applications after the information registration is successful; wherein the multimedia applications include interconnected applications and local applications; A resource application module, used for the first target application to send first parameter information for applying for target audio and video resources based on the resource application interface of the state synchronization plug-in library, and if the first target application succeeds, the resource allocation status information of the target audio and video resources is synchronized to other target applications through the state synchronization plug-in library; wherein the resource allocation status information includes resource holder information, held resource status information and priority information; The resource grabbing module is used to, upon receiving the second parameter information sent by the second target application to apply for the target audio and video resources, perform a priority comparison based on the resource allocation status information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resources; if the application is successful, update the resource allocation status information of the target audio and video resources, and synchronize the updated resource allocation status information to other target applications.
8. The resource status synchronization device according to claim 7, characterized in that: When the resource grabbing module is used to perform a priority comparison based on the resource allocation state information and the second parameter information to determine whether the second target application has successfully applied for the target audio and video resource, the resource grabbing module is specifically used to: Detecting whether the priority information in the second parameter information is greater than or equal to the priority information in the resource allocation status information; If so, the second target application successfully applies for the target audio and video resources; If not, the second target application fails to apply for the target audio and video resources.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor when running to execute the steps of the resource status synchronization method for multi-interconnected vehicle applications as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the resource status synchronization method for multi-connected applications of a vehicle machine as claimed in any one of claims 1 to 6 are executed.