Method, device and equipment for switching theme of vehicle terminal and storage medium

By storing resource packages in the vehicle terminal system path and using masked screen gradient animation, the problems of screen flickering and resource redundancy are solved, enabling efficient custom theme switching and improving user experience.

CN118069348BActive Publication Date: 2026-03-03AVATR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing in-vehicle terminals suffer from screen flickering during theme switching, impacting user experience, and also lack custom theme switching capabilities and resource redundancy issues.

Method used

The resource package is stored in a designated path on the vehicle terminal system. A gradual animation is performed during theme switching using a masked screen to avoid screen reconstruction and utilize system-level resources for loading.

Benefits of technology

It reduces the application-side resource loading process, avoids screen flickering, improves the visual experience, and reduces resource redundancy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118069348B_ABST
    Figure CN118069348B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, and storage medium for theme switching in an in-vehicle terminal. The method includes: upon receiving a theme switching request, determining the resource package path of the target theme based on the theme switching request; obtaining the resource package of the target theme corresponding to the foreground application based on the resource package path of the target theme, wherein the resource package is stored in the in-vehicle terminal system; adding a preset mask screen to the root layout of the foreground application; loading the resource package of the target theme into the application of the foreground application; and removing the mask screen after the resource package of the target theme has been loaded. With this method, the theme resource package is stored in the system path, eliminating the need to reconstruct the screen during theme switching, effectively reducing the resource loading process on the application side. Adding a mask screen during switching avoids screen flickering and improves the visual experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to vehicle technology, and more particularly to a method, apparatus, device, and storage medium for switching themes on an in-vehicle terminal. Background Technology

[0002] With the development of vehicle technology, switching themes for in-vehicle terminals has become a common function in vehicles, such as switching between day and night mode. Theme changes can include changes to images, colors, models, and other elements, as well as layout modifications.

[0003] Currently, the common approach for theme switching is to use two sets of resources on the application side, placing the resources in the application's (app) path and monitoring changes in the Android system's native UI mode to replace the resources accordingly. However, this method involves replacing resource files, which requires reconstructing the screen during the replacement process, inevitably causing screen flickering and affecting the user experience.

[0004] Therefore, how to avoid screen flickering and improve user experience when switching themes is an urgent problem to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, device, and storage medium for switching themes on an in-vehicle terminal, in order to solve the problem of screen flickering affecting user experience when switching themes on an in-vehicle terminal.

[0006] Firstly, this application provides a method for switching themes on an in-vehicle terminal, applied to an in-vehicle terminal, the method comprising:

[0007] When a theme switching request is detected, the resource package path of the target theme is determined based on the theme switching request;

[0008] The resource package corresponding to the target theme is obtained according to the resource package path of the target theme, and the resource package is stored in the vehicle terminal system;

[0009] Add a preset mask image to the root layout of the foreground application;

[0010] Load the resource package of the target theme into the application of the foreground application;

[0011] After the resource package for the target theme has been loaded, remove the mask image.

[0012] Optionally, before determining the resource package path of the target theme based on the theme switching request, the method further includes:

[0013] In response to the user's theme switching operation on the display interface of the vehicle terminal, the theme switching request is generated;

[0014] or,

[0015] When the preset theme switching rules are met, the theme switching request is generated.

[0016] Optionally, loading the resource package of the target theme into the application of the foreground application includes:

[0017] Open the resource pack for the target theme using File Explorer;

[0018] Read the resources from the resource package of the target topic;

[0019] The resources of the target theme resource package that have been read are applied to the corresponding functions of the front-end application.

[0020] Optionally, the theme switching request includes the theme value to be switched to, and correspondingly, determining the resource package path of the target theme based on the theme switching request includes:

[0021] The resource package path of the target theme is determined based on the theme value and a preset theme configuration table. The theme configuration table stores the mapping relationship between the resource package path and the theme value for each theme.

[0022] Optionally, the mask image includes at least one of a semi-transparent mask, a Gaussian blur mask, a color gradient mask, and a dynamic mask.

