Interface refresh method, apparatus, electronic device and computer-readable storage medium

CN119883313BActive Publication Date: 2026-09-01CHENGDU GREAT WALL MOTOR R&D CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411862821.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2026-09-01
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

[0003]本申请提供了一种界面刷新方法、装置、电子设备和计算机可读存储介质,本申请能够解决显示界面出现视觉闪烁的问题

Benefits of technology

[0005]This application embodiment combines a delayed task mechanism and a periodic sampling mechanism for interface display by employing a technical solution that, upon receiving first display data, updates the second display data in a delayed display task with the first display data, determines whether the sampling period of the data sampling task has been reached (the start time of the data sampling task is the same as the start time of the delayed display task, and the sampling period is longer than the delay period of the delayed display task), and, if the sampling period has been reached, retrieves the latest-stored display data from the updated display data of the delayed display task to obtain the target display data, and refreshes the display interface based on the target display data. On the one hand, by setting a delayed display task, it avoids frequent refreshes of the display interface and visual flickering caused by receiving different display data multiple times in a short period. On the other hand, by setting a data sampling task with a sampling period longer than the delay period of the delayed display task, it avoids data loss due to the delayed task, preventing the display interface from not refreshing for extended periods, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883313B_ABST
    Figure CN119883313B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, electronic device, and computer-readable storage medium for refreshing an interface, relating to the field of automotive display technology. The method includes: updating second display data in a delayed display task using the first display data each time first display data is received; determining whether the sampling period of a data sampling task has been reached; wherein the start time of the data sampling task is the same as the start time of the delayed display task, and the sampling period is longer than the delay period of the delayed display task; if the sampling period has been reached, obtaining the latest-stored display data from the updated display data of the delayed display task to obtain target display data; and refreshing the display interface based on the target display data. This application can avoid visual flickering and prolonged periods without refresh of the display interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automotive display technology, and more specifically, to an interface refresh method, apparatus, electronic device, and computer-readable storage medium in the field of automotive display technology. Background Technology

[0002] The CarMediaApp is the UI container for Google's native MediaSession framework. It can connect to different servers (including MediaSession applications) to display different content. The content displayed by the CarMediaApp is callback data from the MediaSession application. If the MediaSession application sends back different data multiple times in a short period, the CarMediaApp will display different interfaces multiple times. This rapid change in interface display can create a flickering effect for the user, negatively impacting the user experience. Summary of the Invention

[0003] This application provides a method, apparatus, electronic device, and computer-readable storage medium for refreshing an interface, which can solve the problem of visual flickering in the display interface.

[0004] In a first aspect, a method for refreshing an interface is provided, the method comprising: updating second display data in a delayed display task using the first display data each time first display data is received; determining whether the sampling period of a data sampling task has been reached; wherein the start time of the data sampling task is the same as the start time of the delayed display task, and the sampling period is longer than the delay period of the delayed display task; if the sampling period has been reached, obtaining the latest-stored display data from the updated display data of the delayed display task to obtain target display data; and refreshing the display interface according to the target display data.

[0005] This application embodiment combines a delayed task mechanism and a periodic sampling mechanism for interface display by employing a technical solution that, upon receiving first display data, updates the second display data in a delayed display task with the first display data, determines whether the sampling period of the data sampling task has been reached (the start time of the data sampling task is the same as the start time of the delayed display task, and the sampling period is longer than the delay period of the delayed display task), and, if the sampling period has been reached, retrieves the latest-stored display data from the updated display data of the delayed display task to obtain the target display data, and refreshes the display interface based on the target display data. On the one hand, by setting a delayed display task, it avoids frequent refreshes of the display interface and visual flickering caused by receiving different display data multiple times in a short period. On the other hand, by setting a data sampling task with a sampling period longer than the delay period of the delayed display task, it avoids data loss due to the delayed task, preventing the display interface from not refreshing for extended periods, thus improving the user experience.

[0006] In one possible implementation, updating the second display data in the delayed display task with the first display data each time the first display data is received includes: replacing the second display data with the first display data each time the vehicle media application receives the first display data sent by the media session application, in order to update the delayed display task.

[0007] In one possible implementation, replacing the second display data with the first display data includes: determining the similarity between the first display data and the second display data; if the similarity is less than a similarity threshold, replacing the second display data with the first display data.

