Interface display method and apparatus, electronic device, and storage medium

By synthesizing interface frames from different processes in electronic devices, the problems of stuttering and output asynchrony during interface switching are solved, improving the smoothness and accuracy of interface display and enhancing the user experience.

WO2026031907A1PCT designated stage Publication Date: 2026-02-12HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/106316
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-09
Filing Date
2025-06-30
Publication Date
2026-02-12

AI Technical Summary

Technical Problem

Existing interface display technologies are prone to stuttering and output asynchrony when switching between interfaces generated by different processes, resulting in low animation smoothness and display accuracy during the switching process.

Method used

The system acquires interface frames generated by different processes through electronic devices, and determines the target frame based on the sequence number to synthesize it into a third interface frame. This ensures that the interface frames between processes match during the switching process, thereby improving the accuracy and smoothness of the display.

Benefits of technology

It ensures smooth animation and accurate display during interface transitions, avoiding overlapping or missing images and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025106316_12022026_PF_FP_ABST
    Figure CN2025106316_12022026_PF_FP_ABST
Patent Text Reader

Abstract

The present application is applicable to the technical field of device control, and provides an interface display method and apparatus, an electronic device, and a storage medium. The method comprises: in response to a switching operation of switching from a first interface to a second interface, determining, on the basis of a first sequence number identifier, a first target frame corresponding to a first process, and determining, on the basis of a second sequence number identifier, a second target frame corresponding to a second process, wherein the first process and the second process are different processes; generating a third interface frame on the basis of the first target frame and the second target frame; and displaying the third interface frame before the switching operation is completed. In embodiments of the present application, processes during interface switching are not run independently, but the electronic device can obtain interface frames of different processes on the basis of sequence number identifiers and synthesize same, so as to obtain a third interface frame to be displayed before the switching operation is completed, thereby ensuring the smoothness of display during switching, and also improving the accuracy of display.
Need to check novelty before this filing date? Find Prior Art

Description

Method and device for interface display, electronic device and storage medium

[0001] The present application claims priority to the Chinese patent application No. 202411098078.1, filed on August 9, 2024, and entitled "Method and device for interface display, electronic device and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application belongs to the technical field of device control, and particularly relates to a method and device for interface display, an electronic device and a storage medium. BACKGROUND

[0003] With the continuous development of display technology, the screen on the electronic device can provide users with pictures with higher resolution and higher refresh rate, thereby meeting the growing display needs of users. How to provide users with smooth and clear interfaces has become one of the main factors affecting the display effect of the electronic device.

[0004] The existing interface display technology, different interfaces, such as the main interface and the negative one screen interface on a smart phone, often draw interfaces through different processes. In the case of continuous improvement of the refresh rate of the electronic device, if the process of a certain interface runs in a lagging manner or the two processes are out of sync during interface switching, the smoothness of the animation in the interface switching process may be affected, thereby affecting the user experience. As can be seen, the existing display technology is prone to lag and output out of sync when switching between interfaces generated by different processes, and the smoothness and display accuracy of the switching process animation are low. SUMMARY

[0005] The embodiments of the present application provide a method and device for interface display, an electronic device and a storage medium, which can solve the problem that the existing display technology is prone to lag and output out of sync when switching between interfaces generated by different processes, and the smoothness and display accuracy of the switching process animation are low.

[0006] In a first aspect, the embodiments of the present application provide a method for interface display, comprising:

[0007] In response to a switching operation from a first interface to a second interface, determining a first target frame corresponding to a first process according to a first serial number identifier, and determining a second target frame corresponding to a second process according to a second serial number identifier; the first process and the second process are different processes;

[0008] Generating a third interface frame according to the first target frame and the second target frame;

[0009] display the third interface frame before the switching operation is completed.

[0010] The embodiments of the present application have the following beneficial effects: the electronic device can receive interface frames sent by different processes in the case that the user initiates a switching operation, each interface frame can correspond to a serial number identifier, the electronic device can determine target frames matched between different processes according to the serial number identifier, and thus can perform interface synthesis based on the target frames corresponding to two processes to obtain a third interface frame displayed before the switching operation is completed, thereby ensuring the smoothness of switching animation display and the accuracy of interface display during the switching process. Compared with the existing display technology, each process is not run alone during the switching process, but the electronic device can obtain each frame interface frame required by switching animation generated by different processes, and determine target frames matched between two processes for synthesis according to the serial number identifier corresponding to the interface frame to obtain a third interface frame, thereby avoiding the situation of picture overlapping or picture loss caused by the mismatch of selected interface frames, ensuring the smoothness of the display during the switching process, and improving the accuracy of the display.

[0011] In a possible implementation of the first aspect, the first serial number identifier of the first target frame is the same as the second serial number identifier of the second target frame.

[0012] In a possible implementation of the first aspect, in response to the switching operation from the first interface to the second interface, the first target frame corresponding to the first process is determined according to the first serial number identifier, and the second target frame corresponding to the second process is determined according to the second serial number identifier, including:

[0013] determining the first target frame from a first cache queue according to the first serial number identifier; the first cache queue is used to store at least one first interface frame sent by the first process;

[0014] determining the second target frame from a second cache queue according to the second serial number identifier; the second cache queue is used to store at least one second interface frame sent by the second process.

[0015] In a possible implementation of the first aspect, in response to the switching operation from the first interface to the second interface, the first target frame corresponding to the first process is determined according to the first serial number identifier, and the second target frame corresponding to the second process is determined according to the second serial number identifier, including:

[0016] if there is no second interface frame with the same first serial number identifier as the first target frame in the second cache queue, taking the second interface frame with the second serial number identifier earlier than the first serial number identifier of the first target frame in the second cache queue as the second target frame; or

[0017] If there is no first interface frame with the same second sequence number identifier as the second target frame in the first cache queue, the first interface frame with the first sequence number identifier earlier than the second sequence number identifier of the second target interface is taken as the first target frame.

[0018] In a possible implementation of the first aspect, the first sequence number identifier is determined according to a corresponding frame sequence number when the first process draws the first target frame; and / or

[0019] The second sequence number identifier is determined according to a corresponding frame sequence number when the second process draws the second target frame.

[0020] In a possible implementation of the first aspect, the switching operation is a sliding operation.

[0021] In a possible implementation of the first aspect, the switching operation is a sliding operation, and in response to the switching operation from the first interface to the second interface, a third interface frame corresponding to each display time is generated according to at least one frame first interface frame about the first interface sent by the first process and at least one frame second interface frame about the second interface sent by the second process, including:

[0022] According to a sliding distance of the switching operation, an offset distance is determined.

[0023] The third interface frame is generated based on the offset distance.

[0024] In a possible implementation of the first aspect, the third interface frame is generated based on the offset distance, including:

[0025] A first position corresponding to the first target frame and a second position corresponding to the second target frame are determined based on the offset distance.

[0026] The first target frame and the second target frame are merged according to the first position and the second position to generate the third interface frame.

[0027] In a possible implementation of the first aspect, the sliding operation is a sliding operation triggered by a finger of a user and / or a sliding operation triggered by a stylus.

[0028] In a possible implementation of the first aspect, the first interface is a main interface of an electronic device, and the second interface is a negative one screen interface; or

[0029] The first interface is a negative one screen interface, and the second interface is a main interface.

[0030] The second aspect is a device for displaying an interface, including:

[0031] The determining unit is configured to determine a first target frame corresponding to the first process according to the first sequence number identifier and determine a second target frame corresponding to the second process according to the second sequence number identifier in response to a switching operation of switching from the first interface to the second interface.

[0032] The synthesizing unit is configured to generate a third interface frame according to the first target frame and the second target frame.