[0023] Optionally, the method further includes:

[0024] When any background application is detected to be launched, check whether the resource package of the target theme exists in the cache area;

[0025] If the cache area contains a resource package for the target theme, load the resource package for the target theme into the application of any of the background applications;

[0026] If the resource package for the target theme does not exist in the cache area, the resource package for the target theme is obtained and loaded into the application of any of the background applications.

[0027] Optionally, the method further includes:

[0028] Receive application-side theme resource packages pushed by the server;

[0029] The resource package is stored in a designated path of the vehicle terminal system;

[0030] The path of the bound resource package and the theme value corresponding to the theme are stored in a preset theme configuration table.

[0031] Secondly, this application also provides a device for switching themes on an in-vehicle terminal, the device comprising:

[0032] The first acquisition module is used to determine the resource package path of the target theme based on the theme switching request when a theme switching request is detected.

[0033] The second acquisition module is used to acquire the resource package of the target theme corresponding to the front-end application according to the resource package path of the target theme, and the resource package is stored in the vehicle terminal system;

[0034] Add a module to add a preset mask image to the root layout of the foreground application;

[0035] A control module is used to load the resource package of the target theme into the application of the foreground application;

[0036] The removal module is used to remove the mask image after the resource package of the target theme has been loaded.

[0037] Thirdly, this application also provides an in-vehicle terminal, including:

[0038] The processor, the memory communicatively connected to the processor, and the communication interface for interacting with other devices;

[0039] The memory stores computer-executed instructions;

[0040] The processor executes computer execution instructions stored in the memory to implement the method for switching vehicle terminal themes as described in any of the first aspects.

[0041] Fourthly, this application also provides a vehicle, the vehicle comprising: the vehicle-mounted terminal described in the third aspect.

[0042] Fifthly, this application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method for switching themes of an in-vehicle terminal as described in any of the first aspects.

[0043] Sixthly, this application also provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, is used to implement the method for switching themes of an in-vehicle terminal as described in any of the first aspects.

[0044] This application provides a method, apparatus, device, and storage medium for theme switching in vehicle-mounted terminals. The method includes: upon detecting a theme switching request, determining the resource package path of the target theme based on the theme switching request; obtaining the resource package of the target theme corresponding to the foreground application based on the resource package path of the target theme, wherein the resource package is stored in the vehicle-mounted terminal system; adding a preset mask screen to the root layout of the foreground application; loading the resource package of the target theme into the application of the foreground application; and removing the mask screen after the resource package of the target theme has been loaded. With this method, the theme resource package is stored in the system path, eliminating the need to reconstruct the screen during theme switching, effectively reducing the resource loading process on the application side. Furthermore, adding a mask screen at the system layer during switching avoids screen flickering and improves the visual experience. Attached Figure Description

[0045] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0046] Figure 1 A schematic diagram illustrating a possible application scenario provided in this application;

[0047] Figure 2 A flowchart illustrating an embodiment of the method for switching vehicle terminal themes provided in this application;

[0048] Figure 3 A flowchart illustrating a second embodiment of the method for switching vehicle terminal themes provided in this application;

[0049] Figure 4 A flowchart illustrating a third embodiment of the method for switching vehicle terminal themes provided in this application;

[0050] Figure 5 A schematic diagram of the structure of an embodiment of the vehicle terminal theme switching device provided in this application;

[0051] Figure 6 This is a structural schematic diagram of a vehicle-mounted terminal provided in this application.

[0052] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0053] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0054] An application's theme is the overall look and style of its interface, including combinations of elements such as colors, fonts, and icons. Themes typically influence the overall style of the application, such as light and dark modes and color schemes.

[0055] Theme switching is achieved by changing the application's theme. Typically, applications offer several predefined themes for users to choose from, or automatically switch themes based on user settings (such as the system's night mode). Compared to changing application skins, theme switching focuses more on changing the overall appearance and style of the application, potentially including global modifications to colors, fonts, icons, etc.