[0008] In one possible implementation, refreshing the display interface according to the target display data includes: refreshing the display interface of the vehicle media application according to the target display data, which can solve the problem of visual flickering in the display interface of CarMediaApp caused by frequent updates of display data by MediaSession applications in the field of in-vehicle display technology.

[0009] In one possible implementation, after determining whether the sampling period of the data sampling task has been reached, the interface refresh method further includes: if the sampling period has not been reached, determining whether the delay period has been reached; if the delay period has been reached, obtaining the latest stored display data from the updated display data of the delayed display task to obtain the target display data, and refreshing the display interface using the target display data obtained when the delay period has been reached, thereby avoiding the problem of the display interface not refreshing for a long time.

[0010] In one possible implementation, refreshing the display interface based on the target display data includes: determining whether the similarity between the first data to be used and the second data to be used is less than a similarity threshold; wherein the first data to be used is the target display data obtained when the delay duration is reached, and the second data to be used is the target display data obtained when the sampling period duration is reached; if so, refreshing the display interface based on the second data to be used effectively avoids unnecessary interface refreshes.

[0011] In one possible implementation, after updating the second display data in the delayed display task with the first display data each time the first display data is received, the interface refresh method further includes: setting the delay duration to zero and re-timing the delay duration. By setting the delay duration to zero and re-timing the delay duration after each update of the delayed display task, the display interface flickering problem that occurs when refreshing the display interface with the first data to be used is avoided.

[0012] Secondly, a user interface refresh device is provided, the user interface refresh device comprising:

[0013] The task update module is used to update the second display data in the delayed display task with the first display data each time the first display data is received;

[0014] The time determination module is used to determine whether the sampling period of the data sampling task has been reached; wherein the start time of the data sampling task is the same as the start time of the delayed display task, and the sampling period is longer than the delay duration of the delayed display task.

[0015] The data sampling module is used to obtain the latest storage time display data from the updated display data of the delayed display task when the sampling period is reached, so as to obtain the target display data;

[0016] The interface refresh module is used to refresh the display interface based on the target display data.

[0017] In one possible implementation, the task update module is specifically used to replace the second display data with the first display data each time the vehicle media application receives the first display data sent by the media session application, in order to update the delayed display task.

[0018] In one possible implementation, the task update module, in replacing the second display data with the first display data, is further configured to: determine the similarity between the first display data and the second display data; if the similarity is less than a similarity threshold, replace the second display data with the first display data.

[0019] In one possible implementation, the interface refresh module is specifically used to refresh the display interface of the vehicle media application based on the target display data.

[0020] In one possible implementation, the data sampling module is further configured to determine whether the delay duration has been reached if the sampling period duration has not been reached; and if the delay duration has been reached, to obtain the latest storage time display data from the updated display data of the delayed display task to obtain the target display data.

[0021] In one possible implementation, the interface refresh module is specifically used to determine whether the similarity between the first data to be used and the second data to be used is less than a similarity threshold; wherein, the first data to be used is the target display data obtained when the delay duration is reached, and the second data to be used is the target display data obtained when the sampling period duration is reached; if so, the display interface is refreshed according to the second data to be used.

[0022] In one possible implementation, the task update module is further configured to, upon receiving first display data, update the second display data in the delayed display task using the first display data, set the delay duration to zero, and restart the timing of the delay duration.

[0023] Thirdly, an electronic device is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the interface refresh method in the first aspect or any possible implementation thereof.

[0024] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to execute the interface refresh method in the first aspect or any possible implementation thereof.

[0025] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the interface refresh method described in the first aspect or any possible implementation thereof. Attached Figure Description

[0026] Figure 1 An exemplary schematic diagram of a non-delayed interface refresh method is shown;

[0027] Figure 2 An exemplary schematic diagram of a delayed interface refresh method is shown;

[0028] Figure 3 Another exemplary schematic diagram of a delayed interface refresh method is shown;

[0029] Figure 4 Another exemplary schematic diagram of a delayed interface refresh method is shown;

[0030] Figure 5 An exemplary schematic diagram of an interface refresh method combining delay and periodic sampling is shown;

[0031] Figure 6 A schematic flowchart of an interface refresh method provided in an embodiment of this application is shown;

[0032] Figure 7 This paper shows a schematic diagram of the structure of an interface refresh device provided in an embodiment of this application;

