Multi-state interface dynamic switching method and system, computer equipment and computer program product

By removing the target view and updating the display content in the multi-state interface, the problem of unindependent refresh of sub-display areas in the multi-function page is solved, improving the user experience.

CN120371448AActive Publication Date: 2025-07-25ROYPOW TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510855440.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-07-25
Estimated Expiration
2045-06-25

AI Technical Summary

Technical Problem

The prior art is difficult to realize independent refresh of each sub-display area in a multi-function page, resulting in a decline in user experience.

Method used

When a data flow manager generates a data flow event in the sub-display area, the target view is removed, and the target callback object is determined based on the load status of the data flow manager, the latest state view is determined based on the current and target callback objects, and the display content is updated using dynamic containers.

Benefits of technology

It realizes independent refresh of sub-display areas of different states on the same interface, improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371448A_ABST
    Figure CN120371448A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of computer front ends, and provides a multi-state interface dynamic switching method and system, computer equipment and a computer program product, and the method comprises the steps: for each sub-display region of a current display interface, under the condition that a data flow manager of the sub-display region generates a data flow event, switching the sub-display region of the current display interface; if the target view corresponding to the sub-display area is not empty, removing the target view; determining a target callback object according to the loading state of the data flow manager of the sub-display area; determining a latest state view based on the current callback object and the target callback object; and updating the display content of the sub-display area based on the dynamic container and the latest state view. According to the method provided by the invention, the switching of the target view and the latest state view of the sub-display area is controlled through the data flow manager of each sub-display area, so that the independent refreshing of the sub-display areas in different states of the same interface is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of computer front-end, and particularly relates to a method, system, computer device and computer program product for dynamically switching multi-state interfaces. Background Art

[0002] In the current context of increasingly rich Internet content, users' expectations for various interface feedbacks are also constantly rising. Whenever a page is opened, if no content is seen for a long time or an abnormality suddenly occurs, it often gives people the illusion of "lagging" or "crashing"; on the contrary, appropriate prompts and proper transition animations can make people feel smooth and at ease. Especially in scenarios where information is obtained and content is updated frequently, how to let users clearly perceive states such as "preparing", "no data available", or "loading error" has become an important part of improving the experience of major applications.

[0003] At the same time, with the continuous iteration of business, a single page often carries multiple functional modules - news recommendations, product lists, comment areas, etc. come in a steady stream. The content sources and display logics of each module are different. If only a unified way is used to prompt "please wait" or "loading failed", it is difficult to take into account the respective scenario requirements and is also likely to cause confusion among users. Once a certain part of the content cannot be displayed normally and the entire page blocking processing method is still adopted, the user experience of the entire page may be greatly reduced.

[0004] Based on the above background, there is an urgent need for a page refresh method to improve the user experience. Summary of the Invention

[0005] In view of this, the embodiments of this application provide a method, system, computer device and computer program product for dynamically switching multi-state interfaces to achieve independent refreshing of display areas in multiple different states of the same interface.

[0006] The first aspect of the embodiments of this application provides a method for dynamically switching multi-state interfaces, and the method includes: For each sub-display area of the current display interface, when a data flow event is generated by the data flow manager of the sub-display area, if the target view corresponding to the sub-display area is not empty, remove the target view; Determine a target callback object according to the loading state of the data flow manager of the sub-display area; Determine the latest state view based on the current callback object and the target callback object; Update the display content of the sub-display area based on the dynamic container and the latest state view.

[0007] In one implementation of the first aspect, determining the latest status view based on the current callback object and the target callback object includes: When the target callback object is different from the current callback object, determining the target status view corresponding to the target callback object as the latest status view; When the target callback object is the same as the current callback object, determining the current status view corresponding to the current callback object as the latest status view.

[0008] In one implementation of the first aspect, updating the display content of the sub-display area based on the dynamic container and the latest status view includes: When the latest status view is the target status view, removing the current status view from the custom dynamic container; Loading the latest status view into the dynamic container; Adding the dynamic container to the parent container of the target view and updating the display content of the sub-display area.

