Information acquisition method, vehicle and storage medium
By monitoring the window management service of the vehicle infotainment system, the system obtains the window event times of the target application and combines them with the vehicle's operating status and the intensity of application interaction, thus solving the problem of the accuracy of application usage time information in the vehicle infotainment system and achieving more accurate statistical results.
Patent Information
- Application Number
- CN202510889702.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-17
AI Technical Summary
In vehicle infotainment systems based on the Android platform, existing technologies struggle to accurately obtain application usage time information. In particular, defects such as chaotic state in multi-screen/split-screen scenarios, inability to perceive non-Activity pages, and failure to determine ownership when displaying multiple screens lead to statistical biases.
By monitoring the window management service of the vehicle's infotainment system, the system obtains the times when windows of the target application are added and removed. It then uses these times to calculate the usage time of the application and combines the vehicle's operating status and the intensity of application interaction to perform differentiated time deduction and compensation.
It improves the accuracy and objectivity of application usage time information, can more accurately identify the impact of vehicle operating status on application usage time, ensures the continuity and integrity of statistical data, and adapts to the refined statistics in the context of vehicle-to-grid communication.
Smart Images

Figure CN120803843A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of car machine system, and more particularly, to an information acquisition method, a vehicle and a storage medium in the technical field of car machine system. BACKGROUND
[0002] In a car machine system based on an Android platform, acquiring the use duration of an application in the car machine system is of great significance for optimizing user experience and system performance. In related technologies, the use duration information is collected by listening to Activity related events of the application. Due to the defects such as state confusion in multi-screen / split-screen scenarios, non-Activity pages cannot be perceived, and attribution determination fails when multiple screens are displayed, the use duration acquisition method based on Activity cannot accurately reflect the actual use of the application. Therefore, how to improve the accuracy of the use duration information of the application in the car machine system has become a technical problem to be solved. SUMMARY
[0003] The present application provides an information acquisition method, a vehicle and a storage medium, which can improve the accuracy of the use duration information of the target application.
[0004] In a first aspect, an information acquisition method is provided, which comprises:
[0005] After the car machine system is started, an event listening is performed on a window management service of the car machine system;
[0006] When a first event corresponding to a window addition request of a target application in the car machine system is listened to, a first time corresponding to the first event is acquired, the window addition request is used to request the window management service to add a window component of the target application, and the window component is used to display an associated component of the target application;
[0007] When a second event corresponding to a window removal request of the target application is listened to, a second time corresponding to the second event is acquired, the window removal request is used to request the window management service to remove the window component of the target application;
[0008] According to the first time and the second time, the use duration information of the target application is determined.
[0009] Through the above scheme, the event listening is realized by listening to the window management service, all associated components displayed through the window component under the target application can be accurately identified, the use state of the target application is reflected, and thus the accuracy of the use duration information of the target application is improved.
[0010] In a possible implementation manner of the first aspect, the determining the usage duration information of the target application according to the first time and the second time comprises: determining first duration information according to the first time and the second time; and performing duration deduction on the first duration information according to pre-acquired invalid duration information to obtain the usage duration information of the target application, the invalid duration information being determined based on running information of a vehicle to which the vehicle machine system belongs between the first time and the second time.
[0011] By introducing the deduction mechanism of the invalid duration information, the non-actual usage duration caused by the running state of the vehicle can be excluded, so that the usage duration information of the target application finally obtained is closer to the actual user usage, and the objectivity and accuracy of the usage duration information are improved.
[0012] In a possible implementation manner of the first aspect and the above implementation manner, the running information comprises speed information, the invalid duration information comprises second duration information, and the method further comprises: acquiring speed information of the vehicle between the first time and the second time; and if the speed information indicates that a driving speed of the vehicle is greater than a preset speed threshold, determining the second duration information according to a duration during which the driving speed is greater than the preset speed threshold.
[0013] By introducing the invalid duration determination mechanism based on the speed information, the influence period of the running state of the vehicle on the application usage duration statistics can be more accurately identified, and is used as a basis for subsequent duration deduction, so that the usage duration information finally determined is more objective and accurate.
[0014] In a possible implementation manner of the first aspect and the above implementation manner, the running information further comprises running mode information, the invalid duration information further comprises third duration information, and if the speed information indicates that the driving speed of the vehicle is less than or equal to the preset speed threshold, the method further comprises: acquiring running mode information of the vehicle; and if the running mode information indicates that the vehicle is in a sentry mode, determining the third duration information according to a duration during which the vehicle is in the sentry mode.
[0015] By introducing the double invalid duration determination mechanism based on the speed information and the running mode information, the influence period of the running state of the vehicle on the application usage duration statistics can be more accurately identified. In this way, the high-speed driving state and the sentry mode are used as independent invalid duration determination conditions, different deduction strategies can be adopted for different scenarios, and the usage duration information finally determined is more objective and accurate.
[0016] In a possible implementation manner of the first aspect, the first time length information is obtained according to the invalid time length information, including: if the target application is a first type application, the second time length information and the third time length information are deducted from the first time length information to obtain the use time length information of the target application; if the target application is a second type application, the third time length information is deducted from the first time length information to obtain the use time length information of the target application, and the interaction intensity of the first type application is higher than that of the second type application.
[0017] Through the above scheme, the differentiated deduction strategy associated with the application interaction intensity is established, which can more accurately distinguish the real use scenario and the invalid statistical period. For the first type application requiring high interaction, the high-speed driving and sentinel mode period are deducted at the same time; for the second type application requiring low interaction, only the sentinel mode period is deducted. This hierarchical processing mechanism based on application characteristics not only avoids the statistical distortion caused by excessive deduction, but also ensures the rationality of the deduction period, thereby significantly improving the matching degree of the use time length information and the actual user use situation.
[0018] In a possible implementation manner of the first aspect, the first time length information is determined according to the first time and the second time, including: the fourth time length information is determined according to the first time and the second time; the fifth time length information of the target application is obtained, the fifth time length information indicating a to-be-compensated time length of the target application generated before the first time; and the fourth time length information is compensated according to the fifth time length information of the target application to obtain the first time length information.
[0019] Through the above scheme, by introducing the compensation mechanism based on historical data, the application use time length statistical interruption problem caused by system abnormalities can be effectively solved, the continuity and integrity of the statistical data are ensured, and the accuracy and reliability of the use time length information are improved.
[0020] In a possible implementation manner of the first aspect, before the first time, the method further includes: when a third event corresponding to a window addition request of the target application is listened to, a third time corresponding to the third event is obtained; based on a preset period, a system time of the vehicle machine system is obtained, and the fifth time length information of the target application is determined according to the third time and the system time, and the fifth time length information of the target application is cleared when a fourth event corresponding to a window removal request of the target application is listened to.
[0021] Through the above scheme, by establishing a periodic compensation recording mechanism during the display of the target application window, the use time data that may be lost due to system abnormal interruption can be saved in real time. Among them, the system time based on the preset period ensures the timeliness of the compensation data, and the zero operation when the window is removed maintains the statistical accuracy under normal circumstances, effectively solving the problem of data loss caused by system or application crash.
[0022] With the first aspect and the above implementation, in some possible implementation, the target application is configured to display the screen projection content of the mobile device connected with the car machine system, and the method further comprises: calling a preset interface in the car machine system, obtaining a state notification set sent by the mobile device between the first time and the second time, the state notification set comprising state notifications of each sub-application in the mobile device; and determining sub-use time information of each sub-application in the use time information according to the state notifications of each sub-application.
[0023] Through the above scheme, by establishing a state notification transmission mechanism between the car machine system and the mobile device, the actual use of each sub-application in the mobile device can be accurately obtained. Among them, the preset interface ensures the reception of the state notification, and the sub-time calculation realizes the fine statistics of the screen projection content, effectively solving the problem that the use time of the mobile device sub-application cannot be distinguished in the related art, making the use time statistics of the application in the car-mobile interconnection scene more comprehensive and accurate.
[0024] The second aspect provides an information acquisition device, which comprises:
[0025] A listening unit is configured to listen to a window management service of the car machine system after the car machine system is started;
[0026] A first acquisition unit is configured to acquire a first time corresponding to a first event when the first event corresponding to a window addition request of a target application in the car machine system is listened to, the window addition request being used to request the window management service to add a window component of the target application, and the window component being used to display an associated component of the target application;
[0027] A second acquisition unit is configured to acquire a second time corresponding to a second event when the second event corresponding to a window removal request of the target application is listened to, the window removal request being used to request the window management service to remove the window component of the target application;
[0028] A determination unit is configured to determine use time information of the target application according to the first time and the second time.
[0029] The third aspect provides a vehicle, which comprises:
[0030] A memory is configured to store executable program codes;
[0031] a processor configured to call and run the executable program code from the memory, so that the vehicle executes the method in the first aspect or any possible implementation manner of the first aspect.
[0032] In a fourth aspect, a computer program product is provided, which comprises computer program code, which, when run on a computer, causes the computer to execute the method in the first aspect or any possible implementation manner of the first aspect.
[0033] In a fifth aspect, a computer-readable storage medium is provided, which stores computer program code, which, when run on a computer, causes the computer to execute the method in the first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0034] Figure 1 is an example schematic diagram of obtaining usage duration information based on Activity provided by an embodiment of the present application;
[0035] Figure 2 is a flowchart of an information obtaining method provided by an embodiment of the present application;
[0036] Figure 3 is an example schematic diagram of obtaining usage duration information based on Window provided by an embodiment of the present application;
[0037] Figure 4 is a flowchart of deducting obtained usage duration information provided by an embodiment of the present application;
[0038] Figure 5 is a flowchart of obtaining invalid duration information provided by an embodiment of the present application;
[0039] Figure 6 is an example schematic diagram of obtaining invalid duration information provided by an embodiment of the present application;
[0040] Figure 7 is an example schematic diagram of deducting invalid duration information provided by an embodiment of the present application;
[0041] Figure 8 is a flowchart of compensating obtained first duration information provided by an embodiment of the present application;
[0042] Figure 9 is a flowchart of obtaining fifth duration information based on a preset period provided by an embodiment of the present application;
[0043] Figure 10is an example schematic diagram for compensating for the first time length information provided by an embodiment of the present application.
[0044] Figure 11 is a flowchart of determining sub time length information provided by an embodiment of the present application.
[0045] Figure 12 is an example schematic diagram for determining a relevant time based on a mobile device provided by an embodiment of the present application.
[0046] Figure 13 is a structural schematic diagram of an information acquisition device provided by an embodiment of the present application.
[0047] Figure 14 is a structural schematic diagram of a vehicle provided by an embodiment of the present application. DETAILED DESCRIPTION
[0048] The technical solutions in the present application will be described in detail below with reference to the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B: "and / or" in the text is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, and B exists alone, and in addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0049] Hereinafter, the terms "first" and "second" are only for descriptive purposes, and cannot be understood as implying or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more of the features.
[0050] In the Android platform-based car machine system, obtaining the use time length of the application in the car machine system is of great significance for optimizing user experience and system performance. Please refer to Figure 1 , Figure 1is an example schematic diagram for obtaining usage duration information based on Activity provided by an embodiment of the present application. Wherein, the car machine system listens to the Activity related events of the application through the related interface of ActivityManagerService (Activity management service); when entering the target application, the related interface listens to the Activity creation event of the application, and stores the current system time as the entering time according to the package name of the application to the storage unit; when exiting the target application, the related interface listens to the Activity destruction event of the application, and queries the entering time corresponding to the application according to the package name of the application to the storage unit; then, according to the current system time and the entering time of the application, the time difference between the two is calculated as the usage duration; finally, the corresponding relationship between the usage duration of the application and the package name is saved to the storage unit.
[0051] However, due to the defects such as state confusion in multi-screen / split-screen scenario, non-Activity page cannot be perceived, and attribution determination is invalid when multi-screen is displayed, the Activity-based statistical method is difficult to accurately reflect the actual use of the application.
[0052] Specifically, in terms of state confusion in multi-screen / split-screen scenario, with the upgrade of Android system version, the car machine system supports multiple Activities to be displayed on the screen at the same time, for example, multiple applications each occupy part of the screen space in split-screen mode. The related technical solution listens to the single Activity related event through ActivityManagerService, which cannot accurately determine the actual use state when multiple Activities exist at the same time. When the user switches the operation in different split-screen areas, the system cannot effectively distinguish which Activity is in the actual use state, resulting in deviation of the statistical result. In addition, in the automobile multi-screen display scenario, the main driver screen and the copilot screen may run different applications at the same time, and the Activity-based statistical method is difficult to correctly distinguish the application usage on different screens.
[0053] In terms of non-Activity page cannot be perceived, there are other forms of interfaces presented in the car machine system, such as the floating window of the navigation application, the notification bar control interface of the music player, etc. These interfaces are not implemented through Activity component, and the related technical solution cannot obtain their display state through ActivityManagerService. In addition, part of the system level functions such as the screen projection interface of the car interconnection, its implementation method also bypasses the Activity mechanism, resulting in that the traditional statistical scheme cannot cover this important use scenario.
[0054] In the aspect of home determination failure in multi-screen display, a related vehicle is usually equipped with multiple independent display screens, and each screen can run different applications simultaneously. In the related art, when an application usage state is determined through an Activity life cycle, it is unable to distinguish in which physical screen the Activity is actually displayed. For example, when a main driving screen and a copilot screen simultaneously display different instances of the same application, the system will incorrectly combine the usage time lengths of the two screens for statistics. Similarly, in the scenario of projecting a mobile device to a vehicle machine, a mobile device application is presented through a specific application of the vehicle machine end. The related art is unable to distinguish the relationship between the mobile device application and the projection application of the vehicle machine system, resulting in confusion in the statistics dimension.
[0055] It can be seen that the Activity-based usage time length acquisition manner in the related art has many defects. Therefore, how to improve the accuracy of acquiring the usage time length information of an application in a vehicle machine system becomes a technical problem to be solved urgently.
[0056] To solve the above problems, the scheme provided by the embodiments of the present application mainly includes: first, establishing an event listening mechanism for a window management service after starting the vehicle machine system, when a first event corresponding to a window addition request of a target application is listened to, a first time corresponding to the first event is acquired, the window addition request is used to request the window management service to add a window component of the target application to display its associated component; then, when a second event corresponding to a window removal request of the target application is listened to, a second time corresponding to the second event is acquired, the window removal request is used to request the window management service to remove the window component of the target application; finally, the usage time length information of the target application is determined according to the time difference between the first time and the second time. In this way, by listening to the window management service, all associated components displayed through the window component under the target application can be accurately identified to reflect the usage state of the target application, thereby improving the accuracy of the usage time length information of the target application.
[0057] The embodiments of the present application will be described below in conjunction with Figure 2 Figure 12 The information acquisition method provided by the embodiments of the present application will be described in detail.
[0058] Please refer to Figure 2 , Figure 2 The flowchart of the information acquisition method provided by the embodiments of the present application is shown in FIG. 1. As shown in FIG. 1, the method of the embodiments of the present application can include the following steps S101-S104. Figure 2
[0059] S101, after starting the vehicle machine system, an event listening is performed on a window management service of the vehicle machine system.
[0060] Specifically, the vehicle system involved in this embodiment refers to an embedded computer system installed in the vehicle for providing functions such as infotainment, vehicle control, and navigation services, which includes a processor, memory, input and output devices, and an operating system and application software running on a hardware platform; vehicle system startup refers to the process from power-on to the vehicle system completing initialization and entering an operational state; the window management service of the vehicle system refers to the system service used to manage the display of window components in a graphical user interface; the window component refers to a visual component used to carry and display application content in a graphical user interface; event monitoring refers to the process of obtaining specific events in the window management service in real time by registering callback functions or message hook mechanisms.
[0061] After the vehicle-mounted system is started, the window management service of the vehicle-mounted system is monitored for events. Some possible implementations of this step may include the following technical details: First, after the vehicle-mounted system is started, an event listener is registered with the window management service, and the event listener is used to monitor events of the window management service of the vehicle-mounted system; second, a window addition event is triggered when the window management service receives a request to add a new window component; third, a window removal event is triggered when the window management service receives a request to remove an existing window component. Furthermore, the above events may also include necessary information such as the time of event occurrence, the target window identifier, and the application identifier to which it belongs.
[0062] S102, when monitoring the first event corresponding to the window adding request of the target application in the vehicle system, obtain the first moment corresponding to the first event, the window adding request is used to request the window management service to add the window component of the target application, and the window component is used to display the associated components of the target application.
[0063] Specifically, the target application involved in this embodiment refers to any monitored application among multiple applications of the vehicle system; the associated component of the target application refers to the component that needs to be displayed through the window component; the first event refers to the system-level event triggered when the window management service receives a window adding request from the target application.
[0064] In some cases, the target application sends a window addition request to the window management service to request the window management service to add a window component of the target application, the window addition request can include identification information of the target application and attribute information of the window component to be added. Correspondingly, the event listener listens to a first event corresponding to the window addition request received by the window management service. Further, a first time corresponding to the first event is obtained, wherein the first time refers to a system time recorded when the window management service processes the window addition request of the target application, representing a time point at which the window component of the target application starts to be displayed. It can be understood that the first time can be saved to a related storage unit of the car machine system and is in a corresponding relationship with the identification information of the target application.
[0065] S103, when the second event corresponding to the window removal request of the target application is listened to, a second time corresponding to the second event is obtained, and the window removal request is used to request the window management service to remove the window component of the target application.
[0066] Specifically, the second event referred to by the embodiment refers to a system-level event triggered when the window management service receives the window removal request of the target application.
[0067] In some cases, the target application sends a window removal request to the window management service to request the window management service to remove a window component of the target application, the window removal request can include identification information of the target application and attribute information of the window component to be removed. Correspondingly, the event listener listens to a second event corresponding to the window removal request received by the window management service. Further, a second time corresponding to the second event is obtained, wherein the second time refers to a system time recorded when the window management service processes the window removal request of the target application, representing a time point at which the window component of the target application ends to be displayed. It can be understood that the second time can be saved to a related storage unit of the car machine system and is in a corresponding relationship with the identification information of the target application.
[0068] S104, according to the first time and the second time, determine the use duration information of the target application.
[0069] Specifically, since the first time and the second time represent the time points at which the window component of the target application starts to be displayed and ends to be displayed respectively, the use duration information of the target application can be determined according to the first time and the second time. The use duration information of the target application refers to duration data of the window component of the target application continuously displayed in the car machine system, which is measured in time units and stored in the storage unit of the car machine system in association with the identification information of the target application.
[0070] In some possible implementation manners, the usage duration information of the target application can be directly obtained by calculating the difference between the second time and the first time. Specifically, the first time and the second time corresponding to the target application identification information are obtained from the storage unit; the value of the second time is subtracted from the value of the first time to obtain a time difference value; and the time difference value is stored as the usage duration information of the target application in the storage unit. It can be understood that this implementation manner is suitable for a standard scenario without duration adjustment.
[0071] In some possible implementation manners, after the difference between the second time and the first time is calculated, compensation and / or deduction processing is performed, and then the usage duration information of the target application is obtained. Specifically, the first time and the second time corresponding to the target application identification information are obtained from the storage unit; the value of the second time is subtracted from the value of the first time to obtain a time difference value; the time difference value is subjected to duration compensation processing to obtain a compensated time difference value, and the compensated time difference value is stored as the usage duration information of the target application in the storage unit.
[0072] Alternatively, the first time and the second time corresponding to the target application identification information are obtained from the storage unit; the value of the second time is subtracted from the value of the first time to obtain a time difference value; the time difference value is subjected to duration deduction processing to obtain a deducted time difference value, and the deducted time difference value is stored as the usage duration information of the target application in the storage unit.
[0073] Alternatively, the first time and the second time corresponding to the target application identification information are obtained from the storage unit; the value of the second time is subtracted from the value of the first time to obtain a time difference value; the time difference value is subjected to duration compensation and deduction processing to obtain a compensated and deducted time difference value, and the compensated and deducted time difference value is stored as the usage duration information of the target application in the storage unit.
[0074] For the convenience of understanding the embodiments, please refer to Figure 3 , Figure 3 is an example schematic diagram for obtaining usage duration information based on a Window provided by the embodiments. In the vehicle machine system of the Android platform, the window management service of the embodiments is the Window Manager Service, the window component is the Window, the associated component of the target application includes the Activity and the Service (service), and the vehicle machine system further includes the activity management service Activity Manager Service.
[0075] Exemplarily, when the target application enters a certain Activity, the Activity first completes its own creation process, then notifies the system to create the Activity and notifies the system to add a Window; the step of notifying the system to create the Activity is implemented by calling the interface of the ActivityManagerService, and the step of notifying the system to add a Window is implemented by sending a Window adding request to the WindowManagerService; after receiving the Window adding request, the WindowManagerService triggers an adding event, which is captured by the pre-registered listener.
[0076] Exemplarily, when the target application exits a certain Activity, the Activity first executes a destruction process, then notifies the system to destroy the Activity and notifies the system to remove a Window; the step of notifying the system to destroy the Activity is implemented by calling the interface of the ActivityManagerService, and the step of notifying the system to remove a Window is implemented by sending a Window removing request to the WindowManagerService; after receiving the Window removing request, the WindowManagerService triggers a removing event, which is captured by the pre-registered listener.
[0077] Exemplarily, when a certain Service of the target application needs to display an interface, the Service notifies the system to add a Window by sending a Window adding request to the WindowManagerService; after receiving the Window adding request, the WindowManagerService triggers an adding event, which is captured by the pre-registered listener.
[0078] Exemplarily, when a certain Service of the target application needs to hide an interface, the Service notifies the system to remove a Window by sending a Window removing request to the WindowManagerService; after receiving the Window removing request, the WindowManagerService triggers a removing event, which is captured by the pre-registered listener.
[0079] It can be understood that, since the WindowManagerService is monitored to implement the usage time length statistics, the final usage time length information not only reflects the existence of the Activity in the target application, but also reflects the existence of the Service in the target application, effectively making up for the defect that the non-Activity page cannot be perceived in the related art.
[0080] In this embodiment, first, an event listening mechanism for a window management service is established after the car machine system is started. When a first event corresponding to a window addition request of a target application is listened to, a first time corresponding to the first event is obtained. The window addition request is used to request the window management service to add a window component of the target application to display its associated components. Then, when a second event corresponding to a window removal request of the target application is listened to, a second time corresponding to the second event is obtained. The window removal request is used to request the window management service to remove the window component of the target application. Finally, the time difference between the first time and the second time is used to determine the usage duration information of the target application. In this way, by listening to the window management service, all associated components displayed through the window component of the target application can be accurately identified, which reflects the usage state of the target application, thereby improving the accuracy of the usage duration information of the target application.
[0081] Please refer to Figure 4 A flowchart for obtaining the usage duration information by deduction is provided for the embodiments of the present application, as shown in Figure 4 The method of the embodiments of the present application can include the following steps S201-S202, which can be used as detailed steps of the step S104 of the embodiments shown in Figure 2
[0082] S201, determining first duration information according to the first time and the second time;
[0083] S202, performing duration deduction on the first duration information according to the invalid duration information obtained in advance to obtain the usage duration information of the target application. The invalid duration information is determined based on the running information of the vehicle to which the car machine system belongs between the first time and the second time.
[0084] Specifically, the first duration information referred to in the embodiments refers to duration data calculated based on the first time and the second time; the invalid duration information refers to duration data that does not conform to the actual use scenario and is determined based on the running information of the vehicle to which the car machine system belongs between the first time and the second time; and the running information refers to parameter data related to the running of the vehicle.
[0085] Regarding the process of determining the first duration information according to the first time and the second time, in some possible implementation manners, the first time and the second time corresponding to the target application can be obtained from a storage unit; the time difference between the second time and the first time is calculated, and the time difference value is stored as the first duration information in the storage unit. In some possible implementation manners, the first time and the second time corresponding to the target application can be obtained from a storage unit; the time difference between the second time and the first time is calculated, and the time difference value is stored as the first duration information in the storage unit.
[0086] As to the process of deducting the first duration information according to the pre-acquired invalid duration information to obtain the usage duration information of the target application, in some possible implementation manners, the invalid duration information can include one item of duration data to be deducted, and the usage duration information of the target application can be obtained by deducting the one item of duration data to be deducted from the first duration information. In some possible implementation manners, the invalid duration information can include multiple items of duration data to be deducted, and the usage duration information of the target application can be obtained by deducting at least one item of the multiple items of duration data to be deducted from the first duration information.
[0087] In this embodiment, the non-real usage duration caused by the running state of the vehicle can be excluded by introducing the deduction mechanism of the invalid duration information, so that the usage duration information of the target application obtained finally is closer to the actual user usage, and the objectivity and accuracy of the usage duration information are improved.
[0088] Please refer to Figure 5 A flowchart for acquiring invalid duration information is provided for the embodiments of the application. The running information at least includes speed information, or includes running mode information on this basis; the invalid duration information at least includes second duration information, or includes third duration information on this basis. As shown in Figure 5 The method of the embodiments of the application can further include steps S301-S304, wherein steps S303-S304 are optionally executed.
[0089] S301, acquiring speed information of the vehicle between a first time and a second time;
[0090] S302, if the speed information indicates that the driving speed of the vehicle is greater than a preset speed threshold, determining the second duration information according to the duration that the driving speed is greater than the preset speed threshold;
[0091] S303, if the speed information indicates that the driving speed of the vehicle is less than or equal to the preset speed threshold, acquiring running mode information of the vehicle;
[0092] S304, if the running mode information indicates that the vehicle is in a sentry mode, determining the third duration information according to the duration that the vehicle is in the sentry mode.
[0093] Specifically, the speed information refers to real-time speed data collected by a speed sensor during vehicle driving and transmitted to the infotainment system; the preset speed threshold refers to a critical value preset for determining whether the vehicle is in high-speed driving state, for example, 15 km / h; the second time length information refers to time length data corresponding to the duration that the vehicle driving speed is greater than the preset speed threshold; the running mode information refers to data representing the running state of the vehicle, such as normal driving mode, sentinel mode, energy-saving mode, etc.; the sentinel mode refers to a safety monitoring mode enabled when the vehicle is in a stationary state; and the third time length information refers to time length data corresponding to the duration that the vehicle is in the sentinel mode.
[0094] For the convenience of understanding the embodiment, please refer to Figure 6 Figure 6 FIG. 1 is an example schematic diagram of obtaining invalid time length information provided by the embodiment of the present application.
[0095] Regarding the process of obtaining the speed information of the vehicle between the first time and the second time, in some possible implementation manners, first, the speed data uploaded by the speed sensor is continuously obtained by the infotainment system at a preset sampling frequency; second, the obtained speed data is stored in association with the corresponding time stamp in the cache area of the infotainment system; and finally, when it is necessary to calculate the invalid time length, the speed data sequence between the first time and the second time is extracted from the cache area. It can be understood that the speed data sequence can reflect all speed changes of the vehicle during the display of the target application window.
[0096] Regarding the process of determining the second time length information according to the duration that the driving speed is greater than the preset speed threshold if the speed information indicates that the driving speed of the vehicle is greater than the preset speed threshold, in some possible implementation manners, first, the obtained speed data sequence is analyzed to identify all continuous time periods in which the speed value is greater than the preset speed threshold; second, the cumulative time length of these continuous time periods is calculated as the second time length information; and finally, the second time length information is stored in association with the identification information of the target application. It can be understood that when the vehicle is driving at high speed, the user is usually focused on driving operation, and therefore the application usage time length counted at this time cannot truly reflect the user interaction.
[0097] Regarding the process of obtaining the running mode information of the vehicle if the speed information indicates that the driving speed of the vehicle is less than or equal to the preset speed threshold, in some possible implementation manners, first, the state identification of the current vehicle running mode is obtained by the infotainment system; second, the state identification is analyzed to determine whether the vehicle is in the sentinel mode; and finally, the running mode information is stored in association with the corresponding time stamp. It can be understood that this step is only executed when the speed does not exceed the preset threshold, so as to avoid unnecessary consumption of system resources.
[0098] As for the process of determining the third duration information according to the duration that the vehicle is in the sentry mode when the running mode information indicates that the vehicle is in the sentry mode, in some possible implementations, firstly, the change record of the running mode information is analyzed to identify the continuous time periods during which the vehicle is in the sentry mode; secondly, the cumulative duration of the continuous time periods is calculated as the third duration information; and finally, the third duration information is stored in association with the identification information of the target application. It can be understood that the user is generally not in the vehicle during the sentry mode, and therefore the application usage duration that is counted at this time cannot reflect the actual usage condition.
[0099] It can be understood that if the running mode information indicates that the vehicle is not in the sentry mode, the recording of the third duration information is stopped. At this time, only the second duration information determined based on the speed information is retained as the invalid duration information. Specifically, when the running mode information indicates that the vehicle is in a mode other than the sentry mode, the system will skip the calculation step of the third duration information, and only determine the invalid duration information that needs to be deducted finally according to the comparison result of the speed information and the preset speed threshold.
[0100] Exemplarily, when the first time corresponding to the window addition request of the target application A is T1 and the second time corresponding to the window removal request is T2: firstly, the speed information sequence V = {v1, v2,..., vn} of the vehicle is obtained between the first time T1 and the second time T2; if it is detected that all speed values v > a preset speed threshold S (such as S = 15 kilometers / hour) in a continuous time period [t3, t4] in the speed information sequence, the duration L1 = t4-t3 of the time period is calculated as the second duration information; if the running mode information is obtained when the speed value v ≤ S in the remaining time period, and it is identified that the vehicle is in a continuous time period [t5, t6] in the sentry mode, the duration L2 = t6-t5 is calculated as the third duration information; and finally, the usage duration information of the target application A is obtained by deducting L1 and L2 from the total duration T2-T1.
[0101] In this embodiment, by introducing the dual invalid duration determination mechanism based on the speed information and the running mode information, the influence period of the vehicle running state on the application usage duration statistics can be more accurately identified. In which, the high-speed driving state and the sentry mode are taken as independent invalid duration determination conditions, and the differentiated deduction strategies can be adopted for different scenarios, so that the finally determined usage duration information is more objective and accurate.
[0102] In an embodiment, based on Figure 5 The second duration information and the third duration information determined by the embodiment are used to Figure 4 As shown in the embodiment step S202, the step can further include the following steps:
[0103] If the target application is the first type of application, the second duration information and the third duration information are deducted from the first duration information to obtain the use duration information of the target application.
[0104] If the target application is the second type of application, the third duration information is deducted from the first duration information to obtain the use duration information of the target application, and the interaction intensity of the first type of application is higher than that of the second type of application.
[0105] Specifically, the interaction intensity referred to in the embodiment refers to the frequency and complexity indicators of the application requiring the user to perform input operations in a unit of time; the first type of application refers to an application category with an interaction intensity higher than a preset threshold, for example, a navigation application or a video playback application, which requires the user to frequently perform touch or voice operations to realize functions; and the second type of application refers to an application category with an interaction intensity lower than the preset threshold, which only needs a small amount of user interaction or can run autonomously during running, for example, a music playback application or a background download application.
[0106] For the convenience of understanding the embodiment scheme, please refer to Figure 7 , Figure 7 is an example of the embodiment provided by the present application. Assuming that a plurality of applications in the car machine system are divided into the first type of application and the second type of application, the target application is the second type of application in the case where the target application is not the first type of application.
[0107] Regarding the process of deducting the second duration information and the third duration information from the first duration information if the target application is the first type of application, in some possible implementation manners, first, the interaction intensity classification identifier of the target application is queried from the application attribute database; when it is identified that the target application is the first type of application, the second duration information and the third duration information associated with the target application are obtained from the storage unit; second, the first duration information is subtracted by the sum of the second duration information and the third duration information to obtain the use duration information after deduction; and finally, the calculation result is stored in association with the target application identifier information. It can be understood that for the first type of application with high interaction intensity, the use duration counted in the vehicle high-speed driving or sentry mode is invalid data and should be deducted in total.
[0108] In some possible implementation manners, when the target application is the second type of application, the third time length information is deducted from the first time length information, first, the interaction intensity classification identifier of the target application is queried from the application attribute database; when the target application is identified as the second type of application, the third time length information associated with the target application is obtained from the storage unit; second, the first time length information is subtracted by the third time length information to obtain the deducted use time length information; and finally, the calculation result is stored in association with the target application identifier information. It can be understood that for the second type of application with low interaction intensity, only the use time length counted in the sentinel mode is invalid data, and the user can still interact with the application through a non-contact manner such as voice in the high-speed driving state, so the data in this period is retained.
[0109] In some possible implementation manners, the determination criterion of the interaction intensity classification can include: first, the number of user operation events of the target application in a preset time period is counted, including a touch event, a voice instruction event, and a physical key event; second, the operation event density value in a unit time is calculated; when the density value exceeds a first threshold value, the target application is determined as the first type of application, and when the density value is lower than a second threshold value, the target application is determined as the second type of application, where the first threshold value is greater than the second threshold value. In addition, the application classification information can be preset in the application configuration file of the vehicle machine system, or dynamically adjusted according to historical interaction data by using a machine learning model.
[0110] Exemplarily, it is assumed that the target application is a navigation application (the first type of application), the first time is T1, the second time is T2, and the first time length information is T2-T1. Between the first time T1 and the second time T2, the duration that the vehicle speed is greater than a preset speed threshold value S is L1, and the duration that the vehicle is in the sentinel mode is L2. According to the above scheme, the second time length information L1 and the third time length information L2 are deducted from the first time length information T2-T1, and the use time length information of the target application is (T2-T1)-L1-L2. If the target application is a music playing application (the second type of application), only the third time length information L2 is deducted, and the use time length information is (T2-T1)-L2. The interaction intensity classification is based on that the number of operation events N1 of the navigation application in a preset time period Δt exceeds a first threshold value N_high, and the number of operation events N2 of the music playing application is lower than a second threshold value N_low (N_high>N_low).
[0111] In this embodiment, by establishing a differentiated deduction strategy associated with application interaction intensity, the real use scenario and invalid statistical period can be more accurately distinguished. For the first type of application requiring high interaction requirement, the high-speed driving and sentinel mode period are deducted at the same time; for the second type of application with low interaction requirement, only the sentinel mode period is deducted. This hierarchical processing mechanism based on application characteristics not only avoids statistical distortion caused by excessive deduction, but also ensures the rationality of the deduction period, thereby significantly improving the matching degree of the use time information and the actual user use situation.
[0112] Please refer to Figure 8 , the embodiment of the application provides a flow diagram for compensating the first time length information, as shown in Figure 8 , the method of the embodiment of the application can include the following steps S401-S403, which can be used as refinement steps of the embodiment step S201. Figure 4
[0113] S401, determining fourth time length information according to the first time and the second time;
[0114] S402, obtaining fifth time length information of the target application, the fifth time length information indicating a to-be-compensated time length of the target application generated before the first time;
[0115] S403, compensating the fourth time length information according to the fifth time length information of the target application to obtain the first time length information.
[0116] Specifically, the fourth time length information related to the embodiment refers to initial time length data calculated based on the first time and the second time; the fifth time length information refers to to-be-compensated time length data of incomplete use time length of the target application caused by abnormal conditions before the first time; the time length compensation refers to a process of superimposing the to-be-compensated time length data on the initial time length data.
[0117] For the convenience of understanding the embodiment scheme, please refer to Figure 10 , Figure 10 is an example diagram provided by the embodiment of the application for compensating the first time length information.
[0118] Regarding the process of determining the fourth time length information according to the first time and the second time, in some possible implementation manners, first, the first time and the second time corresponding to the target application identification information are obtained from the storage unit of the car machine system; second, the numerical difference between the second time and the first time is calculated as the fourth time length information; finally, the fourth time length information is stored in the storage unit in association with the target application identification information. It can be understood that the fourth time length information represents the complete display period of the target application window from addition to removal.
[0119] Regarding the process of obtaining the fifth duration information of the target application, in some possible implementation manners, the fifth duration information is recorded by the car machine system before the first time, and the fifth duration information can be read from the storage unit of the car machine system. It can be understood that the fifth duration information reflects the display duration of the target application that is not completed in the last abnormal interruption.
[0120] Regarding the process of duration compensation of the fourth duration information according to the fifth duration information of the target application, in some possible implementation manners, first, the fourth duration information and the fifth duration information corresponding to the target application are obtained from the storage unit; second, the value of the fourth duration information is added to the value of the fifth duration information to obtain compensated duration data; and then the compensated duration data is stored as the first duration information in the storage unit. In some possible implementation manners, if the fifth duration information has been cleared, the fourth duration information can be directly determined as the first duration information.
[0121] Exemplarily, it is assumed that the first time corresponding to the window addition request of the target application is T1, and the second time corresponding to the window removal request is T2. First, the fourth duration information T2-T1 is calculated according to the first time T1 and the second time T2; then the fifth duration information Δt recorded by the target application before the first time T1 is obtained from the storage unit; and finally, the fourth duration information T2-T1 is added to the fifth duration information Δt to obtain the compensated first duration information (T2-T1)+Δt. If the fifth duration information Δt is zero, T2-T1 is directly taken as the first duration information.
[0122] In this embodiment, first, the fourth duration information is determined according to the first time and the second time, and the fourth duration information reflects the basic use duration of the target application in the current statistical period; then the fifth duration information generated by the target application before the first time is obtained, and the fifth duration information records the to-be-compensated duration of the target application that is not completely recorded in the last statistical period due to system abnormalities and the like; and finally, the first duration information after compensation processing is obtained by performing duration compensation operation on the fifth duration information and the fourth duration information. In this way, by introducing the compensation mechanism based on historical data, the application use duration interruption problem caused by system abnormalities can be effectively solved, the continuity and integrity of the statistical data are ensured, and the accuracy and reliability of the use duration information are improved.
[0123] Please refer to Figure 9 A flowchart for obtaining the fifth duration information based on a preset period is provided for the embodiments of the present application, as shown in Figure 9 The method of the embodiments of the present application can include the following steps S501-S502, which can be executed before the first time.
[0124] S501, acquire a third time corresponding to a third event corresponding to the window addition request of the target application when the third event is listened to;
[0125] S502, acquire a system time of the car machine system based on a preset period, and determine fifth duration information of the target application according to the third time and the system time, the fifth duration information of the target application being cleared when a fourth event corresponding to the window removal request of the target application is listened to.
[0126] Specifically, the third event referred to in the embodiment refers to a system-level event triggered when the window management service receives the window addition request of the target application; the third time refers to the system time recorded when the window management service processes the window addition request of the target application before the first time; the preset period refers to a time interval preset for periodically recording the system time; the system time refers to the time stamp data currently running of the car machine system; the fourth event refers to a system-level event triggered when the window management service receives the window removal request of the target application; and the clearing refers to the operation of resetting the value of the fifth duration information recorded in the storage unit to zero.
[0127] Regarding the process of acquiring the third time corresponding to the third event when the third event corresponding to the window addition request of the target application is listened to, in some possible implementation manners, first, the window addition request received by the window management service is captured through the pre-registered event listener; second, the target application identifier and the window component attribute information contained in the request are analyzed; and finally, the system time recorded when processing the request is extracted from the log record of the window management service as the third time. It can be understood that the third time represents the time point when the target application window component starts to display, and will be used as the reference time for subsequent compensation calculation.
[0128] Regarding the process of acquiring the system time of the car machine system based on the preset period, and determining the fifth duration information of the target application according to the third time and the system time, in some possible implementation manners, first, a timer is started to trigger the system time acquisition operation at a preset period (for example, every minute); second, the current system time of the car machine system is acquired at each triggering; then, the time difference value between the current system time and the third time is calculated as a temporary compensation duration; and finally, the temporary compensation duration is accumulated and updated with the existing fifth duration information in the storage unit. It can be understood that the periodic recording mechanism ensures that even if a system exception occurs, the time stamp data recorded last time can be retained.
[0129] In some possible implementation manners, the fifth duration information about the target application is cleared when a fourth event corresponding to a window removal request of the target application is listened to. First, a window removal request received by the window management service is captured through an event listener; second, it is verified whether the target application identifier corresponding to the request is consistent with the application identifier associated with the recorded fifth duration information; and third, the fifth duration information field corresponding to the target application in the storage unit is reset to zero after verification of consistency. It can be understood that the zeroing operation is only performed when the target application normally exits, indicating that the use duration has been completely counted and does not need to be compensated.
[0130] Exemplarily, when a third event corresponding to a window addition request of the target application occurs, the third time T3 is recorded; subsequently, the system records the current system time Tn every minute, and calculates Tn-T3 as a temporary compensation duration ΔTn; if the system is abnormally terminated at T4, the last recorded ΔTn is stored as the fifth duration information; when the target application is started again after the system is restored, the fifth duration information ΔTn is read from the storage unit for compensation of the use duration in a new counting period; and finally, the fifth duration information is cleared when the fourth event is triggered by the normal exit of the target application.
[0131] In this embodiment, the use duration data that may be lost due to system abnormal interruption can be saved in real time by establishing a periodic compensation recording mechanism during the display of the target application window. The system time based on a preset period is collected to ensure the timeliness of the compensation data, and the zeroing operation at the time of window removal maintains the statistical accuracy in normal cases, effectively solving the problem of data loss caused by system or application crashes.
[0132] Please refer to Figure 11 A flowchart for determining the sub-duration information is provided for the embodiment of the application. In the embodiment, the target application is configured to display the screen mirroring content of a mobile device connected to the in-vehicle infotainment system. Figure 11 As shown in the figure, the method of the embodiment of the application can further include steps S601-S602.
[0133] S601, a preset interface in the in-vehicle infotainment system is called to obtain a state notification set sent by the mobile device between a first time and a second time, and the state notification set includes state notifications of each sub-application in the mobile device;
[0134] S602, the sub-duration information of each sub-application in the use duration information is determined according to the state notifications of each sub-application.
[0135] Specifically, the target application involved in the embodiment is configured to display the screen projection content of a mobile device connected with the car machine system, which refers to an application instance in the car machine system specially used for presenting the screen projection picture of the mobile device; the mobile device refers to a portable computing device such as a smart phone or a tablet computer which establishes a data connection with the car machine system through a wired or wireless manner; the preset interface refers to a communication interface in the car machine system used for receiving the state notification of the mobile device; the state notification set refers to a set of notification messages about the running state change of each sub application sent by the mobile device to the car machine system between a first time and a second time; the sub application refers to an independent application program in the mobile device which displays its content on the car machine system through screen projection; and the sub time length information refers to the time length data of each sub application actually in the foreground display state at the mobile device end.
[0136] For the convenience of understanding the embodiment, please refer to Figure 12 , Figure 12 is an example schematic diagram provided by the embodiment of the application for determining the related time based on the notification of the mobile device.
[0137] Regarding the process of calling the preset interface in the car machine system and obtaining the state notification set sent by the mobile device between the first time and the second time, in some possible implementation manners, first, the preset interface is activated through the communication link established between the car machine system and the mobile device; second, the preset interface continuously listens to the state notification message sent by the mobile device, and stores the received message in the cache queue in chronological order; and then all the state notification messages between the first time and the second time are extracted from the cache queue to constitute the state notification set. It can be understood that each message in the state notification set at least contains the sub application identifier, the state change type (such as entering the foreground / exiting the foreground) and the corresponding timestamp information.
[0138] Regarding the process of determining the sub time length information of each sub application in the use time length information according to the state notification of each sub application, in some possible implementation manners, first, the state notification sequence of each sub application in the state notification set is analyzed to identify the complete display period of each sub application; second, for each sub application, the cumulative time length of all the display periods is calculated as the sub time length information; and finally, the sub time length information of each sub application is stored in association with the use time length information of the target application. It can be understood that for different sub application contents displayed by the same target application, the use time length needs to be recorded respectively to realize accurate statistics.
[0139] Exemplarily, when the target application is configured to display the projection content of the mobile device: first, a communication connection is established between the vehicle system and the mobile device through Bluetooth and Wi-Fi direct connection; secondly, when sub-application A and sub-application B on the mobile device switch in the foreground, status notifications indicating "sub-application A enters the foreground", "sub-application A exits the foreground", "sub-application B enters the foreground", and "sub-application B exits the foreground" are respectively sent to the vehicle system; then the vehicle system receives these notifications through a preset interface and records the corresponding time; finally, the duration of sub-application A and sub-application B displayed in the foreground is calculated as their respective sub-duration information, and stored in association with the total usage time information of the target application.
[0140] In this embodiment, by establishing a status notification transmission mechanism between the vehicle system and the mobile device, the actual usage of each sub-application on the mobile device can be accurately obtained. A preset interface ensures the receipt of status notifications, while sub-duration calculation based on the notification sequence enables refined statistics on projected content. This effectively solves the problem of the related art of being unable to distinguish the usage time of mobile device sub-applications, making application usage time statistics in the vehicle-to-vehicle interconnection scenario more comprehensive and accurate.
[0141] The following will be combined Figure 13 The information acquisition device provided in the embodiment of the present application is introduced in detail. It should be noted that, Figure 13 The information acquisition device in the present application is used to execute Figure 2 - Figure 12 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 2 - Figure 12 Specifically, the information acquisition device 800 may include a monitoring unit 801, a first acquisition unit 802, a second acquisition unit 803, and a determination unit 804, as follows:
[0142] The monitoring unit 801 is used to monitor the events of the window management service of the vehicle system after the vehicle system is started;
[0143] A first acquiring unit 802 is configured to acquire a first time corresponding to a first event corresponding to a window adding request of a target application in the vehicle system upon monitoring the first event, wherein the window adding request is used to request the window management service to add a window component of the target application, and the window component is used to display associated components of the target application;
[0144] A second acquiring unit 803 is configured to acquire a second time corresponding to the second event upon monitoring a second event corresponding to a window removal request of the target application, wherein the window removal request is used to request the window management service to remove the window component of the target application;
[0145] The determination unit 804 is configured to determine the use time length information of the target application according to the first time and the second time.
[0146] Optionally, in some embodiments, the determination unit 804 can be configured to determine the first time length information according to the first time and the second time.
[0147] The first time length information is deducted by the invalid time length information to obtain the use time length information of the target application, and the invalid time length information is determined based on running information of a vehicle to which the car machine system belongs between the first time and the second time.
[0148] Optionally, in some embodiments, the running information includes speed information, and the invalid time length information includes the second time length information. The information acquisition apparatus 800 can be configured to: acquire the speed information of the vehicle between the first time and the second time; and determine the second time length information according to a duration during which the running speed of the vehicle is greater than the preset speed threshold, if the speed information indicates that the running speed of the vehicle is greater than the preset speed threshold.
[0149] Optionally, in some embodiments, the running information further includes running mode information, and the invalid time length information further includes third time length information. The information acquisition apparatus 800 can be configured to: acquire the running mode information of the vehicle, if the speed information indicates that the running speed of the vehicle is less than or equal to the preset speed threshold; and determine the third time length information according to a duration during which the vehicle is in a sentry mode, if the running mode information indicates that the vehicle is in the sentry mode.
[0150] Optionally, in some embodiments, the determination unit 804 can be configured to: deduct the second time length information and the third time length information from the first time length information to obtain the use time length information of the target application, if the target application is a first type application; and deduct the third time length information from the first time length information to obtain the use time length information of the target application, if the target application is a second type application, the interaction intensity of the first type application being higher than that of the second type application.
[0151] Optionally, in some embodiments, the determination unit 804 can be configured to: determine fourth time length information according to the first time and the second time; acquire fifth time length information of the target application, the fifth time length information indicating a to-be-compensated time length of the target application generated before the first time; and compensate the fourth time length information by the fifth time length information of the target application to obtain the first time length information.
[0152] Optionally, in some embodiments, before the first time point, the information acquisition apparatus 800 can be configured to: acquire a third time point corresponding to a third event corresponding to the window addition request of the target application when the third event is monitored; acquire a system time point of the vehicle machine system based on a preset period, and determine fifth time length information of the target application according to the third time point and the system time point, the fifth time length information of the target application being cleared when a fourth event corresponding to a window removal request of the target application is monitored.
[0153] Optionally, in some embodiments, the target application is configured to display the screen projection content of the mobile device connected with the vehicle machine system, and the information acquisition apparatus 800 can be configured to: call a preset interface in the vehicle machine system, acquire a state notification set sent by the mobile device between the first time point and the second time point, the state notification set including state notifications of each sub-application in the mobile device; and determine sub-time length information of each sub-application in the use time length information according to the state notifications of each sub-application.
[0154] Effects that can be achieved by the present embodiment are described in the above-mentioned related embodiments of the information acquisition method, which will not be repeated here.
[0155] Please refer to Figure 14 A structural schematic diagram of a vehicle is provided for the embodiments of the present application. As shown in the figure, Figure 14 The vehicle 900 includes a processor 901 and a memory 902. The processor 901 is electrically connected to the memory 902.
[0156] The processor 901 is the control center of the vehicle 900, and can include one or more processing cores. The processor 901 connects various parts of the vehicle 900 through various interfaces and lines, executes various functions of the vehicle 900 and processes data by running or calling computer programs stored in the memory 902 and calling data stored in the memory 902, thereby overall controlling the vehicle 900. Optionally, the processor 901 can be realized in at least one of the hardware forms of Digital Signal Processing (DSP), Field Programmable Gate Array (FPGA), Programmable Logic Array (PLA). The processor 901 can integrate one or several combinations of CPU, Graphics Processing Unit (GPU) and modem. Among them, the CPU mainly processes operating systems, user pages and application programs, etc.; the GPU is responsible for rendering and drawing display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 901, but realized by a separate communication chip.
[0157] The memory 902 can be used to store software programs and modules, and the processor 901 executes various functional applications and data processing by running the computer programs and modules stored in the memory 902. The memory 902 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, computer programs required by at least one function, etc.; and the data storage area can store data created according to the use of the vehicle 900, etc.
[0158] In addition, the memory 902 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 902 can also include a memory controller to provide the processor 901 with access to the memory 902.
[0159] In the embodiment, the processor 901 in the vehicle 900 loads the instructions corresponding to the processes of one or more computer programs into the memory 902, and the processor 901 runs the computer programs stored in the memory 902 to implement various functions according to the following steps:
[0160] After the car machine system is started, the window management service of the car machine system is event listened to;
[0161] When a first event corresponding to a window addition request of a target application in the car machine system is listened to, a first time corresponding to the first event is obtained, the window addition request is used to request the window management service to add a window component of the target application, and the window component is used to display an associated component of the target application;
[0162] When a second event corresponding to a window removal request of the target application is listened to, a second time corresponding to the second event is obtained, and the window removal request is used to request the window management service to remove the window component of the target application;
[0163] According to the first time and the second time, the use duration information of the target application is determined.
[0164] Optionally, when the processor 901 determines the use duration information of the target application according to the first time and the second time, it specifically performs: determining first duration information according to the first time and the second time; and performing duration deduction on the first duration information according to pre-obtained invalid duration information to obtain the use duration information of the target application, wherein the invalid duration information is determined based on running information of a vehicle to which the car machine system belongs between the first time and the second time.
[0165] Optionally, the running information comprises speed information, and the invalid duration information comprises second duration information; the processor 901 can further execute: obtaining speed information of the vehicle between the first time and the second time; if the speed information indicates that the running speed of the vehicle is greater than a preset speed threshold, determining the second duration information according to a duration during which the running speed is greater than the preset speed threshold.
[0166] Optionally, the running information further comprises running mode information, and the invalid duration information further comprises third duration information; after executing, if the speed information indicates that the running speed of the vehicle is greater than a preset speed threshold, determining the second duration information according to a duration during which the running speed is greater than the preset speed threshold, the processor 901 further executes: if the speed information indicates that the running speed of the vehicle is less than or equal to the preset speed threshold, obtaining running mode information of the vehicle; if the running mode information indicates that the vehicle is in a sentry mode, determining the third duration information according to a duration during which the vehicle is in the sentry mode.
[0167] Optionally, when executing the duration deduction of the first duration information according to the pre-acquired invalid duration information to obtain the usage duration information of the target application, the processor 901 specifically executes: if the target application is a first type application, deducting the second duration information and the third duration information from the first duration information to obtain the usage duration information of the target application; if the target application is a second type application, deducting the third duration information from the first duration information to obtain the usage duration information of the target application, the interaction intensity of the first type application being higher than that of the second type application.
[0168] Optionally, when executing the determination of the first duration information according to the first time and the second time, the processor 901 specifically executes: determining fourth duration information according to the first time and the second time; obtaining fifth duration information of the target application, the fifth duration information indicating a to-be-compensated duration of the target application generated before the first time; performing duration compensation on the fourth duration information according to the fifth duration information of the target application to obtain the first duration information.
[0169] Optionally, before the first time, the processor 901 further executes: obtaining a third time corresponding to a third event corresponding to the window addition request of the target application; based on a preset period, obtaining a system time of the vehicle machine system and determining fifth duration information of the target application according to the third time and the system time, the fifth duration information of the target application being cleared when a fourth event corresponding to a window removal request of the target application is listened to.
[0170] Optionally, the target application is configured to display the screen mirroring content of the mobile device connected with the car machine system; the processor 901 further executes: calling a preset interface in the car machine system, obtaining a state notification set sent by the mobile device between the first time and the second time, the state notification set including state notifications of each sub-application in the mobile device; and determining sub-time length information of each sub-application in the use time length information according to the state notifications of each sub-application.
[0171] Effects that can be achieved by the present embodiment are described in the above-mentioned related embodiments of the information acquisition method, and will not be repeated here.
[0172] It should be understood that the apparatus provided by the embodiments of the present application is used to execute the above-mentioned information acquisition method, and thus can achieve the same effects as the above-mentioned implementation method.
[0173] In the case of using an integrated unit, the apparatus can include a processing module and a storage module. When the apparatus is applied to a vehicle, the processing module can be used to control and manage the actions of the vehicle. The storage module can be used to support the vehicle to execute related program codes and the like.
[0174] The processing module can be a processor or a controller, which can realize or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure of the present application. The processor can also be a combination of computing functions, such as one or more microprocessor combinations, combinations of digital signal processing (DSP) and microprocessors, and the like. The storage module can be a memory.
[0175] In addition, the apparatus provided by the embodiments of the present application can be a chip, a component or a module, which can include a connected processor and a memory. The memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute the information acquisition method provided by the above-mentioned embodiments.
[0176] The embodiments of the present application also provide a computer readable storage medium, which stores computer program codes, and when the computer program codes are run on a computer, the computer executes the above-mentioned related method steps to realize the information acquisition method provided by the above-mentioned embodiments.
[0177] The embodiments of the present application also provide a computer program product, which, when run on a computer, makes the computer execute the above-mentioned related steps to realize the information acquisition method provided by the above-mentioned embodiments.
[0178] The apparatus, the computer readable storage medium, the computer program product or the chip provided in the embodiment are used for executing the corresponding method provided in the above, thus the beneficial effects achieved thereby can refer to the beneficial effects of the corresponding method provided in the above, which will not be repeated here.
[0179] Through the description of the above embodiments, those skilled in the art can understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above.
[0180] In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. For example, the apparatus embodiments described above are only illustrative, for example, the division of the modules or units is only a logical function division, and in actual implementation, another division mode can be used, for example, a plurality of units or components can be combined or integrated into another apparatus, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, and can be electrical, mechanical or other forms.
[0181] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for obtaining information, characterized in that: The method comprises: After the vehicle system is started, monitoring the window management service of the vehicle system for events; Upon monitoring a first event corresponding to a window addition request of a target application in the vehicle system, obtaining a first time corresponding to the first event, wherein the window addition request is used to request the window management service to add a window component of the target application, and the window component is used to display associated components of the target application; Upon monitoring a second event corresponding to a window removal request of the target application, obtaining a second time corresponding to the second event, wherein the window removal request is used to request the window management service to remove the window component of the target application; Determine usage duration information of the target application according to the first moment and the second moment.
2. The method according to claim 1, characterized in that The determining, according to the first moment and the second moment, the usage duration information of the target application includes: Determining first duration information according to the first moment and the second moment; The first duration information is deducted according to the invalid duration information obtained in advance to obtain the usage duration information of the target application, and the invalid duration information is determined based on the operation information of the vehicle to which the vehicle system belongs between the first moment and the second moment.
3. The method according to claim 2, characterized in that The operation information includes speed information, the invalid duration information includes second duration information, and the method further includes: between the first moment and the second moment, acquiring speed information of the vehicle; If the speed information indicates that the driving speed of the vehicle is greater than a preset speed threshold, second duration information is determined according to a duration during which the driving speed is greater than the preset speed threshold.
4. The method according to claim 3, characterized in that The operation information further includes operation mode information, the invalid duration information further includes third duration information, and if the speed information indicates that the driving speed of the vehicle is greater than a preset speed threshold, after determining the second duration information based on the duration for which the driving speed is greater than the preset speed threshold, the method further includes: If the speed information indicates that the driving speed of the vehicle is less than or equal to the preset speed threshold, obtaining the operating mode information of the vehicle; If the operating mode information indicates that the vehicle is in the sentry mode, third duration information is determined according to a duration during which the vehicle is in the sentry mode.
5. The method according to claim 4, characterized in that The step of deducting the first duration information according to the pre-acquired invalid duration information to obtain the usage duration information of the target application includes: If the target application is a first type application, deducting the second duration information and the third duration information from the first duration information to obtain usage duration information of the target application; If the target application is a second type application, the third duration information is deducted from the first duration information to obtain usage duration information of the target application, and the interaction intensity of the first type application is higher than the interaction intensity of the second type application.
6. The method according to claim 2, characterized in that The determining first duration information according to the first moment and the second moment includes: Determining fourth duration information according to the first moment and the second moment; Acquire fifth duration information of the target application, where the fifth duration information indicates a duration to be compensated generated by the target application before the first moment; The fourth duration information is compensated for in duration according to the fifth duration information of the target application to obtain first duration information.
7. The method according to claim 6, characterized in that Before the first moment, the method further includes: When a third event corresponding to the window adding request of the target application is monitored, obtaining a third time corresponding to the third event; Based on a preset cycle, the system time of the vehicle system is obtained and the fifth duration information of the target application is determined according to the third time and the system time. The fifth duration information of the target application is cleared when the fourth event corresponding to the window removal request of the target application is monitored.
8. The method according to claim 1, characterized in that The target application is configured to display screen content of a mobile device connected to the vehicle system, and the method further includes: Calling a preset interface in the vehicle system to obtain a set of status notifications sent by the mobile device between the first time and the second time, the set of status notifications including status notifications of each sub-application in the mobile device; According to the status notification of each sub-application, the sub-duration information of each sub-application is determined in the usage duration information.
9. A vehicle, characterized in that: include: a memory for storing executable program code; A processor is configured to call and run the executable program code from the memory, so that the vehicle executes the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program code, and when the computer program code is executed, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Application use time segment statistics method and terminal
CN110618913A
Application program double-screen display method and device
CN111124562A
Method and system for accurately acquiring screen use time of Android equipment
CN114546541A
Vehicle display method, display device, vehicle and storage medium
CN118733177A
System and method for collecting and analyzing data
WO2017101606A1