[0033] The displaying unit is configured to display the third interface frame before the switching operation is completed.

[0034] In a possible implementation of the second aspect, the first sequence number identifier of the first target frame is the same as the second sequence number identifier of the second target frame.

[0035] In a possible implementation of the second aspect, the determining unit is configured to:

[0036] determine the first target frame from a first cache queue according to the first sequence number identifier, the first cache queue being configured to store at least one first interface frame sent by the first process;

[0037] determine the second target frame from a second cache queue according to the second sequence number identifier, the second cache queue being configured to store at least one second interface frame sent by the second process.

[0038] It should be noted that the determination of the first target frame and the second target frame can be implemented by the same determining unit or by different determining units, and the actual implementation can be set according to actual conditions. If different determining units are used, the first determining unit can be configured to determine the first target frame, and the second determining unit can be configured to determine the second target frame.

[0039] In a possible implementation of the second aspect, the determining unit is further configured to:

[0040] if there is no second interface frame with the same first sequence number identifier as the first target frame in the second cache queue, the second interface frame with the second sequence number identifier earlier than the first sequence number identifier of the first target frame in the second cache queue is taken as the second target frame.

[0041] In a possible implementation of the second aspect, the determining unit is further configured to:

[0042] if there is no first interface frame with the same second sequence number identifier as the second target frame in the first cache queue, the first interface frame with the first sequence number identifier earlier than the second sequence number identifier of the second target interface is taken as the first target frame.

[0043] In a possible implementation manner of the second aspect, the first sequence number identifier is determined according to a frame sequence number corresponding to a time when the first process draws the first target frame; and / or

[0044] The second sequence number identifier is determined according to a frame sequence number corresponding to a time when the second process draws the second target frame.

[0045] In a possible implementation manner of the second aspect, the switching operation is a sliding operation.

[0046] In a possible implementation manner of the second aspect, the switching operation is a sliding operation, and the synthesizing unit includes:

[0047] an offset distance determining unit, configured to determine an offset distance according to a sliding distance of the switching operation;

[0048] an interface offset unit, configured to generate the third interface frame based on the offset distance.

[0049] In a possible implementation manner of the second aspect, the interface offset unit includes:

[0050] a position determining unit, configured to determine a first position corresponding to the first target frame and a second position corresponding to the second target frame based on the offset distance;

[0051] a position merging unit, configured to merge the first target frame and the second target frame according to the first position and the second position to generate the third interface frame.

[0052] In a possible implementation manner of the second aspect, the sliding operation is a sliding operation triggered by a finger of a user and / or a sliding operation triggered by a stylus.

[0053] In a possible implementation manner of the second aspect, the first interface is a main interface of the electronic device, and the second interface is a negative one-screen interface; or

[0054] The first interface is a negative one-screen interface, and the second interface is a main interface.

[0055] In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a program stored in the memory, and the processor implements the steps of the method for displaying an interface according to any one of the other aspects when executing the program.

[0056] In a fourth aspect, an embodiment of the present application provides a readable storage medium, and the readable storage medium stores a program, and the program implements the steps of the method for displaying an interface according to any one of the other aspects when executed by a processor.

[0057] In a fifth aspect, an embodiment of the present application provides a program product, which, when running on a device, causes the device to perform the steps of the display method in any of the other aspects.

[0058] Other implementations can refer to the foregoing aspects, and will not be described herein.

[0059] The advantages of the foregoing aspects can be referred to each other, and will not be described herein. BRIEF DESCRIPTION OF DRAWINGS

[0060] FIG. 1 is a schematic diagram of a prior art interface switching process;

[0061] FIG. 2 is a schematic diagram of refresh timing of different interfaces of the prior art interface switching process;

[0062] FIG. 3 is a specific implementation flowchart of a method for displaying an interface according to an embodiment of the present application;

[0063] FIG. 4 is a schematic diagram of a switching operation according to an embodiment of the present application;

[0064] FIG. 5 is an interaction flowchart between multiple processes and an interface processing service in a process feedback stage according to an embodiment of the present application;

[0065] FIG. 6 is a schematic diagram of a dynamic interface according to an embodiment of the present application;

[0066] FIG. 7 is a schematic diagram of interface frame feedback timing of each process in the process feedback stage according to an embodiment of the present application;

[0067] FIG. 8 is an implementation flowchart of an interface frame synthesis stage according to an embodiment of the present application;

[0068] FIG. 9 is a schematic diagram of operation of a cache queue according to an embodiment of the present application;

[0069] FIG. 10 is a schematic diagram of operation of a cache queue according to another embodiment of the present application;

[0070] FIG. 11 is a schematic diagram of generation of a third interface frame according to an embodiment of the present application;

[0071] FIG. 12 is a schematic diagram of interface changes in a switching operation process according to an embodiment of the present application;

[0072] FIG. 13 is a schematic diagram of interface changes in a switching process according to an embodiment of the present application;

[0073] FIG. 14 is a schematic diagram of a mechanism of an interface processing service according to an embodiment of the present application;

[0074] FIG. 15 is a structural block diagram of an apparatus for displaying an interface according to an embodiment of the present application;

[0075] FIG. 16 is a structural schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0076] In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular architectures, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices, circuits, and

[0077] It will be understood that the terms "comprises" and / or "comprising," when used in this specification, include the presence of one or more features, integers, steps, operations, elements, and / or components but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0078] It will be understood that the term "and / or," when used in the specification and in the following claims, is intended to mean one or more of the associated listed items can be present, and, further, that unless otherwise managed, the items are applicable to the full extent of compatibility.

[0079] As used in this specification and claims, the terms "if" and "when" can be interpreted to mean "upon determination" or "in response to a determination" or "in response to detecting," depending on the context. Similarly, the phrase "if determined" or "if detected [the described condition or event]" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the described condition or event]" or "in response to detecting [the described condition or event]," depending on the context.

[0080] In addition, the terms "first," "second," "third," etc. are used herein to describe various elements, but the elements should not be limited by these terms. The terms "first," "second," "third," and so on are used herein to describe various elements, but the elements should not be limited by these terms.

[0081] Reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in some embodiments" or "in other embodiments" or "in still other embodiments" in various places throughout this specification are not necessarily all referring to the same embodiment, unless otherwise specified. The terms "comprise," "comprising," "including," "containing," "have," "having," and "include" and their variations, mean "including but not limited to," unless otherwise specified.

[0082] Interface, as one of the most important carriers of human-computer interaction, is often frequently switched by users in the process of using electronic devices. Whether the interface switching process is smooth will directly affect the user experience of using electronic devices. Different interfaces on the electronic device can be generated by different processes, and in the existing interface display technology, each process runs independently, which often causes process lag or asynchronization between processes, resulting in unsmooth interface switching.

[0083] Take the process of switching between the main interface and the negative one interface as an example. Exemplarily, FIG. 1 shows a schematic diagram of the existing interface switching process. Referring to (a) in FIG. 1, the electronic device can draw the main interface (i.e. interface 11) through one process (such as process 1), and draw the negative one interface 12 through another process (such as process 2). If at a certain moment, process 2 runs lag and cannot generate the negative one interface 12 in time, then in the interface of the electronic device, only the main interface 11 generated by process 1 exists, and the display content originally belonging to the negative one interface 12 cannot be normally displayed in the switching process, which may appear as a black screen, as shown in (b) in FIG. 1; or the display content originally belonging to the negative one interface 12 still remains the display content at the last sending display moment, as shown in (c) in FIG. 1, and since the ratio between the main interface 11 and the negative one interface 12 is constantly changing in the interface switching process, if the display content of the last refresh period is still displayed on the screen of the electronic device, then interface overlapping will occur, and of course in some scenarios, due to frame loss, there may be a region missing in a certain interface region.