[0056] Currently, the common approach for theme switching in vehicles is to use two sets of resources on the application side, placing the resources in the application's (app) path and monitoring changes in the Android system's native UI mode to replace the resources accordingly. However, this method has the following drawbacks:

[0057] 1. Android's native UIMode switching directly replaces the resource files, requiring a reconstruction of the screen, which inevitably causes screen flickering and affects the user experience.

[0058] 2. Android's native uimode only supports switching between day and night modes; other custom themes, such as dusk themes and summer cool themes, cannot be implemented.

[0059] 3. If you use the method of modifying the native Android configuration to support multiple themes, the app will need to store too many resource files.

[0060] 4. When a theme resource needs to be modified or a new theme is added, all apps need to be modified and republished. The apps and theme resources cannot be decoupled, resulting in a waste of manpower and resources.

[0061] In view of the above problems, the inventors discovered during their research that writing only the default theme resources on the app side and packaging the non-default theme resources into an Android application package (APK) and storing it in a specified system path can effectively reduce the resource loading process on the application side, thereby improving the efficiency of theme switching. Simultaneously, using system-level resource transition animations during the switching process can avoid screen flickering and improve the visual experience. Based on this, this application proposes a method, apparatus, device, and storage medium for theme switching in an in-vehicle terminal.

[0062] Figure 1 This application provides a possible application scenario illustration. Figure 1 In this process, the cloud server pushes newly added or modified theme resources to the user's terminal device. After receiving the new theme resources, the in-vehicle terminal device stores them in the system path of the in-vehicle terminal. When a theme switch is required, the theme switch is performed.

[0063] It should be noted that this method can be applied not only to in-vehicle terminal devices, but also to electronic devices such as mobile phones, computers, tablets, and smartwatches.

[0064] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0065] Figure 2 This is a flowchart illustrating an embodiment of the method for switching themes on an in-vehicle terminal provided in this application, as shown below. Figure 2 As shown, the method includes the following steps:

[0066] S101. When a theme switching request is detected, determine the resource package path of the target theme based on the theme switching request.

[0067] In this step, the vehicle-mounted terminal continuously monitors for theme switching requests. There are several ways to generate a theme switching request. It can be generated by the user performing a theme switching operation on the vehicle-mounted terminal's display interface, or it can be generated based on preset time changes, weather changes, or temperature changes. The theme switching request includes the theme value of the target theme to be switched to. The resource package path corresponding to that theme value is determined based on the theme value of the target theme in the theme switching request.

[0068] S102. Obtain the resource package corresponding to the target theme of the front-end application according to the resource package path of the target theme. The resource package is stored in the vehicle terminal system.

[0069] In this step, a unique resource package for the target theme can be found in the vehicle terminal system based on the resource package path of the target theme. Resource packages for non-default system themes are stored in a designated path within the vehicle terminal system, effectively reducing the resource loading process on the application side and thus improving the efficiency of theme switching.

[0070] S103. Add a preset mask screen to the root layout of the foreground application.

[0071] In this step, the resource package of the target theme is obtained for theme switching of the foreground application. The foreground application represents the application that is interacting with the user. Before the theme of the foreground application is switched, a mask screen is added to the root layout of the foreground application to prevent flickering during the switching process.

[0072] In one specific implementation, open the layout file of the foreground application, which is usually an "activity_main.xml" file. Add an element to the root element of the layout file to implement the mask effect. This mask can typically be a view or an image view. You can also set the element's attributes, such as background color or opacity, to achieve the desired mask effect. Depending on the actual needs, make the mask visible at the appropriate time. The mask is then added to the root layout of the foreground application, providing a masking layer for the foreground application.

[0073] Optionally, the mask can be set to a preset image or an image from the current page applied to the foreground. The pop-up mask is semi-transparent, with its transparency ranging from completely transparent to opaque, and its size can be increased.