[0033] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0034] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0035] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0036] The CarMediaApp is the UI container for Google's native MediaSession framework. It can connect to different service providers (Content Providers, CPs) to display different content. These service providers include applications that adhere to the MediaSession framework, such as Spotify, Tunein, Tidal, Deezer, and Audible. These MediaSession applications are third-party applications. Spotify is a popular music streaming service that allows users to access millions of songs, podcasts, audiobooks, and other audio content; Tunein provides streaming services, allowing users to listen to online music, radio, and interviews; Tidal provides lossless audio, HiRes FLAC, and Dolby Atmos audio; Deezer is a well-known music website and streaming service; and Audible is an audiobook application. The MediaSession framework, introduced by Google in Android 5.0, is a multimedia application framework primarily used to solve the communication issues between the interface and services during music playback.

[0037] CarMediaApp connects to the MediaSession application through the MediaSession framework. CarMediaApp controls the MediaSession application through the control commands of the MediaSession framework, and listens for MediaSession application callbacks through the listening commands of the MediaSession framework, and parses the content for display on the interface.

[0038] Control commands include:

[0039] Play command: Play media;

[0040] The skipToPrevious command: Plays the previous media file;

[0041] The skipToNext command: plays the next media entry;

[0042] The `doCustomAction` command requests custom functions from the application, such as favorites, speed adjustment, and fast forward.

[0043] The monitoring commands include:

[0044] The onMetadataChanged command is a media information callback, such as album art, song title, and artist information.

[0045] The onQueueChanged command: playlist callback;

[0046] The onPlaybackStateChanged command is a playback status callback, such as playback status, current progress, custom function list, error code, etc.

[0047] The onRepeatModeChanged command: Repeat mode callback.

[0048] The content displayed by CarMediaApp is callback data from the MediaSession application. If the MediaSession application sends back different data multiple times in a short period of time, the vehicle media application will display different interfaces multiple times. This rapid change in interface display can create a flickering effect for the user, negatively impacting the user experience of the vehicle media application.

[0049] Interface flickering issues include, but are not limited to: 1. For example, in a MediaSession application, the play button keeps flickering between loading and play during playback. This is because the displayed data for the play button changes rapidly between buffering and playback states within 1 second, causing the play button to flicker. 2. As another example, in a MediaSession application, when switching songs, the album art flickers with an unknown image, causing the displayed album art to flicker. This is because the MediaSession application, when switching songs, calls back with an unknown image and then immediately calls back with the correct album art.

[0050] To address the aforementioned issues, this application provides an interface refresh method, apparatus, electronic device, and computer-readable storage medium. This application introduces a delayed task mechanism and a periodic sampling mechanism for refreshing the display interface. By combining these two mechanisms, the problem of visual flickering caused by frequent updates of display data in MediaSession applications in the field of automotive display technology can be solved.

[0051] The delayed task mechanism specifically uses new display data received each time to update the old display data in the delayed display task. Then, when the delay time of the delayed display task is reached (i.e., the delayed display task times out), the display interface is refreshed according to the latest display data in the delayed display task, thereby solving the problem of visual flickering in the display interface.

[0052] One situation, such as Figure 1 As shown, Figure 1 An exemplary schematic diagram of a non-delayed interface refresh method is shown. Figure 1Without a delayed task mechanism, if incorrect display data is received and correct display data is received 100ms later, without any processing, a black area will be displayed for 100ms, causing the display interface to flicker.

[0053] Adding a 200m delay will cause correctly displayed data to overwrite (remove) incorrectly displayed data, thus filtering out flickering black areas and resolving the flickering issue. The resulting display effect is shown in the image below. Figure 2 As shown, Figure 2 An exemplary schematic diagram of a delayed interface refresh method is shown.

[0054] In another scenario, if display data is received every 100ms, without any processing, each data entry will display a 100ms segment of the screen, causing the display to flicker. The resulting screen flicker is shown in the image below. Figure 3 As shown, Figure 3 Another exemplary schematic diagram of a delayed interface refresh method is shown.

[0055] If a delay of 200m is added, the display effect is as shown in the image. Figure 4 As shown, Figure 4 This diagram illustrates yet another example of a delayed interface refresh method. Although the display no longer flickers, a significant amount of intermediate display data is lost, which is not desirable during the display process.