[0084] In addition to process lag causing unsmooth switching between interfaces of different processes, the above-mentioned situation also occurs when the sending display between two processes is not synchronized in the interface switching process. Exemplarily, FIG. 2 shows a refresh timing diagram of the processes of different interfaces in the existing interface switching process. In the figure, each time is the time corresponding to a different refresh period. For example, T0 time is used to represent the time corresponding to refresh period 0; T1 time is used to represent the time corresponding to refresh period 1, and so on, which will not be described here. Referring to FIG. 2, the specific refresh timing can be described as follows:

[0085] T0 time: process 1 generates interface 10, and process 2 generates interface 20. At T0 time, the sending display of the above two processes is synchronized, and the above two interfaces are displayed in the correct region.

[0086] A certain time between T0 and T1: process 2 draws interface 21, but this interface 21 will not be displayed on the screen of the electronic device at this time, because it is not the next refresh period.

[0087] At T1, process 1 draws interface 11, and process 2 also draws interface 22. Since the two processes are not synchronized, the screen of the electronic device displays interface 11 drawn by process 1 and interface 22 drawn by process 2, which may cause the actual display content of the screen to have interface overlap. Since interface 11 should be displayed at the same time as interface 21, but interface 21 is drawn in advance due to the asynchronization of the two processes, the interfaces generated between the processes do not match.

[0088] Therefore, in the existing interface display technology, when the interface switching animation in the process of drawing switching between different processes is involved, the animation may not be smooth due to process lag or asynchronization between processes, thereby reducing the accuracy of interface display and affecting the user experience.

[0089] Embodiment one:

[0090] To solve the problems in the interaction technology, an embodiment of the present application provides an interface display method. In the switching process, each process is not run alone, but the electronic device can obtain interface frames generated by different processes, determine a target frame according to the serial number of each interface frame, and synthesize the target frames of the two processes to obtain a third interface, thereby ensuring the matching of interface frames between different processes in the switching process and improving the accuracy of display. In this embodiment, the interface display method can be applied to an electronic device, which can be a computer, a server, a notebook computer, a smart phone, a wearable device (such as a smart watch and a smart bracelet), and the like, which can interact with a user. The electronic device can be configured with an interaction module and a display module. The interaction module can be a touch screen, a mouse, a keyboard, a stylus, and the like, to obtain a switching operation between different interfaces initiated by a user through the interaction module and respond to the switching operation initiated by the user. The display module can be a display screen, a projector, and the like, to display the animation change of the interface in the switching process through the display module. The interaction module and the display module can be built-in in the electronic device, or can be external devices, and the connection relationship between the interaction module, the display module, and the electronic device is not limited.

[0091] Specifically, FIG. 3 shows a specific implementation flowchart of an interface display method according to an embodiment of the present application.

[0092] To facilitate subsequent understanding, the related terms involved in the embodiments are explained as follows.

[0093] Display time: the time corresponding to each refresh cycle of the screen of the electronic device.

[0094] First interface: used to represent the interface originally displayed on the electronic device before the user initiates a switching operation.

[0095] First process: used to represent a process running in the electronic device for drawing the first interface.

[0096] First interface frame: any frame about the first interface.

[0097] First target frame: used to represent a first interface frame corresponding to a certain display time in the generation of the switching process.

[0098] First cache queue: used to store the first interface frame drawn by the first process.

[0099] Second interface: used to represent the interface displayed after the completion of the switching operation.

[0100] Second process: used to represent a process running in the electronic device for drawing the second interface.

[0101] Second interface frame: any frame about the second interface.

[0102] Second target frame: used to represent a second interface frame corresponding to a certain display time in the generation of the switching process.

[0103] Second cache queue: used to store the second interface frame drawn by the second process.

[0104] Third interface: the corresponding interface in the switching process.

[0105] Third interface frame: any frame in the switching process.

[0106] Specifically, referring to FIG. 3, the method for displaying an interface provided by the embodiment of the application comprises the following steps:

[0107] In S301, in response to a switching operation from a first interface to a second interface, a first target frame corresponding to a first process is determined according to a first serial number identifier, and a second target frame corresponding to a second process is determined according to a second serial number identifier; the first process and the second process are different processes.

[0108] In S302, a third interface frame is generated according to the first target frame and the second target frame.

[0109] In this embodiment, a user can initiate a switching operation on the electronic device to switch from a first interface to a second interface. The switching operation can be initiated by an interaction module on the electronic device, for example, by a touch screen on the electronic device, or by a pre-set shortcut key on the electronic device.

[0110] In some scenarios, the electronic device is configured with a touch screen. In this case, the switching operation can be a sliding operation. The user can initiate the sliding operation on the touch screen by using a finger or a stylus. The sliding operation can be a leftward sliding operation or a rightward sliding operation. In some scenarios, if the electronic device supports up-and-down sliding switching of interfaces, the sliding operation can be an upward or downward sliding operation. The specific sliding operation can be determined according to actual conditions.

[0111] In some scenarios, the electronic device can be configured with a button. The button can be a physical button (such as a volume button or a lock screen button) or a virtual button (such as a floating button on the screen). The user can click one or more buttons according to a preset correspondence between a shortcut operation and the button, so as to initiate the switching operation between interfaces. For example, Table 1 shows the correspondence between a shortcut operation and a button according to an embodiment of the present application. As shown in Table 1, different switching operations can correspond to different button combination modes. The user can set the button combination corresponding to different shortcut operations according to actual operation requirements. For example, the user can initiate a rightward sliding operation on the electronic device by clicking the volume "+" button twice.

[0112] Table 1

[0113] In some implementations, the first interface can be a main interface of the electronic device, and the second interface can be a minus-one screen interface of the electronic device. For example, FIG. 4 shows a schematic diagram of a switching operation according to an embodiment of the present application. As shown in (a) of FIG. 4, the electronic device is a smart phone, and the screen of the smart phone currently displays a main interface, that is, interface 41. The main interface can be drawn by a desktop process running in the electronic device. When the number of icon controls included in the main interface is large, the main interface can include multiple sub-interfaces. The user can switch between different sub-interfaces in the main interface by leftward or rightward sliding.

[0114] If the user needs to switch from the main interface to the minus-one screen interface, the user can initiate a leftward sliding operation in the main interface, such as the trajectory 42 in (a) of FIG. 4. The electronic device can draw the main interface by using the desktop process and draw the minus-one screen interface by using a minus-one screen process. After the switching is completed, the minus-one screen interface, that is, interface 43, is displayed. The two processes can send the drawn interfaces to the electronic device, so as to generate the interfaces in the switching process by using the electronic device, thereby uniformly managing the drawing of the interfaces in the switching process.

[0115] In some implementations, the first interface described above can be a minus one screen interface of the electronic device, and correspondingly, the second interface described above can be a main interface of the electronic device. Referring to (b) shown in FIG. 4, the interface displayed on the screen of the current smart phone is a minus one screen interface, that is, interface 44. The user can view multiple operable controls in the minus one screen by sliding downward, and enter the corresponding application by clicking the corresponding operable control. At this time, the user can initiate a rightward sliding operation, such as the trajectory 45 described above, to switch from the minus one screen interface to the main interface, that is, to switch to the interface 46.