[0074] Optionally, the masking effect includes various combinations of effects such as semi-transparent masks, Gaussian blur masks, color gradient masks, and dynamic modules. These combinations can achieve different transition effects for different themes.

[0075] S104. Load the resource package of the target theme into the application of the foreground application.

[0076] In this step, a resource manager is obtained in the foreground application. The resource manager is then used to open the target theme's resource package and read its resources. For example, the resource files can be read as an input stream. The read resources from the target theme's resource package are then applied to the corresponding interface or function in the foreground application.

[0077] For example, if it's an image resource, you can set it as the background of an ImageView or as an image resource. If it's a text resource, you can use it to display text content, etc.

[0078] During the loading of the target theme's resource package, a gradient animation is initiated to gradually change the transparency of the mask image, making it change according to a preset rule. For example, the preset rule can be based on a time rule, with the mask transparency gradually changing from completely opaque to completely transparent within a preset time period; the preset rule can also be based on the device's brightness and ambient light perception data to automatically adjust the mask transparency; the preset rule can also be based on a specific time period (such as day and night) to adjust the rate of change of the mask transparency; the preset rule can also be a gradient of transparency from the center of the mask outwards.

[0079] S105. After the target theme's resource pack has been loaded, remove the mask screen.

[0080] In this step, loading the target theme's resource package requires a time range, which can be determined in advance through testing. At the end of the time range, the transparency of the mask is adjusted to a preset transparency, such as completely transparent, or as low as a certain value. The screen displayed in the foreground application is the screen of the new theme's resources. At this point, the mask can be removed to display the target theme's screen.

[0081] Optionally, while adjusting the mask's opacity, a Gaussian blur effect can be applied, making the mask clearer.

[0082] This embodiment provides a method for theme switching in an in-vehicle terminal. Upon receiving a theme switching request, the method determines the resource package path of the target theme based on the request; retrieves the resource package of the target theme corresponding to the foreground application based on the resource package path, and stores the resource package in a specified path within the in-vehicle terminal system; adds a preset mask screen to the root layout of the foreground application; loads the target theme's resource package into the foreground application; and removes the mask screen after the target theme's resource package has been loaded. This method stores the theme resource package in a specified system path, eliminating the need for screen reconstruction during theme switching, effectively reducing resource loading on the application side. Furthermore, the system-level resource gradient animation during switching avoids screen flickering and improves the visual experience.

[0083] The following example, using the vehicle terminal receiving a theme resource package pushed by the server, illustrates the method for switching themes on a vehicle terminal.

[0084] Figure 3 This is a flowchart illustrating a second embodiment of the method for switching themes on an in-vehicle terminal provided in this application, as shown below. Figure 3 As shown, the method includes the following steps:

[0085] S201, The vehicle terminal receives the application-side topic resource package pushed by the server.

[0086] In this step, developers upload the designed application-side theme resource package to the cloud server, which then pushes it to the in-vehicle terminal. This application-side theme resource package can be a new theme resource package including multiple applications, a new theme resource package for a single application, or a modified version of a previous theme resource package.

[0087] In one implementation, the application-side theme resource package is upgraded by pushing it to the vehicle terminal via Over-the-Air (OTA) technology.

[0088] In one possible implementation, the user browses application-side themes on a cloud server through the in-vehicle terminal and downloads the corresponding theme resource package.

[0089] Optionally, users can configure within the app whether to receive multi-theme push notifications from the cloud, and which themes to receive, syncing to the cloud. When an application-side theme is updated, or resources within a theme are modified, the cloud pushes the update to a designated user on a designated vehicle. Users receive an update notification pop-up, allowing them to choose to update, postpone the update, or decline the notification. If the user chooses to update, the cloud will sync the corresponding resources to the designated user on the designated vehicle. Additionally, the same vehicle may be logged in by a vehicle owner or authorized account, and theme data will be isolated between different users. Theme resource package data can be synced to all vehicles of a user based on their user identifier.

[0090] S202. Store the resource package in the specified path of the vehicle terminal system.