[0056] If a delay of 200m and a data acquisition period of 300ms are added, the display effect is as shown in the image. Figure 5 As shown, Figure 5 An exemplary schematic diagram of an interface refresh method combining delay and periodic sampling is shown. By combining delay and periodic sampling for display interface refresh, not only can the problem of display interface flickering be solved, but also the problem of display interface not refreshing for a long time due to loss of intermediate display data can be avoided.

[0057] The following is an embodiment of an interface refresh method provided in this application specification.

[0058] Figure 6 The illustration shows a schematic flowchart of an interface refresh method provided in an embodiment of this application, such as... Figure 6 As shown, the execution subject of the interface refresh method provided in this application embodiment is an electronic device, such as a mobile display device, a display device installed on a vehicle, or other devices with display functions.

[0059] The above-mentioned interface refresh methods include the following solutions:

[0060] S110: Upon receiving the first display data each time, update the second display data in the delayed display task using the first display data;

[0061] S120: Determine whether the sampling period of the data sampling task has been reached;

[0062] S130: When the sampling period is reached, retrieve the latest storage time display data from the updated delayed display task display data to obtain the target display data;

[0063] S140: Refresh the display interface based on the target display data.

[0064] In an exemplary embodiment, each new, unused display data received is referred to as first display data, and the delayed display task is created in advance. When the electronic device's display interface is displaying data for the first time, if no display data has been received yet, it can be understood that the second display data stored in the delayed display task is empty data, i.e., no display data is stored in the delayed display task. When the electronic device's display interface is not displaying data for the first time, the second display data stored in the delayed display task can be understood as previously received, unused display data, also referred to as old display data. The delayed display task is a temporary storage mechanism used to save the latest received, unused display data and, after a certain delay, decide whether to use the latest received, unused display data as the final display data.

[0065] The delayed display task has a corresponding delay duration. After display data is stored in the delayed display task, it is not immediately used to refresh the display interface; instead, it is suspended for later use. Each time the first display data is received, it is stored in the delayed display task to update the second display data stored there, thus updating the delayed display task. This means that the delayed display task always stores the latest received and unused display data.

[0066] A data sampling task can be understood as a periodic sampling task of the displayed data. It is also created in advance and has a corresponding sampling period duration, which is longer than the delay duration of the delayed display task. The sampling period duration refers to the time interval at which the data sampling task executes periodically, while the delay duration refers to the waiting time for the delayed display task. This ensures that frequently received display data is not displayed immediately, thus avoiding flickering issues. Setting the sampling period duration to be longer than the delay duration prevents some display data from being lost due to delayed usage, thus avoiding the problem of the display interface not refreshing for a long time.

[0067] The data sampling task starts at the same time as the delayed display task; that is, the two tasks are executed simultaneously. For example, if the delayed display task starts at time 1, the data sampling task also starts at time 1. The delay duration timer for the delayed display task and the sampling period duration timer for the data sampling task both start counting simultaneously.

[0068] After the delayed display task is updated, it is determined whether the sampling period of the data sampling task has been reached. If the sampling period has been reached, the latest stored display data is retrieved from the updated delayed display task's display data. This can also be understood as retrieving the latest received but unused display data from the updated delayed display task's display data to obtain the target display data, which is the final display data used for refreshing the display interface. For example, the latest stored display data in the updated delayed display task is the first display data 5 received at time 5. The current time is time 7, which is also the time when the sampling period has been reached. Since no display data has been received from time 5 to time 7, then the first display data 5 is the target display data.

[0069] After obtaining the target display data, the display interface is refreshed using this data to visually display the content of the target display data, ensuring that the user sees the latest and most stable data. By combining a delayed task mechanism and a periodic sampling mechanism in the interface display, even if different display data is received multiple times in a short period of time, the display interface will not change frequently. This not only avoids visual flickering issues but also prevents data loss due to latency, thus avoiding the problem of the display interface not refreshing for extended periods.

[0070] This application embodiment combines a delayed task mechanism and a periodic sampling mechanism for interface display by employing a technical solution that, upon receiving first display data, updates the second display data in a delayed display task with the first display data, determines whether the sampling period of the data sampling task has been reached (the start time of the data sampling task is the same as the start time of the delayed display task, and the sampling period is longer than the delay period of the delayed display task), and, if the sampling period has been reached, retrieves the latest-stored display data from the updated display data of the delayed display task to obtain the target display data, and refreshes the display interface based on the target display data. On the one hand, by setting a delayed display task, it avoids frequent refreshes of the display interface and visual flickering caused by receiving different display data multiple times in a short period. On the other hand, by setting a data sampling task with a sampling period longer than the delay period of the delayed display task, it avoids data loss due to the delayed task, preventing the display interface from not refreshing for extended periods, thus improving the user experience.

