Progressive theme changing method and device, equipment and storage medium
By using a progressive theme change method, page controls are registered in the control pool, and the page control switching process is accelerated when a map theme switching completion instruction is received. This solves the problem of incoordination between page controls and map theme switching in vehicle navigation systems, thus improving the user experience.
Patent Information
- Application Number
- CN202510814500.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-10-17
AI Technical Summary
When switching between daytime and nighttime themes, in-vehicle navigation systems often exhibit abrupt, delayed, and jerky transitions. The lack of coordination between page controls and map theme switching results in a poor user experience.
A progressive theme change approach is adopted, which registers page controls through a control pool, retrieves controls to be loaded sequentially, and speeds up the page control switching process when a map theme switching completion instruction is received. Switching acceleration rules such as switching only keyframes, reducing control resolution, and simple matrix transformations are used to ensure that the page control and map theme switching times are synchronized.
It achieves time synchronization between page controls and map theme, improves user experience, reduces abruptness during switching, and enhances the smooth transition of the navigation interface.
Smart Images

Figure CN120803578A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to a progressive theme changing method, device, equipment and storage medium. BACKGROUND
[0002] Taking car navigation as an example, the car navigation is prone to a series of problems such as harshness, delay and jerkiness in the process of switching day theme and night theme. Moreover, the car navigation page card and the map are prone to uncoordinated and inconsistent phenomenon when switching theme, resulting in flickering problem of the map theme switching and jarring feeling of the user caused by the synchronous switching of the car navigation page card. SUMMARY
[0003] Embodiments of the present application provide a progressive theme changing method, device, equipment and storage medium, to at least register the page control into the control pool, and sequentially take out the to-be-loaded control when in use, slow down the switching progress of the page control, and speed up the switching progress of the page control after the map theme switching is completed, so as to at least solve the problem of inconsistent switching time of the page control and the map theme in the prior art, facilitate the time synchronization of the page control and the map theme switching, and improve the user experience.
[0004] In a first aspect, embodiments of the present application provide a progressive theme changing method, at least including the following steps:
[0005] loading a page control and a map theme;
[0006] registering the page control meeting a preset condition into a control pool to generate a corresponding control tree;
[0007] generating and issuing a theme switching instruction in response to a theme replacement operation of a user;
[0008] sequentially taking out a to-be-loaded control from the control pool according to the theme switching instruction to complete the switching of the page control;
[0009] calling a theme switching interface to complete the switching of the map theme;
[0010] when receiving a switching completion instruction of the map theme and any page control switching is not completed, speeding up the switching progress of the page control based on a switching acceleration rule;
[0011] determining that the theme replacement operation is executed after at least the page control and the map theme are completely switched.
[0012] Optionally, the page control meeting the preset condition is registered into the control pool to generate the corresponding control tree, specifically including:
[0013] registering the page control into the control pool to generate the corresponding to-be-loaded control;
[0014] constructing a first connection between the to-be-loaded controls meeting the preset condition according to the hierarchical relationship of the page controls to generate a corresponding control tree.
[0015] Optionally, after the first connection is constructed between the to-be-loaded controls meeting the preset condition according to the hierarchical relationship of the page controls to generate a corresponding control tree, the method further comprises:
[0016] constructing a second connection between adjacent controls in any control layer;
[0017] constructing a third connection between at least the control layer and a parent control of the current control layer;
[0018] wherein a second link is constructed between a tail control and a head control in any control layer.
[0019] Optionally, the to-be-loaded controls are sequentially taken out of the control pool according to the theme switching instruction to complete the switching of the page controls, and the method specifically comprises:
[0020] pointing a control pointer position to a head control of a lowest hierarchical control layer;
[0021] traversing the control layer based on the control pointer position and the second connection to complete the switching of the page controls;
[0022] after the control pointer position is re-pointed to the head control of the current control layer, it is determined that the current control layer is traversed completely;
[0023] pointing the control pointer position to the parent control of the current control layer according to the third connection; and re-traversing the control layer based on the control pointer position and the second connection to complete the switching of the page controls;
[0024] after the traversal of all the control layers is completed, it is determined that the switching of the page controls is completed completely.
[0025] Optionally, the switching acceleration rule at least comprises one of only switching a key frame, reducing control resolution, and simple matrix transformation.
[0026] Optionally, the method further comprises:
[0027] recording the switching completion time of the map theme and all the page controls in each round;
[0028] statistically calculating the switching completion time difference of the map theme and all the page controls in each round;
[0029] The switching completion time of the page control in the next round is dynamically adjusted based on the switching completion time difference.
[0030] Optionally, the progressive theme change method further includes:
[0031] In response to the user's theme modification operation, generating a corresponding task configuration list based on the theme modification operation through the cloud;
[0032] The cloud sends the task configuration list to the system end to be switched, so that the system end performs the corresponding theme change operation based on the configuration task list.
[0033] In a second aspect, an embodiment of the present invention further provides a progressive theme changing device, comprising a system end and a theme switching manager;
[0034] The system side is used to load the page control and the map theme; and, in response to the user's theme change operation, generate and issue a theme switching instruction;
[0035] The theme switching manager includes:
[0036] A control registration module, configured to register the page controls that meet preset conditions into a control pool to generate a corresponding control tree;
[0037] A page switching module, configured to sequentially retrieve the controls to be loaded from the control pool at least according to the theme switching instruction, so as to complete the switching of page controls;
[0038] Theme switching module, used to call the theme switching interface to complete the switching of the map theme;
[0039] a time coordination module, configured to accelerate the switching progress of the page control based on a switching acceleration rule when a switching completion instruction of the map theme is received and the switching of any of the page controls is not completed;
[0040] The completion confirmation module is used to determine that the theme change operation is completed at least after the page control and the map theme are all switched.
[0041] In a third aspect, an embodiment of the present invention further provides an electronic device comprising a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the progressive theme change method described in the first aspect are executed.
[0042] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the progressive theme changing method described in the first aspect.
[0043] The technical scheme provided by the embodiment of the present application firstly loads a page control and a map theme; further, registers the page control meeting the preset condition into a control pool to generate a corresponding control tree; further, generates and sends a theme switching instruction in response to a theme changing operation of a user; further, takes out the to-be-loaded control from the control pool according to the theme switching instruction to complete switching of the page control; further, calls a theme switching interface to complete switching of the map theme; further, when a switching completion instruction of the map theme is received and any page control switching is not completed, accelerates the switching progress of the page control based on a switching acceleration rule; and further, determines that the theme changing operation is completed after at least the page control and the map theme are completely switched.
[0044] It can be seen that, on one hand, the embodiment of the present application registers the page control into the control pool, and takes out the to-be-loaded control to make the page control switch gradually, so that the fade-in and fade-out effect is realized when the page control is switched, and the user experience is improved. On the other hand, when the switching completion instruction of the map theme is received and any page control switching is not completed, the embodiment of the present application accelerates the switching progress of the page control based on the switching acceleration rule, so as to at least solve the problem that the switching time of the page control and the map theme is inconsistent in the prior art, which is beneficial to promote the time synchronization of the switching of the page control and the map theme, and improve the user experience. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the specific embodiments of the present application or the technical schemes in the prior art, the drawings needed to be used in the specific embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0046] Figure 1 is a flowchart of a gradual theme changing method provided by the embodiment of the present application;
[0047] Figure 2 is a flowchart of another gradual theme changing method provided by the embodiment of the present application;
[0048] Figure 3 is a page control diagram provided by the embodiment of the present application;
[0049] Figure 4 is a control tree provided by the embodiment of the present application;
[0050] Figure 5 is another control tree provided by the embodiment of the present application;
[0051] Figure 6 is another control tree provided by an embodiment of the present application;
[0052] Figure 7 is a page control switching timing diagram provided by an embodiment of the present application;
[0053] Figure 8 is a flowchart of another progressive theme changing method provided by an embodiment of the present application;
[0054] Figure 9 is a structural schematic diagram of a progressive theme changing device provided by an embodiment of the present application;
[0055] Figure 10 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0057] The terms used in the embodiments of the present application are only for the purpose of describing the specific embodiments, and are not intended to limit the present application. The singular forms "a", "an" and "the" used in the embodiments of the present application and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. "Multiple" generally includes at least two.
[0058] It should be understood that the term "and / or" used herein is only to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper generally represents that the front and rear associated objects are a "or" relationship.
[0059] It should be understood that although the terms first, second, third, etc. can be used in the embodiments of the present application, these descriptions should not be limited to these terms. These terms are only used to distinguish the description. For example, without departing from the scope of the embodiments of the present application, the first can also be called the second, and similarly, the second can also be called the first.
[0060] Depending on the context, the word "if' can be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting," generally or as used in this document. Similarly, the phrase "if it is determined" or "if [a stated condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the stated condition or event]" or "in response to detecting [the stated condition or event]," generally or as used in this document.
[0061] It is also important to note that the terms "comprises", "comprising", "includes", "including" or other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0062] In particular, it is to be noted that symbols and / or numbers present in the description and not marked in the description of the figures are not figure references.
[0063] As mentioned in the background, the current car machine navigation page card and map are also prone to uncoordinated and inconsistent when switching themes, causing the map theme to flicker when switching, and the car machine navigation page card to be synchronized to switch, causing a jarring feeling for the user. The inventor found that the reason for this problem is that when switching the navigation theme, the page control switches the theme first, and the map theme switches the theme later, with a difference of more than 1S.
[0064] Therefore, the inventor found after thinking that the map theme switching time is difficult to control artificially, and the inventor proposes to gradually switch the page control in a progressive manner, increase the switching time of the page control, and gradually control the switching completion time of the page control and the map theme to be consistent, and finally obtains the following solution:
[0065] Figure 1 A flowchart of a progressive theme changing method provided by an embodiment of the present application, the embodiment is applicable to at least the theme changing scene of the car machine navigation, and the progressive theme changing method can be executed by the progressive theme changing device in the embodiment of the present application as an execution subject, and the execution subject can be realized in the form of software and / or hardware. As shown in the figure, the progressive theme changing method at least includes the following steps: Figure 1 S1, loading a page control and a map theme.
[0066] S1, loading a page control and a map theme.
[0067] The page control can be a related control and a UI element in the navigation interface. The map theme can be divided into two parts, namely a map base map theme (including mountains, rivers, grasslands, roads, etc.) and a map layer theme (including a car logo, a traffic light, a search result marker, an eagle eye map, etc.).
[0068] S2, register the page control meeting the preset condition in the control pool to generate a corresponding control tree.
[0069] The preset condition can be that the page control is not covered, non-transparent, etc. It can be understood that by removing the page control that does not meet the condition, the switching speed of the subsequent page control can be further accelerated. The control tree can be a special control pool with a tree structure and capable of storing page controls.
[0070] S3, in response to a theme changing operation of a user, generate and issue a theme switching instruction.
[0071] The theme changing operation can be that the user clicks a theme changing button on the man-machine interface of the navigation software. The theme switching instruction can be an Ethernet signal for switching the navigation theme (from the day theme to the night theme).
[0072] S4, at least according to the theme switching instruction, sequentially take out the to-be-loaded control from the control pool to complete the switching of the page control.
[0073] The to-be-loaded control can be the corresponding control generated when the page control is registered in the control pool. It can be known that the to-be-loaded control and the page control correspond one-to-one.
[0074] S5, call a theme switching interface to complete the switching of the map theme.
[0075] The theme switching interface can be an interface called when the map theme is switched, such as an updateStyle interface, a setMapStyle interface, etc. It can be understood that the switching of the map layer theme is also gradually started when the switching of the map base map theme is started.
[0076] S6, when the switching completion instruction of the map theme is received and any page control switching is not completed, accelerate the switching progress of the page control based on a switching acceleration rule.
[0077] In one specific embodiment, the switching acceleration rule at least includes one of only switching key frames, reducing control resolution, and simple matrix transformation. Only switching key frames can be only rendering the key frames of the switching animation of the page control. Simple matrix transformation can be only performing simple translation, rotation, scaling, etc. on the page control when switching the page control.
[0078] S7, at least after the page control and the map theme are switched completely, it is determined that the theme changing operation is executed completely.
[0079] The technical scheme provided by the embodiment firstly loads the page control and the map theme; further, the page control meeting the preset condition is registered into the control pool to generate the corresponding control tree; further, in response to the theme changing operation of the user, the theme switching instruction is generated and sent; further, at least according to the theme switching instruction, the to-be-loaded control is taken out from the control pool in sequence to complete the switching of the page control; further, the theme switching interface is called to complete the switching of the map theme; further, when the switching completion instruction of the map theme is received and any page control switching is not completed, the switching acceleration rule is based on to speed up the switching progress of the page control; further, at least after the page control and the map theme are switched completely, it is determined that the theme changing operation is executed completely.
[0080] Therefore, it can be seen that, on the one hand, the page control is registered into the control pool, and is taken out in sequence for use, so that the page control is switched gradually, the fade-in and fade-out effect is realized during the switching of the page control, and the user experience is improved. On the other hand, when the switching completion instruction of the map theme is received and any page control switching is not completed, the switching acceleration rule is based on to speed up the switching progress of the page control, so as to at least solve the problem that the page control and the map theme switching time are inconsistent in the prior art, which is beneficial to promote the time synchronization of the page control and the map theme switching, and improve the user experience.
[0081] On the basis of the above embodiment or embodiment, Figure 2 is a flowchart of another gradual theme changing method provided by the embodiment of the present application, and the embodiment is added on the basis of the above embodiment. As shown in the figure, Figure 2 the gradual theme changing method at least includes the following steps:
[0082] S1, loading the page control and the map theme.
[0083] S21, registering the page control into the control pool to generate the corresponding to-be-loaded control.
[0084] Among them, Figure 3 is a page control diagram provided by the embodiment of the present application, referring to Figure 3 , it can be known that the page control B (not shown in the figure) is blocked by the page control E and cannot be displayed, and the page control D is a transparent control.
[0085] S22, according to the hierarchical relationship of the page control, a first connection is constructed between the to-be-loaded controls meeting the preset condition to generate the corresponding control tree.
[0086] Among them, the hierarchical relationship can be understood as whether the page control belongs to the same layer.Figure 4 is a control tree provided by an embodiment of the present application, referring to Figure 4 , the initially constructed control tree is as shown in Figure 4 . Figure 5 is another control tree provided by an embodiment of the present application, since the page control B and the page control E do not meet the preset condition, the page control B and the page control E need to be removed after the control tree is initially generated, and the control tree after the removal is as shown in Figure 5 .
[0087] S81, constructing a second connection between adjacent controls in any control layer.
[0088] Among them, the second connection is constructed between the tail control and the head control in any control layer. The head control can be the leftmost to-be-loaded control of the control layer. Conversely, the tail control can be the rightmost to-be-loaded control of the control layer. The control layer can be divided by different heights of the control tree. The adjacent controls can be the to-be-loaded controls adjacent to the control on the left and right in the same control layer.
[0089] S82, constructing a third connection between at least the control layer and the parent control of the current control layer.
[0090] Among them, Figure 6 is still another control tree provided by an embodiment of the present application, referring to Figure 6 , the second connection (the half-dashed line-half-dashed line in Figure 6 ) and the third connection (the double long-dashed line-half-dashed line in Figure 6 ) are constructed, and the control tree after the construction is as shown in Figure 6 .
[0091] S3, generating and issuing a theme switching instruction in response to a theme replacement operation of a user.
[0092] Among them, the user can also trigger the theme replacement operation based on the cloud, and in a specific implementation manner, the progressive theme changing method further includes:
[0093] (31) generating a corresponding task configuration list based on the theme modification operation through the cloud in response to a theme modification operation of a user.
[0094] Among them, the task configuration list at least contains a replacement strategy of a map theme or a page control.
[0095] (32) issuing the task configuration list to a to-be-switched system end through the cloud, so that the system end performs a corresponding theme replacement operation based on the configuration task list.
[0096] S5, calling a theme switching interface to complete the switching of the map theme.
[0097] S41, point the control pointer position to the first control of the lowest level control layer.
[0098] Continuing to refer to Figure 6 The lowest level control layer can be understood as the control layer at the bottom of the control tree, that is, the control layer corresponding to the to-be-loaded controls G, H, and I. It can be understood that step S41 and step S5 are executed synchronously.
[0099] S42, based on the control pointer position and the second connection, traverse the control layer to complete the switching of the corresponding page control.
[0100] The switching of the corresponding page control can be rendering the corresponding to-be-loaded control to the map page. In specific rendering, the rendering animation effect can be customized based on the pre-defined rendering configuration file, such as fading in and out, shrinking and expanding, and the like. Continuing to refer to Figure 6 , the traversal manner of traversing the control layer based on the control pointer position and the second connection can be: first, the control pointer position points to the to-be-loaded control G, and the to-be-loaded control G corresponding page control is switched; further, since the second connection of the to-be-loaded control G points to the to-be-loaded control H, the control pointer position is also moved to the to-be-loaded control H, and the switching of the to-be-loaded control H corresponding page control D is completed; similarly, until the to-be-loaded control I corresponding page control is switched, according to the second connection of the to-be-loaded control I, the control pointer position is re-pointed to the to-be-loaded control G.
[0101] S43, after the control pointer position is re-pointed to the first control of the current control layer, it is determined that the traversal of the current control layer is completed.
[0102] S44, according to the third connection, the control pointer position is pointed to the parent control of the current control layer.
[0103] Continuing to refer to Figure 6 , the parent control of the current control layer is the to-be-loaded control F, so the control pointer position is pointed to the to-be-loaded control F.
[0104] S45, re-traverse the control layer based on the control pointer position and the second connection to complete the switching of the corresponding page control.
[0105] The control layer corresponding to the to-be-loaded control F only has one to-be-loaded control, so after the to-be-loaded control F corresponding page control is switched, the control pointer position is pointed to the to-be-loaded control E.
[0106] S6, when the switching completion instruction of the map theme is received and any page control switching is not completed, the switching progress of the page control is accelerated based on the switching acceleration rule.
[0107] Wherein Figure 7is a page control switching timing diagram provided by an embodiment of the present application. Referring to Figure 7 , step S6 can be as shown in Figure 7 .
[0108] S46, at least after the traversal of all control layers is completed, determine that the page control switching is completed.
[0109] Continuing to refer to Figure 6 , the traversal order of the to-be-loaded controls is G, H, I, F, E, C and A in sequence. When the page control corresponding to the to-be-loaded control A is switched, it can be considered that the page control switching is completed.
[0110] S7, at least after the page control and the map theme are switched, determine that the theme replacement operation is completed.
[0111] wherein, Figure 8 is a flow chart of another gradual theme changing method provided by an embodiment of the present application, as shown in Figure 8 , the gradual theme changing method at least includes the following steps:
[0112] S91, record the switching completion time of the map theme and all page controls in each round.
[0113] S92, count the switching completion time difference of the map theme and all page controls in each round.
[0114] S93, dynamically adjust the switching completion time of the page control in the next round based on the switching completion time difference.
[0115] It can be known that the purpose of setting this step is to gradually calibrate the page control switching time to be consistent with the map theme switching time.
[0116] The technical solution provided by this embodiment first loads a page control and a map theme. Furthermore, the page control is registered in a control pool to generate a corresponding control to be loaded. Furthermore, based on the hierarchical relationship of the page control, a first connection is established between controls to be loaded that meet preset conditions to generate a corresponding control tree. Furthermore, a second connection is established between adjacent controls within any control layer. Furthermore, a third connection is established between at least one control layer and the parent control of the current control layer. Furthermore, in response to a user's theme change operation, a theme switch instruction is generated and issued. Furthermore, a theme switch interface is called to switch the map theme. Furthermore, the control pointer position is pointed to the first control of the lowest-level control layer. Furthermore, the control layer is traversed based on the control pointer position and the second connection to complete the switching of the corresponding page control. Furthermore, after the control pointer position is re-pointed to the first control of the current control layer, it is determined that the traversal of the current control layer is complete. Furthermore, the control pointer position is pointed to the parent control of the current control layer based on the third connection. Furthermore, the control layer is traversed again based on the control pointer position and the second connection to complete the switching of the corresponding page control. Furthermore, upon receiving a map theme switch completion instruction and any page control switch not yet completed, the page control switch progress is accelerated based on the switch acceleration rules. Furthermore, at least after all control layers have been traversed, the complete switch of all page controls is determined. Finally, the theme change operation is determined to be complete after at least all page controls and map themes have been switched.
[0117] It can be seen that, on the one hand, this embodiment registers the page control into the control pool, and takes out the controls to be loaded in sequence when in use, so that the page controls are switched one by one, achieving a gradual in and out effect when the page controls are switched, thereby improving the user experience. On the other hand, when the switch completion instruction of the map theme is received and the switch of any page control is not completed, the switching progress of the page control is accelerated based on the switching acceleration rule, so as to at least solve the problem of inconsistent switching time between the page control and the map theme in the prior art, which is conducive to promoting the time synchronization of the switching of the page control and the map theme, and improving the user experience. On the other hand, this embodiment records the time difference between the switching completion of the map theme and the page control in each round, and dynamically adjusts the switching completion time of the next round of page controls based on the completion time difference, gradually making the switching completion time of the map theme and the page control consistent, thereby improving the user experience.
[0118] Figure 9 This is a structural diagram of a progressive theme changing device provided by an embodiment of the present invention. This embodiment is at least applicable to the theme switching scenario of vehicle navigation. The progressive theme changing device can be implemented in software and / or hardware. Figure 9 As shown, the progressive theme changing device 100 at least includes a system end 110 and a theme switching manager 120 .
[0119] The system end 110 is configured to load the page control and the map theme, and generate and send a theme switching instruction in response to a theme changing operation of a user.
[0120] The theme switching manager 120 comprises:
[0121] The control registration module 130 is configured to register the page control satisfying the preset condition into the control pool to generate a corresponding control tree.
[0122] The page switching module 140 is configured to sequentially take out the to-be-loaded control from the control pool according to the theme switching instruction to complete the switching of the page control.
[0123] The theme switching module 150 is configured to call a theme switching interface to complete the switching of the map theme.
[0124] The time coordination module 160 is configured to accelerate the switching progress of the page control based on a switching acceleration rule when the switching completion instruction of the map theme is received and any page control switching is not completed.
[0125] The completion confirmation module 170 is configured to determine that the theme changing operation is completed at least after the switching of the page control and the map theme is completed.
[0126] Optionally, the control registration module 130 is specifically configured to:
[0127] register the page control into the control pool to generate a corresponding to-be-loaded control, and construct a first connection between the to-be-loaded controls satisfying the preset condition according to the hierarchical relationship of the page control to generate a corresponding control tree.
[0128] Optionally, the control registration module 130 is further specifically configured to:
[0129] construct a second connection between adjacent controls in any control layer, and construct a third connection at least between the control layer and the parent control of the current control layer.
[0130] The second connection is constructed between the tail control and the head control in any control layer.
[0131] Optionally, the page switching module 140 is specifically configured to:
[0132] pointing the control pointer position to the first control of the lowest level control layer; and traversing the control layer based on the control pointer position and the second connection to complete the switching of the corresponding page control; and after the control pointer position is re-pointed to the first control of the current control layer, determining that the traversal of the current control layer is completed; and pointing the control pointer position to the parent control of the current control layer according to the third connection; and re-traversing the control layer based on the control pointer position and the second connection to complete the switching of the corresponding page control; and determining that the switching of all page controls is completed at least after the traversal of all control layers is completed.
[0133] Optionally, the switching acceleration rule at least includes one of only switching key frames, reducing control resolution, and simple matrix transformation.
[0134] Optionally, further comprising:
[0135] a time control module, configured to record the switching completion time of each round of map theme and all page controls; and statistically adjust the switching completion time of the next round of page controls based on the switching completion time difference.
[0136] Optionally, further comprising:
[0137] a cloud control module, configured to generate a corresponding task configuration list based on the theme modification operation in response to the theme modification operation of the user; and issue the task configuration list to the system end to be switched, so that the system end performs the corresponding theme replacement operation based on the configuration task list.
[0138] The technical scheme provided by the embodiment first loads the page control and the map theme through the system end; further, in response to the theme replacement operation of the user, the theme switching instruction is generated and issued through the system end; further, the page control meeting the preset condition is registered into the control pool through the control registration module by the theme switching manager, so as to generate the corresponding control tree; further, the page control to be loaded is taken out from the control pool in turn by the theme switching manager according to the theme switching instruction through the page switching module, so as to complete the switching of the page control; further, the theme switching interface is called to complete the switching of the map theme by the theme switching manager through the theme switching module; further, when the switching completion instruction of the map theme is received and any page control switching is not completed, the switching progress of the page control is accelerated based on the switching acceleration rule by the theme switching manager through the time coordination module; further, after the switching of the page control and the map theme is completed, the theme replacement operation is determined to be completed by the theme switching manager through the completion confirmation module.
[0139] It can be seen that, on the one hand, the page control is registered in the control pool, and the to-be-loaded control is taken out in sequence for use, so that the page control is switched, the fade-in and fade-out effect is realized when the page control is switched, and the user experience is improved. On the other hand, when the switching completion instruction of the map theme is received and any page control switching is not completed, the switching acceleration rule is used to speed up the switching progress of the page control, so as to at least solve the problem that the page control and the map theme switching time are inconsistent in the prior art, facilitate the time synchronization of the page control and the map theme switching, and improve the user experience.
[0140] The embodiment of the application also provides an electronic device, Figure 10 is a structural schematic diagram of an electronic device provided by the embodiment of the application, referring to Figure 10 The electronic device 1000 includes a processor 1001 and a memory 1002, and the memory 1002 stores computer readable instructions. When the computer readable instructions are executed by the processor 1001, the steps in any one of the above progressive theme changing methods are run. Through the above technical solution, the processor 1001 and the memory 1002 are interconnected and communicate with each other through a communication bus and / or other forms of connection mechanism (not marked). The memory 1002 stores a computer program executable by the processor, and when the electronic device 1000 is running, the processor 1001 executes the computer program to execute the progressive theme changing method in any optional implementation manner of the above embodiment, so as to at least realize the following functions: loading page controls and a map theme; registering the page controls meeting the preset condition in the control pool to generate a corresponding control tree; generating and issuing a theme switching instruction in response to a theme changing operation of a user; taking out the to-be-loaded control from the control pool in sequence according to the theme switching instruction to complete the switching of the page control; calling a theme switching interface to complete the switching of the map theme; when the switching completion instruction of the map theme is received and any page control switching is not completed, speeding up the switching progress of the page control based on the switching acceleration rule; and at least after the page control and the map theme are completely switched, determining that the theme changing operation is executed.
[0141] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the progressive theme changing method provided by all the embodiments of the present application: loading page controls and a map theme; registering the page controls meeting preset conditions into a control pool to generate a corresponding control tree; generating and sending a theme switching instruction in response to a theme changing operation of a user; taking out the to-be-loaded controls from the control pool in sequence according to at least the theme switching instruction to complete switching of the page controls; calling a theme switching interface to complete switching of the map theme; when a switching completion instruction of the map theme is received and any page control switching is not completed, accelerating the switching progress of the page controls based on a switching acceleration rule; and determining that the theme changing operation is executed completely at least after the page controls and the map theme are all switched.
[0142] Any combination of one or more computer readable medium can be employed. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present document, a computer readable storage medium can be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
[0143] A computer readable signal medium can include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
[0144] Program code embodied on a computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0145] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0146] The above examples are merely intended for describing the technical solutions of the present application, but not for limiting the same; even though the present application has been described in detail with reference to the foregoing examples, it should be understood by those skilled in the art that the technical solutions recorded in the foregoing examples can be modified, or some of the technical features can be replaced by equivalent ones; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A progressive theme change method, characterized in that: At least the following steps are included: Load page controls and map themes; Registering the page controls that meet preset conditions into a control pool to generate a corresponding control tree; In response to the user's theme change operation, generate and issue a theme switching instruction; At least according to the theme switching instruction, controls to be loaded are sequentially taken out from the control pool to complete the switching of page controls; Call the theme switching interface to complete the switching of the map theme; When a switch completion instruction of the map theme is received and the switch of any of the page controls is not completed, accelerating the switch progress of the page controls based on a switch acceleration rule; At least after the page controls and the map themes are all switched, it is determined that the theme switching operation is completed.
2. The progressive theme changing method according to claim 1, characterized in that: Registering the page controls that meet the preset conditions into the control pool to generate a corresponding control tree specifically includes: Registering the page control into the control pool to generate the corresponding control to be loaded; According to the hierarchical relationship of the page controls, a first connection is established between the controls to be loaded that meet the preset conditions to generate a corresponding control tree.
3. The progressive theme changing method according to claim 2, characterized in that: After building a first connection between the controls to be loaded that meet the preset conditions according to the hierarchical relationship of the page controls to generate a corresponding control tree, the method further includes: Building a second connection between adjacent controls in any control layer; Establishing at least a third connection between the control layer and a parent control of the current control layer; Wherein, a second link is constructed between the tail control and the head control in any of the control layers.
4. The progressive theme changing method according to claim 3, characterized in that: The extracting the to-be-loaded controls from the control pool in sequence at least according to the theme switching instruction to complete the switching of the page controls specifically includes: Set the control pointer position to the first control in the lowest level control layer; traversing the control layer based on the control pointer position and the second connection to complete switching of the corresponding page control; After the control pointer position is re-pointed to the first control of the current control layer, determining that the traversal of the current control layer is completed; Pointing the control pointer position to the parent control of the current control layer according to the third connection; Re-traversing the control layer based on the control pointer position and the second connection to complete switching of the corresponding page control; At least after all the control layers are traversed, it is determined that all the page controls are switched.
5. The progressive theme changing method according to claim 1, wherein: The switching acceleration rule includes at least one of switching only key frames, reducing control resolution, and simple matrix transformation.
6. The progressive theme changing method according to claim 1, wherein: The method further comprises: Record the completion time of switching of the map theme and all the page controls in each round; Counting the time difference between the map theme and all the page controls in each round of switching completion; The switching completion time of the page control in the next round is dynamically adjusted based on the switching completion time difference.
7. The progressive theme changing method according to claim 1, wherein: The progressive theme change method further includes: In response to the user's theme modification operation, generating a corresponding task configuration list based on the theme modification operation through the cloud; The task configuration list is sent to the system end to be switched via the cloud, so that the system end performs the corresponding theme switching operation based on the configuration task list.
8. A progressive theme changing device, characterized in that: Includes system-side and theme switching managers; The system side is used to load page controls and map themes; and, generating and issuing a theme switching instruction in response to a theme changing operation by a user; The theme switching manager includes: A control registration module, configured to register the page controls that meet preset conditions into a control pool to generate a corresponding control tree; A page switching module, configured to sequentially retrieve the controls to be loaded from the control pool at least according to the theme switching instruction, so as to complete the switching of page controls; Theme switching module, used to call the theme switching interface to complete the switching of the map theme; a time coordination module, configured to accelerate the switching progress of the page control based on a switching acceleration rule when receiving a switching completion instruction of the map theme and the switching of any of the page controls is not completed; The completion confirmation module is used to determine that the theme change operation is completed at least after the page control and the map theme are all switched.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the method executes the steps of the progressive theme changing method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the progressive theme changing method described in any one of claims 1 to 7 is implemented.