Interface notification message display method, device, equipment and storage medium
By deploying multiple view layers in the graphical user interface of the network live broadcast platform and using a unified interface object display interface to form a tree structure, the problem of messy display of animation information in the live broadcast room is solved, and the Z-axis direction is achieved Fast and efficient display of hierarchical scheduling and interface objects simplify development and improve display compatibility.
Patent Information
- Application Number
- CN202011039493.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-28
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2040-09-28
AI Technical Summary
In the online live broadcast platform, with the growth of business, the types and quantity of animation information in the live broadcast room have increased, resulting in messy display effects of the graphical user interface, making it difficult for the development team to achieve effective collaborative management and maintenance. The traditional way of adjusting the Y-axis position has been The business needs cannot be met, and the independent coordinate system of different dynamic information components causes difficulty in controlling the Z-axis view level.
By deploying multiple view layers in the graphical user interface, a unified interface object display interface is used to provide the service of view layer calling, forming a tree structure to organize and manage view layers, quickly position the target view layer and load interface objects, and implement interface notifications Orderly display of messages.
It realizes hierarchical scheduling of the Z-axis depth direction of the graphical user interface, simplifies the development and maintenance of the development team, improves the compatibility and efficiency of interface object display, adapts to the display needs of various types of interface notification messages, and reduces the The operating pressure of the equipment.
Smart Images