[0009] In one implementation of the first aspect, for each sub-display area of the current display interface, when a data flow event is generated by the data flow manager of the sub-display area, if the target view corresponding to the sub-display area is not empty, before removing the target view, it further includes: Obtaining the context environment of the target view; Based on the context environment, obtaining the parent container of the target view and the index of the target view in the parent container; The step of adding the dynamic container to the parent container of the target view and updating the display content of the sub-display area includes: Adding the dynamic container to the parent container of the target view according to the index of the target view in the parent container and updating the display content of the sub-display area; The step of removing the target view includes: Removing the target view from the parent container according to the index of the target view in the parent container.

[0010] In one implementation of the first aspect, after updating the display content of the sub-display area based on the dynamic container and the latest status view, it further includes: When the data flow manager of the sub-display area successfully obtains the target display data, removing the latest status view from the dynamic container; Re-adding the target view to the parent container of the target view; Bind the target display data to the target view and update the display content of the sub-display area.

[0011] In one implementation of the first aspect, before determining the latest status view based on the current callback object and the target callback object, it further includes: Construct corresponding status views in the callback objects corresponding to each loading state of the data flow manager; Map each loading state of the data flow manager and the corresponding callback object, and store them in a mapping table.

[0012] In one implementation of the first aspect, determining the target callback object according to the loading state of the data flow manager in the sub-display area includes: Look up the corresponding target callback object in the mapping table according to the loading state of the data flow manager in the sub-display area.

[0013] The second aspect of the embodiments of the present application provides a multi-state interface dynamic switching system, including: A removal module, configured to, for each sub-display area of the current display interface, when a data flow event occurs in the data flow manager of the sub-display area, if the target view corresponding to the sub-display area is not empty, remove the target view; A callback object module, configured to determine a target callback object according to the loading state of the data flow manager in the sub-display area; A status view module, configured to determine the latest status view based on the current callback object and the target callback object; An update display module, configured to update the display content of the sub-display area based on the dynamic container and the latest status view.

[0014] The third aspect of the embodiments of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the multi-state interface dynamic switching method as described in the first aspect.

[0015] The fourth aspect of the embodiments of the present application provides a computer program product, including a computer program. When the computer program is run, the multi-state interface dynamic switching method as described in the first aspect is executed.

[0016] The beneficial effect of the first aspect of the embodiment of the present application is as follows: for each sub-display area of the current display interface, when a data flow event is generated by the data flow manager in the sub-display area, if the target view corresponding to the sub-display area is not empty, the target view is removed, then the target callback object is determined according to the loading state of the data flow manager in the sub-display area, and then the latest state view is determined based on the current callback object and the target callback object. Finally, the display content of the sub-display area is updated based on the dynamic container and the latest state view, so as to realize independent refreshing of each sub-display area with different states of the same display interface.

[0017] It can be understood that the beneficial effects of the above second aspect to the fourth aspect can refer to the relevant descriptions in the above first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0019] Figure 1 It is a schematic flowchart of the implementation of the multi-state interface dynamic switching method provided by the embodiment of the present application; Figure 2 It is a schematic diagram of the multi-state interface provided by the embodiment of the present application; Figure 3 It is a schematic structural diagram of the multi-state interface dynamic switching system provided by the embodiment of the present application; Figure 4 It is a schematic diagram of the computer device provided by the embodiment of the present application; Figure 5 It is a schematic diagram of the computer program product provided by the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] In the following description, specific details such as specific system structures and technologies are proposed for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0021] It should be understood that, as used in the specification of this application and the appended claims, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups.

[0022] It should also be understood that the term "and / or" as used in the specification of this application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0023] As used in the specification of this application and the appended claims, the term "if" may be construed, depending on the context, as "when" or "once" or "in response to determining" or "in response to detecting". Similarly, the phrases "if determined" or "if [the described condition or event] is detected" may be construed, depending on the context, to mean "once determined" or "in response to determining" or "once [the described condition or event] is detected" or "in response to detecting [the described condition or event]".

[0024] In addition, in the description of the specification of this application and the appended claims, the terms "first", "second", "third", etc. are used only for differential description and should not be construed as indicating or implying relative importance.

[0025] Reference to "one embodiment" or "some embodiments" or the like described in the specification of this application means that a particular feature, structure or characteristic described in connection with that embodiment is included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "comprising", "including", "having" and their variants all mean "including but not limited to", unless otherwise specifically emphasized.

