Interface notification message scheduling method, device, equipment and storage medium
By building a tree-like view layer management module and message queue management module, the problem of disorderly processing of interface notification messages in the live broadcast room is solved, orderly display and unified management are realized, and audience experience and development efficiency of live broadcast room is improved.
Patent Information
- Application Number
- CN202011039487.6
- 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
The existing technology lacks a versatile and scalable scheduling process, which leads to disorderly processing of notification messages for various types of interfaces in the live broadcast room, resulting in device cache accumulation and application crashes, affecting the audience's experience.
Using a tree structure management module composed of root container, view container and view layer, combined with the message queue management module, interface notification messages are processed according to the first-in-first-out principle to ensure orderly display, and the visualization process of optimized interface messages is controlled through display policies. .
The orderly coordination and unified management of various interface notification messages is realized, which reduces development difficulty, improves the viewing experience of live broadcast audiences, and saves software development costs.
Smart Images

Figure CN112099895B_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 scheduling method, device, equipment and storage medium. Background Art
[0002] With the development of network technology, people have more and more online entertainment projects. In recent years, live broadcast programs have gradually entered the public's field of vision, especially some excellent anchors' live broadcast programs are loved by the audience. In the live broadcast room, when the anchor's performance is wonderful, the audience often expresses their love for the program by leaving messages to the anchor, sending gifts, etc. In the live broadcast room business scenario, the live broadcast room displays various animations or broadcasts various notifications according to the actual business to feedback and stimulate the user's positive behavior in the live broadcast room, such as playing exquisite animations to give visual feedback in response to the user's gift-giving operation to the anchor, and giving exquisite animations or broadcasting in the live broadcast room for visual feedback of the results of the gift-giving or task-doing operation. Through these animations, the user's efforts are affirmed and the user's enthusiasm for interaction in the live broadcast room is stimulated, thereby improving the audience's experience in watching live broadcast programs. Similarly, the platform often sends various notifications to the live broadcast room users, which are also delivered to the user interface in the form of broadcasts for display.
[0003] In order to enrich the live broadcast room with more exquisite animations, the development team needs to develop more interface notification messages. Each time the team develops an interface notification message, it needs to plan the area and display effect for it to be displayed in the live broadcast room's graphical user interface. This development model, which requires customization for each different type of interface notification message, not only greatly increases the difficulty of the team to develop new interface notification messages, but also causes different types of interface notification messages to be displayed in the live broadcast room's graphical user interface in a chaotic manner, seriously affecting the viewing experience of the audience in the live broadcast room.
[0004] It can be understood that in the live broadcast room business scenario, when multiple types of interface notification messages are concurrently sent to the terminal device, the live broadcast room receives a large number of interface notification messages of various types and cannot process them in an orderly manner, causing a large number of interface notification messages to accumulate in the device cache, causing the live broadcast room application to crash when running on the terminal device, seriously affecting the experience of the live broadcast room audience.
[0005] In summary, the prior art does not have a scheduling process with strong versatility and scalability for orderly coordinating and distributing the display of various interface notification messages, and an effective solution is urgently needed to be developed in the industry. Summary of the invention
[0006] The primary purpose of this application is to provide an interface notification message scheduling method to standardize the processing of interface notification messages.
[0007] As another object of the present application, an interface notification message scheduling device, electronic device, and non-volatile storage medium compatible with the aforementioned method are provided.
[0008] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0009] A method for scheduling interface notification messages provided to meet the primary purpose of this application includes the following steps:
[0010] As the live broadcast room application process starts, you start receiving interface notification messages;
[0011] According to the view layer specified by the interface notification message, the message is shunted to the message queue set corresponding to the view layer to perform the enqueue operation, and each view layer is correspondingly represented by a view container associated with the root container to implement the interface performance;
[0012] The message dequeue module corresponding to each message queue executes the dequeue operation of its corresponding message queue according to the queue access rule;
[0013] The display strategy control is executed on each interface notification message out of the queue, and under the control, each interface notification message is output to its corresponding view layer for display.
[0014] In a further embodiment, the present application further includes the following post-processing steps:
[0015] In response to an exit event of the live broadcast room application process, the memory occupied by executing this method is reclaimed.
[0016] In a further embodiment, when the display strategy control is executed on each out-of-queue interface notification message, adapting each out-of-queue interface notification message includes the following specific control steps:
[0017] Instantiate the preset interface class for encapsulating interface notification messages and obtain the instance object;
[0018] Obtaining the interface object encapsulation data from the interface notification message and assigning values to the corresponding attribute items of the instance object to construct the interface object to be displayed in the view layer;
[0019] Obtain the display policy control identifier corresponding to the interface object from the interface notification message, and assign values to the corresponding attribute items of the instance object;
[0020] The instance object is transferred to a display execution module for executing output of the interface object to a view layer display, and the display execution module is driven to output the interface notification message to its corresponding view layer display under control.
[0021] In a preferred embodiment, the display policy control identifier includes a visibility monitoring identifier, which is used to set whether the interface notification message is visible in a specific environment, so as to control the display execution module to control the corresponding interface object to be visible or invisible in the specific environment according to the visibility monitoring identifier.
[0022] In a further embodiment, the display strategy control identifier includes a display duration identifier, which is used to set the display duration of the interface object of the interface notification message, so as to control the display execution module to control the display of the corresponding interface object according to the display duration identifier and end its display after the corresponding duration.
[0023] In some embodiments, the display execution module performs the following steps before outputting the interface notification message to its corresponding view layer for display: detecting whether there is an interface notification message being displayed in the view layer specified by the interface notification message to be displayed, and executing the interface notification message to be displayed only when there is no interface notification message being displayed in the view layer.
[0024] In some embodiments, the present application further includes the following steps:
[0025] Monitor the idle duration of each message queue / view layer. When the idle duration of a message queue / view layer exceeds a preset value, recycle the memory of the message queue / view layer.
[0026] In a further embodiment, the view layer specified by the interface notification message is diverted to the message queue set corresponding to the view layer to perform the enqueue operation. When the view layer and / or message queue specified by the interface notification message does not exist, a corresponding view layer and / or message queue is created for it.
[0027] In a preferred embodiment, after the live broadcast room application process is started, the corresponding interface notification message is generated in response to the user instruction generated by the user touching the graphical user interface of the live broadcast room application. This type of interface notification message and the interface notification message received from the server are used for the diversion and added to the corresponding message queue.
[0028] An interface notification message scheduling device proposed to meet other purposes of the present application includes:
[0029] The message receiving module is configured to start receiving interface notification messages as the live broadcast room application process is started;
[0030] A message enqueue module, used to shunt the interface notification message to the message queue set corresponding to the view layer according to the view layer specified by the interface notification message to perform an enqueue operation, and each view layer is correspondingly represented by a view container associated with the root container to implement the interface performance;
[0031] The message dequeue module is independently configured for each message queue and is used to perform the dequeue operation of the corresponding message queue according to the queue access rules;
[0032] The message display module is used to execute display strategy control on each interface notification message out of the queue, and output each interface notification message to its corresponding view layer for display under its control.
[0033] 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 scheduling method described in the present application.
[0034] 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 scheduling method. When the computer program is called and executed by a computer, the steps included in the method are executed.
[0035] Compared with the prior art, the advantages of this application are as follows:
[0036] First, the present application constructs a view layer management module with a tree structure consisting of a root container, a view container and a view layer, assigns designated view layers to various interface notification messages, makes full use of the Z-axis of the live broadcast room graphical user interface, centrally and uniformly manages the display of the interface messages, and combines the present application to construct a queue management module of multiple message queues corresponding to the view layers to control the display order of various interface notification messages occupying their designated view layers, and the message queue follows the first-in-first-out principle, and processes the display of various interface notification messages in the live broadcast room graphical user interface in sequence, preventing multiple interface notification messages from being displayed in a chaotic manner in the same view layer, affecting the viewing experience of the audience in the live broadcast room; when different development teams need to define their own interface notification messages, they only need to understand the principles implemented by the present application, specify the relevant view layer for the display of their own interface notification messages, and then hand it over to the application that implements the solution of the present application to display its interface notification messages in an orderly manner, and hand it over to the application to achieve orderly coordination.
[0037] Secondly, in order to strengthen the management of the display of various types of interface notification messages in the graphical user interface of the live broadcast room, display policy control is executed on the interface notification messages dequeued from the message queue, and various types of interface notification messages are controlled to be output to their corresponding view layer displays, and the visualization process of various types of interface message notifications is standardized. On this basis, the present application further constructs a display management function, and combines the view layer management function and the queue management function, so that the technical solution of the present application constitutes a highly versatile and extensible interface notification message scheduling component, which can modularly manage various types of interface notification messages to meet the increasing business development of various types of interface notification messages, and greatly reduce the workload of the team in developing new interface notification messages.
[0038] In addition, the present application changes and enriches the technical process of processing interface notification messages in traditional applications, from enqueuing the interface notification messages to pushing the interface notification messages to the corresponding view layer for display, and standardizes the interface of the interface notification message, making it suitable for assembling its technical solution into the same application. Therefore, multiple versions of the same application only need to maintain the modules implemented by the technical solution of the present application without the need for repeated development, which is conducive to saving repeated costs in software development.
[0039] 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
[0040] 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:
[0041] Figure 1 A schematic diagram of a typical network deployment architecture related to implementing the technical solution of this application;
[0042] Figure 2 This is a flowchart of a typical embodiment of the interface notification message scheduling method of the present application;
[0043] Figure 3 This is a specific flow chart of step S14 in the interface notification message scheduling method of the present application;
[0044] Figure 4 This is a schematic diagram of the style of the live broadcast room graphical user interface of this application;
[0045] Figure 5 This is a flow chart of another embodiment of the interface notification message scheduling method of the present application, which relatively adds a post-step;
[0046] Figure 6This is a flow chart of another embodiment of the interface notification message scheduling method of the present application, which relatively adds a post-step;
[0047] Figure 7 This is a principle block diagram of a typical embodiment of the interface notification message scheduling device of the present application. DETAILED DESCRIPTION
[0048] 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.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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 related 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, so as to run the terminal application related to the service provided by the server. In the relevant technical solutions of this application, the protocol 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 performs corresponding processing on the protocol message.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] The motion effect information, also called dynamic special effect information, interface special effect information, etc., is mainly used as a basis for playing animations in the graphical user interface of the live broadcast room, so as to play corresponding dynamic special effects and thus achieve message notification effects.
[0061] The broadcast information, like the animation information, is a notification message sent to the terminal user in order to notify a certain message. After it reaches the terminal device, it will eventually cause the relevant content to be displayed in the graphical user interface of the live broadcast room of the terminal device.
[0062] 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.
[0063] 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.
[0064] See also Figure 2 The interface notification message scheduling method of the present application is programmed and implemented in a live broadcast room application to run in a terminal device. In its typical embodiment, it includes the following steps:
[0065] Step S11, with the start of the live broadcast room application process, start receiving interface notification messages:
[0066] This 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 types of interface notification messages. Similarly, these interface notification messages can be generated by local triggers or pushed to the local by the server. It can be understood that the interface notification message can be triggered by a user instruction generated by touching the local live broadcast room graphical user interface, or it can be an interface notification message transmitted by a server providing live broadcast room services through a communication link.
[0067] The interface notification message includes type information for describing various types of interface notification messages. The type information is generally suitable for identifying different types of fields, identifying different forms of expression, and fields representing different senders, etc. Regarding the role of the type information, for example, the present application can determine the view layer specified by the type information of the interface notification message, and add the interface notification message to the message queue corresponding to the view layer according to the identification of the view layer, so as to classify all received interface notification messages of various types.
[0068] The method of the present application will be programmed to be implemented as a built-in functional module of the live broadcast room application. Therefore, it will be called up and run along with the start of the live broadcast room application process. Therefore, when the live broadcast room application is started, it can start to receive the interface notification message.
[0069] Step S12, according to the view layer specified by the interface notification message, the message is shunted to the message queue set corresponding to the view layer to perform the queue operation, and each view layer is correspondingly implemented by a view container associated with the root container to implement the interface performance:
[0070] The present application constructs a message queue corresponding to each view layer in the graphical user interface, which stores interface notification messages that form a corresponding relationship with the view layer under the premise of following the first-in-first-out principle, so as to control the output order of each interface notification message occupying its designated view layer for output display.
[0071] In one embodiment, the present application determines the view layer for output display of each type of interface notification message according to the view layer index contained in the type information of the interface notification message, and adds it in order to the end of the message queue corresponding to the specified view layer to complete the execution of the enqueuing operation, thereby realizing the function of diverting the received interface notification messages of various types.
[0072] In other embodiments, if the type information of the interface notification message does not contain an explicit record of the specific view layer index, the same effect as the previous embodiment can be achieved by locally querying a table that maps the type information to the view layer index and determining the corresponding view layer index locally through the type information of the interface notification message.
[0073] In order to have the ability to process a large number of interface notification messages 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 implement 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. This application can directly call the view layer by providing the same number as the index of the view layer. 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.
[0074] The root container and its corresponding class can be customized by the developer, for example, it can be customized and developed as needed 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 instantiated 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.
[0075] It can be understood that the same view container can be reused multiple times to serve the same type of interface notification message, 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 corresponding interface notification message at that time in the live studio graphical user interface, can also be used to load other interface notification messages later, depending entirely on the content of the type information of the interface notification message itself. That is to say, as long as different interface notification messages specify the same view layer index in their respective type information, or the type information can be locally queried to correspond to the view layer index, the view layer corresponding to the view layer index will be reused successively by these different interface notification messages.
[0076] Usually, interface notification messages are frequent, so a large number of interface notification messages often need to be processed within the same time period. When such a situation exists, since a large number of interface notification messages specify at least some different view layer indexes, 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 notification messages 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.
[0077] In combination with the message queue mentioned above and the tree structure composed of view layers, a view layer specified by the interface notification message is added to the message queue corresponding to the view layer, and the preliminary scheduling of the interface notification message is completed, so that the message dequeue modules corresponding to each subsequent message queue can perform the dequeue operation of the message queue according to the queue access rules, and control the interface notification message to be output to the corresponding view layer in the live broadcast room graphical user interface through display strategy control.
[0078] Step S13, the message dequeue module corresponding to each message queue performs the dequeue operation of its corresponding message queue according to the queue access rule:
[0079] The message dequeue module refers to the dequeue operation of the interface notification messages stored in the message queue according to the first-in-first-out principle described above, that is, the interface notification message at the head of each message queue is dequeued first, so that the interface notification message can be subsequently output to its designated view layer for display.
[0080] Each message queue needs to perform its corresponding dequeue operation according to the queue access rules to prevent the interface notification messages stored in each message queue from being dequeued in disorder, resulting in a large number of dequeued interface notification messages being unable to be processed in an orderly manner and accumulating in the memory of the terminal device, causing the live broadcast room application or the terminal device to crash.
[0081] The queue access rules are used to limit the order in which each message queue executes the dequeue operation. As a variant implementation, in general, the time for each message queue to execute the enqueue operation can be monitored. By comparing the time for each message queue to execute the enqueue operation, the message queue that executes the enqueue operation earlier is allowed to execute the dequeue operation first.
[0082] In another embodiment that can be flexibly combined with other embodiments, a priority can be set for each message queue, and the corresponding priority can be set according to the type of interface notification message stored therein. The message queue with a higher priority will be given priority to perform the dequeue operation, thereby enriching the queue access rules and realizing the definition of the access rules across message queues. A specific example of performance under this definition is as follows: the priority of a message queue with a stored interface notification message of the type of large gift is greater than that of a message queue with a stored interface notification message of the type of small gift. It has priority to perform the dequeue operation, and the interface notification message at the head of the queue is displayed in priority in the live studio graphical user interface; if the priorities of multiple message queues are the same, the dequeue operation will be performed in parallel, and the interface notification messages at the head of multiple message queues will be displayed in parallel in the live studio graphical user interface; regarding the number of queues when queuing messages, those skilled in the art can flexibly design it as long as it complies with the definition of the relevant rules of this application.
[0083] The various methods implemented in this step, combined with the shunting and queuing operations described above, constitute a queue management module that can be used to process a large number of interface notification messages. This queue management module not only sets the access rules for each message queue, but also standardizes the relevant rules for access across message queues, and implements a more systematic organization and management of multiple message queues. Through the queuing and dequeuing operations of the message queues, various types of interface notification messages are managed in an orderly manner to prevent numerous interface notification messages from accumulating in the memory and being unable to be processed, causing the terminal device running the live broadcast room application to crash.
[0084] Step S14, executing display strategy control on each out-of-queue interface notification message, and outputting each interface notification message to its corresponding view layer for display under the control of the display strategy control:
[0085] The display strategy control can be defined by the corresponding display strategy of the interface notification message itself. The display strategy is suitable for implementing effective display control on the interface notification message to which it belongs after local processing, so that the live broadcast room application can objectively standardize the display of various types of interface notification messages while individually controlling the display of interface notification messages according to the display strategy. When one or more message queues perform a dequeue operation on the interface notification messages stored in them, the interface notification messages are generally processed locally. When implementing local processing, the interface notification messages can be instantiated and converted into instance objects by calling the relevant interfaces given in advance. Thus, the control of the interface notification message to be displayed in its designated view layer is realized by accessing the instance object.
[0086] For the process of local processing of interface notification messages, please refer to Figure 3In one embodiment, when executing the display strategy control for each interface notification message stored in the message queue for dequeuing, adapting to each dequeued interface notification message may include the following specific control steps:
[0087] Step S141, instantiate the preset interface class for encapsulating interface notification messages, and obtain the instance object:
[0088] In order to realize the local processing of interface notification messages and the conversion of interface notification information into instance objects so that they can be subsequently objectified by computers and finally realize interface output, developers adapt to the specifications of the unified protocol in the programming interface and provide a template for the interface object accordingly. The template provides a definition specification of an interface class. By instantiating the interface class, an instance object can be obtained. The instance object inherits the various functional interfaces pre-defined in the interface class. When the various data related to the interface notification message are converted into the attributes of the instance object, the instance object can play its role in carrying the local operation performance of the interface notification message. Among them, the visual part contained in the interface notification message is converted into the interface object contained in the instance object, and the relevant display strategy can also be encapsulated in the instance object. These objects or information encapsulated by the instance object can be called through the corresponding functional interface of the instance object.
[0089] Step S142, obtaining the interface object encapsulation data from the interface notification message and assigning values to corresponding attribute items of the instance object to construct the interface object to be displayed in the view layer:
[0090] The interface notification messages stored in each message queue for executing the dequeue operation are implemented in a localized manner, which contain information that needs to be displayed visually in the graphical user interface. This information defines a visual object displayed in the graphical user interface, and therefore, it can be converted into an interface object by transferring it to an instance object. Specifically, the definition information related to the interface object can be obtained from the interface notification message, and the corresponding attribute items of the instance object can be assigned to complete the data encapsulation of the interface object in the instance object, thereby constructing the interface object to be displayed in the view layer specified by the interface notification message.
[0091] By localizing the interface notification messages and converting them into interface objects, standardization of various types of interface notification messages can be achieved, regardless of which project team these interface notification messages are developed by, what type of presentation these interface notification messages are responsible for, and even whether various interface notification messages comply with the same format specifications. Once converted into interface objects, the standardization of the visual information of the interface notification messages on the local device is completed and can be standardized and uniformly called.
[0092] Step S143, obtaining the display policy control identifier corresponding to the interface object from the interface notification message, and assigning values to the corresponding attribute items of the instance object:
[0093] The display strategy control identifier, as described above, is predefined in the interface notification message as information related to the display strategy description, and can therefore be obtained from the interface notification message. The display strategy control identifier is used to assign values to corresponding attribute items of the instance object, so as to control the display strategy of the interface notification message in the view layer specified by it.
[0094] In one embodiment, the display strategy control identifier includes a visibility monitoring identifier, which is used to set whether the interface notification message is visible in a specific environment, so as to control the display execution module to control the corresponding interface object to be visible or invisible in the specific environment according to the visibility monitoring identifier; the specific environment generally refers to setting the trigger condition of the visibility monitoring identifier according to the actual application scenario of the live broadcast room, judging whether to trigger the change of the interface object to be visible or invisible in the graphical user interface. For example, the specific environment can be judged by the touch event of the user in the live broadcast room as the trigger condition. When the touch event is received, the relevant interface object changes the interface object in the graphical user interface of the live broadcast room according to the visibility monitoring identifier to be visible or invisible. More vividly, sometimes a certain interface notification message needs to be visible after the user exits a certain live broadcast room. In this case, the interface notification message can be realized by marking the visibility monitoring identifier as a visible attribute. This visible attribute will be passed to the instance object here so that it can be called and acted on the corresponding interface object later.
[0095] In another embodiment that can exist independently or be combined with the previous embodiment, the display processing control identifier includes a display duration identifier, which is used to set the display duration of the interface notification message in the graphical user interface, so as to control the display execution module according to the display duration identifier, and control the corresponding interface object from the time it first appears in the graphical user interface to the end of its display after the corresponding duration is reached; the display duration can be set by the development team when developing its interface notification message, so as to control the display time of the corresponding interface object in the corresponding view layer accordingly.
[0096] Step S144: passing the instance object to a display execution module for executing output of the interface object to a view layer display, driving the display execution module to be controlled to output the interface notification message to its corresponding view layer display:
[0097] When the dequeued interface notification message is converted into the interface object and the data encapsulation of the corresponding instance object is completed, the localization processing is completed. The instance object can be passed to the display execution module to drive the display execution module to output the interface notification message to its corresponding view layer by accessing and calling the instance object, so that the corresponding interface object is displayed in the live broadcast room graphical user interface.
[0098] Specifically, the display execution module can obtain the interface object encapsulated and defined by calling the first functional interface of the instance object, and output the interface object to the corresponding view layer for display; it can obtain the display policy control identifier encapsulated by calling the second functional interface of the instance object, and control the display activity of the interface object in the view layer accordingly. Similarly, if the interface notification message defines other control items, they can all be converted into corresponding attribute items of the instance object, and the display execution module can call the corresponding attribute items through the corresponding functional interface of the instance object to control other display activities of the interface object in the view layer.
[0099] In one embodiment, in order to prevent multiple interface notification messages from specifying the same view layer at the same time period, causing the multiple interface notification messages to be displayed in the same view layer in a disorderly manner, affecting the viewing experience of users in the live broadcast room, the display execution module may first perform the following steps before outputting the interface notification message to its corresponding view layer for display:
[0100] Check whether there is an interface notification message being displayed in the view layer specified by the interface notification message that needs to be displayed. When there is no interface notification message being displayed in the view layer, the interface notification message that needs to be displayed is executed.
[0101] For the setting of this step, it can be understood that the display execution module needs to detect whether the view layer specified by the interface notification message is occupied before outputting the interface notification message to its corresponding view layer for display. When the view layer is occupied, it needs to wait for the interface notification message being displayed to be completed before outputting the next interface notification message to the view layer for display in the live studio graphical user interface. Figure 4 As shown, the present application outputs the interface object to the view layer designated by it so that the interface message to which the interface object belongs can be displayed in the live studio graphical user interface.
[0102] 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:
[0103] In one embodiment, in order to optimize the memory of the terminal device running the live broadcast room application process, refer to Figure 5 , this application also includes the following subsequent steps:
[0104] Step S15, in response to the exit event of the live broadcast room application process, reclaiming the memory occupied by executing this method:
[0105] This application is attached to the live broadcast room application, so the exit event, generally speaking, refers to the event triggered by the live broadcast room audience user exiting the live broadcast room; when this application responds to the exit event, it will trigger the recovery of the memory occupied by the execution of this method, that is, destroy the message queue and the tree structure constructed by the view layer container and the root container, etc., which are the data information generated by the execution of this method, so as to recycle the memory occupied by the execution of this method and prevent the terminal device from freezing or even crashing.
[0106] In another embodiment, the purpose is the same as the previous embodiment, which is also to optimize the memory of the terminal device running the live broadcast room application process. Figure 6 , the application also includes the following steps:
[0107] Step S15', monitor the idle duration of each message queue / view layer, and when the idle duration of a message queue / view layer exceeds a predetermined value, reclaim the memory of the message queue / view layer:
[0108] The present application can construct a monitoring module that monitors the idle duration of each message queue and each view layer, and pre-sets a predetermined value. When the monitoring module monitors that the idle duration of a message queue or a view layer exceeds the predetermined value, the message queue or the view layer will be destroyed to reclaim the memory occupied by the message queue or the view layer for the terminal device executing the present application; regarding the predetermined value, technicians in this field can flexibly set it according to the actual application scenario of the live broadcast room.
[0109] In another embodiment, the present application constructs a module for automatically creating message queues and view layers. In the step of performing an enqueue operation on the view layer specified by the interface notification message and diverting it to the message queue set corresponding to the view layer, when the view layer and / or message queue specified by the interface notification message does not exist, a corresponding view layer and / or message queue is created for it.
[0110] It can be understood that, in the process of determining the view layer designated for output display and the message queue to which each type of interface notification message belongs according to the view layer index of the type information of the interface notification message, when the view layer or message queue specified by a certain interface notification message does not exist, the creation module will automatically create the corresponding view layer or message queue for the interface notification message according to the view layer index or its type information contained in the type information of the interface notification message, so as to prevent the method proposed in the present application from failing to execute normally, resulting in the inability to orderly manage the interface notification message and its display in the live broadcast room graphical user interface.
[0111] It can be understood that this embodiment realizes the automatic creation of message queues and / or view layers, and the previous example also reveals the means for automatically recycling message queues and / or view layers. Therefore, another embodiment combining these two means and implementing them will enable the technical solution of the present application to have the ability to dynamically create and recycle the memory maintenance of the message queues and / or view layers, and better realize the background management of massive interface notification messages.
[0112] In another embodiment, after the live broadcast room application process is started, the corresponding interface notification message is generated in response to the user instruction generated by the user touching the graphical user interface of the live broadcast room application. This type of interface notification message and the interface notification message received from the server are used for the diversion and added to the corresponding message queue.
[0113] It can be understood that during the period when the live broadcast room application process constructed by this application is executed, whether it is the interface notification message sent from the server or the interface notification message generated from the local terminal device, it can be managed and displayed in the graphical user interface in an orderly manner by this application, that is, as long as the live broadcast room application process is started, it will process and display various interface notification messages it receives in an orderly manner at all times according to relevant rules.
[0114] Furthermore, by functionalizing each step in the method disclosed in the above embodiments, an interface notification message scheduling device of the present application can be constructed. According to this idea, please refer to Figure 7 In a typical embodiment, the device comprises:
[0115] The message receiving module 11 is configured to start receiving interface notification messages as the live broadcast room application process is started;
[0116] A message enqueue module 12, configured to shunt the interface notification message to a message queue corresponding to the view layer according to the view layer specified by the interface notification message, and perform an enqueue operation, wherein each view layer is correspondingly represented by a view container associated with a root container;
[0117] The message dequeue module 13 is independently configured for each message queue and is used to perform the dequeue operation of the corresponding message queue according to the queue access rule;
[0118] The message display module 14 is used to execute display strategy control on each interface notification message out of the queue, and output each interface notification message to its corresponding view layer for display under its control.
[0119] Furthermore, 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 scheduling method described in the aforementioned embodiments.
[0120] 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 processing unit 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 scheduling method is stored. When the computer program is called and executed by the computer, the steps included in the method are executed.
[0121] To summarize, the present application constructs a scheduling module that is highly versatile and extensible for processing various types of interface notification messages. While orderly managing various types of interface notification messages through the message queue, combined with the tree structure constructed by the view layer, view layer container, and root container, it realizes the centralized and orderly scheduling of view layers at different levels in the depth direction of the graphical user interface, and localizes various types of interface notification messages, which helps to unify the development of interface notification messages defined by different development teams of the same application project and improve program development efficiency.
[0122] 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).
[0123] 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.
[0124] 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.
[0125] The above 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 scheduling interface notification messages, characterized in that: The steps include: As the live broadcast room application process starts, you start receiving interface notification messages; According to the view layer specified by the interface notification message, the message is shunted to the message queue set corresponding to the view layer to perform the enqueue operation, and each view layer is correspondingly represented by a view container associated with the root container to implement the interface performance; The message dequeue module corresponding to each message queue executes the dequeue operation of its corresponding message queue according to the queue access rule; Execute display strategy control on each out-of-queue interface notification message, and output each interface notification message to its corresponding view layer for display under its control; When executing display policy control for each outbound interface notification message, adapting to each outbound interface notification message includes the following specific control steps: Instantiate the preset interface class for encapsulating interface notification messages and obtain the instance object; Obtaining the interface object encapsulation data from the interface notification message and assigning values to the corresponding attribute items of the instance object to construct the interface object to be displayed in the view layer; Obtain the display policy control identifier corresponding to the interface object from the interface notification message, and assign values to the corresponding attribute items of the instance object; The instance object is transferred to a display execution module for executing output of the interface object to a view layer display, and the display execution module is driven to output the interface notification message to its corresponding view layer display under control.
2. The method according to claim 1, characterized in that The following post-processing steps are also included: In response to an exit event of the live broadcast room application process, the memory occupied by executing this method is reclaimed.
3. The method according to claim 1, characterized in that: The display policy control identifier includes a visibility monitoring identifier, which is used to set whether the interface notification message is visible in a specific environment, so as to control the display execution module to control the corresponding interface object to be visible or invisible in the specific environment according to the visibility monitoring identifier.
4. The method according to claim 1, characterized in that: The display strategy control identifier includes a display duration identifier, which is used to set the display duration of the interface object of the interface notification message, so as to control the display execution module to control the corresponding interface object to display to the corresponding duration and then end its display according to the display duration identifier.
5. The method according to claim 1, characterized in that The display execution module performs the following steps before outputting the interface notification message to its corresponding view layer for display: detecting whether there is an interface notification message being displayed in the view layer specified by the interface notification message that needs to be displayed, and executing the interface notification message that needs to be displayed only when there is no interface notification message being displayed in the view layer.
6. The method according to claim 1, characterized in that The steps include: Monitor the idle duration of each message queue / view layer. When the idle duration of a message queue / view layer exceeds a preset value, recycle the memory of the message queue / view layer.
7. The method according to claim 1, characterized in that According to the view layer specified by the interface notification message, it is diverted to the message queue set corresponding to the view layer to perform the enqueue operation step. When the view layer and / or message queue specified by the interface notification message does not exist, the corresponding view layer and / or message queue is created for it.
8. The method according to claim 1, characterized in that: After the live broadcast room application process is started, the corresponding interface notification message is generated in response to the user instruction generated by the user touching the graphical user interface of the live broadcast room application. The corresponding interface notification message and the interface notification message received from the server are used for the diversion and added to the corresponding message queue.
9. An interface notification message scheduling device, characterized in that: It includes: The message receiving module is configured to start receiving interface notification messages as the live broadcast room application process is started; A message enqueue module, used to shunt the interface notification message to the message queue set corresponding to the view layer according to the view layer specified by the interface notification message to perform an enqueue operation, and each view layer is correspondingly represented by a view container associated with the root container to implement the interface performance; The message dequeue module is independently configured for each message queue and is used to perform the dequeue operation of the corresponding message queue according to the queue access rules; A message display module is used to execute display strategy control on each interface notification message that has been dequeued, and output each interface notification message to its corresponding view layer display under its control, including: instantiating a preset interface class for encapsulating interface notification messages to obtain an instance object; obtaining interface object encapsulation data from the interface notification message and assigning values to corresponding attribute items of the instance object to construct an interface object to be displayed in the view layer; obtaining a display strategy control identifier corresponding to the interface object from the interface notification message and assigning values to corresponding attribute items of the instance object; passing the instance object to a display execution module for executing the output of the interface object to the view layer display, and driving the display execution module to be controlled to output the interface notification message to its corresponding view layer display.
10. 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 scheduling method as described in any one of claims 1 to 8.
11. A non-volatile storage medium, characterized in that: It stores a computer program implemented according to the interface notification message scheduling method described in any one of claims 1 to 8, and when the computer program is called and run by a computer, the steps included in the method are executed.