[0116] In some implementations, an interface processing service can be run in the electronic device. In a scenario involving multi-process drawing switching animation, the electronic device can call the interface processing service to receive interface frames of corresponding interfaces sent by different processes, and determine target frames corresponding to each process through the interface processing service, such as receiving at least one first interface frame about the first interface sent by the first process and at least one second interface frame about the second interface sent by the second process through the interface processing service, and determining the first target frame according to the first sequence identifier and the second target frame according to the second target identifier through the interface processing service. Based on the target frames corresponding to different processes, the interface synthesis is performed, so that the third interface frame corresponding to each refresh cycle can be generated through the interface processing service described above, and the third interface frame is displayed before the switching operation is completed to display the switching animation between interfaces, so that in the scenario involving multi-process drawing switching animation, the interface drawing involved in the switching animation can be uniformly managed through the interface processing service, thereby improving the accuracy of interface drawing and avoiding the situation that the picture is not smooth due to asynchronous drawing.

[0117] In the embodiment, after the electronic device receives the interface frames sent by different processes, the interface synthesis processing can be performed on the interface frames fed back by different processes to generate the third interface frame corresponding to each refresh cycle in the switching process, so that the corresponding third interface frame is displayed in each refresh cycle in the subsequent switching process, so as to maintain the smoothness of the switching animation in the switching process and improve the accuracy of interface management.

[0118] In a possible implementation, the process of generating the third interface frame by the electronic device according to the first target frame and the second target frame can be divided into at least two stages, that is, a process feedback stage and an interface frame synthesis stage. Specifically, the execution processes of the above two stages are as follows:

[0119] Stage 1: Process Feedback Stage

[0120] In the process feedback stage, the processes involved in the interface switching process can send the interface frames generated in the switching process to the interface processing service running on the electronic device. For example, the first process can send the generated first interface frames to the interface processing service, and the second process can also send the generated second interface frames to the interface processing service.

[0121] Exemplarily, FIG. 5 shows an interaction flow diagram between multiple processes and the interface processing service in the process feedback stage according to an embodiment of the present application. Referring to FIG. 5, in the process feedback stage, the interaction process among the first process, the second process, and the interface processing service includes the following steps:

[0122] In S501, in the switching process, the first process is invoked to draw at least one first interface frame about the first interface.

[0123] In S502, the first process sends the first interface frame to the interface processing service every time a first interface frame is generated.

[0124] In this embodiment, when the electronic device detects that the user initiates the switching operation, the first process can be invoked to draw the first interface frame about the first interface. In some implementations, the first process can draw at least one first interface frame according to the refresh rate of the screen of the electronic device. Since the content displayed on the screen is dynamically changed in the switching process, in order to improve the smoothness of the switching animation, the speed at which the first process draws the first interface frame is consistent with the refresh rate (i.e., frame rate) of the screen of the electronic device. If the refresh rate of the screen is higher, the first process draws the first interface frame faster. Conversely, if the refresh rate of the screen is lower, the first process draws the first interface frame slower. Exemplarily, if the refresh rate of the screen of the electronic device is 80 frames per second (FPS), the first process can also draw the first interface frame at a speed of 80 FPS per second.

[0125] In some implementations, each interface frame generated by a process can correspond to a sequence number identifier. The first interface frame corresponds to a first sequence number identifier, which is used to determine the drawing order of the first interface frame. In some implementations, the first sequence number identifier can be determined according to the frame sequence number corresponding to the first interface frame. The second interface frame corresponds to a second sequence number identifier, which is used to determine the drawing order of the second interface frame. Similarly, the second sequence number identifier can also be determined according to the frame sequence number corresponding to the second interface frame.

[0126] In some implementations, if the first interface corresponding to the first process is a static interface, i.e., all display objects in the first interface are static display objects, the first interface frame fed back by the first process to the interface processing service is the same each time.

[0127] In some implementations, if the first interface corresponding to the first process is a dynamic interface, i.e., there is at least one dynamic display object in the first interface, the display content of the dynamic display object is subject to change, in this case, the interface displayed on the electronic device can be a dynamic interface, i.e., the interface can change over time. For example, FIG. 6 shows a schematic diagram of a dynamic interface provided by an embodiment of the present application. Referring to FIG. 6, a clock control 61 is displayed in the main interface of the electronic device, and the clock control 61 includes three areas for displaying hours, minutes and seconds. The area 62 is for displaying seconds, and the minimum time unit of the area is millisecond, so the change speed of the area is 10 times per second, which is a dynamic interface. When drawing the interface frame corresponding to the main interface, the desktop process can generate multiple interface frames corresponding to the main interface based on the screen refresh rate of the electronic device, and the display numbers of the area 62 in each interface frame can be different. During the switching process, the multiple interface frames corresponding to the main interface are sent to the interface processing service.

[0128] In S503, during the switching process, the second process is invoked to draw at least one second interface frame.

[0129] In S504, the second process sends the second interface to the interface processing service after generating the second interface.

[0130] In this embodiment, the process of sending the second interface frame to the interface processing service by the second process is the same as the implementation process of the first process, and the specific implementation process can be referred to the related description of S501 and S502, which will not be described here.

[0131] In this embodiment, the interface processing service in the electronic device can create a corresponding cache queue for different processes. After the first process sends the generated first interface frame to the interface processing service, the interface processing service can store the first interface frame in the cache queue corresponding to the first process (which can also be referred to as the first cache queue). Similarly, after the second process sends the generated second interface to the interface processing service, the interface processing service can also store the second interface in the cache queue corresponding to the second process (which can also be referred to as the second cache queue).

[0132] In S505, the interface processing service stores at least one first interface frame in the first cache queue according to the first serial number identifier of the first interface.

[0133] In S506, the interface processing service stores at least one second interface frame in the second cache queue according to the second serial number identifier of the second interface.

[0134] In this embodiment, when the process draws each frame of the interface corresponding to the interface, the process can configure a corresponding serial number identifier for the frame of the interface, which is used to determine the drawing order of the frame of the interface. For example, the serial number identifier can be the frame order corresponding to the drawing of the frame of the interface, or the cycle number of a refresh cycle. For example, if a frame of the interface is generated as the first frame in the switching process, the serial number identifier corresponding to the frame of the interface is 1. When the interface processing service receives the multiple frames of the interface sent by the process, the interface processing service can determine the order of each frame of the interface in the cache queue according to the serial number identifier corresponding to each frame of the interface. In some scenarios, the queue position of the frame of the interface with a smaller serial number identifier in the cache queue is in front of the queue position of the frame of the interface with a larger serial number identifier. For example, in the cache queue, the frame of the interface with the serial number identifier 1 is in front of the frames of the interface with the serial number identifiers 2 or 3. Since the serial number identifier can be used to determine the drawing order of each frame of the interface, if a frame of the interface is drawn before another frame of the interface, for example, the frame of the interface A is drawn before the frame of the interface B, the serial number identifier of the frame of the interface A is earlier than the serial number identifier of the frame of the interface B.

[0135] In some implementations, the serial number identifier configured by the process for each frame of the interface can be determined based on the time when the frame of the interface is drawn, or other identifiers that can be used to determine the drawing order of each frame of the interface. If the serial number identifier is the drawing time, one serial number identifier being earlier than another serial number identifier means that the drawing time corresponding to the one serial number identifier is earlier than the drawing time corresponding to the other serial number identifier.

[0136] For example, FIG. 7 shows the interface frame feedback timing diagram of each process in the process feedback stage provided by an embodiment of the present application. Referring to FIG. 7, at T0, process 1 draws a frame of the interface, i.e., interface 10, and process 2 also draws a frame of the interface, i.e., interface 20. The two processes can send the drawn frames of the interface to the interface processing service, respectively. The interface processing service can store each frame of the interface sent by process 1, such as interface 10, in cache queue 1, and store each frame of the interface sent by process 2, such as interface 20, in cache queue 2. At T1, process 1 draws interface 11, and process 2 draws interface 21. Similarly, the interface processing service can store the received interface 11 and interface 21 in the corresponding cache queue for subsequent use.