Figure CN112114927B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer control technology, and in particular to an interface notification message display method, device, equipment and storage medium. Background Art
[0002] In the live broadcast room of the online live broadcast platform, when the audience users interact with each other or with the online anchors, they usually interact by leaving messages or giving electronic gifts. Similarly, in order to better interact with the audience users, the online anchors usually initiate other types of interactions and activities such as raffles. In order to create an interactive atmosphere in the live broadcast room, as an interactive effect designed by the live broadcast room application, the interactive behavior between the audience users and the anchor users will trigger the live broadcast room graphical user interface to play exquisite motion information to provide visual notifications and feedback to the live broadcast room users.
[0003] In the live broadcast business scenario, there are many kinds of dynamic effect information, sometimes concurrent and overlapping, which can easily make people dazzled. These dynamic effect information may be subdivided into small gift dynamic effect information, large gift dynamic effect information, broadcast message dynamic effect information... Since the area for displaying dynamic effects in the live broadcast graphical user interface is limited, usually, the development team of the live broadcast platform needs to plan a vertical Y-axis position layout for displaying dynamic effect information in advance. By adjusting the position of the dynamic effect information on the Y-axis, different dynamic effect information can be displayed in a staggered manner.
[0004] However, with the growth of the live broadcast platform's business, the types and amount of animation information that the live broadcast room has to carry are increasing. The different concurrent animation information in the live broadcast room may make the information display effect very messy. For terminal devices, the concurrent display of different animations increases the computing load. For the development and maintenance of live broadcast room applications, various animation information is used for different purposes, making it difficult to achieve effective collaborative development and management. Therefore, the traditional way of managing the display of animation information on terminal devices by adjusting the Y-axis can no longer meet the business needs of the live broadcast platform.
[0005] In addition, because different motion information components independently construct their own coordinate systems, the various coordinate systems cannot be uniformly coordinated, which makes it difficult for the development team to control and maintain the Z-axis view hierarchy in actual business development. In actual operations, the team can usually only rely on the Y-axis position layout of the motion information. Ultimately, in order to avoid mutual influence between different motion information, they have to make various compromises on the development of the motion information components they are responsible for.
[0006] It can be seen that the existing technology cannot realize the scheduling and utilization of the graphical user interface of the terminal device in the depth direction, and the industry is in urgent need of developing an effective solution. Summary of the invention
[0007] The primary purpose of the present application is to provide an interface notification message display method suitable for scheduling message display in the depth direction of a graphical user interface.
[0008] As another object of the present application, an interface notification message display device, electronic device, and non-volatile storage medium compatible with the aforementioned method are provided.
[0009] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0010] A method for processing an interface notification message provided to achieve the primary purpose of this application includes the following steps:
[0011] Respond to the call of the interface display interface of the interface object and receive the interface object;
[0012] Calling the target view layer specified by the interface object from multiple view layers, wherein each view layer is implemented by a corresponding view container to implement interface performance, and the multiple view containers belong to the same root container;
[0013] The interface object is loaded into its target view layer accordingly to realize the display of the interface notification message.
[0014] In a further embodiment, the step of calling the target view layer specified by the interface object from the multiple view layers comprises the following steps:
[0015] Identify the type field in the interface object, and obtain the view layer index specified by the type field;
[0016] Call the target view layer according to the view layer index.
[0017] In a preferred embodiment, the step of calling the target view layer specified by the interface object from multiple view layers includes the following steps:
[0018] When calling the target view layer according to the view layer index fails, creating a new view container belonging to the view layer index and subordinate to the root container;
[0019] The view layer represented by the newly created view container is called as the target view layer of the interface object.
[0020] In a further embodiment, it also includes the following steps:
[0021] Monitor the duration of view containers in the cache, and destroy the view containers whose duration exceeds a preset duration.
[0022] In a further embodiment, the following pre-steps are also included:
[0023] Receive the interface notification message, convert it into an interface object, and convert the type of the interface notification message into a view layer index in the type field of the interface object;
[0024] Call the interface object display interface and pass the interface object.
[0025] In one embodiment, the following pre-steps are also included:
[0026] The live broadcast room application receives an interface notification message;
[0027] Constructing the interface object according to the interface notification message, converting the type of the interface notification message into the view layer index in the type field of the interface object, and storing it in the display queue;
[0028] Obtaining the interface object from the display queue;
[0029] Call the interface object display interface and pass the interface object.
[0030] Another preferred embodiment further includes the following pre-steps:
[0031] The live broadcast room application receives an interface notification message;
[0032] Storing the interface notification message in a display queue;
[0033] Obtaining an interface notification message from the presentation queue and constructing it into the interface object, converting the type of the interface notification message into a view layer index in the type field of the interface object;
[0034] Call the interface object display interface and pass the interface object.
[0035] An interface notification message processing device provided for another purpose of the present application includes:
[0036] The object acquisition module is used to respond to the call of the interface object display interface and receive the interface object;
[0037] A view positioning module, used to call the target view layer specified by the interface object from multiple view layers, wherein each view layer is implemented by a corresponding view container to implement interface performance, and multiple view containers belong to the same root container;
[0038] The object display module is used to load the interface object into its target view layer to realize the display of the interface notification message.
[0039] An electronic device provided to meet another purpose of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the interface notification message display method described in the present application.
[0040] A non-volatile storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the interface notification message display method. When the computer program is called and executed by a computer, the steps included in the method are executed.
[0041] Compared with the prior art, the advantages of this application are as follows:
[0042] First, the present application deploys multiple view layers in the Z-axis direction of the graphical user interface of the terminal device, i.e., its depth direction, and further provides the service capability of calling the specified view layer by opening a unified interface object display interface, which can provide a coordinated and unified calling service for different development teams to display interface notification messages using the graphical user interface. Interface notification messages of different teams or different forms of expression only need to access the unified interface object call interface and specify the view layer index in the interface object to complete the development, without having to be responsible for the development work such as view layer creation, maintenance, and destruction. Moreover, under the coordination of the service mechanism implemented by the present application, various types of interface notification messages can achieve orderly interface expression through different view layers.
[0043] Furthermore, each view layer of the present application is implemented with an interface presentation by a corresponding view container, and multiple view layer containers belong to the same root container, thereby forming a tree structure. Through this tree structure, multiple view layers are effectively organized and managed, and hierarchical scheduling in the Z-axis depth direction of the graphical user interface is realized. The corresponding target view layer can be quickly located for the interface object, and the display interface object can be loaded in the target view layer. This process is fast and efficient, and managing multiple view layers through a tree structure can make the display of various types of interface objects parallel. Therefore, it has a very strong compatibility capability for interface object display and is suitable for providing display channels for various types of interface notification messages.
[0044] Additional aspects and advantages of the present application will be partially given in the following description, which will become apparent from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0046] Figure 1 A schematic diagram of a typical network deployment architecture related to implementing the technical solution of this application;
[0047] Figure 2 This is a flowchart of a typical embodiment of the interface message display method of the present application;
[0048] Figure 3 It is a flowchart of the detailed steps of step S12 in the interface message display method of the present application;
[0049] Figure 4 This is a flowchart of further refinement of step S12 in the interface message display method of the present application;
[0050] Figure 5 A flowchart of an embodiment of the interface message display method of the present application proposed to improve memory management;
[0051] Figure 6 A flowchart of an embodiment of the interface message display method of the present application in which a pre-step is added to standardize the display interface call;
[0052] Figure 7 Based on Figure 6 A schematic diagram of another embodiment obtained by modifying the idea of the embodiment;
[0053] Figure 8 This is a principle block diagram of a typical embodiment of the interface notification message display device of the present application. DETAILED DESCRIPTION
[0054] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0055] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0056] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0057] It will be understood by those skilled in the art that the "client", "terminal" and "terminal device" used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capabilities, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of two-way communication on a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers, tablet computers, which have single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service, personal communication system), which can combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant, personal digital assistant), which may include a radio frequency receiver, pager, Internet / intranet access, web browser, notepad, calendar and / or GPS (Global Positioning System, global positioning system) receiver; conventional laptop and / or palmtop computers or other devices, which have and / or include a conventional laptop and / or palmtop computer or other device with and / or including a radio frequency receiver. The "client", "terminal" and "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or suitable for and / or configured to run locally, and / or in a distributed form, at any other location on the earth and / or in space. The "client", "terminal" and "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playing terminal, for example, a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or a smart TV, a set-top box and other devices.
[0058] The hardware referred to by the names such as "server", "client", and "service node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. The computer program is stored in its memory, and the central processing unit calls the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0059] It should be pointed out that the concept of "server" referred to in this application can also be extended to the case of server clusters. According to the network deployment principle understood by those skilled in the art, the servers should be logically divided. In physical space, these servers can be independent of each other but can be called through interfaces, or integrated into a physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility, and should not use it to restrict the implementation of the network deployment method of this application.
[0060] See also Figure 1 , the hardware foundation required for the implementation of the relevant technical solutions of this application can be deployed according to the architecture shown in the figure. The server 80 referred to in this application is deployed in the cloud. As a front-end application server, it can be responsible for further connecting relevant data servers, video streaming servers and other servers that provide relevant support, etc., so as to form a logically associated service cluster to provide services for relevant terminal devices such as the smart phone 81 and personal computer 82 shown in the figure. The smart phone and personal computer can access the Internet through a well-known network access method, and establish a data communication link with the server 80 in the cloud to run the terminal application related to the service provided by the server. In the relevant technical solutions of this application, the message message sent by the server 80 can be received by the smart phone 81 or the personal computer (collectively referred to as the terminal device or the local device), and the terminal device runs the corresponding application and processes the message message accordingly.
[0061] It should be pointed out that in the server cluster supporting the operation of the live broadcast room, in some scenarios, the server supporting the live broadcast room message service and the server supporting the video stream synthesis of the live broadcast room are combined into the same server or the same network address. Sometimes, the same application server can establish the mutual association of the entire cluster independently, so that the same network address can be used to point to the server that is ultimately responsible for the service. Those skilled in the art should understand this.
[0062] In order to support the operation of the above-mentioned applications, the terminal device is equipped with relevant operating systems, such as IOS, HMS (Hongmeng), Android and other operating systems that provide equivalent functions. With the support of such operating systems, adaptively developed applications can run normally and realize human-computer interaction and remote interaction.
[0063] The method of the present application is programmed and built into the terminal device application that provides network live broadcast as its basic service function. The network live broadcast refers to a live broadcast room network service implemented based on the aforementioned network deployment architecture.
[0064] The live broadcast room referred to in this application refers to a video chat room implemented by Internet technology, which usually has audio and video broadcast control functions, including anchor users and audience users. Audience users can include registered users who have registered on the platform, or unregistered visitor users; they can be registered users who follow anchor users, or registered or unregistered users who do not follow anchor users. The anchor user and the audience user can interact with each other through well-known online interaction methods such as voice, video, and text. Generally, the anchor user performs programs for the audience users in the form of audio and video streams, and economic transactions can also be generated during the interaction. Of course, the application form of the live broadcast room is not limited to online entertainment, but can also be extended to other related scenarios, such as education and training scenarios, video conferencing scenarios, product promotion and sales scenarios, and any other scenarios that require similar interactions.
[0065] The application running on the terminal device of this application can trigger the display of interface notification messages according to the needs of its platform design. Currently, common interface notification messages are mainly used to play dynamic effect information or broadcast information, but of course they are not limited to this. Therefore, it can be understood that any behavior supported by the live broadcast room service, which is intended to output a certain notification message to the graphical user interface of the live broadcast room constructed when the application is running, can be understood as the interface notification message of this application.
[0066] There are countless similar interface notification messages, and the classification criteria between various types are mainly based on the fact that each maintains a communication protocol to distinguish them, rather than necessarily on the content and form of the notification messages they display. At present, there are multiple such communication protocols in the active application products on the market provided by the industry, such as the live broadcast room entry effect communication protocol, the live broadcast room anchor level upgrade effect data communication protocol, the live broadcast room user level upgrade effect data communication protocol, the live broadcast room gift effect data communication protocol, the live broadcast room banner effect data communication protocol, other effects in the live broadcast room, broadcast data communication protocol, etc. It can be seen that all the above-mentioned types of notification messages can be summarized as the interface notification messages in this application.
[0067] Those skilled in the art should be aware that, although the various methods of the present application are described based on the same concept and thus present commonality to each other, unless otherwise specified, these methods can be independently executed. Similarly, for each embodiment disclosed in the present application, they are all proposed based on the same inventive concept, therefore, concepts with the same expression, and concepts that are appropriately changed for convenience despite different expressions, should be understood as equivalent.
[0068] See also Figure 2 The present invention provides an interface notification message display method, which is constructed as a live broadcast room application and is suitable for running in a terminal device. In a typical embodiment, the method comprises the following steps:
[0069] Step S11: respond to the call of the interface object display interface and receive the interface object.
[0070] This method will provide an interface object display interface for external calls. When it is called, the various steps of this method are executed. The external call needs to pass the interface object through the display interface so that this step can successfully obtain the interface object that needs to be displayed.
[0071] The interface object is converted from the interface notification message. When the live broadcast room application receives an interface notification message triggered locally or pushed by a server, it is necessary to process the interface notification message locally, convert the interface notification message into the interface object of the present application, and display the interface notification message in the graphical user interface by calling the interface object display interface.
[0072] The interface object is suitable for describing any kind of interface notification message. The purpose is to uniformly manage interface notification messages of various types or from various sources. By constructing various interface notification messages into interface objects of a unified format, standardization of different interface notification messages can be achieved, regardless of which project team developed these interface notification messages, and regardless of which type of expression these interface notification messages are responsible for. In order to identify different interface notification messages, the interface notification message will usually include some type information, such as fields that identify different types of protocols, fields that identify different forms of expression, etc. In this case, regardless of whether the various interface notification messages comply with the same format specifications, when they are converted into interface objects, the standardization specifications of the interface notification messages on the local device are completed, and they can be unified into the same format.
[0073] As mentioned above, the interface notification messages are diverse in terms of interface presentation, application function classification, and development team affiliation. The same format protocol can be used to encapsulate interface notification messages of different classifications and sources, or different format protocols can be used to encapsulate different classifications and sources. In any case, when the interface notification message is encapsulated, it generally carries type information for identifying its own type. For example, in the case of using the same format protocol, the encapsulated message can contain a special field for indicating the type information; in the case of using a single protocol that is independent of each other, the protocol type in the message (for example, the view layer index can also be regarded as the identifier of the protocol type) itself also has the function of indicating the type information of the interface notification message, and in a sense, it also indicates the development team to which it belongs. Therefore, it can be seen that the interface notification message received by the live broadcast room application on the terminal device generally contains the corresponding type information. The live broadcast room application can theoretically identify different interface notification messages based on this information and know their corresponding view layer indexes.
[0074] Regardless of the source and type of the interface notification message, for the interface object, the focus is on the corresponding relationship between the view layer used when it is finally displayed in the graphical user interface. In order to match this relationship, the interface object can set a type field to record the view layer index specified by the interface object, so as to determine its target view layer. The specific designation of the view layer index is very flexible and can be planned and agreed upon by the development team, or flexibly assigned according to certain preset rules. In short, for the interface object obtained in this step, the view layer index in the type field of the interface object is already determined.
[0075] In order to ensure that the live broadcast application currently run by the user can process various interface type information in a standardized manner, the application can construct the received interface notification message as a standardized interface object in advance, thereby determining the type field in the interface object, and then matching the corresponding target view layer for the corresponding interface notification message according to the view layer index specified by the type field for interface display. This also essentially completes the localization processing of the interface notification message.
[0076] At the programming development level, the interface object can be constructed using a class, and the type field constitutes an attribute of the class. In addition, the class can also use methods to construct the various functional interfaces implemented by this application. Therefore, when it is instantiated and run, it can be called more conveniently. By calling the methods and referencing related attributes, its services can be used, which greatly reduces the programming difficulty required to expand the interface notification message output capabilities in the same application in the future, helps to optimize the collaboration between teams in large-scale program development projects, and thus improves program development efficiency.
[0077] Since the service can be provided through the interface object display interface, when the live broadcast room application completes the aforementioned localization processing and initiates the call of the interface object display interface, this step can respond to the call and obtain the corresponding interface object. Even if multiple different processes and threads initiate the call of the display interface synchronously or asynchronously, concurrent responses can be achieved.
[0078] Step S12: calling the target view layer specified by the interface object from multiple view layers, wherein each view layer is implemented with an interface presentation by a corresponding view container, and the multiple view containers belong to the same root container.
[0079] As mentioned above, the interface object contains a type field for specifying the specific view layer it needs to adopt. According to the view layer index specified in the type field, the target view layer corresponding to the interface object can be determined from the multiple view layers already existing in the cache, so as to load the interface object into the target view layer and realize the display of the interface notification message represented by the interface object in the live broadcast room graphical user interface.
[0080] In order to have the ability to process a large number of interface objects in an orderly manner, this method is responsible for maintaining a tree structure composed of view layers. Each view layer corresponds to a view container that implements the interface performance. The view container is used to centrally manage the view layer it is responsible for performing. All view containers are associated with the same root container to achieve the tree structure organization. Therefore, the root container is suitable for centrally managing one or more view containers. It can be understood that only one root container is needed to organize all view layers in a live broadcast room. In order to facilitate the determination of a specific view layer, the view layer will be assigned a corresponding index number. Subsequently, by providing the same number as the index of the view layer, the view layer can be directly called. Once this tree structure is created, the root container and each view container therein can persist in the cache unless destroyed. It can be understood that the view layer can be created or destroyed on demand.
[0081] The root container and its corresponding class can be customized by the developer, for example, it can be customized and developed on demand based on Android's View or ViewGroup base class, so that it has the ability of ViewGroup to support view containers (such as View) and ViewGroup, that is, the root container is suitable for associating and managing the view container of the next level, and the view container can be derived from the same customized class as the root container. In theory, since the root container has the same ability as ViewGroup, the root container can further associate and manage the parent container of the next level. The parent container and the root container are derived from the same customized class and have the same ability of the root container to support the next level View. Through this tree structure constructed based on the class derivation relationship, it is possible to organize and call a variety of view containers. In general, on the basis of the root container, associating a single-layer view container can meet the general number of view layer usage requirements. If the developer knows that there are many view layers required, multi-layer cascading can also be implemented to meet the needs. When developers customize the classes associated with the root container and its view container, they can expand some properties or interfaces to meet other needs to enrich the functionality of the view container, as long as such implementation does not affect the implementation of this application, which should be understood by those skilled in the art.
[0082] It can be understood that the same view container can be reused multiple times to serve the same type of interface object, or it can be used once. As for how to apply it specifically, it can be flexibly determined by those skilled in the art. For example, in an embodiment of a reused view layer, a target view layer that is initially created and used, in addition to being used to display the interface notification message represented by its corresponding interface object at the time in the live studio graphical user interface, can also be used to load other interface objects later, depending entirely on the content of the type field of the interface object itself. In other words, as long as different interface objects specify the same view layer index in their respective type fields, the view layer corresponding to the view layer index will be reused successively by these different interface objects.
[0083] Usually, interface notification messages are frequent, so a large number of interface objects often need to be processed in the same time period. When such a situation exists, since a large number of interface objects may specify at least partially different view layer indexes due to belonging to different sources or different types, and this step calls different view layers according to these different indexes to display different interface objects, the display positions of a large number of interface objects are ultimately displayed through different levels in the Z-axis depth direction of the live studio graphical user interface, and the display process is parallel. It can be seen that the present application has the scheduling service capability of displaying different interface notification messages using different levels in the Z-axis depth direction of the graphical user interface, and can automatically and scientifically and reasonably organize the display of each of the interface notification messages to meet the increasing business needs of various types of interface notification messages and their dynamic effect information.
[0084] Step S13: Load the interface object accordingly into its target view layer to realize the display of the interface notification message.
[0085] This application determines the target view layer of the interface object based on the view layer index of the type field of the interface object, and then loads the interface object into the target view layer to which it belongs, so that the interface notification message to which the interface object belongs can be displayed in the live broadcast room graphical user interface.
[0086] It can be understood that, usually, whether it is an interface notification message pushed by the server or an interface notification message generated locally, it will describe how to display a graphic object of a certain resource in a graphical user interface. Therefore, the interface notification message will usually also include a description of the display position, display size, referenced resources, animation effects and other information of the graphic object. The descriptive information formed by these descriptions will also be converted into its corresponding interface object. Therefore, when the interface object is loaded, the corresponding referenced resource will be called according to the descriptive information and then output to the target view layer for display, thereby realizing the display of the corresponding interface notification message.
[0087] In the typical embodiments of the present application disclosed above and their variant embodiments, since the interface object described in the present application includes a type field for specifying a view layer index, the target view layer of the interface object can be determined by identifying the type field of the interface object, and different development teams or different types of interface notification messages can respectively specify the view layer index to which they belong. Therefore, by instantiating this principle into the technical solution of the cost application and implementing a unified organization for the view layer, the correspondence between interface notification messages of various types and sources and each view layer can be effectively controlled, so that multi-source and multi-type interface notification messages can be displayed in an orderly manner, which can meet the business needs of the increasing display of interface notification messages within the same application and maximize the avoidance of duplicate development in software engineering management.
[0088] In addition to the above embodiments, in order to enrich the implementation of the present application, other various implementation methods of the present application are further disclosed as follows:
[0089] In one embodiment, based on the typical embodiment of this application, please refer to Figure 3 , providing detailed steps for step S12, specifically including:
[0090] Step S121: Identify the type field in the interface object and obtain the view layer index specified by the type field. According to this step, the content of the type field is extracted from the received interface object, thereby obtaining the view layer index of the type field.
[0091] Step S122: calling the target view layer according to the view layer index. According to this step, after obtaining the view layer index, the corresponding view layer is determined from the cache as the target view layer according to the view layer index, and the target view layer is called by passing the view layer index.
[0092] In another embodiment, the present application is based on any of the above embodiments. Figure 4 , further adding the following specific steps to step S12:
[0093] Step S123: When calling the target view layer according to the view layer index fails, creating a new view container that belongs to the view layer index and is subordinate to the root container.
[0094] In the live broadcast application, some view layers can be created in advance for immediate calling. However, creating a large number of empty view layers will occupy the cache. Therefore, this embodiment optimizes memory management by realizing the function of dynamically creating view layers.
[0095] Specifically, when the view layer corresponding to the view layer index specified by the interface object to be displayed does not exist, calling the corresponding target view layer will result in a call failure. When the result of the call failure is received, a new view container can be created, and the view layer index is used as the number of the view container, and the view container is used to display the view layer corresponding to the view layer index. Similarly, the newly created view container should be associated with the root container to facilitate the normal maintenance of the current application process.
[0096] Step S124: the view layer represented by the newly created view container is used as the target view layer of the interface object for invocation. After the view container is created, the view layer index of the interface object is still used for invocation, and the view layer represented by the view container can be used.
[0097] It can be seen that this embodiment enables the present application to have the ability to dynamically create a view layer on demand.
[0098] In another embodiment, please refer to Figure 5 In order to improve memory management, based on any of the above embodiments, the following steps are further included:
[0099] Step S14: monitoring the duration of the view containers in the cache, and destroying the view containers whose duration exceeds a preset duration.
[0100] The live broadcast room application can implement its own memory management. Therefore, it can monitor the duration of each view container in the tree structure through its own functional modules. When any view container is not called again within the preset time (set during development), it can be considered that the utilization rate of the view container is not high. In order to save cache, the view container can be directly destroyed.
[0101] It can be seen that when this step is combined with the previous embodiment, the live broadcast room application has the ability to dynamically create view containers on demand and the ability to dynamically destroy idle view containers. It can automatically implement dynamic maintenance of the tree structure and optimize memory usage. Especially when a large number of interface notification messages need to be processed, this mechanism can greatly improve the running smoothness of the live broadcast room application.
[0102] Through the disclosure of this embodiment, it can be further understood that when determining the view layer of an interface object, if the target view layer specified by the type field of the interface object does not exist in the cache, the present application can create a new view container attached to the root container for the interface object and construct a new view layer. For view containers that have existed in the cache for more than a preset time, they will be destroyed in a timely manner. Therefore, the present application can dynamically control the duration of each view container in the live broadcast room, scientifically and reasonably optimize the running memory and computing power resources occupied by the live broadcast room application, and greatly reduce the probability of the device being stuck when running the live broadcast room application.
[0103] In another embodiment, the present application further improves the calling steps of its display interface. Therefore, in this embodiment, the method further includes the following pre-steps:
[0104] Receive the interface notification message, convert it into an interface object, and convert the type of the interface notification message into a view layer index in the type field of the interface object;
[0105] Call the interface object display interface and pass the interface object.
[0106] In another embodiment, considering the need to schedule a large number of interface objects before calling the standard display interface, please refer to Figure 6, the method also includes the following pre-specific steps:
[0107] Step S101: The live broadcast room application receives an interface notification message.
[0108] As mentioned above, the present application is mainly used in live broadcast room applications. Therefore, the main process of the live broadcast room application can be responsible for receiving various interface notification messages. Similarly, these interface notification messages can be generated by local triggers or pushed to the local by the server.
[0109] Step S102: construct the interface object according to the interface notification message, convert the type of the interface notification message into a view layer index in the type field of the interface object, and store it in a display queue.
[0110] In this step, first, according to the correspondence between the interface notification message and the interface object known during program development, the type of the interface notification message, whether its presentation type or its source type, is converted into the corresponding view layer index as the content of the type field of the interface object. For example, in an application, the interface notification message itself contains the view layer index, and the view layer index can be directly referenced without special conversion. When the interface object is completed, it can be stored in a preset display queue, and then queued and called using the first-in-first-out rule.
[0111] Step S103: Acquire the interface object from the display queue.
[0112] In this step, the interface object can be called according to the calling rules of the display queue, such as the first-in-first-out rule.
[0113] Step S104: calling the interface object display interface and transferring the interface object.
[0114] It can be seen from this embodiment that under the effect of the display queue, the function of converting interface notification messages into interface objects is decoupled from the function of calling the display interface to transfer interface objects. The two have a certain degree of development independence, which facilitates software engineering management.
[0115] In another embodiment of the previous embodiment, the same effect is achieved by changing the application time node of the display queue. Figure 7 , adapted to this embodiment, the method further includes the following pre-steps:
[0116] Step S101': the live broadcast room application receives an interface notification message.
[0117] Step S102': storing the interface notification message in a display queue.
[0118] Step S103': obtaining the interface notification message from the presentation queue and constructing it into the interface object, and converting the type of the interface notification message into the view layer index in the type field of the interface object.
[0119] Step S104': calling the interface object display interface and transferring the interface object.
[0120] A brief comparison shows that the difference between this embodiment and the previous embodiment is that step S102' directly adds the interface notification message to the display queue, and the display queue is mainly used to maintain the queue of interface notification messages, but not for the queue of interface objects, and in step S103', the interface notification message is directly obtained from the display queue and then the corresponding interface object is constructed. There is no other difference. It can be understood that the effects obtained by this embodiment and the previous embodiment are the same.
[0121] It can be seen from the above two embodiments that the present application further enriches the orderly processing capability for massive interface notification messages or interface objects by setting a display queue to schedule interface notification messages or interface objects before calling the display interface. According to this principle, even multiple display queues can be used to enrich the subdivision processing of the interface notification messages, so that the interface notification messages can be further properly diverted and processed under the organization of multiple display queues, thereby enhancing the application's concurrent processing capability for interface notification messages.
[0122] Furthermore, by functionalizing each step in the method disclosed in the above embodiments, an interface notification message display device of the present application can be constructed. According to this idea, please refer to Figure 8 In a typical embodiment, the device comprises:
[0123] The object acquisition module 11 is used to respond to the call of the interface object display interface and receive the interface object;
[0124] A view positioning module 12, used to call a target view layer specified by the interface object from multiple view layers, wherein each view layer is implemented by a corresponding view container to implement interface performance, and multiple view containers belong to the same root container;
[0125] The object display module 13 is used to load the interface object into its target view layer to realize the display of the interface notification message.
[0126] Further, to facilitate the execution of the present application, the present application provides an electronic device, including a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the interface notification message display method described in the aforementioned embodiments.
[0127] It can be seen that the memory is suitable for using a non-volatile storage medium. By implementing the aforementioned method as a computer program and installing it in an electronic device such as a mobile phone or a computer, the relevant program code and data are stored in the non-volatile storage medium of the electronic device. The program is further run through the central processor of the electronic device, and it is transferred from the non-volatile storage medium to the memory for execution, so that the desired purpose of the present application can be achieved. Therefore, it can be understood that in one embodiment of the present application, a non-volatile storage medium can also be provided, in which a computer program implemented according to each embodiment of the interface notification message display method is stored. When the computer program is called and executed by the computer, the steps included in the method are executed.
[0128] To summarize, the present application can provide services through an open unified calling interface, centrally respond to interface notification message processing needs, automatically and scientifically plan the rational use of different levels of view layers in the depth direction of the graphical user interface for such needs, and is suitable for online live broadcast applications to handle a large number of the same and different types of interface notification messages displayed in the live broadcast room graphical user interface. It can simplify development difficulty, reduce the operating pressure of running equipment, and improve the processing efficiency of computing resources of running equipment.
[0129] It will be understood by those skilled in the art that the present application includes devices for performing one or more of the operations and methods described in the present application. These devices may be specially designed and manufactured for the desired purpose, or may also include known devices in general-purpose computers. These devices have computer programs stored in their memory, which are selectively activated or reconstructed. Such computer programs may be stored in a device (e.g., computer) readable medium or in any type of medium suitable for storing electronic instructions and coupled to a bus, respectively, the computer readable medium including but not limited to any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, the readable medium includes any medium that stores or transmits information in a readable form by a device (e.g., computer).
[0130] Those skilled in the art will appreciate that each block in these structure diagrams and / or block diagrams and / or flow charts and combinations of blocks in these structure diagrams and / or block diagrams and / or flow charts can be implemented using computer program instructions. Those skilled in the art will appreciate that these computer program instructions can be provided to a general-purpose computer, a professional computer, or a processor of other programmable data processing methods to implement, thereby executing the scheme specified in the block or multiple blocks of the structure diagrams and / or block diagrams and / or flow charts disclosed in this application through the processor of the computer or other programmable data processing method.
[0131] Those skilled in the art will appreciate that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, altered, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted.
[0132] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for displaying an interface notification message, characterized in that: Applied in the live broadcast room application, it includes the following steps: Receive an interface notification message, convert it into an interface object based on a class structure, convert the format specification followed by the interface notification message into the same format specification after being converted into an interface object, convert the type of the interface notification message to which it belongs into a view layer index in the type field of the interface object, and the interface notification message is used to realize the playback of dynamic effect information or broadcast information; Calling the interface object display interface and passing the interface object; Responding to the call of the interface display interface, receiving the interface object; Calling the target view layer specified by the interface object from multiple view layers, wherein each view layer is implemented by a corresponding view container to implement interface performance, and the multiple view containers belong to the same root container; Loading the interface object to its target view layer accordingly to realize the display of the interface notification message; The step of calling the target view layer specified by the interface object from multiple view layers comprises the following steps: When calling the target view layer according to the view layer index fails, creating a new view container belonging to the view layer index and subordinate to the root container; The view layer represented by the new view container is called as the target view layer of the interface object; Monitor the duration of view containers in the cache, and destroy the view containers whose duration exceeds a preset duration.
2. The method according to claim 1, characterized in that ,The step of calling the target view layer specified by the interface object from multiple view layers includes the following steps: Identify the type field in the interface object, and obtain the view layer index specified by the type field; Call the target view layer according to the view layer index.
3. The method according to claim 1, characterized in that The following pre-steps are also included: The live broadcast room application receives an interface notification message; Constructing the interface object according to the interface notification message, converting the type of the interface notification message into the view layer index in the type field of the interface object, and storing it in the display queue; Obtaining the interface object from the display queue; Call the interface object display interface and pass the interface object.
4. The method according to claim 1, characterized in that: The following pre-steps are also included: The live broadcast room application receives an interface notification message; Storing the interface notification message in a display queue; Obtaining an interface notification message from the presentation queue and constructing it into the interface object, converting the type of the interface notification message into a view layer index in the type field of the interface object; Call the interface object display interface and pass the interface object.
5. An interface notification message display device, characterized in that: It is used in live broadcast applications, including: The object acquisition module is used to respond to the call of the interface object display interface and receive the interface object; the object acquisition module includes: receiving the interface notification message, converting it into an interface object based on the class structure, converting the format specification followed by the interface notification message into the same format specification after converting it into the interface object, converting the type of the interface notification message to which it belongs into the view layer index in the type field of the interface object, and the interface notification message is used to realize the playback of the dynamic effect information or the broadcast information; calling the interface object display interface and transferring the interface object; A view positioning module is used to call the target view layer specified by the interface object from multiple view layers, wherein each view layer is implemented by a corresponding view container to implement interface performance, and multiple view containers are subordinate to the same root container; including: when calling the target view layer according to the view layer index fails, creating a new view container belonging to the view layer index and subordinate to the root container; calling the view layer represented by the new view container as the target view layer of the interface object; monitoring the duration of the view container in the cache, and destroying the view container whose duration exceeds a preset time; The object display module is used to load the interface object into its target view layer to realize the display of the interface notification message.
6. An electronic device, comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run a computer program stored in the memory to execute the steps of the interface notification message display method as described in any one of claims 1 to 4.
7. A non-volatile storage medium, characterized in that: It stores a computer program implemented according to the interface notification message display method described in any one of claims 1 to 4, and when the computer program is called and run by a computer, the steps included in the method are executed.