[0026] The embodiment of the present application provides a method for dynamically switching multi-state interfaces, which is used for independently refreshing multiple sub-display areas in different states of the same interface. The method provided by the embodiment of the present application, for each sub-display area of the current display interface, when a data flow event is generated by the data flow manager of the sub-display area, if the target view corresponding to the sub-display area is not empty, the target view is removed, then the target callback object is determined according to the loading state of the data flow manager of the sub-display area, and then the latest state view is determined based on the current callback object and the target callback object, and finally the display content of the sub-display area is updated based on the dynamic container and the latest state view, so as to realize the independent refresh of each sub-display area in different states of the same display interface.

[0027] The multi-state interface dynamic switching method provided by the embodiment of the present application can be applied to computer devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc., to realize the refresh of various interfaces of these computer devices. The embodiment of the present application does not impose any restrictions on the specific types of computer devices.

[0028] As Figure 1 shown, the first aspect of the embodiment of the present application provides a method for dynamically switching multi-state interfaces, and the method includes: Step S1, for each sub-display area of the current display interface, when a data flow event is generated by the data flow manager of the sub-display area, if the target view corresponding to the sub-display area is not empty, the target view is removed.

[0029] In the application, a display interface may include multiple independent sub-display areas, and a data flow manager is assigned to each sub-display area, so that the display content of these display areas is controlled by different data flow managers and is independent of each other. The generation of a data flow event by the data flow manager of a sub-display area indicates that the sub-display area is refreshing the interface.

[0030] In the application, the data flow manager is a middleware for processing asynchronous data flows implemented based on the component flow in kotlin coroutines.

[0031] Step S2, determine the target callback object according to the loading state of the data flow manager of the sub-display area.

[0032] In the application, flow has multiple lifecycle operators, and each lifecycle operator, such as flow(), onStart(), onEmpty(), catch(), collect() corresponds to a different display state, which is saved in the data template base class. The data state field DataState is updated based on the lifecycle operator to save the display state corresponding to the lifecycle operator. The loading state of the data flow manager is determined based on the read data state field DataState.

[0033] In the application, create an abstract class IStateObserver <t>(target:View) Inherits Observer and is used to receive data based on the observer pattern. Different pages can be displayed according to the DataState. Use the builder pattern to create a PageLoad class for adding callback objects: ErrorCallback(), EmptyCallback(), LoadingCallback(),TimeoutCallback(), CustomCallback().

[0034] In the application, the callback objects are stored in a Map collection. The key in this Map collection is of the callbacks type, and the value is the callback object.

[0035] Step S3, determine the latest state view based on the current callback object and the target callback object.

[0036] In the application, the current callback object corresponds to the current state view. Determine whether to update the latest state view based on the current callback object and the target callback object.

[0037] In one embodiment, the step S3 of determining the latest state view based on the current callback object and the target callback object includes: Step S31, when the target callback object is different from the current callback object, determine the target state view corresponding to the target callback object as the latest state view.

[0038] Step S32, when the target callback object is the same as the current callback object, determine the current state view corresponding to the current callback object as the latest state view.

[0039] It can be understood that the same callback object corresponds to the same state view (root view), and different callback objects correspond to different state views. If the target callback object is different from the current callback object, it means that the state view needs to be switched. Therefore, the target state view corresponding to the target callback object is determined as the latest state view, and the display is refreshed based on the latest state view subsequently. If the target callback object is the same as the current callback object, it means that the state view does not need to be switched, and the current state view is still maintained, and no refresh operation is required subsequently.

[0040] Step S4, update the display content of the sub-display area based on the dynamic container and the latest state view.

[0041] In one embodiment, the step S4 of updating the display content of the sub-display area based on the dynamic container and the latest state view includes: Step S41, when the latest state view is the target state view, remove the current state view in the custom dynamic container.

[0042] Step S42, load the latest state view in the dynamic container.

[0043] Step S43, add the dynamic container to the parent container of the target view and update the display content of the sub-display area.

[0044] In the application, the custom dynamic container is implemented by LoadLayout View. When the latest state view is the target state view, the latest state view is added to the dynamic container, and then the dynamic container is added to the parent container of the target view to implement the display of the latest state view in the sub-display area.