[0071] The following are Figure 1 The specific implementation methods of each step in the illustrated embodiment will be explained below:

[0072] In one possible implementation, after determining whether the sampling period of the data sampling task has been reached in S120 above, the interface refresh method further includes the following steps:

[0073] If the sampling period has not been reached, determine whether the delay period has been reached;

[0074] When the delay period is reached, retrieve the latest stored display data from the updated delayed display task's display data to obtain the target display data.

[0075] Because the sampling period is longer than the delay period, if the sampling period is not reached, the display data stored in the delayed display task will not be used. This can lead to data loss due to the delayed sampling period and the delay task itself, resulting in the display interface not refreshing for an extended period. Therefore, if the sampling period is not reached, the system further checks if the delay period has arrived. If the delay period has arrived, the latest stored display data is retrieved from the updated delayed display task's display data to obtain the target display data. This target display data, obtained when the delay period has arrived, is then used to refresh the display interface, thus preventing the display interface from not refreshing for an extended period. The target display data obtained when the delay period has arrived may be the same as or different from the target display data obtained when the sampling period has arrived.

[0076] In one possible implementation, the above-mentioned S140, which refreshes the display interface according to the target display data, includes the following steps:

[0077] Determine whether the similarity between the first data to be used and the second data to be used is less than the similarity threshold;

[0078] If not, refresh the display interface based on the second set of data to be used.

[0079] The first set of data to be used is the target display data obtained when the delay period has elapsed, and the second set of data to be used is the target display data obtained when the sampling period has elapsed.

[0080] Since the sampling period is longer than the delay, the delay may arrive earlier than the sampling period. If the display has already been refreshed using the first set of data, after acquiring the second set of data, it's determined whether the similarity between the first and second sets of data is less than a similarity threshold. If not, it means the first and second sets of data are identical. Since the display has already been refreshed using the first set of data, and the second set of data is identical, refreshing the display again with the second set of data would not change the content, thus avoiding a waste of system resources. If yes, it means the first and second sets of data are different, and the second set of data is used to refresh the display, effectively avoiding unnecessary screen refreshes.

[0081] In one possible implementation, after updating the second display data in the delayed display task with the first display data each time the first display data is received, the interface refresh method further includes the following steps:

[0082] Set the delay duration to zero and restart the delay timer.

[0083] As time passes, the remaining delay time gradually decreases. If the delayed display task does not reset the delay timer after each update, once the delay timer expires, any subsequent moment will be considered the expiration date of the delay. Each subsequent received first display data will then be a "first pending data," leading to frequent refreshes of the display interface using each received first pending data, resulting in a flickering display. Therefore, after each update, the delayed display task should reset the delay timer to zero and reset the delay timer to avoid the flickering issue that occurs when refreshing the display interface with the first pending data.

[0084] In one possible implementation, the above-mentioned S110, in each instance of receiving first display data, updating the second display data in the delayed display task using the first display data includes the following steps:

[0085] Each time CarMediaApp receives the first display data sent by the MediaSession application, it replaces the second display data with the first display data to update the delayed display task.

[0086] When the above interface refresh method is specifically applied to a display device installed on a vehicle, such as an in-vehicle display device with CarMediaApp installed, CarMediaApp refreshes its display interface by sending display data through the MediaSession application.

[0087] When CarMediaApp receives a request to start CarMediaApp, it creates a delayed display task and a data sampling task, sets the sampling period of the data sampling task to be longer than the delay duration of the delayed display task, and then starts the delayed display task and the data sampling task at the same time.

[0088] After enabling the delayed display task and data sampling task, CarMediaApp updates the delayed display task by replacing the second display data with the first display data sent by the MediaSession application each time it receives the first display data. Specifically, the delayed display task always stores one set of display data. After replacing the second display data with the first display data, the original second display data is deleted, and the first display data becomes the new second display data. This ensures that the display data stored in the delayed display task is always the latest received display data.

[0089] In one possible implementation, replacing the second display data with the first display data includes the following steps:

[0090] Determine the similarity between the first displayed data and the second displayed data;

[0091] If the similarity is less than the similarity threshold, the first display data will replace the second display data.