[0137] In the process of sending each frame of the interface to the interface processing service based on the preset frame rate, there are the following two cases.

[0138] Case 1: Process 1 and process 2 do not have running lag

[0139] In this case, there are two interface frames with the same sequence number identifier in the cache queue 1 and the cache queue 2. As shown in the example of FIG. 7, each interface frame is configured with a sequence number identifier, for example, the interface 10 in the cache queue 1 corresponds to the sequence number identifier 0, the interface 20 in the cache queue 2 also corresponds to the sequence number identifier 0, and there are interface frames with the sequence number identifier 0 in both cache queues; similarly, at the T1 moment, there are interface frames with the sequence number identifier 1 in both cache queues, for example, the interface 11 and the interface 21 described above. Therefore, the subsequent interface processing process can generate the third interface frame corresponding to each display time according to the sequence number identifier of each interface frame.

[0140] In the embodiment of the present application, the interface processing service configures the corresponding sequence number identifier for different interface frames, and in the subsequent interface synthesis process, the target frame corresponding to each refresh period can be determined according to the sequence number identifier, which can improve the management efficiency of the interface, improve the accuracy of the synthesized interface, and achieve the purpose of synchronization of different processes.

[0141] Case 2: Process 1 or process 2 has a running lag

[0142] In this case, part of the interface frames corresponding to the sequence number identifier will be missing in the cache queue 1 or the cache queue 2. Taking the case of lag of process 1 as an example, as shown in the example of FIG. 7, if process 1 has a lag at the T2 moment, process 1 will not send an interface frame to the interface processing service at the T2 moment, that is, there is no first interface frame with the sequence number identifier 2 (that is, there is no interface 12), and the interface frame with the sequence number identifier 2 is missing in the cache queue 1. Since process 2 has no lag, it can normally send the second interface frame with the frame sequence number 2 (that is, the interface 22) to the interface processing service. Therefore, in this case, there is no first interface frame with the same sequence number identifier as the interface 22 in the cache queue 1.

[0143] It should be noted that process 2 can also have a lag, and if process 2 has a lag, the interface frame corresponding to the sequence number identifier will also be missing in the cache queue 2, which can be referred to the related description of process 1 above, and will not be described here.

[0144] Stage 2: interface frame synthesis stage

[0145] In the embodiment, the electronic device can synthesize the first interface frame fed back by the first process and the second interface frame fed back by the second process to obtain the third interface frame corresponding to each refresh period, that is, to generate each frame before the switching operation is completed. Specifically, FIG. 8 shows an implementation flowchart of the interface frame synthesis stage provided by an embodiment of the present application. Referring to FIG. 8, the process of generating the third interface frame corresponding to each display time according to the first interface frame and the second interface frame by the electronic device specifically includes the following steps:

[0146] In S801, the interface processing service determines a first target frame from the first cache queue according to the first sequence number identifier, and determines a second target frame from the second cache queue according to the second sequence number identifier.

[0147] In this embodiment, continuing to refer to the timing diagram shown in FIG. 7 as an example, when the interface processing service generates the synthetic interface frame corresponding to T0 (i.e., the third interface frame), the interface processing service can determine the first interface frame corresponding to T0 from the cache queue 1. Since the sequence number identifier corresponding to T0 is 0, the interface 10 with the sequence number identifier 0 is selected from the cache queue 1 as the first target frame, and the interface 20 with the sequence number identifier 0 is selected from the cache queue 2 as the second target frame. That is, for T0, the first target frame is the interface 10, and the second target frame is the interface 20.

[0148] In this embodiment, continuing to refer to the timing diagram shown in FIG. 7 as an example, when the interface processing service generates the synthetic interface frame corresponding to T0 (i.e., the third interface frame), the interface processing service can determine the first interface frame corresponding to T0 from the cache queue 1. Since the sequence number identifier corresponding to T0 is 0, the interface 10 with the sequence number identifier 0 is selected from the cache queue 1 as the first target frame, and the interface 20 with the sequence number identifier 0 is selected from the cache queue 2 as the second target frame. That is, for T0, the first target frame is the interface 10, and the second target frame is the interface 20.

[0149] Case 1: neither process 1 nor process 2 has running lag

[0150] Since neither process 1 nor process 2 has running lag, the corresponding interface frames are drawn in the cache queue 1 and the cache queue 2 in each refresh period. Therefore, the first interface frame corresponding to the current refresh period is stored in the cache queue 1, that is, there is a first interface frame with the same frame sequence number as the refresh period, such as the interface 10 with the sequence number identifier 0 stored in the cache queue 1 at T0 (the frame sequence number corresponding to the refresh period is 0), and the interface 11 with the sequence number identifier 1 stored in the cache queue 1 at T1 (the frame sequence number corresponding to the refresh period is 1). Similarly, the interface 20 with the sequence number identifier 0 is stored in the cache queue 2 at T0, and the interface 21 with the sequence number identifier 1 is stored in the cache queue 2 at T1. The interface processing service can obtain the interface frame with the same sequence number identifier as the current time from the two cache queues, such as the interface 10 selected from the cache queue 1 as the first target frame at T0, and the interface 20 selected from the cache queue 2 as the second target frame at T0, and the synthetic interface frame corresponding to T0 is generated according to the interface 10 and the interface 20, that is, the interface 30. Similarly, the interface processing service can also generate the synthetic interface frame corresponding to T1 according to the interface 11 and the interface 21 at T1, that is, the interface 31.

[0151] In this case, the first target frame and the second target interface have the same sequence number identifier.

[0152] In the embodiment of the present application, according to the serial number corresponding to each interface frame, the target frame matching the current display time is selected for interface synthesis, the display synchronization between processes is realized, and the consistency of display interval is realized by ensuring that each display time corresponds to a third interface frame, thereby improving the smoothness of the switching process and the accuracy of interface management.

[0153] Case 2: Process 1 and / or process 2 run stuttering

[0154] Since there is a process running stuttering in the above two processes, some interface frames corresponding to the serial number of the refresh cycle are missing in a certain cache queue. Taking FIG. 7 as an example, at T2 time, since process 1 is stuttering, there is no interface frame with serial number 2 in cache queue 1, that is, interface 12 is missing. In this case, the interface processing service can select an interface frame with a serial number earlier than 2 in cache queue 1 as the first target frame, for example, interface 1X generated at a time before T0 time (such as TX time). Since the serial number X is earlier than the serial number 2, that is, the drawing time corresponding to the serial number X is before the drawing time corresponding to the serial number 2, and the interface processing service stores the interface 1X sent by process 1 at TX time (that is, the first interface frame drawn at the refresh cycle X corresponding to the time TX), therefore, the interface processing service can take the interface 1X as the first target frame corresponding to T2 time, and perform interface processing based on the interface 1X and the interface 22 to obtain the synthesized interface frame corresponding to T2 time, that is, the interface 32. It should be noted that the above-mentioned interface 1X can be a first interface frame in the cache queue 1 which is not used for synthesizing the third interface frame.

[0155] In some implementations, the interface frame stored in the cache queue can be removed from the cache queue each time it is used for interface synthesis. For example, FIG. 9 shows an operation schematic diagram of the cache queue provided by an embodiment of the present application. Referring to (a) shown in FIG. 9, after receiving the interface 10 sent by process 1, the interface processing service can store the interface 10 in the above-mentioned cache queue 1, and when synthesizing the synthesized interface frame corresponding to T0 time, the interface 10 can be extracted from the cache queue 1, that is, at T0 time, the interface 10 will be removed from the cache queue 1, and the cache queue 1 can not store the interface 10. After process 1 generates the interface 11 corresponding to T1 time, the interface processing service can also store the interface 11 in the above-mentioned cache queue 1, and extract the interface 11 from the cache queue 1 when synthesizing the synthesized interface (i.e., interface 31) corresponding to T1 time.