[0045] In one embodiment, in step S1, for each sub-display area of the current display interface, when a data flow event is generated by the data flow manager in the sub-display area, if the target view corresponding to the sub-display area is not null, before removing the target view, it further includes: Step S11, obtain the context environment of the target view.

[0046] In the application, in the Android system, Context is the core abstract class that carries application environment information, and its main functions include accessing resources (such as layouts, styles, strings), starting components, obtaining system services, etc. In actual development, common Contexts include the context bound to Activity, Application, Service, and View. In the multi-state interface dynamic switching method of the present invention, it is necessary to obtain its context environment (Context) according to the type of the target view, and further obtain its parent container and structure information through this context to achieve precise replacement of the view. For this reason: if the target view is of the Activity type, the Activity instance can be directly used as the Context, and the root container FrameLayout of the target view can be obtained through its getWindow().getDecorView() or findViewById(android.R.id.content); if the target view is of the general View type, its context can be obtained through the getContext() method; Context is a necessary parameter for subsequent construction of the LoadLayout dynamic container and loading of state view layout resources, and all view replacement operations depend on the running environment it provides.

[0047] Step S12: Obtain the parent container of the target view and the index of the target view in the parent container based on the context environment.

[0048] In an application, if the target view is of the View type, obtain the parent node of the target view through targetView.parent and attempt to cast it to ViewGroup forcibly; obtain the position index of the target view (targetView) in the parent container through parent.indexOfChild(targetView). targetView.parent is of the ViewParent type, and it is necessary to determine whether it is a ViewGroup. If the current parent container of the target view is null, then perform the subsequent steps.

[0049] In an application, if the target type is of the Activity type, insert the dynamic container (such as LoadLayout View) at the default first position (index 0) to achieve state coverage of the entire page. Since the Activity itself does not have a position index in the parent container, the system ensures that its page structure is not damaged through the default insertion strategy and retains the original view for subsequent restoration and display.

[0050] Step S43: Add the dynamic container to the parent container of the target view and update the display content of the sub-display area, including: Step S431: According to the index of the target view in the parent container, add the dynamic container to the parent container of the target view and update the display content of the sub-display area; Removing the target view includes: Step S13: Remove the target view from the parent container according to the index of the target view in the parent container.

[0051] In an application, obtain the index of the target view in its parent container before removing the target view. This index indicates the position of the target view in its parent container. Based on this index, the target view can be removed from its parent container, and the dynamic container can be accurately added to the parent container of the target view and ensure that the position of the dynamic container in the parent container of the target view is the same as the position of the target view in the parent container.

[0052] In one embodiment, after step S4: updating the display content of the sub-display area based on the dynamic container and the latest status view, it further includes: Step S5: Remove the latest status view in the dynamic container when the data flow manager in the sub-display area successfully obtains the target display data.

[0053] Step S6, re-add the target view to the parent container of the target view.

[0054] In the application, based on the index of the target view in its parent container, the target view is re-added to the parent container of the target view, so as to perform normal display of the target display data subsequently.

[0055] Step S7, bind the target display data to the target view and update the display content of the sub-display area.

[0056] In the application, when the data flow manager successfully obtains the target display data, the display content of the sub-display area can be switched from the latest status view to the target display data. By first removing the latest status view in the dynamic container to empty the content of the dynamic container, then adding the target view to its parent container, and binding the display data to the target view, the display of the target display data in the sub-display area is realized.

[0057] In one embodiment, before the step S3 of determining the latest status view based on the current callback object and the target callback object, it further includes: Step S301, construct corresponding status views in the callback objects corresponding to each loading state of the data flow manager.

[0058] Step S302, map each loading state of the data flow manager and the corresponding callback object, and store them in a mapping table.

[0059] In one embodiment, the step S2 of determining the target callback object according to the loading state of the data flow manager in the sub-display area includes: Step S21, look up the corresponding target callback object in the mapping table according to the loading state of the data flow manager in the sub-display area.

[0060] In one embodiment, as Figure 2 shown, the multi-state interface 200 includes a first sub-display area 201, a second sub-display area 202, and a third sub-display area 203. Each sub-display area corresponds to a data flow manager, which can implement independent data flow processing, realize independent refreshing and display of the sub-display areas. For example, the first sub-display area 201 displays product information, the second sub-display area 202 displays Loading, and the third sub-display area 203 displays Error.

