CN107454456B - Management control method and system for floating layer elements - Google Patents

Management control method and system for floating layer elements Download PDF

Info

Publication number
CN107454456B
CN107454456B CN201710797020.XA CN201710797020A CN107454456B CN 107454456 B CN107454456 B CN 107454456B CN 201710797020 A CN201710797020 A CN 201710797020A CN 107454456 B CN107454456 B CN 107454456B
Authority
CN
China
Prior art keywords
floating layer
layer element
information
protocol
floating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710797020.XA
Other languages
Chinese (zh)
Other versions
CN107454456A (en
Inventor
张磊
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710797020.XA priority Critical patent/CN107454456B/en
Publication of CN107454456A publication Critical patent/CN107454456A/en
Application granted granted Critical
Publication of CN107454456B publication Critical patent/CN107454456B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4438Window management, e.g. event handling following interaction with the user interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8166Monomedia components thereof involving executable data, e.g. software

Abstract

The invention provides a management control method and a management control system for floating layer elements, wherein the method comprises the following steps: designing a floating layer protocol document, wherein the floating layer protocol document comprises protocol description information of each floating layer element, and the protocol description information is used for representing attribute information of each floating layer element; the floating layer manager obtains the protocol description information of each floating layer element by analyzing the floating layer protocol document, and further obtains the attribute information of each floating layer element; and the floating layer manager performs layout on each floating layer element on the interface according to the attribute information of each floating layer element. The invention designs a floating layer protocol document for floating layer elements in an interface, wherein the floating layer protocol document comprises attribute information of each floating layer element in the interface, and the floating layer manager is used for distributing the floating layer elements on the interface according to the attribute information of each floating layer element, thereby realizing automatic unified management of the floating layer elements, and avoiding the complexity and difficult maintenance brought by manual management.

Description

Management control method and system for floating layer elements
Technical Field
The invention relates to the technical field of interface design, in particular to a management control method and a management control system for floating layer elements.
Background
In the development process of client software, particularly relating to the field of game development or video live broadcast, a plurality of floating layer elements are required to be displayed on a video stream layer. The size, the position and the hierarchical relation of each floating layer element on the interface are different, when a plurality of floating layer elements appear on the interface, each floating layer element needs to be manually managed, which floating layer element is displayed on the uppermost layer and which floating layer element is displayed on the lowermost layer, and the floating layers have the overlapping effect.
The traditional method is manually managed, namely, the judgment of the floating layer elements is manually managed according to rules defined by the product, and the floating layer elements are more complex and more difficult to manage as the iteration and the update of the product at the later stage are more and more complex.
Disclosure of Invention
The present invention provides a method and system for managing and controlling a floating layer element that overcomes, or at least partially solves, the above problems.
According to a first aspect of the present invention, there is provided a management control method for a floating layer element, including:
s1, designing a floating layer protocol document, wherein the floating layer protocol document comprises protocol description information of each floating layer element, and the protocol description information is used for representing attribute information of each floating layer element;
s2, the floating layer manager obtains the protocol description information of each floating layer element by analyzing the floating layer protocol document, and further obtains the attribute information of each floating layer element;
and S3, the floating layer manager lays out each floating layer element on the interface according to the attribute information of each floating layer element.
The invention has the beneficial effects that: the floating layer protocol document is designed for floating layer elements in the interface, wherein the floating layer protocol document comprises attribute information of each floating layer element in the interface, and the floating layer manager is used for distributing the floating layer elements on the interface according to the attribute information of each floating layer element, so that automatic unified management of the floating layer elements is realized, and the complexity and difficult maintenance brought by manual management are avoided.
On the basis of the above embodiments, the present invention may be further modified as follows.
Further, the protocol description information represents attribute information of each floating layer element by using binary numbers, wherein the attribute information of each floating layer element includes a level of the floating layer element, a center position of the floating layer element on the interface, size information of the floating layer element, display hiding information of the floating layer element, and identification information of the floating layer element.
Further, the attribute information of each floating-layer element represented by the protocol description information using binary digits further includes:
when m kinds of hierarchies exist for all floating layer elements, [ log ] in binary number is adopted2 m]+1 bit represents the hierarchy of all float elements, where [ log ]2 m]+1 represents taking the logarithm of m with 2 as the base and then rounding up, wherein m is a positive integer;
dividing the whole interface into n subspaces, and using [ log ] in binary number2 n]+1 bit represents the position information of all floating layer elements in the interface subspace, wherein n is a positive integer;
using in binary numbers
Figure BDA0001400603250000021
The method comprises the steps that bits are used for representing size information of all floating layer elements, wherein the size information of a floating layer is represented by distance information of upper, lower, left and right interfaces and a central position of the floating layer elements;
1 bit in binary number is adopted to represent the display hidden information of each floating layer element;
when the number of floating layer elements of the whole interface is w, the [ log ] in binary number is adopted2 w]And +1 bit, where w is a positive integer.
Further, the step S2 further includes:
extracting binary numbers corresponding to the protocol description information of each floating layer element from the floating layer protocol document;
according to the binary number corresponding to the protocol description information of each floating layer element and the digit corresponding to each attribute information of each floating layer element, obtaining the binary number corresponding to each attribute information by adopting left shift operation of the binary digit;
and converting the binary number corresponding to each attribute information into a decimal number to obtain the content of each attribute information of the floating layer element.
Further, the step S3 is followed by:
and S4, based on the message protocol, realizing that one floating layer element in the interface transfers the message to another floating layer element by the forwarding mode of the floating layer manager.
Further, the step S4 further includes:
s41, designing a message protocol for transmitting messages between two floating layer elements, wherein the message protocol comprises identification information of a sender, identification information of a receiver and sent message content;
s42, the floating layer manager receives the message protocol content of the sender, analyzes the identification information and the message content of the receiver from the message protocol content of the sender, and sends the message content to the receiver.
Further, the step S4 further includes:
defining a set object in a floating layer manager, wherein identification information of all floating layer elements is stored in the set object;
accordingly, the parsing the identification information of the receiver and the message content from the step S42, and sending the message content to the receiver further includes:
and the floating layer manager searches the receiver corresponding to the receiver identification information from the set object according to the analyzed receiver identification information and sends the message content to the receiver.
According to a second aspect of the present invention, there is provided a management control system of a floating layer element, comprising a floating layer manager, wherein the floating layer manager comprises a parsing module and a layout module;
the analysis module is used for obtaining the protocol description information of each floating layer element by analyzing the floating layer protocol document so as to obtain the attribute information of each floating layer element;
the layout module is used for carrying out layout on each floating layer element on the interface according to the attribute information of each floating layer element;
the floating layer protocol document comprises protocol description information of each floating layer element, and the protocol description information is used for representing attribute information of each floating layer element.
According to a third aspect of the present invention, there is provided an apparatus of a management control method of a floating layer element, including a processor, a memory, and a bus;
the processor and the memory complete mutual communication through the bus;
the memory stores program instructions executable by the processor, the processor invoking a management control method that the program instructions are capable of executing a floating layer element.
According to a fourth aspect of the present invention, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute a management control method of a floating layer element.
Drawings
FIG. 1 is a flowchart of a management control method for a floating layer element according to an embodiment of the present invention;
FIG. 2 is a block diagram of a management control system connection for a floating level element according to another embodiment of the present invention;
FIG. 3 is a block diagram of a management control system connection for a floating level element according to yet another embodiment of the present invention;
FIG. 4 is a block diagram of the internal connections of the parsing module in the management control system of the floating layer element;
fig. 5 is a device connection block diagram of a management control method of a floating layer element according to still another embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
Referring to fig. 1, a management control method of a floating layer element according to an embodiment of the present invention is provided, including: s1, designing a floating layer protocol document, wherein the floating layer protocol document comprises protocol description information of each floating layer element, and the protocol description information is used for representing attribute information of each floating layer element; s2, the floating layer manager obtains the protocol description information of each floating layer element by analyzing the floating layer protocol document, and further obtains the attribute information of each floating layer element; and S3, the floating layer manager lays out each floating layer element on the interface according to the attribute information of each floating layer element.
In the development process of client software, particularly relating to the field of game development or video live broadcast, a plurality of floating layer elements are required to be displayed on a video stream layer. Because the size, the position and the hierarchical relation of each floating layer element on the interface are different, each floating layer element needs to be managed, the management is performed manually by people, the manual management mode is complex in process, and the maintenance is difficult.
Therefore, this embodiment provides a method for automatically managing all floating layer elements, which is implemented by first designing a floating layer protocol document for all floating layer elements in an interface, where the floating layer protocol document includes protocol description information of each floating layer element, and each protocol description information represents attribute information of a corresponding floating layer element on the interface.
After the floating layer protocol document is designed for all floating layer elements, a floating layer manager is defined in the interface and is mainly used for managing all floating layer elements on the interface. In this embodiment, the layout of all the floating layer elements on the interface is mainly designed, so that the floating layer manager parses the floating layer protocol document, obtains the protocol description information corresponding to each floating layer element from the floating layer protocol document, and further obtains each attribute information of the floating layer element. And the floating layer manager performs layout on each floating layer element on the interface according to the attribute information of each floating layer element on the interface.
The floating layer protocol document is designed for the floating layer elements in the interface, wherein the floating layer protocol document comprises attribute information of each floating layer element in the interface, and the floating layer manager is used for carrying out layout on the floating layer elements on the interface according to the attribute information of each floating layer element, so that automatic unified management on the floating layer elements is realized, and the complexity and difficult maintenance brought by manual management are avoided.
On the basis of the above embodiment, in an embodiment of the present invention, the protocol description information uses binary numbers to represent attribute information of each floating layer element, where the attribute information of each floating layer element includes a hierarchy of the floating layer element, a center position of the floating layer element on the interface, size information of the floating layer element, display hidden information of the floating layer element, and identification information of the floating layer element.
It should be noted that, when the conventional protocol is designed normally, a plurality of field information, each of which is of one type, in the memory model, one type of information occupies a plurality of bytes in the memory, and one byte corresponds to 8 bits in the memory model. If a protocol includes 8 boolean values, the overhead of designing the memory according to the 8 boolean values is necessarily an integer multiple of 8, and may even be an integer multiple of 32 or 64, and the like, and the memory usage calculation rules of different systems for boolean values are inconsistent, but the memory space occupied is certainly larger than 8 bits. Therefore, when the protocol is designed according to the present embodiment, the protocol is not designed according to the boolean value type, but is designed according to bit data, and a one-bit boolean value in the binary system is adopted, for example, the bit is 1, which represents that the boolean value is tube, and if the one-bit in the binary system is 0, which represents that the boolean value is false, all data can be perfectly stored by 8 bits in the memory, which obviously saves a lot of memory overhead compared with the conventional method.
Through the above analysis, the protocol description information in this embodiment adopts binary numbers to represent the attribute information of each floating layer element, where the attribute information of each floating layer element mainly includes the hierarchy of the floating layer element, that is, the hierarchical relationship of all floating layer elements on the interface, the central position of the floating layer element on the interface, the size information of the floating layer element, the display hiding information of the floating layer element, and the identification information of the floating layer element. The attribute information of each floating layer element on the interface is designed, and support is provided for the subsequent layout of each floating layer element on the interface.
In this embodiment, in order to optimize the memory channel occupied by the protocol, the protocol information is divided in a bit manner, so that the memory overhead required by the protocol can be effectively reduced.
In the above embodimentsBasically, in another embodiment of the present invention, when m levels of all float elements exist, [ log ] in binary number is adopted2 m]+1 bit represents the hierarchy of all float elements, where [ log ]2 m]+1 represents taking the logarithm of m with 2 as the base and then rounding up, wherein m is a positive integer; dividing the whole interface into n subspaces, and using [ log ] in binary number2 n]+1 bit represents the position information of all floating layer elements in the interface subspace, wherein n is a positive integer; using in binary numbers
Figure BDA0001400603250000061
The method comprises the steps that bits are used for representing size information of all floating layer elements, wherein the size information of a floating layer is represented by distance information of upper, lower, left and right interfaces and a central position of the floating layer elements; 1 bit in binary number is adopted to represent the display hidden information of each floating layer element; when the number of floating layer elements of the whole interface is w, the [ log ] in binary number is adopted2 w]And +1 bit, where w is a positive integer.
In the present embodiment, by analyzing the design rule and the idea of the protocol description information of each floating layer element in detail, in java, the overhead of one long type data, that is, the long integer data in the memory is 64 bits, and all attribute information of each floating layer element can be included by only one long integer data. The protocol description information of each floating layer element is designed as follows.
The attribute information of each floating layer element comprises the hierarchy information of the floating layer element, the central position information of the floating layer element on the interface, the size information of the floating layer element view, the display hidden information of the floating layer element and the identification information of the floating layer element.
In the following, a specific example is described, for example, all the floating layer elements exist in 16 levels, 2 of which416, a 4-bit binary number is used to represent the hierarchical level of a floating layer element. When displayed on the interface, the display is performed from small to large according to the hierarchy, and the floating layer element with the large hierarchy coversA small-level float element.
In the process of displaying the floating layer elements on the interface, the whole interface space is divided into 16 equally divided grids, each grid can be understood as an independent space, the central position of each floating layer element on the interface is represented by a position in a subspace, and since 16 types of position information need to be expressed, 4-bit binary numbers need to be occupied for expression.
The size information of each floating layer element is described by using the width information of the upper, lower, left and right sides of the central point by taking the central position as a reference, and since the whole interface is divided into 16 subspaces, the maximum distance of the upper, lower, left and right sides is 3 by taking the subspaces as a unit, the distance information needs to be represented by using a 2-bit binary number, and the information of the upper, lower, left and right sides needs to be represented by using a 4-bit binary number, so that the size information of each floating layer element needs to be represented by 8-bit binary numbers in total.
The hidden information displayed by the floating layer element only needs 1-bit binary number to be represented, for example, a binary number of 0 indicates hiding the floating layer element, and a binary number of 1 indicates reality of the floating layer element.
Each floating layer element has unique identification information corresponding to the floating layer element, if 64 floating layer elements are designed, 8-bit binary data is needed to represent the identification information of all the floating layer elements, and the unique identifier of the floating layer element facilitates the uniform management of a subsequent floating layer manager on the floating layer elements.
In this embodiment, in addition to describing the above attribute positions, some bit number information remains in the binary number representing the protocol description information of each floating layer element, which is used for an extension field and facilitates the upgrading of subsequent protocols.
The present embodiment describes the design of the protocol description information of the floating layer element, and the memory overhead can be greatly reduced and the protocol transmission efficiency can be improved by using binary data to store the whole protocol layer data information.
On the basis of the foregoing embodiments, in an embodiment of the present invention, the step S2 further includes: extracting binary numbers corresponding to the protocol description information of each floating layer element from the floating layer protocol document; according to the binary number corresponding to the protocol description information of each floating layer element and the digit corresponding to each attribute information of each floating layer element, obtaining the binary number corresponding to each attribute information by adopting left shift operation of the binary digit; and converting the binary number corresponding to each attribute information into a decimal number to obtain the specific content of each attribute information of the floating layer element.
The above embodiment has described the design method of the whole protocol description information, and this embodiment will mainly describe the parsing method of the protocol description information, the protocol description information is represented by binary data, the first 4 bits can be known as the hierarchy information of each floating layer element through the above design, and how to parse the hierarchy information in the protocol description information is described in detail next. If the protocol data is a, first, the binary data in a is shifted to the left by 4 bits through a left shift operation on the data of a, and the shifted-out 4 bits of data are saved into a temporary variable temp, where the 4 bits of binary data related to the hierarchy are stored. Next, sequentially right-shifting the data in temp by one bit and multiplying by (n-1) power of 2, where n represents the number of shifted bits, the binary data of temp is converted into corresponding decimal data layerInfo, and in this way, the level information of the floating layer element is obtained.
Similarly, for other attribute information of the floating layer element, the binary number corresponding to the attribute information is obtained through left shift operation, and then the binary number is converted into corresponding decimal data to realize the analysis of the whole data format, and finally the specific content information contained in the protocol is obtained.
On the basis of the foregoing embodiments, in an embodiment of the present invention, after the step S3, the method further includes: and S4, based on the message protocol, realizing that one floating layer element in the interface transfers the message to another floating layer element by the forwarding mode of the floating layer manager.
In addition to the above-described management of the layout of all the floating layer elements in the interface, the floating layer manager also has an important function of handling message communication between different floating layer elements. The traditional mode is direct communication between different floating layer elements, and when the number of the floating layer elements is large, the direct communication between the floating layer elements is very disordered and is very difficult to maintain.
In this embodiment, the function of the floating layer manager is exerted, and the message communication from one floating layer element to another floating layer element is realized by using the floating layer manager for forwarding, that is, when the floating layer element a sends a message to the floating layer element b, the floating layer element a sends the message to the floating layer manager first, and the floating layer manager forwards the message to the floating layer element b.
On the basis of the foregoing embodiments, in an embodiment of the present invention, the step S4 further includes: s41, designing a message protocol for transmitting messages between two floating layer elements, wherein the message protocol comprises identification information of a sender, identification information of a receiver and sent message content; s42, the floating layer manager receives the message protocol content of the sender, analyzes the identification information and the message content of the receiver from the message protocol content of the sender, and sends the message content to the receiver.
In the process of forwarding the message, the floating layer manager needs to design a message protocol for communication between different floating layer elements, each floating layer element has a corresponding unique identification information, and the message protocol format designed in this embodiment is:
Figure BDA0001400603250000091
wherein fromId represents identification information of a sender, toId represents identification information of a receiver, msg represents transmitted message content, and the message content is data in json format, so that arbitrary object data can be carried.
For example, the floating layer element a needs to send a message to the floating layer element B, the floating layer element a constructs the content of the protocol and sends the message to the floating layer manager, and the floating layer manager parses the information content of the toId and then transparently transmits the message content to the floating layer element B corresponding to the toId.
On the basis of the foregoing embodiments, in an embodiment of the present invention, the step S4 further includes: defining a set object in a floating layer manager, wherein identification information of all floating layer elements is stored in the set object; accordingly, the parsing the identification information of the receiver and the message content from the step S42, and sending the message content to the receiver further includes: and the floating layer manager searches the receiver corresponding to the receiver identification information from the set object according to the analyzed receiver identification information and sends the message content to the receiver.
In order to facilitate the floating layer manager to quickly find the corresponding floating layer element, in this embodiment, a set object list is designed in the floating layer manager, and identification information of all floating layer elements is stored in the set object. And the floating layer manager searches the receiver corresponding to the receiver identification information from the set object according to the analyzed receiver identification information and sends the message content to the receiver. By storing the identifying information of all the floating layer elements in the floating layer manager, the floating layer manager can quickly locate the floating layer elements by traversing the set object. After receiving the message, the floating layer element B analyzes the specific message content through a standard JSON format, thereby completing the message communication among different floating layer elements.
Referring to fig. 2, a floating level element management control system of an embodiment of the present invention is provided, a floating level manager, which includes a parsing module 21 and a layout module 22;
the parsing module 21 is configured to parse the floating layer protocol document to obtain protocol description information of each floating layer element, and further obtain attribute information of each floating layer element.
The layout module 22 is configured to layout each floating layer element on the interface according to the attribute information of each floating layer element; the floating layer protocol document comprises protocol description information of each floating layer element, and the protocol description information is used for representing attribute information of each floating layer element.
The protocol description information adopts binary numbers to represent the attribute information of each floating layer element, wherein the attribute information of each floating layer element comprises the hierarchy of the floating layer element, the central position of the floating layer element on an interface, the size information of the floating layer element, the display hiding information of the floating layer element and the identification information of the floating layer element.
The design module 21 is specifically configured to:
when m kinds of hierarchies exist for all floating layer elements, [ log ] in binary number is adopted2 m]+1 bit represents the hierarchy of all float elements, where [ log ]2 m]+1 represents taking the logarithm of m with 2 as the base and then rounding up, wherein m is a positive integer;
dividing the whole interface into n subspaces, and using [ log ] in binary number2 n]+1 bit represents the position information of all floating layer elements in the interface subspace, wherein n is a positive integer;
using in binary numbers
Figure BDA0001400603250000111
The method comprises the steps that bits are used for representing size information of all floating layer elements, wherein the size information of a floating layer is represented by distance information of upper, lower, left and right interfaces and a central position of the floating layer elements;
1 bit in binary number is adopted to represent the display hidden information of each floating layer element;
when the number of floating layer elements of the whole interface is w, the [ log ] in binary number is adopted2 w]And +1 bit, where w is a positive integer. Referring to fig. 3, parsing module 21 in floating layer manager 2 specifically includes an extracting unit 211, an obtaining unit 212, and a converting unit 213.
The extracting unit 211 is configured to extract a binary number corresponding to the protocol description information of each floating layer element from the floating layer protocol document.
The obtaining unit 212 is configured to obtain a binary number corresponding to each attribute information by performing a left shift operation on the binary number according to the binary number corresponding to the protocol description information of each floating layer element and the bit number corresponding to each attribute information of each floating layer element.
The conversion unit 213 is configured to convert the binary number corresponding to each attribute information into a decimal number, so as to obtain the content of each attribute information of the floating layer element.
Referring to fig. 4, on the basis of the above embodiment, the floating layer element management control system provided by the present invention further includes a definition module 3, and the floating layer manager 2 further includes a forwarding module 23.
And the forwarding module 23 is configured to implement, based on a message protocol, that one floating layer element in the interface transfers a message to another floating layer element in a forwarding manner.
And the defining module 3 is used for defining a message protocol for transmitting messages between the two floating layer elements, wherein the message protocol comprises identification information of a sender, identification information of a receiver and sent message content.
Accordingly, the forwarding module 23 is further configured to:
receiving the message protocol content of the sender, analyzing the identification information and the message content of the receiver from the message protocol content of the sender, and sending the message content to the receiver.
The defining module 3 is further configured to define a set object in the floating layer manager, where the set object stores identification information of all floating layer elements.
Correspondingly, the forwarding module 23 is further configured to find the receiver corresponding to the receiver identification information from the set object according to the analyzed receiver identification information, and send the message content to the receiver.
Referring to fig. 5, a block diagram of an apparatus structure of a floating layer element management control method according to an embodiment of the present application is shown.
Referring to fig. 5, the apparatus of the floating layer element management control method includes: a processor (processor)501, a memory (memory)502, and a bus 503; the processor 501 and the memory 502 are in communication with each other via the bus 503.
The processor 501 is configured to call program instructions in the memory 502 to perform the methods provided by the above-mentioned method embodiments, for example, including: designing a floating layer protocol document, wherein the floating layer protocol document comprises protocol description information of each floating layer element, and the protocol description information is used for representing attribute information of each floating layer element; the floating layer manager obtains the protocol description information of each floating layer element by analyzing the floating layer protocol document, and further obtains the attribute information of each floating layer element; and the floating layer manager performs layout on each floating layer element on the interface according to the attribute information of each floating layer element.
The present invention discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, which when executed by a computer, the computer is capable of executing the floating layer element management control method provided by the corresponding embodiments described above, for example, comprising: designing a floating layer protocol document, wherein the floating layer protocol document comprises protocol description information of each floating layer element, and the protocol description information is used for representing attribute information of each floating layer element; the floating layer manager obtains the protocol description information of each floating layer element by analyzing the floating layer protocol document, and further obtains the attribute information of each floating layer element; and the floating layer manager performs layout on each floating layer element on the interface according to the attribute information of each floating layer element.
The present invention also provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the floating layer element management control method provided in the corresponding embodiment, including: designing a floating layer protocol document, wherein the floating layer protocol document comprises protocol description information of each floating layer element, and the protocol description information is used for representing attribute information of each floating layer element; the floating layer manager obtains the protocol description information of each floating layer element by analyzing the floating layer protocol document, and further obtains the attribute information of each floating layer element; and the floating layer manager performs layout on each floating layer element on the interface according to the attribute information of each floating layer element.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the apparatus and the like of the floating layer element management control method are merely illustrative, where units illustrated as separate components may or may not be physically separate, and components displayed as units may or may not be physical units, may be located in one place, or may also be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute the various embodiments or some parts of the methods of the embodiments.
According to the floating layer element management control method and system provided by the invention, a floating layer protocol document is designed for floating layer elements in an interface, wherein the floating layer protocol document comprises attribute information of each floating layer element in the interface, and the floating layer manager is used for laying out the floating layer elements on the interface according to the attribute information of each floating layer element, so that the automatic unified management of the floating layer elements is realized, and the complexity and the difficulty in maintenance caused by manual management are avoided; the message communication between different floating layer elements is realized through the floating layer manager, and the complexity of directly communicating between different floating layer elements is avoided.
Finally, the method of the present application is only a preferred embodiment and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A management control method of a floating layer element is characterized by comprising the following steps:
s1, designing a floating layer protocol document, wherein the floating layer protocol document comprises protocol description information of each floating layer element, and the protocol description information is used for representing attribute information of each floating layer element;
s2, the floating layer manager obtains the protocol description information of each floating layer element by analyzing the floating layer protocol document, and further obtains the attribute information of each floating layer element;
s3, the floating layer manager lays out each floating layer element on the interface according to the attribute information of each floating layer element;
the protocol description information adopts binary numbers to represent the attribute information of each floating layer element, wherein the attribute information of each floating layer element comprises the hierarchy of the floating layer element, the central position of the floating layer element on an interface, the size information of the floating layer element, the display hiding information of the floating layer element and the identification information of the floating layer element;
wherein the protocol description information represents the attribute information of each floating layer element by using binary digits, and further comprises:
when m kinds of hierarchies exist for all floating layer elements, [ log ] in binary number is adopted2 m]+1 bit represents the hierarchy of all float elements, where [ log ]2 m]+1 represents taking the logarithm of m with 2 as the base and then rounding up, wherein m is a positive integer;
dividing the whole interface into n subspaces, and using [ log ] in binary number2 n]+1 bit represents the position information of all floating layer elements in the interface subspace, wherein n is a positive integer;
using in binary numbers
Figure FDA0002449754600000011
The method comprises the steps that bits are used for representing size information of all floating layer elements, wherein the size information of a floating layer is represented by distance information of upper, lower, left and right interfaces and a central position of the floating layer elements;
1 bit in binary number is adopted to represent the display hidden information of each floating layer element;
when the number of floating layer elements of the whole interface is w, the [ log ] in binary number is adopted2 w]And +1 bit, where w is a positive integer.
2. The management control method of a floating layer element according to claim 1, wherein the step S2 further includes:
extracting binary numbers corresponding to the protocol description information of each floating layer element from the floating layer protocol document;
according to the binary number corresponding to the protocol description information of each floating layer element and the digit corresponding to each attribute information of each floating layer element, obtaining the binary number corresponding to each attribute information by adopting left shift operation of the binary digit;
and converting the binary number corresponding to each attribute information into a decimal number to obtain the content of each attribute information of the floating layer element.
3. The method for managing and controlling a floating layer element according to claim 1, wherein said step S3 is followed by further comprising:
and S4, based on the message protocol, realizing that one floating layer element in the interface transfers the message to another floating layer element by the forwarding mode of the floating layer manager.
4. The management control method of a floating layer element according to claim 3, wherein the step S4 further includes:
s41, designing a message protocol for transmitting messages between two floating layer elements, wherein the message protocol comprises identification information of a sender, identification information of a receiver and sent message content;
s42, the floating layer manager receives the message protocol content of the sender, analyzes the identification information and the message content of the receiver from the message protocol content of the sender, and sends the message content to the receiver.
5. The management control method of a floating layer element according to claim 4, wherein the step S4 further includes:
defining a set object in a floating layer manager, wherein identification information of all floating layer elements is stored in the set object;
accordingly, the parsing the identification information of the receiver and the message content from the step S42, and sending the message content to the receiver further includes:
and the floating layer manager searches the receiver corresponding to the receiver identification information from the set object according to the analyzed receiver identification information and sends the message content to the receiver.
6. The management control system of the floating layer element is characterized by comprising a floating layer manager, wherein the floating layer manager comprises an analysis module and a layout module;
the analysis module is used for obtaining the protocol description information of each floating layer element by analyzing the floating layer protocol document so as to obtain the attribute information of each floating layer element;
the layout module is used for carrying out layout on each floating layer element on the interface according to the attribute information of each floating layer element;
the floating layer protocol document comprises protocol description information of each floating layer element, and the protocol description information is used for representing attribute information of each floating layer element;
the protocol description information adopts binary numbers to represent the attribute information of each floating layer element, wherein the attribute information of each floating layer element comprises the hierarchy of the floating layer element, the central position of the floating layer element on an interface, the size information of the floating layer element, the display hiding information of the floating layer element and the identification information of the floating layer element;
wherein the protocol description information represents the attribute information of each floating layer element by using binary digits, and further comprises:
when m kinds of hierarchies exist for all floating layer elements, [ log ] in binary number is adopted2 m]+1 bit represents the hierarchy of all float elements, where [ log ]2 m]+1 represents taking the logarithm of m with 2 as the base and then rounding up, wherein m is a positive integer;
dividing the whole interface into n subspaces, and using [ log ] in binary number2 n]+1 bit represents the position information of all floating layer elements in the interface subspace, wherein n is a positive integer;
using in binary numbers
Figure FDA0002449754600000031
The method comprises the steps that bits are used for representing size information of all floating layer elements, wherein the size information of a floating layer is represented by distance information of upper, lower, left and right interfaces and a central position of the floating layer elements;
1 bit in binary number is adopted to represent the display hidden information of each floating layer element;
when the number of floating layer elements of the whole interface is w, the [ log ] in binary number is adopted2 w]And +1 bit, where w is a positive integer.
7. A control apparatus of a floating layer element, comprising a processor, a memory, and a bus;
the processor and the memory complete mutual communication through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any one of claims 1-5.
CN201710797020.XA 2017-09-06 2017-09-06 Management control method and system for floating layer elements Active CN107454456B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710797020.XA CN107454456B (en) 2017-09-06 2017-09-06 Management control method and system for floating layer elements

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710797020.XA CN107454456B (en) 2017-09-06 2017-09-06 Management control method and system for floating layer elements