[0092] When applying the above interface refresh method to in-vehicle display devices, considering that the first display data sent by the MediaSession application to CarMediaApp may be the same as the second display data in the delayed display task, CarMediaApp would easily waste computing resources by replacing the second display data with the first display data every time it receives the first display data from the MediaSession application. Therefore, each time CarMediaApp receives the first display data from the MediaSession application, it checks whether the first display data sent by the MediaSession application is the same as the second display data in the delayed display task. If they are the same, there is no need to replace the second display data in the delayed display task, and the second display data in the delayed display task is retained. If they are different, the first display data is used to replace the second display data in the delayed display task, thereby saving system computing resources and avoiding unnecessary update operations. Specifically, it is determined whether the first display data sent by the MediaSession application is the same as the second display data in the delayed display task. This is done by judging similarity. If the similarity between the first display data and the second display data is less than the similarity threshold, it is determined that the first display data and the second display data are not the same. If the similarity between the first display data and the second display data is greater than or equal to the similarity threshold, it is determined that the first display data and the second display data are the same.

[0093] In one possible implementation, the above-mentioned S140, which refreshes the display interface according to the target display data, includes the following steps:

[0094] Refresh the CarMediaApp display interface based on the target display data.

[0095] When the above interface refresh method is specifically applied to in-vehicle display devices, when the sampling period is reached, the latest storage time display data is obtained from the updated delayed display task display data to obtain the target display data. By refreshing the CarMediaApp display interface using the target display data, the problem of visual flickering in the CarMediaApp display interface caused by frequent updates of display data by MediaSession applications in the field of in-vehicle display technology can be solved.

[0096] The following is another embodiment of an interface refresh method provided in this application specification.

[0097] The interface refresh method provided in this application is applied to in-vehicle display devices, and the interface refresh method includes the following solutions:

[0098] S210: Each time CarMediaApp receives the first display data sent by the MediaSession application, it replaces the second display data in the delayed display task with the first display data to update the delayed display task.

[0099] The delayed display task is a temporary storage mechanism used to save the latest received but unused display data, and after a certain delay, decide whether to use the latest received but unused display data as the final display data.

[0100] The delayed display task always stores only one set of display data. Replacing the second display data in the delayed display task with the first display data involves: determining the similarity between the first and second display data; if the similarity is less than a similarity threshold, replacing the second display data with the first display data; if the similarity is greater than or equal to the similarity threshold, discarding the first display data and keeping the second display data unchanged. Since the delayed display task always stores only one set of display data, after replacing the second display data with the first display data, the original second display data is deleted, and the first display data becomes the new second display data. This ensures that the display data stored in the delayed display task is always the latest received display data.

[0101] S221: Set the delay duration of the delayed display task to zero and restart the delay duration timing.

[0102] As time passes, the remaining delay time gradually decreases. If the delayed display task does not reset the delay timer after each update, once the delay timer expires, any subsequent moment will be considered the expiration date of the delay. Each subsequent received first display data will then be a "first pending data," leading to frequent refreshes of the display interface using each received first pending data, resulting in a flickering display. Therefore, after each update, the delayed display task should reset the delay timer to zero and reset the delay timer to avoid the flickering issue that occurs when refreshing the display interface with the first pending data.

[0103] S222: Determine if the sampling period duration of the data sampling task has been reached. The sampling period duration is greater than the delay duration. The start time of the data sampling task is the same as the start time of the delayed display task; that is, the two tasks are executed simultaneously. For example, if the delayed display task starts at time 1, the data sampling task also starts at time 1. The delay duration timer for the delayed display task and the sampling period duration timer for the data sampling task start counting simultaneously.

[0104] S223: Determine whether the delay duration has been reached if the sampling period duration has not been reached.

[0105] S224: If the delay period is reached, retrieve the latest storage time display data from the updated delayed display task display data to obtain the first data to be used, use the first data to be used as the target display data, and execute S226.

[0106] Because the sampling period is longer than the delay period, if the sampling period is not reached, the display data stored in the delayed display task will not be used. This can lead to data loss due to the sampling period not being reached and the delay task itself, resulting in the display interface not refreshing for an extended period. Therefore, if the sampling period is not reached, it is further determined whether the delay period has been reached. If the delay period has been reached, the latest stored display data is retrieved from the updated delayed display task's display data to obtain the target display data. Then, the target display data obtained when the delay period has been reached is used to refresh the display interface, thus avoiding the problem of the display interface not refreshing for an extended period.