[0061] It should be understood that the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0062] The embodiment of the present application further provides a multi-state interface dynamic switching system for performing the steps in the embodiment of the above multi-state interface dynamic switching method. The multi-state interface dynamic switching system can be a virtual appliance in a computer device, run by the processor of the computer device, or the computer device itself.

[0063] As Figure 3 shown, the multi-state interface dynamic switching system 300 provided by the embodiment of the present application includes: The second aspect of the embodiment of the present application provides a multi-state interface dynamic switching system, including: A removal module 301, configured to, for each sub-display area of the current display interface, when a data stream event is generated by the data stream manager in the sub-display area, if the target view corresponding to the sub-display area is not empty, remove the target view; A callback object module 302, configured to determine a target callback object according to the loading state of the data stream manager in the sub-display area; A status view module 303, configured to determine the latest status view based on the current callback object and the target callback object; An update display module 304, configured to update the display content of the sub-display area based on the dynamic container and the latest status view.

[0064] In one embodiment, the status view module 303 is configured to: When the target callback object is different from the current callback object, determine the target status view corresponding to the target callback object as the latest status view; When the target callback object is the same as the current callback object, determine the current status view corresponding to the current callback object as the latest status view.

[0065] In one embodiment, the update display module 304 is configured to: When the latest status view is the target status view, remove the current status view in the custom dynamic container; Load the latest status view in the dynamic container; Add the dynamic container to the parent container of the target view and update the display content of the sub-display area.

[0066] In one embodiment, the removal module 301 is configured to: Obtain the context environment of the target view; Based on the context environment, obtain the parent container of the target view and the index of the target view in the parent container; The update display module 304 is configured to: Add the dynamic container to the parent container of the target view according to the index of the target view in the parent container, and update the display content of the sub-display area; The removal module 301 is configured to remove the target view from the parent container according to the index of the target view in the parent container.

[0067] In one embodiment, the update display module 304 is further configured to: Remove the latest status view in the dynamic container when the data flow manager in the sub-display area successfully obtains the target display data; Re-add the target view to the parent container of the target view; Bind the target display data to the target view and update the display content of the sub-display area.

[0068] In one embodiment, the multi-status interface dynamic switching system 300 further includes a mapping configuration module 305, which is configured to: Construct corresponding status views in the callback objects corresponding to each loading state of the data flow manager; Map each loading state of the data flow manager and the corresponding callback object, and store them in a mapping table.

[0069] In one embodiment, the callback object module 302 is configured to: Find the corresponding target callback object in the mapping table according to the loading state of the data flow manager in the sub-display area.

[0070] In an application, each module in the multi-status interface dynamic switching system 300 can be a software program module, can also be implemented by different logic circuits integrated in a processor, or can be implemented by multiple distributed processors.

[0071] Figure 4 It is a schematic structural diagram of a computer device provided in an embodiment of the present application. As Figure 4 shown, the computer device 4 in this embodiment includes: at least one processor 40 ( Figure 4 only one is shown in the figure), a processor, a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40. When the processor 40 executes the computer program 42, it implements the steps in any of the above-mentioned embodiments of the multi-status interface dynamic switching method.

[0072] The computer device may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art can understand, Figure 4 The computer device 4 is merely an example and does not constitute a limitation on the computer device 4. It may include more or fewer components than those shown in the figure, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.

[0073] The processor 40 may be a central processing unit (CPU), and the processor 40 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0074] In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 4. Further, the memory 41 may also include both the internal storage unit and the external storage device of the computer device 4. The memory 41 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program, etc. The memory 41 may also be used to temporarily store data that has been output or will be output.

[0075] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units, due to being based on the same concept as the method embodiment of the present application, for the specific functions and the technical effects brought, please refer to the method embodiment part specifically, and will not be elaborated here.

[0076] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be 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 into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0077] An embodiment of this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0078] An embodiment of this application provides a computer program product 5, including a computer program 42. When the computer program 42 is run, the steps in the above-mentioned method embodiments of the dynamic switching of each multi-state interface are executed.

[0079] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-mentioned method embodiments of this application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the device / computer equipment, recording medium, computer memory, read-only memory (ROM), random access memory (Random Access Memory, RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0080] In the above embodiments, the descriptions of the respective embodiments each have their own emphasis. For parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0081] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0082] In the embodiments provided in this application, it should be understood that the disclosed computer devices and methods can be implemented in other ways. For example, the computer device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.

[0083] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0084] The above-described embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of this application, and should all be included in the protection scope of this application.< / t>

Claims

1. A method for dynamically switching multi-state interfaces, characterized in that, The method includes: For each sub-display area of the current display interface, when a data stream event is generated by the data stream manager in the sub-display area, if the target view corresponding to the sub-display area is not empty, remove the target view; Determine a target callback object according to the loading state of the data stream manager in the sub-display area; Determine the latest state view based on the current callback object and the target callback object; Update the display content of the sub-display area based on the dynamic container and the latest state view.

2. The multi-state interface dynamic switching method according to claim 1, characterized in that The determining the latest state view based on the current callback object and the target callback object includes: When the target callback object is different from the current callback object, determine the target state view corresponding to the target callback object as the latest state view; When the target callback object is the same as the current callback object, determine the current state view corresponding to the current callback object as the latest state view.

3. The multi-state interface dynamic switching method according to claim 2, wherein The updating the display content of the sub-display area based on the dynamic container and the latest state view includes: When the latest state view is the target state view, remove the current state view from the custom dynamic container; Load the latest state view in the dynamic container; Add the dynamic container to the parent container of the target view and update the display content of the sub-display area.

4. The multi-state interface dynamic switching method according to claim 3, wherein Before the step of, for each sub-display area of the current display interface, when a data stream event is generated by the data stream manager in the sub-display area, if the target view corresponding to the sub-display area is not empty, remove the target view, it further includes: Obtain the context environment of the target view; Based on the context environment, obtain the parent container of the target view and the index of the target view in the parent container; The adding the dynamic container to the parent container of the target view and updating the display content of the sub-display area includes: According to the index of the target view in the parent container, add the dynamic container to the parent container of the target view and update the display content of the sub-display area; The removing the target view includes: According to the index of the target view in the parent container, remove the target view from the parent container.

5. The multi-state interface dynamic switching method according to any one of claims 1 to 4, characterized in that, After the step of updating the display content of the sub-display area based on the dynamic container and the latest state view, it further includes: When the data stream manager in the sub-display area successfully obtains the target display data, remove the latest state view in the dynamic container; Re-add the target view to the parent container of the target view; Bind the target display data to the target view and update the display content of the sub-display area.

6. The multi-state interface dynamic switching method according to any one of claims 1 to 4, characterized in that, Before the step of determining the latest state view based on the current callback object and the target callback object, it further includes: Construct corresponding state views in the callback objects corresponding to each loading state of the data stream manager; Map each loading state of the data stream manager and the corresponding callback object, and store them in a mapping table.

7. The multi-state interface dynamic switching method according to claim 6, wherein, The determining the target callback object according to the loading state of the data stream manager in the sub-display area includes: Look up the corresponding target callback object in the mapping table according to the loading status of the data flow manager of the sub-display area.

8. A multi-state interface dynamic switching system, characterized in that, Comprising: A removal module, for each sub-display area of the current display interface, in the case where a data flow event is generated by the data flow manager of the sub-display area, if the target view corresponding to the sub-display area is not empty, remove the target view; A callback object module, for determining a target callback object according to the loading status of the data flow manager of the sub-display area; A status view module, for determining the latest status view based on the current callback object and the target callback object; An update display module, for updating the display content of the sub-display area based on the dynamic container and the latest status view.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the multi-state interface dynamic switching method according to any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that, Comprising a computer program, when the computer program is run, the multi-state interface dynamic switching method according to any one of claims 1 to 7 is executed.

Citation Information

Patent Citations

  • Display method and device for page state switching

    CN107704241A

  • Page refreshing method and device, computer equipment and storage medium

    CN115687826A

  • Display method and device of multi-state view, computer equipment and medium

    CN118484606A

  • Method and system for efficient execution and rendering of client / server interactive applications

    US20080104025A1

  • Method and computer program product for an UI software application

    US20210232372A1