[0091] In this step, the specified system path includes the system directory and mount point paths, such as / system, / data, and / cache. Theme resource packages stored in the system path can be accessed by all applications, not just specific applications. This means that all applications in the system can use the same theme resources, such as fonts and colors, avoiding the need to copy the same resources in each application and thus reducing resource redundancy.

[0092] The system path stores device-level configurations and resources, visible to all applications. This contrasts with existing technologies that store resource packages in the application's `res` path. The application's `res` path is a private resource storage area, accessible only to the application itself and not shared by other applications. If a resource needs updating, each application must handle the update logic individually. Storing resources in the system path allows for unified updates at the system level, benefiting all applications and eliminating the need for each application to store a copy of the resource package, thus reducing resource redundancy. Furthermore, resources stored in the application's path require loading through the application's internal mechanism, which may be slightly slower than loading resources from the system path.

[0093] S203. Store the path of the bound resource package and the theme value corresponding to the theme in the preset theme configuration table.

[0094] In this step, the theme value of the theme resource will be explicitly specified in the resource package. This theme value can be an identifier, a string, or a number. The storage path of the resource package and the theme value are bound and stored in the theme configuration table, making it easy to query the theme resource package path based on the theme value.

[0095] S204, The vehicle terminal generates a theme switching request.

[0096] In this step, the theme switching request can be generated by the user clicking the corresponding theme on the display page of the vehicle terminal, or it can be generated by receiving a theme switching request sent by an external terminal (such as a mobile phone). Alternatively, it can be generated by pre-set trigger rules in the vehicle terminal, such as different theme modes for different time periods of the day, different theme modes for different seasons, and different theme modes for different weather conditions.

[0097] S205. The vehicle terminal will synchronize the generated topic switching request to all registered listening applications.

[0098] In this step, the vehicle terminal sends a topic switching request to the registered application via broadcast or other communication mechanisms.

[0099] S206. When the front-end application detects a theme switching request, it obtains the target theme value.

[0100] In the foreground application, a receiver is registered to listen for theme switching requests. When a theme switching request is received, the target theme value in the theme switching request is obtained.

[0101] S207. Obtain the resource package path of the target theme value from the preset theme configuration table based on the target theme value.

[0102] In this step, the application uses the target theme value as the key to query the corresponding resource package path from the preset theme configuration table.

[0103] S208. Locate the corresponding resource package based on the found resource package path.

[0104] If the resource package of the target theme corresponding to the front-end application is found based on the resource package path of the target theme, then proceed to step S209.

[0105] If the resource package corresponding to the target theme for the front-end application is not found according to the resource package path of the target theme, then proceed to step S210.

[0106] S209. Load the resource package of the target theme value into the application.

[0107] S210, Display a message indicating that the theme switching failed.

[0108] In this step, if the corresponding resource package path is not found, the application will display a message informing the user that the theme switching failed. In one possible scenario, a theme switching failure message will also be displayed if loading the resource package fails.

[0109] It should be noted that the above steps all need to be implemented in the application's code, using appropriate Android APIs and related libraries. The specific implementation code will vary depending on the development environment, programming language, and framework.

[0110] This embodiment provides a method for switching themes on an in-vehicle terminal. The in-vehicle terminal receives a resource package of application-side themes pushed by the server and stores the resource package in a specified path in the in-vehicle terminal system. All registered and listening applications can access the theme resources in the resource package, which can avoid the waste of storage resources caused by copying and storing the same resources in each application.

[0111] Figure 4 A flowchart illustrating Embodiment 3 of the method for switching themes on an in-vehicle terminal provided in this application is shown below. Figure 4 As shown, when the application is launched from the background, the method includes the following steps:

[0112] S301. When any background application is detected to be running, check if the resource package of the target theme exists in the cache area.

[0113] In this step, after detecting a theme switching request, obtaining the resource package corresponding to the target theme, and loading the resource package into the foreground application, the resource package is cached in the cache area of ​​the vehicle terminal for use by other applications. The cache area can be a path within the vehicle terminal system or a storage area in the hardware device; the storage time of the resource package in the cache area can be set as needed, such as half an hour, one hour, immediate release after loading, or continuous storage until overwritten by a new resource package.

[0114] When a background application is detected to be starting, the system checks if a resource package exists in the cache area. Specifically, for applications that need to monitor theme switching, the in-vehicle terminal can create a background service or use the lifecycle methods of the Application class to detect the startup of the background application.

[0115] If the target topic resource package exists in the cache area, proceed to step S302.

[0116] If the target topic's resource package is not present in the cache area, proceed to step S303.

[0117] S302. Load the resource package corresponding to the target theme into the newly launched background application.

[0118] Optionally, start the mask animation during the resource pack loading process.

[0119] S303. Obtain the resource package of the target theme and load the resource package corresponding to the target theme into the newly launched background application.

[0120] In this step, all applications performing theme switching register a theme switching listener to listen for theme changes and take appropriate action when a theme switching request occurs. This listener is a component that implements a specific interface or inherits from a specific class. When a background application is detected starting up, it first needs to obtain the current theme value.

[0121] In one implementation, SharedPreferences can be used within the application to store and retrieve simple configuration information, including the current theme. Information about the current theme can be stored in SharedPreferences when switching themes, and information about the new theme is also stored there when a theme switch is detected. When the background application is open, it can retrieve this information from SharedPreferences, including the theme values.

[0122] In one implementation, a global variable or singleton can be defined in the application to store the current theme information. When the theme changes, the value of this global variable or singleton is updated. When the background application is opened, it can directly retrieve the current theme information, which includes the theme value.

[0123] Optionally, if the background application is triggered by an event, the current theme can be passed as a parameter to the background application via an Intent or Bundle when the background application starts. The background application can then retrieve the current theme information from the Intent or Bundle upon startup.

[0124] After obtaining the current target theme value, the corresponding resource package path is retrieved from the preset theme configuration table based on the target theme value, and then the resource package is loaded into the newly launched background application.

[0125] This embodiment provides a method for switching themes on an in-vehicle terminal. When any background application is detected to be running, if the resource package is not present in the cache area, the background application automatically detects the current target theme value upon startup, obtains the target theme's resource package, loads it into the newly launched application, and completes the theme switching for the background application. This method ensures that any background application opens with the latest theme, and loading themes from the system path improves the application's theme loading speed.

[0126] The following example demonstrates how to switch themes on an in-vehicle terminal:

[0127] Step 1: The user selects to switch to the "Sports Theme" in the application.

[0128] Step 2: The application determines the resource package path for the "sports theme" based on the user's selection. This path is stored in the designated path of the vehicle terminal system.

[0129] Step 3: The application accesses the specified path through the interface provided by the system to obtain the "sports theme" resource package, which includes new icons, colors and other elements.

[0130] Step 4: Add a semi-transparent layer as a mask to the root layout of the front-end interface.

[0131] The mask initially obscures the original theme's foreground interface, transitioning from completely transparent to completely opaque. The application then gradually reduces the mask's obscuring effect by progressively adjusting its transparency, allowing the "motion theme" to gradually emerge. This process may involve animation effects, which can be implemented using Android's animation libraries. When the mask becomes completely transparent, the application removes it from the interface, revealing the full "motion theme."

[0132] Step 5: When the mask transparency is adjusted to the preset transparency, remove the mask from the foreground interface through the system interface.

[0133] By following the steps above, the resource package was successfully loaded from the system path into the application, and a gradient effect was applied when switching themes, enhancing the user's visual experience.

[0134] Figure 5 This is a schematic diagram of the structure of an embodiment of the vehicle terminal theme switching device provided in this application, as shown below. Figure 5 As shown, the in-vehicle terminal theme switching device 500 includes:

[0135] The first acquisition module 511 is used to determine the resource package path of the target theme based on the theme switching request when a theme switching request is detected.

[0136] The second acquisition module 512 is used to acquire the resource package of the target theme corresponding to the front-end application according to the resource package path of the target theme, and the resource package is stored in the vehicle terminal system;

[0137] Add module 513 to add a preset mask screen to the root layout of the foreground application;

[0138] Control module 514 is used to load the resource package of the target theme into the application of the foreground application;

[0139] The removal module 515 is used to remove the mask image after the resource package of the target theme has been loaded.

[0140] Optionally, the apparatus further includes a generation module 516, which is used for:

[0141] In response to the user's theme switching operation on the display interface of the vehicle terminal, the theme switching request is generated;

[0142] or,

[0143] When the preset theme switching rules are met, the theme switching request is generated.

[0144] Optionally, the control module 514 is used for:

[0145] Open the resource pack for the target theme using File Explorer;

[0146] Read the resources from the resource package of the target topic;

[0147] The resources of the target theme resource package that have been read are applied to the corresponding functions of the front-end application.

[0148] Optionally, the topic switching request includes the topic value to be switched to. Accordingly, the first acquisition module 511 is specifically used for:

[0149] The resource package path of the target theme is determined based on the theme value and a preset theme configuration table. The theme configuration table stores the mapping relationship between the resource package path and the theme value for each theme.

[0150] Optionally, the device further includes: a detection module;

[0151] The detection module is used to detect whether the resource package of the target theme exists in the cache area when any background application is detected to be launched.

[0152] If the cache area contains a resource package for the target theme, load the resource package for the target theme into the application of any of the background applications;

[0153] If the resource package for the target theme does not exist in the cache area, the resource package for the target theme is obtained and loaded into the application of any of the background applications.

[0154] Optionally, the device further includes a receiving module, a storage module, and a binding module:

[0155] The receiving module is used to receive resource packages of application-side themes pushed by the server;

[0156] The storage module is used to store the resource package in a specified path of the vehicle terminal system;

[0157] The binding module is used to store the path of the bound resource package and the theme value corresponding to the theme in a preset theme configuration table.

[0158] The in-vehicle terminal theme switching device provided in this application embodiment is used to implement the in-vehicle terminal theme switching method described in any of the foregoing method embodiments. Its implementation principle and technical effects are similar, and will not be described in detail here.

[0159] Figure 6 This application provides a structural schematic diagram of a vehicle-mounted terminal, such as... Figure 6 As shown, the vehicle-mounted terminal 600 includes:

[0160] The processor 611, the memory 612 communicatively connected to the processor, and the communication interface 613 for interacting with other devices;

[0161] The memory 612 stores computer-executed instructions;

[0162] The processor 611 executes computer execution instructions stored in the memory to implement the vehicle terminal theme switching method described in any of the above method embodiments.

[0163] Optionally, the in-vehicle terminal may also include a display screen for interacting with the user.

[0164] Optionally, the various devices in the vehicle terminal 600 can be connected via a system bus.

[0165] The memory 612 can be a separate memory unit or a memory unit integrated into the processor 611. The number of processors 611 can be one or more.

[0166] It should be understood that the processor 611 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0167] The system bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. Memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0168] All or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable memory. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.

[0169] The vehicle terminal provided in this application embodiment is used to implement the vehicle terminal theme switching method described in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.

[0170] This application also provides a vehicle that includes the vehicle-mounted terminal described in the above embodiments.

[0171] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method for switching themes of an in-vehicle terminal as described in any of the foregoing method embodiments.

[0172] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memories described above are intended to include, but are not limited to, these and any other suitable types of memory.

[0173] This application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, it can implement the vehicle terminal theme switching method described in any of the foregoing method embodiments.

[0174] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0175] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A method for switching themes on a vehicle-mounted terminal, characterized in that, The method includes: When a theme switching request is detected, the resource package path of the target theme is determined based on the theme switching request; The resource package of the target theme corresponding to the foreground application is obtained according to the resource package path of the target theme, and the resource package of the target theme is cached in the cache area of ​​the vehicle terminal; the system path of the vehicle terminal stores the resource package of the non-default theme, and the application path of the application stores the resource package of the default theme; the resource package of the non-default theme includes: new theme resource package and updated theme resource package, and the system path includes: system directory and mount point path; Add a preset mask image to the root layout of the foreground application; The resource package of the target theme is loaded into the application of the foreground application; wherein, during the loading of the resource package of the target theme, the transparency of the mask image is adjusted according to the brightness and ambient light perception data of the vehicle terminal, and the rate of change of the transparency is adjusted according to the current time period; After the resource package for the target theme has been loaded, remove the mask image; It also includes: when any background application is detected to start, checking whether the cache area contains a resource package for the target theme; if the cache area contains a resource package for the target theme, then loading the resource package for the target theme into the application of any background application.

2. The method according to claim 1, characterized in that, Before determining the resource package path of the target theme based on the theme switching request, the method further includes: In response to the user's theme switching operation on the display interface of the vehicle terminal, the theme switching request is generated; or, When the preset theme switching rules are met, the theme switching request is generated.

3. The method according to claim 1, characterized in that, The step of loading the resource package of the target theme into the application of the foreground application includes: Open the resource pack for the target theme using File Explorer; Read the resources from the resource package of the target topic; The resources of the target theme resource package that have been read are applied to the corresponding functions of the front-end application.

4. The method according to any one of claims 1 to 3, characterized in that, The theme switching request includes the theme value to be switched to. Correspondingly, determining the resource package path of the target theme based on the theme switching request includes: The resource package path of the target theme is determined based on the theme value and a preset theme configuration table. The theme configuration table stores the mapping relationship between the resource package path and the theme value for each theme.

5. The method according to any one of claims 1 to 3, characterized in that, The mask image includes at least one of the following: semi-transparent mask, Gaussian blur mask, color gradient mask, and dynamic mask.

6. The method according to any one of claims 1 to 3, characterized in that, The method further includes: If the resource package for the target theme does not exist in the cache area, then the resource package for the target theme is obtained and loaded into the application of any of the background applications.

7. The method according to claim 4, characterized in that, The method further includes: Receive application-side theme resource packages pushed by the server; The resource package is stored in the vehicle terminal system; The path of the bound resource package and the theme value corresponding to the theme are stored in a preset theme configuration table.

8. A device for switching themes on a vehicle-mounted terminal, characterized in that, The device includes: The first acquisition module is used to determine the resource package path of the target theme based on the theme switching request when a theme switching request is detected. The second acquisition module is used to acquire the resource package of the target theme corresponding to the foreground application according to the resource package path of the target theme, and cache the resource package of the target theme in the cache area of ​​the vehicle terminal; the system path of the vehicle terminal stores the resource package of the non-default theme, and the application path of the application stores the resource package of the default theme; Add a module to add a preset mask image to the root layout of the foreground application; A control module is used to load the resource package of the target theme into the application of the foreground application; wherein, during the loading of the resource package of the target theme, the transparency of the mask image is adjusted according to the brightness and ambient light perception data of the vehicle terminal, and the rate of change of the transparency is adjusted according to the current time period; The removal module is used to remove the mask image after the resource package of the target theme has been loaded; The detection module is used to detect whether the resource package of the target theme exists in the cache area when any background application is detected to be launched; if the resource package of the target theme exists in the cache area, the resource package of the target theme is loaded into the application of any background application.

9. A vehicle-mounted terminal, characterized in that, include: The processor, the memory communicatively connected to the processor, and the communication interface for interacting with other devices; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method for switching vehicle terminal themes as described in any one of claims 1 to 7.

10. A vehicle, characterized in that, The vehicle includes: the vehicle-mounted terminal as described in claim 9.

Citation Information

Patent Citations

  • Theme scene switching method and device for vehicle-mounted terminal

    CN110308961A

  • Online theme switching method and device, equipment and medium

    CN115794285A