Publications (2)

Publication Number Publication Date
CN107454456A CN107454456A (en) 2017-12-08
CN107454456B true CN107454456B (en) 2020-09-08

Family

ID=60496160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710797020.XA Active CN107454456B (en) 2017-09-06 2017-09-06 Management control method and system for floating layer elements

Country Status (1)

Country Link
CN (1) CN107454456B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109040822B (en) * 2018-07-16 2021-06-22 北京奇艺世纪科技有限公司 Player configuration method and device and storage medium
CN111309415B (en) * 2020-01-17 2024-01-02 北京有竹居网络技术有限公司 User Interface (UI) information processing method and device of application program and electronic equipment
CN113553122A (en) * 2021-07-08 2021-10-26 北京奇艺世纪科技有限公司 Floating layer control method, device, equipment and computer readable medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101382867B (en) * 2008-10-28 2010-09-08 深圳市迅雷网络技术有限公司 Video playing interaction method and terminal
CN101763267A (en) * 2010-01-21 2010-06-30 深圳市同洲电子股份有限公司 Method for realizing embedded browser, device therefor and digital television receiving terminal
CN104020984B (en) * 2013-02-28 2017-07-07 阿里巴巴集团控股有限公司 A kind of method and device for generating static page
CN103491416B (en) * 2013-09-29 2018-09-04 深圳Tcl新技术有限公司 The free hand drawing layer display methods and device of caption data
CN104392474B (en) * 2014-06-30 2018-04-24 贵阳朗玛信息技术股份有限公司 A kind of method and device for generating, showing animation
CN104135684B (en) * 2014-07-17 2019-04-16 Tcl集团股份有限公司 A kind of interface display method and device based on Firefox OS
CN104268251A (en) * 2014-09-30 2015-01-07 北京奇虎科技有限公司 Playing method and device of video elements in web page
CN106469220B (en) * 2016-09-09 2020-07-24 北京星选科技有限公司 Method and system for generating dynamic effect page
CN106651996B (en) * 2016-12-20 2020-04-07 广州视源电子科技股份有限公司 Element hierarchy management method and device in manuscript editing tool