[0156] In some implementations, if process 1 can draw multiple interface frames between two refresh cycles, i.e., the interface drawing speed of process 1 is greater than the refresh rate of the screen, in this case, the above-mentioned cache queue can store interface frames corresponding to multiple frames at different refresh moments. Referring to (b) shown in FIG. 9, before synthesizing the synthesized interface at T0 moment, process 1 generates three interface frames with serial numbers 0-2, i.e., interface 10, interface 11 and interface 12, then the interface processing service can store the above-mentioned three interface frames in cache queue 1 according to the serial numbers. When synthesizing the synthesized interface corresponding to T0 moment, the target frame corresponding to T0 moment (i.e., the interface with serial number 0), i.e., interface 10, can be extracted from the cache queue, at this time, cache queue 1 stores interface 1X, interface 11 and interface 12.

[0157] In some implementations, if there is an unused interface in the cache queue, it can be used when subsequent processes are stuck. Continue to take FIG. 7 as an example for description, interface 1X is an interface frame that has not been used and is stored in cache queue 1, and since process 1 does not have a stuck at T0 moment and T1 moment, it can normally generate interface 10 and interface 11, therefore, there is no need to use the pre-stored interface 1X; while at T2 moment, process 1 runs stuck and does not generate interface 12 corresponding to T2 moment, at this time, the interface processing service can use interface 1X and interface 22 in process 2 to synthesize the interface, to obtain the synthesized interface corresponding to T2 moment, i.e., interface 32, so that the picture can be kept smooth during the switching process when the process runs stuck.

[0158] In some implementations, if there are two or more unused interface frames in the cache queue, such as cache queue 1 not only stores interface 1X but also stores interface 1Y, wherein interface 1Y is the first interface frame generated at refresh cycle Y corresponding moment, and refresh cycle Y is a cycle before refresh cycle X, the interface processing service can select any unused interface as the target interface corresponding to the current display moment; or determine the earliest generated unused interface frame as the target frame corresponding to the current display moment according to the serial number. For example, according to the serial number, it is determined that interface 1X is generated earlier than interface 1Y, then at T2 moment, interface 1X and interface 22 can be selected to synthesize the interface, to obtain the above-mentioned interface 32.

[0159] In some embodiments, the cache queue can be used to store not only the interfaces that are not used by the processes, but also the interfaces that are recently used. For example, FIG. 10 shows a schematic diagram of the operation of the cache queue according to another embodiment of the present application. As shown in FIG. 10, the process 1 sends the interface 10 corresponding to the time T0. When the synthetic interface frame corresponding to the time T0 is generated, the interface 10 can be extracted from the cache queue 1 and used to synthesize the interface 30. Since the interface 10 is the interface frame that is recently used, the interface 10 is still stored in the cache queue 1, and the previously stored interface 1X is deleted. After the process 1 sends the interface 11 corresponding to the time T1, the cache queue 1 stores the interface 10 and the interface 11. When the synthetic interface frame corresponding to the time T1 is generated, the interface 11 can be extracted from the cache queue 1 and used to synthesize the interface 31. Since the interface 11 is the interface frame that is recently used, the interface processing service removes the interface 10 and only keeps the interface 11, which is the interface frame that is recently used. Therefore, when the subsequent process is stuck, the interface frame that is recently used can be used to synthesize the subsequent interface. Since the previously generated interface frame, such as the interface 1X, can be quite different from the current interface, the interface frame that is recently used is more similar to the interface that is stuck. Therefore, the picture during the switching operation can be smooth, and the picture mutation can be avoided.

[0160] In some embodiments, each cache queue in the interface processing service can be set with a maximum number of stored frames. If the number of stored interface frames in the cache queue is greater than the maximum number of stored frames, the generation order of the interface frames can be determined based on the serial number identifier, and the interface frames can be deleted from the earliest generated interface frame until the number of stored interface frames in the cache queue is not greater than the maximum number of stored frames. If the process is stuck subsequently, the interface frame that is recently generated can be selected from the cache queue and used to synthesize the synthetic interface frame during the switching operation.

[0161] In the embodiments of the present application, when the process is stuck and the interface cannot be normally generated, the interface frame that is recently stored can be used to synthesize the target frame of the switching animation during the switching operation, which improves the smoothness of the interface switching and improves the user experience.

[0162] In S802, the interface processing service generates a third interface frame according to the first target frame and the second target frame.

[0163] In this embodiment, during the switching process, part of the original interface (i.e., the first interface) and part of the post-switching interface (i.e., the second interface) appear on the screen of the electronic device at the same time, and the proportion between the two areas changes with the change of the switching process. Based on this, when drawing the interface during the switching process, the interface processing service can perform interface synthesis according to the first target frame sent by the first process and the second target frame sent by the second process to obtain a third interface frame for display at each frame before the switching operation is completed, so as to display the change of the area occupied by the two interfaces on the screen.

[0164] Exemplarily, FIG. 11 shows a schematic diagram of generation of a third interface frame according to an embodiment of the present application. Referring to FIG. 11, the first interface is a main interface 111, and the second interface is a minus screen interface 112. The same background image is used between the two interfaces, i.e., image 113. When generating the third interface frame, the interface processing service can determine the layout of the icon control on the main interface 111 to obtain the interface frame corresponding to the main interface 111, i.e., interface 114; similarly, the interface processing service can also determine the layout of the icon control on the minus screen interface 112 to obtain the interface frame corresponding to the minus screen interface 112, i.e., interface 115. The interface processing service can determine the interface layout 116 of the foreground control between the two interfaces according to the above-mentioned interface 114 and interface 115, and generate a synthesized interface 117, i.e., a third interface frame, according to the offset distance corresponding to the interface layout 116 and the image 113. Since the total size of the third interface is twice the displayable size of the screen, the actual display area on the screen is area 118. The area 118 can be different according to the different offset distances corresponding to each display time.

[0165] In some implementations, when the first target frame and the second target frame are spliced, the splicing area can be transitioned by one or more screen effects. The screen effects include gradient transition, border blur, and border superposition, and the screen effects of the splicing area between different interfaces can be determined according to actual conditions.

[0166] Further, as another embodiment of the present application, if the switching operation is a sliding operation, the S802 can specifically include the following steps when the interface processing service generates the third interface frame:

[0167] In S802.1, the offset distance is determined according to the sliding distance of the switching operation.

[0168] In S802.2, the third interface frame is generated based on the offset distance.

[0169] In the embodiment, the content displayed on the display screen of the electronic device changes according to the change of the switching operation of the user during the interface switching process. The process in which the user initiates the switching operation has a certain operation time length. For example, during the process in which the user draws a sliding track on the touch screen to initiate the switching operation, the content displayed on the screen moves in a specified direction with the change of the length of the sliding track. Based on this, the interface processing service can determine the offset distance corresponding to each refresh period according to the sliding distance corresponding to the switching operation, so as to generate the third interface frame displayed during the switching process according to the offset distance.

[0170] Exemplarily, FIG. 12 shows an interface change schematic diagram of a switching operation process provided by an embodiment of the present application. Referring to (a) shown in FIG. 12, the sliding track corresponding to the switching operation is track 121, which is used to switch from the main interface to the minus one screen interface. Since the sliding distance of the track 121 is short, at this time, the display content of the main interface is mainly displayed in the interface displayed on the screen of the electronic device, that is, the area ratio of the main interface is large; and at a subsequent time, when the user extends the above-mentioned sliding track, such as extending to track 122, as shown in (b) of FIG. 12, the area ratio of the main interface will decrease, and the area ratio of the minus one screen interface will increase. The interface processing service can determine the sliding distance of the sliding track of the switching operation in each refresh period in real time, and determine the offset distance corresponding to each refresh period according to the sliding distance.

[0171] In some implementations, the interface processing service can determine the above-mentioned offset distance according to the sliding distance of the switching operation and the resolution of the screen of the electronic device. Exemplarily, the above-mentioned offset distance x can be identified as: x=dpi*long / Width, wherein the above-mentioned dpi is the resolution of the screen of the electronic device, the above-mentioned long is the sliding distance corresponding to the switching operation, and the above-mentioned Width is the screen width of the screen of the electronic device. Of course, the specific way of calculating the offset distance according to the sliding distance can be determined according to the actual situation, which is not limited herein.

[0172] In the embodiment, after the electronic device converts the sliding distance into the offset distance corresponding to the refresh period, the electronic device can combine the first target frame corresponding to the first interface and the second target frame corresponding to the second interface according to the relative position relationship between the first interface and the second interface, and then move the combined interface frame according to the offset distance and the sliding direction corresponding to the switching operation, so as to obtain the third interface frame. Since the interface size of the third interface frame is the sum of the first target frame and the second target frame, that is, the screen of the electronic device cannot completely display all the content of the third interface frame, and since the offset distance changes with the change of the sliding distance of the sliding switching operation, the visual effect of the translation from the first interface to the second interface can be displayed on the screen.

[0173] Exemplarily, FIG. 13 shows a schematic diagram of interface change in a switching process according to an embodiment of the present application. Referring to (a) in FIG. 13, before the user initiates a switching operation, the interface 1 is located in the middle of the screen of the electronic device, i.e., the interface center 131 of the interface 1 coincides with the center 132 of the screen, and the interface center 133 of the interface 2 is located to the left of the interface center 131 of the interface 1, and the distance between the interface center 131 and the interface center 133 can be the screen width Width of the electronic device.

[0174] The user initiates a switching operation of swiping left on the screen, and the corresponding sliding track is 134, as shown in (b) in FIG. 13. At this time, the interface processing service can determine the corresponding offset distance according to the sliding track 134, such as an offset distance x1, and offset the interface 1 to the left by x1, and offset the interface 2 to the left by x1 as well. At this time, the offset distance between the interface center 131 of the interface 1 and the center 132 of the screen is also x1. Since the interface 2 is offset to the left by x1, the distance between the current interface center 133 of the interface 2 and the center 132 of the screen is also Width-x1, and part of the content of the interface 2 can also be displayed on the screen.

[0175] The user continues to extend the sliding track, and the sliding track 135 is obtained, as shown in (c) in FIG. 13. At this time, the interface processing service can determine the corresponding offset distance as x2 according to the sliding track 135. Similarly, the distance of the interface 1 offset to the left is changed to x2, i.e., the distance between the interface 1 and the center 132 of the screen is increased. Meanwhile, the distance between the current interface center 133 of the interface 2 and the center 132 of the screen is Width-x2, i.e., the interface 2 is offset to the left by x2. In terms of display effect, the area ratio of the interface 2 in the screen is increased, and the area ratio of the interface 1 is reduced.

[0176] In the embodiment, if the user completes the switching operation, and the sliding track corresponding to the switching operation is greater than the preset switching track length, it means that the user needs to switch from the first interface to the second interface. At this time, the electronic device can determine the offset distance corresponding to each subsequent refresh period according to the preset screen switching speed and the offset distance corresponding to the completed sliding track.

[0177] Exemplarily, the screen switching speed is v, and the offset distance corresponding to the completed sliding track is X. The offset distance dis corresponding to each subsequent refresh period can be represented as: dis=v*(T-t0)+X, where T is the time corresponding to the current refresh period, and t0 is the time corresponding to the completion of the sliding track. The offset distance of each refresh period after the completion of the sliding track can be calculated in the above manner until the second interface is completely switched to.

[0178] In some implementations, if the track length of the sliding track is less than or equal to the switching track length described above, it is identified that the user does not need to switch to the second interface, and each offset distance in the switching process to the first interface is calculated based on the reverse direction of the sliding track and the preset screen switching speed. The process of switching to the first interface is the same as the process of switching from the first interface to the second interface, which will not be described here.

[0179] In the embodiment of the present application, the offset distance corresponding to each display time is calculated by the interface processing service, and the first target frame and the second target frame are moved simultaneously according to the offset distance, thereby improving the accuracy of the generated third interface frame, realizing the same interframe moving distance between interface frames of different processes, reducing the interface overlap or picture missing situation, and improving the accuracy of interface display.

[0180] In order to further illustrate the processing content of the interface processing service, FIG. 14 shows a mechanism diagram of the interface processing service provided by an embodiment of the present application. Referring to FIG. 14, in the process of interface switching, process 1 and process 2 will send the corresponding generated interface frame to the interface processing service, and the interface processing service can determine the target frame corresponding to each display time through the interface synchronization mechanism. The specific implementation process can be referred to the related description of S801.

[0181] If a process is stuck, that is, it cannot timely feedback the interface frame corresponding to the refresh period, that is, there is a missing interface frame, the previously generated interface frame can be obtained from the cache queue through the cache fusion mechanism to perform interface fusion. The specific implementation process can be referred to the related description of case 2 of S801.

[0182] After determining the target frame corresponding to each refresh period, the target frames corresponding to the two interfaces can be moved by the same distance through the synchronization offset mechanism, thereby avoiding the situation that the storage areas of the interfaces of different processes overlap, and improving the accuracy of interface generation.

[0183] In S303, the third interface frame is displayed before the completion of the switching operation.

[0184] In the embodiment, the electronic device can generate a third interface frame corresponding to each refresh period, and display the corresponding third interface frame at each refresh period of the screen during the interface switching process, that is, before the completion of the switching operation, to ensure that the refresh interval of the third interface frame during the switching process remains consistent, thereby improving the accuracy of interface display, avoiding the situation that the interface display of different processes is out of synchronization, the distance between some display time points is too large, resulting in a non-smooth switching process, and affecting the user experience.

[0185] It can be seen that the electronic device can receive interface frames sent by different processes in the case that the user initiates a switching operation, each interface frame can correspond to a serial number identifier, the electronic device can determine the target frame matched between different processes according to the serial number identifier, and then perform interface synthesis based on the target frames corresponding to the two processes to obtain the third interface frame displayed before the switching operation is completed, so as to ensure the smoothness of the switching animation display and the accuracy of the interface display during the switching process. Compared with the existing display technology, each process is not run alone during the switching process, but the electronic device can obtain each frame interface frame required for the switching animation generated by different processes, determine the target frame matched between the two processes for synthesis according to the serial number identifier corresponding to the interface frame, and obtain the third interface frame, which avoids the situation of picture overlap or picture loss caused by the mismatch of the selected interface frame, ensures the smoothness of the display during the switching process, and also improves the accuracy of the display.

[0186] Embodiment Two

[0187] Corresponding to the above embodiment one, a method for displaying an interface is provided, and FIG. 15 shows a structural block diagram of an apparatus for displaying an interface according to an embodiment of the present application. For ease of illustration, only parts related to the embodiments of the present application are shown.

[0188] Referring to FIG. 15, the apparatus for displaying an interface includes:

[0189] A determination unit 151 is configured to determine a first target frame corresponding to a first process according to a first serial number identifier and determine a second target frame corresponding to a second process according to a second serial number identifier in response to a switching operation from a first interface to a second interface; the first process and the second process are different processes;

[0190] A synthesis unit 152 is configured to generate a third interface frame according to the first target frame and the second target frame.

[0191] A display unit 153 is configured to display the third interface frame before the switching operation is completed.

[0192] Optionally, the first serial number identifier of the first target frame is the same as the second serial number identifier of the second target frame.

[0193] Optionally, the determination unit 151 is configured to:

[0194] determine the first target frame from a first cache queue according to the first serial number identifier; the first cache queue is configured to store at least one frame of first interface frame sent by the first process;

[0195] determine the second target frame from a second cache queue according to the second sequence identifier, wherein the second cache queue is configured to store at least one second interface frame sent by the second process.

[0196] It should be noted that the determination of the first target frame and the second target frame can be realized by the same determination unit or by different determination units, which can be set according to actual conditions. If different determination units are used, the first determination unit can be used to determine the first target frame, and the second determination unit can be used to determine the second target frame.

[0197] Optionally, the determination unit 151 is further configured to:

[0198] If there is no second interface frame with the same second sequence identifier as the first sequence identifier of the first target frame in the second cache queue, the second interface frame with the second sequence identifier earlier than the first sequence identifier of the first target frame in the second cache queue is taken as the second target frame.

[0199] Optionally, the determination unit 151 is further configured to:

[0200] If there is no first interface frame with the same second sequence identifier as the second target frame in the first cache queue, the first interface frame with the first sequence identifier earlier than the second sequence identifier of the second target interface is taken as the first target frame.

[0201] Optionally, the first sequence identifier is determined according to a frame sequence number corresponding to the drawing of the first target frame by the first process; and / or

[0202] The second sequence identifier is determined according to a frame sequence number corresponding to the drawing of the second target frame by the second process.

[0203] Optionally, the switching operation is a sliding operation.

[0204] Optionally, the switching operation is a sliding operation, and the synthesis unit 152 includes:

[0205] An offset distance determination unit configured to determine an offset distance according to a sliding distance of the switching operation.

[0206] An interface offset unit configured to generate the third interface frame based on the offset distance.

[0207] Optionally, the interface offset unit includes:

[0208] A position determination unit configured to determine a first position corresponding to the first target frame and a second position corresponding to the second target frame based on the offset distance.

[0209] A position merging unit is configured to merge the first target frame and the second target frame according to the first position and the second position to generate the third interface frame.

[0210] Optionally, the sliding operation is a sliding operation triggered by a finger of the user and / or a sliding operation triggered by a stylus.

[0211] Optionally, the first interface is a home interface of the electronic device, and the second interface is a negative one interface.

[0212] The first interface is a negative one interface, and the second interface is a home interface.

[0213] FIG. 16 is a structural schematic diagram of an electronic device according to an embodiment of the present application. As shown in FIG. 16, the electronic device 16 according to the embodiment includes at least one processor 160 (only one processor is shown in FIG. 16, and the number of processors can match the number of chips actually included in the electronic device in the embodiment), a memory 161, and a program 162 stored in the memory 161 and executable on the at least one processor 160. The processor 160 implements the steps in the method embodiments of any of the above interface display methods when executing the program 162.

[0214] The electronic device 16 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc. The electronic device can include but is not limited to the processor 160 and the memory 161. Those skilled in the art can understand that FIG. 16 is only an example of the electronic device 16, and does not limit the electronic device 16, which can include more or fewer components than those shown in the figure, or combine certain components, or different components, for example, can also include an input / output electronic device, a network access electronic device, etc.

[0215] The processor 160 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0216] The memory 161 can be an internal storage unit of the electronic device 16, such as a hard disk or a memory of the electronic device 16 in some embodiments. The memory 161 can also be an external storage device of the electronic device 16, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like equipped on the electronic device 16 in other embodiments. Further, the memory 161 can include both an internal storage unit and an external storage device of the electronic device 16. The memory 161 is used to store an operating system, an application program, a boot loader, data, and other programs, such as program codes of the programs, and the like. The memory 161 can also be used to temporarily store data that has been output or is to be output.

[0217] It should be noted that the information interaction and execution process between the above devices / units are based on the same concept as the method embodiments of the present application, and the specific functions and technical effects brought by them can be referred to the method embodiments part, which will not be repeated here.

[0218] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the unit and module in the system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0219] The embodiments of the present application also provide an electronic device, which comprises at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above method embodiments when executing the computer program.

[0220] The embodiments of the present application also provide a readable storage medium, which stores a program, wherein the program is executable on a processor to implement the steps in any of the above method embodiments.

[0221] The embodiments of the present application provide a program product, when the program product is run on an electronic device, the electronic device is caused to perform the steps in the above-mentioned various method embodiments.

[0222] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. The computer program is executed by a processor to implement the steps of the above-mentioned various method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the photographing device / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0223] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0224] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method of interface display, characterized by, The method comprises the following steps: in response to a switching operation from a first interface to a second interface, determining a first target frame corresponding to a first process according to a first sequence number identifier, and determining a second target frame corresponding to a second process according to a second sequence number identifier; the first process and the second process are different processes; generating a third interface frame according to the first target frame and the second target frame; displaying the third interface frame before the switching operation is completed.

2. The method of claim 1, wherein, The first sequence number identifier of the first target frame is the same as the second sequence number identifier of the second target frame.

3. The method of claim 1, wherein, The method comprises the following steps: determining the first target frame from a first cache queue according to the first sequence number identifier; the first cache queue is used for storing at least one frame of first interface frame sent by the first process; determining the second target frame from a second cache queue according to the second sequence number identifier; the second cache queue is used for storing at least one frame of second interface frame sent by the second process.

4. The method of claim 3, wherein, The method comprises the following steps: if there is no second interface frame with the same first sequence number identifier as the first target frame in the second cache queue, taking the second interface frame with the second sequence number identifier earlier than the first sequence number identifier of the first target frame in the second cache queue as the second target frame; or if there is no first interface frame with the same second sequence number identifier as the second target frame in the first cache queue, taking the first interface frame with the first sequence number identifier earlier than the second sequence number identifier of the second target interface as the first target frame.

5. The method according to any one of claims 1 to 4, characterized in that, The first sequence number identifier is determined according to the frame sequence number corresponding to the drawing of the first target frame by the first process; and / or The second sequence number identifier is determined according to the frame sequence number corresponding to the drawing of the second target frame by the second process.

6. The method according to any one of claims 1 to 5, characterized in that, The switching operation is a sliding operation, and the method comprises the following steps: determining an offset distance according to the sliding distance of the switching operation; generating the third interface frame based on the offset distance.

7. The method of claim 6, wherein, The method comprises the following steps: determining a first position corresponding to the first target frame and a second position corresponding to the second target frame based on the offset distance; merging the first target frame and the second target frame according to the first position and the second position to generate the third interface frame.

8. An apparatus for displaying an interface, the apparatus comprising: The method comprises the following steps: a determining unit is configured to determine a first target frame corresponding to a first process according to a first sequence number identifier, and determine a second target frame corresponding to a second process according to a second sequence number identifier in response to a switching operation from a first interface to a second interface; the first process and the second process are different processes; a synthesizing unit is configured to generate a third interface frame according to the first target frame and the second target frame. a display unit configured to display the third interface frame before the switching operation is completed.

9. An electronic device, comprising: The electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for changing interfaces of intelligent mobile phones

    CN104461244A

  • Interface switching method and device

    CN104639725A

  • Interface generation method and electronic equipment

    CN116166255A

  • Frame rate switching method and apparatus

    US20240105107A1