[0107] S225: When the sampling period is reached, obtain the latest storage time display data from the updated delayed display task display data to obtain the second data to be used, use the second data to be used as the target display data, and execute S226.

[0108] The first and second data to be used may be the same or different. Since the sampling period is longer than the delay, the delay may arrive earlier than the sampling period. If the display has already been refreshed using the first data, after obtaining the second data, it's determined whether the similarity between the first and second data is less than a similarity threshold. If not, it means the first and second data are the same. Since the display has already been refreshed using the first data, and the second data is identical, refreshing the display again with the second data would not change the content. Therefore, the second data is not used to refresh the display, avoiding waste of system resources. If the second data is different, it means the first and second data are different. In this case, the second data is used to refresh the display, becoming the target data, thus effectively avoiding unnecessary interface refreshes.

[0109] S226: Refresh the CarMediaApp display interface based on the target display data.

[0110] This application combines a delayed task mechanism and a periodic sampling mechanism for the interface display of CarMediaApp in the field of automotive display technology. On the one hand, by setting a delayed display task, the frequent refresh of the CarMediaApp display interface caused by receiving different display data multiple times in a short period of time can be avoided, thus solving the problem of visual flickering caused by frequent updates of display data in MediaSession applications in the field of automotive display technology. On the other hand, by setting a data sampling task, and setting the sampling period of the data sampling task to be longer than the delay duration of the delayed display task, the problem of display data loss caused by the delayed task, resulting in the CarMediaApp display interface not refreshing for a long time, can be avoided, which is conducive to improving the user experience of CarMediaApp.

[0111] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0112] Figure 7 This paper illustrates a schematic diagram of the structure of an interface refresh device provided in an embodiment of this application, as shown below. Figure 7 As shown, the interface refresh device 700 includes:

[0113] The task update module 710 is used to update the second display data in the delayed display task using the first display data each time the first display data is received.

[0114] The time judgment module 720 is used to determine whether the sampling period of the data sampling task has been reached; wherein the start time of the data sampling task is the same as the start time of the delayed display task, and the sampling period is longer than the delay duration of the delayed display task.

[0115] The data sampling module 730 is used to obtain the latest storage time display data from the updated display data of the delayed display task when the sampling period duration is reached, so as to obtain the target display data;

[0116] The interface refresh module 740 is used to refresh the display interface according to the target display data.

[0117] In one possible implementation, the task update module 710 is specifically used to replace the second display data with the first display data each time the vehicle media application receives the first display data sent by the media session application, so as to update the delayed display task.

[0118] In one possible implementation, the task update module 710, in replacing the second display data with the first display data, is further configured to: determine the similarity between the first display data and the second display data; if the similarity is less than a similarity threshold, replace the second display data with the first display data.

[0119] In one possible implementation, the interface refresh module 740 is specifically used to refresh the display interface of the vehicle media application according to the target display data.

[0120] In one possible implementation, the data sampling module 730 is further configured to determine whether the delay duration has been reached if the sampling period duration has not been reached; and if the delay duration has been reached, to obtain the latest storage time display data from the updated display data of the delayed display task to obtain the target display data.

[0121] In one possible implementation, the interface refresh module 740 is specifically used to determine whether the similarity between the first data to be used and the second data to be used is less than a similarity threshold; wherein, the first data to be used is the target display data obtained when the delay duration is reached, and the second data to be used is the target display data obtained when the sampling period duration is reached; if so, the display interface is refreshed according to the second data to be used.

[0122] In one possible implementation, the task update module 710 is further configured to, upon receiving the first display data, update the second display data in the delayed display task using the first display data, set the delay duration to zero, and restart the timing of the delay duration.

[0123] It should be noted that the interface refresh device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the interface refresh method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the interface refresh device and the interface refresh method embodiments provided in the above embodiments belong to the same concept. Therefore, for details not disclosed in the device embodiments of this application, please refer to the above-described embodiments of the interface refresh method of this application, which will not be repeated here.

[0124] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0125] Figure 8 This application provides a schematic diagram of the structure of an electronic device according to an embodiment of the present application. Figure 8As shown, the electronic device 800 includes a memory 801 and a processor 802. The memory 801 stores executable program code 8011, and the processor 802 is used to call and execute the executable program code 8011 to perform an interface refresh method.

[0126] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each module can correspond to a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0127] When each functional module is divided according to its corresponding function, the electronic device may include: a task update module, a time judgment module, a data sampling module, and an interface refresh module, etc. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0128] The electronic device provided in this embodiment is used to execute the above-described interface refresh method, and thus can achieve the same effect as the above-described implementation method.

[0129] When using integrated units, the electronic device may include a processing module and a storage module. The processing module is used to control and manage the operation of the electronic device. The storage module is used to support the execution of relevant program code and data by the electronic device.

[0130] The processing module may be a processor or a controller, which can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.

[0131] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the aforementioned method steps to implement an interface refresh method as described in the above embodiment.

[0132] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement an interface refresh method as described in the above embodiment.

[0133] In addition, the electronic device provided in the embodiments of this application may specifically be a chip, component or module. The electronic device may include a connected processor and a memory. The memory is used to store instructions. When the electronic device is running, the processor may call and execute the instructions to make the chip execute an interface refresh method in the above embodiments.

[0134] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding interface refresh method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding interface refresh method provided above, and will not be repeated here.

[0135] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0136] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0137] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for refreshing an interface, characterized in that, The interface refresh method includes: Each time the vehicle media application receives the first display data sent by the media session application, it uses the first display data to update the second display data in the delayed display task. The second display data includes display data that the vehicle media application has previously received but has not yet used. After the display data is stored in the delayed display task, the display data in the delayed display task will not be used immediately for refreshing the display interface, but will be suspended and used later. Set the delay duration of the delayed display task to zero, and restart the timing of the delay duration; After the delayed display task is updated, it is determined whether the sampling period of the data sampling task has been reached; wherein, the start time of the data sampling task is the same as the start time of the delayed display task, and the sampling period is longer than the delay duration; When the sampling period is reached, the latest storage time display data is obtained from the updated display data of the delayed display task to obtain the target display data; If the sampling period has not been reached, determine whether the delay period has been reached; If the specified delay time is reached, the latest stored display data is obtained from the updated display data of the delayed display task to obtain the target display data; The display interface of the vehicle media application is refreshed based on the target display data.

2. The interface refresh method according to claim 1, characterized in that, The step of updating the second display data in the delayed display task using the first display data includes: The first display data is used to replace the second display data to update the delayed display task.

3. The interface refresh method according to claim 2, characterized in that, The step of replacing the second display data with the first display data includes: Determine the similarity between the first displayed data and the second displayed data; If the similarity is less than the similarity threshold, the first display data is used to replace the second display data.

4. The interface refresh method according to claim 1, characterized in that, The step of refreshing the display interface of the vehicle media application based on the target display data includes: Determine whether the similarity between the first data to be used and the second data to be used is less than a similarity threshold; wherein, the first data to be used is the target display data obtained when the delay duration is reached, and the second data to be used is the target display data obtained when the sampling period duration is reached; If so, refresh the display interface according to the second data to be used.

5. A screen refresh device, characterized in that, The interface refresh device includes: The task update module is used to update the second display data in the delayed display task with the first display data each time the vehicle media application receives the first display data sent by the media session application, set the delay duration of the delayed display task to zero, and restart the timing of the delay duration. The second display data includes display data previously received by the vehicle media application that has not yet been used. After the display data is stored in the delayed display task, the display data in the delayed display task will not be used immediately for refreshing the display interface, but will be suspended and used later. The time determination module is used to determine whether the sampling period of the data sampling task has been reached after the delayed display task is updated; wherein the start time of the data sampling task is the same as the start time of the delayed display task, and the sampling period is longer than the delay duration; The data sampling module is used to obtain the latest storage time display data from the updated display data of the delayed display task to obtain the target display data when the sampling period duration is reached; and to determine whether the delay duration is reached when the sampling period duration is not reached; and to obtain the target display data from the updated display data of the delayed display task when the delay duration is reached. The interface refresh module is used to refresh the display interface of the vehicle media application based on the target display data.

6. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable program code; A processor is configured to call and run the executable program code from the memory, causing the electronic device to perform the interface refresh method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the interface refresh method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Interface message display and processing method, device and electronic device

    CN109408159A

  • Page updating method and device based on current limiter and computer storage medium

    CN109725974A

  • Method and device for controlling refresh frequency, computer equipment and computer readable storage medium

    CN115756711A