Also Published As

Publication number Publication date
CN107454456A (en) 2017-12-08

Similar Documents

Publication Publication Date Title
US20200372039A1 (en) Data processing method, apparatus, and system
CN108432200B (en) Method for protecting and controlling access to private personal information
CN109902274B (en) Method and system for converting json character string into thraft binary stream
CN107454456B (en) Management control method and system for floating layer elements
CN110445860B (en) Message sending method, device, terminal equipment and storage medium
CN105068854B (en) A kind of method that the control to different product is realized using same rule
CN104135536A (en) Data interaction method of Web management system based on Json data protocols
CN103647870A (en) Terminal and terminal expression display method
CN114090388A (en) Information acquisition method, server cluster, server and equipment
CN109379245A (en) A kind of wifi report form generation method and system
CN109600423A (en) Method of data synchronization, device, electronic equipment and storage medium
CN114091572A (en) Model training method and device, data processing system and server
CN107872441B (en) Method and device for generating equipment attribute configuration file
US9736297B2 (en) Phone number canonicalization and information discoverability
CN110022323A (en) A kind of method and system of the cross-terminal real-time, interactive based on WebSocket and Redux
US20140215011A1 (en) Message exchange via generic tlv generator and parser
CN110865973A (en) Data processing method and equipment and related device
CN112203103B (en) Message processing method, device, electronic equipment and computer readable storage medium
CN110012040B (en) Multi-state pendant updating method and system in mobile terminal
CN113617020A (en) Game control method, device, storage medium, server and terminal
CN106155841A (en) The method and system of data backup
WO2021213667A1 (en) Devices, methods, and system for heterogeneous data-adaptive federated learning
CN110647546A (en) Third-party rule engine generation method and device
CN113439418A (en) Method, system, terminal and storage medium for changing resource state
CN112291202B (en) Message data visualization method, device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant