CN112367535B - Generation method and device of active user interface - Google Patents

Generation method and device of active user interface Download PDF

Info

Publication number
CN112367535B
CN112367535B CN202011296275.6A CN202011296275A CN112367535B CN 112367535 B CN112367535 B CN 112367535B CN 202011296275 A CN202011296275 A CN 202011296275A CN 112367535 B CN112367535 B CN 112367535B
Authority
CN
China
Prior art keywords
interface module
module
interface
activity
client
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
CN202011296275.6A
Other languages
Chinese (zh)
Other versions
CN112367535A (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.)
Guangzhou Boguan Information Technology Co Ltd
Original Assignee
Guangzhou Boguan Information 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 Guangzhou Boguan Information Technology Co Ltd filed Critical Guangzhou Boguan Information Technology Co Ltd
Priority to CN202011296275.6A priority Critical patent/CN112367535B/en
Publication of CN112367535A publication Critical patent/CN112367535A/en
Application granted granted Critical
Publication of CN112367535B publication Critical patent/CN112367535B/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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/74Browsing; Visualisation therefor
    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26291Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for providing content or additional data updates, e.g. updating software modules, stored at the client
    • 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/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application provides a method and a device for generating an active user interface, wherein the method comprises the following steps: the client receives an active configuration file sent by the server; the client loads a module code corresponding to at least one pre-stored interface module according to the configuration file to generate at least one interface module, and different interface modules are used for displaying contents of different functions of activities; the client composes at least one interface module into an active user interface. Compared with the prior art, the client can be directly matched with the corresponding interface module through the configuration file so as to form the active user interface, so that the active user interface does not need to be repeatedly developed, the generation speed of the active user interface is increased, and the development cost of the active user interface is reduced.

Description

Generation method and device of active user interface
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for generating an active user interface.
Background
Currently, more and more users like to watch live video in a live broadcast room through a live application installed on a terminal. In order to improve the participation of the user, live broadcast activities can be carried out in the live broadcast room. The user can participate in the live event through the live event interface.
In the related art, the interface of the live event is generally generated by using an interface library. The interface library used by the client of the current mainstream live broadcast platform mainly comprises a graphic user (QT) interface library. The client can display the activity information such as the relevant information of the anchor, the activity ranking, the activity ticket number and the like in the user interface of the activity through the basic control of the QT interface library.
However, since live events are usually turned on for a short time and frequently, a user interface for new events needs to be frequently generated, which makes the development cost of a user interface for generating events using the existing QT interface library higher.
Disclosure of Invention
The embodiment of the application provides a method and a device for generating an active user interface, so as to solve the problem that the development cost of the active user interface in the prior art is high.
In a first aspect, an embodiment of the present application provides a method for generating an active user interface, which is applied to a client, and the method includes:
the client receives an active configuration file sent by the server;
the client loads a module code corresponding to at least one pre-stored interface module according to the configuration file to generate the at least one interface module, and different interface modules are used for displaying contents of different functions of the activity;
and the client side makes the at least one interface module into the active user interface.
In an optional embodiment, the configuration file includes a description file of the at least one interface module, and after the generating the at least one interface module, the method further includes:
the client analyzes the description file of the at least one interface module to acquire the element attribute of the at least one interface module;
the client adds the element attribute to the interface module.
In an optional embodiment, the at least one interface module includes an interface module for displaying a picture resource, and the method further includes:
the client receives the picture resource to be displayed sent by the server;
and the client adds the resource file name of the picture resource to be displayed in an interface module corresponding to the picture resource to be displayed as the element attribute of the interface module.
In an optional embodiment, the configuration file further includes a location parameter of the at least one interface module, and the client composes the at least one interface module into the active user interface, including:
and the client adds the at least one interface module in the activity container according to the position parameter of the at least one interface module to form the user interface of the activity.
In an optional embodiment, before the generating the at least one interface module, the method further comprises:
the client sends a query request to the server, wherein the query request is used for querying the starting state of the activity;
and the client receives the opening state of the activity sent by the server.
In an alternative embodiment, the generating the at least one interface module includes:
and if the activity is in an opening state, the client loads a module code of at least one interface module corresponding to the configuration file, which is prestored, and generates the at least one interface module.
In an alternative embodiment, after the composing the interface of the activity, the method further comprises:
the client receives activity data sent by the server, wherein the activity data comprises an identifier of the activity data and the type of the activity data;
the client determines an interface module corresponding to the activity data according to the identification of the activity data and the type of the activity data;
and the client processes the activity data through the module code of the interface module corresponding to the activity data, and displays the content corresponding to the activity data on the interface module.
In a second aspect, an embodiment of the present application provides a method for generating an active user interface, which is applied to a server, and the method includes:
the server determines the configuration file of the activity;
and the server side sends a configuration file of the activity to a client side, wherein the configuration file is used for determining a module code corresponding to at least one interface module of the activity, the at least one interface module is used for forming a user interface of the activity, and different interface modules are used for displaying contents of different functions of the activity.
In a third aspect, an embodiment of the present application provides a method for processing an interface module, where the method is applied to a client or a server, and the method includes:
at least one interface module with the same function is divided from a plurality of active user interfaces, and different interface modules correspond to different module codes;
describing the element attributes in the at least one interface module by using a description language, and acquiring a description file of the at least one interface module;
modifying elements in the at least one interface module by using the description file of the at least one interface module to generate a processed interface module;
and storing the module code corresponding to the processed interface module in the client.
In a fourth aspect, an embodiment of the present application provides an apparatus for generating an active user interface, where the apparatus includes:
the receiving module is used for receiving the active configuration file sent by the server;
the processing module is used for loading a pre-stored module code corresponding to at least one interface module according to the configuration file to generate the at least one interface module, and different interface modules are used for displaying contents of different functions of the activity; composing the at least one interface module into a user interface for the activity.
In an alternative embodiment, the configuration file includes a description file of the at least one interface module;
the processing module is further configured to analyze the description file of the at least one interface module by the client to obtain an element attribute of the at least one interface module; adding the element attribute to the interface module.
In an optional embodiment, the at least one interface module includes an interface module for displaying picture resources;
the receiving module is further used for receiving the picture resource to be displayed sent by the server;
the processing module is further configured to add the resource file name of the picture resource to be displayed in the interface module corresponding to the picture resource to be displayed, as an element attribute of the interface module.
In an optional embodiment, the configuration file further includes a location parameter of the at least one interface module;
the processing module is specifically configured to add the at least one interface module to the activity container according to the position parameter of the at least one interface module to form the user interface of the activity.
In an alternative embodiment, the apparatus further comprises:
a sending module, configured to send a query request to the server, where the query request is used to query the activation status of the activity;
the receiving module is further configured to receive the active start state sent by the server.
In an optional implementation manner, the processing module is specifically configured to load a module code of at least one interface module corresponding to the pre-stored configuration file if the activity is in an on state, and generate the at least one interface module.
In an optional implementation manner, the receiving module is further configured to receive activity data sent by the server, where the activity data includes an identifier of the activity data and a type of the activity data;
the processing module is further used for determining an interface module corresponding to the activity data according to the identification of the activity data and the type of the activity data; and processing the activity data through the module code of the interface module corresponding to the activity data, and displaying the content corresponding to the activity data on the interface module.
In a fifth aspect, an embodiment of the present application provides an apparatus for generating an active user interface, where the apparatus includes:
a processing module for determining a profile of an activity;
and the sending module is used for sending the configuration file of the activity to a client, the configuration file is used for determining a module code corresponding to at least one interface module of the activity, the at least one interface module is used for forming a user interface of the activity, and different interface modules are used for displaying contents of different functions of the activity.
In a sixth aspect, an embodiment of the present application provides an apparatus for generating an active user interface, where the apparatus includes:
the dividing module is used for dividing at least one interface module with the same function from a plurality of active user interfaces, and different interface modules correspond to different module codes;
the processing module is used for describing the element attributes in the at least one interface module by using a description language and acquiring a description file of the at least one interface module; modifying elements in the at least one interface module by using the description file of the at least one interface module to generate a processed interface module; and storing the module code corresponding to the processed interface module in the client.
In a seventh aspect, the present application further provides an electronic device, including:
a memory and a processor;
the memory for storing executable instructions of the processor;
the processor is configured to perform the method of the first to third aspects via execution of the executable instructions.
In an eighth aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements any one of the possible methods of the first to third aspects.
According to the method and the device for generating the user interface of the activity, the client receives the configuration file of the activity sent by the server; the client loads a module code corresponding to at least one prestored interface module according to the configuration file to generate at least one interface module, and different interface modules are used for displaying contents of different functions of activities; the client composes at least one interface module into an active user interface. Compared with the prior art, the client can be directly matched with the corresponding interface module through the configuration file so as to form the active user interface, so that the active user interface does not need to be repeatedly developed, the generation speed of the active user interface is increased, and the development cost of the active user interface is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the following briefly introduces the drawings needed to be used in the description of the embodiments or the prior art, and obviously, the drawings in the following description are some embodiments of the present invention, and those skilled in the art can obtain other drawings according to the drawings without inventive labor.
Fig. 1 is a schematic application scenario diagram of a method for generating an active user interface according to an embodiment of the present application;
fig. 2 is a signaling interaction diagram of a method for generating an active user interface according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an active user interface provided by an embodiment of the present application;
FIG. 4 is a signaling interaction diagram of another method for generating an active user interface according to an embodiment of the present application;
fig. 5 is a signaling interaction diagram of a method for generating a user interface for another activity according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a processing method of an interface module according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an apparatus for generating an active user interface according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of an apparatus for generating a user interface of another activity according to an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a processing device of an active user interface according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
In the prior art, the interface of the live activity is generally generated by adopting an interface library. The interface library used by the client of the current mainstream live broadcast platform mainly comprises a graphic user (QT) interface library. The client can display the activity information such as the relevant information of the anchor, the activity ranking, the activity ticket number and the like in the user interface of the activity through the basic control of the QT interface library. However, since live events are usually turned on for a short time and frequently, a user interface for new events needs to be frequently generated, which makes the development cost of a user interface for generating events using the existing QT interface library higher.
In order to solve the above problems, the present application provides a method and an apparatus for generating an active user interface, where a client is instructed by a configuration file to generate an interface module through a pre-stored module code, and the interface module is configured into an active user interface, so that when the active user interface is generated, only a corresponding configuration file needs to be configured, and the user interface does not need to be re-developed, thereby reducing the development cost of the active user interface.
The following explains an application scenario of the present application.
Fig. 1 is a schematic application scenario diagram of a method for generating an active user interface according to an embodiment of the present application. As shown in fig. 1, a client 101 interacts with a server 102. When a new activity needs to be performed, the server 102 sends an activity configuration file to the client 101, and the client 101 loads a pre-stored module code according to the activity configuration file to generate at least one interface module and combine the interface modules into an activity user interface.
The client 101 may be a mobile phone (mobile phone), a tablet computer (pad), a computer with wireless transceiving function, a Virtual Reality (VR) terminal device, an Augmented Reality (AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in remote surgery (remote medical supply), a wireless terminal in smart grid (smart grid), a wireless terminal in smart home (smart home), and the like. In the embodiment of the present application, the apparatus for implementing the function of the terminal may be a terminal device, or may be an apparatus capable of supporting the terminal to implement the function, for example, a chip system, and the apparatus may be installed in the terminal device. In the embodiment of the present application, the chip system may be composed of a chip, and may also include a chip and other discrete devices.
The server 102 may be a server or a server in a cloud service platform, and the type of the server is not limited in the embodiment of the present application, and may be specifically set according to an actual situation.
It should be noted that the application scenario of the technical solution of the present application may be the scenario in fig. 1, but is not limited to this, and may also be applied to a generation scenario of a user interface of other activities.
It can be understood that the method for generating the active user interface can be implemented by the device for generating the active user interface provided in the embodiment of the present application, and the device for generating the active user interface can be part or all of a certain device, for example, the client and the server.
The technical solution of the embodiment of the present application is described in detail below with specific embodiments by taking a client and a server that integrate or install relevant execution codes as examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 2 is a signaling interaction diagram of a method for generating an active user interface according to an embodiment of the present application, and this embodiment relates to a specific process of how to generate an active user interface. As shown in fig. 2, the method includes:
s201, the server determines the active configuration file.
The configuration file is used for determining module codes corresponding to at least one active interface module.
It should be understood that the configuration file related to the embodiment of the present application is composed of the description files of the interface modules, and the server may determine the description files required to be included in the configuration file according to the interface modules required by the user interface composing the activity.
The type of the description language used by the description file is not limited in the embodiments of the present application, and may be, for example, xml, json, and the like.
The interface module is explained below.
It should be understood that the user interface of an activity is made up of at least one interface module, with different interface modules being used to display the content of different functions of the activity. In the embodiment of the present application, the type of the interface module is not limited, and exemplarily, fig. 3 is a schematic view of a user interface of an activity provided in the embodiment of the present application, where the user interface of an activity shown in fig. 3 includes a title module, an activity play module, and a anchor task module.
It should be noted that, the content displayed in the interface module is also not limited in the embodiment of the present application. For example, the title module may be used to show the name and start-stop time of the event, the event play module may be used to introduce the play of the event, and the anchor task module may be used to show the activity data and ranking of the anchor.
The type of the interface module can be preset, and the interface module required to be included in the user interface of the activity can be determined according to the type of the preset interface module before the server side starts a new activity. Subsequently, the server can configure the description file of the interface module required to be included in the active user interface in the configuration file.
It should be noted that, in the embodiment of the present application, as to how to preset the types of the interface modules, in an optional implementation manner, the server may divide at least one interface module having the same function from the multiple active user interfaces as the type of the interface module.
It should be understood that the module code corresponding to the interface module may be understood as an independent code block storing the interface logic of the interface module.
S202, the server side sends the active configuration file to the client side.
It should be understood that, in the embodiment of the present application, there is no limitation on how the route server sends the obtained configuration file to the client, and the configuration file may be sent in a common manner.
In some embodiments, the server may send the active resource to the client while sending the active configuration file to the client, so that the client may display the corresponding resource on the active user interface after generating the active user interface. The active resources may include active picture resources, active text resources, and the like.
It should be understood that, in the embodiments of the present application, there is no limitation on how the client stores the active configuration file and the active resource, and in some embodiments, the client may store the active configuration file and the active resource in a formulated directory, where the directory may be used for subsequent resource acquisition and analysis.
In addition, in some embodiments, the server may also send an identification of the activity to the client, so that the client identifies the activity to which the profile belongs according to the representation of the activity.
S203, the client loads the pre-stored module code corresponding to at least one interface module according to the configuration file to generate at least one interface module, and different interface modules are used for displaying the contents of different functions of the activity.
In this step, after the client receives the configuration file sent by the server, the module code corresponding to the at least one pre-stored interface module may be loaded according to the configuration file to generate the at least one interface module.
It should be understood that the client in the embodiment of the present application prestores module codes corresponding to the respective interface modules. After receiving the active configuration file, the client may analyze the configuration file, obtain the configuration file of each interface module in the configuration file, and further determine the interface module that the client needs to generate. Subsequently, the client may load the module code corresponding to the interface module that needs to be generated, so as to generate the interface module.
In some embodiments, after the client generates the interface module, the client may further parse the description file of the at least one interface module to obtain the element attribute of the at least one interface module. The client then adds the element attributes to the interface module.
In other optional embodiments, at least one interface module includes an interface module for displaying a picture resource, and if the client receives a picture resource to be displayed sent by the server, the client adds a resource file name of the picture resource to be displayed in the interface module corresponding to the picture resource to be displayed, as an element attribute of the interface module.
S204, the client side enables at least one interface module to form an active user interface.
In this step, after the client generates the interface module, at least one interface module may be composed into an active user interface.
The embodiment of the application does not limit how the interface module forms the active user interface. In some embodiments, the configuration file further includes a location parameter of at least one interface module, and the client may add the at least one interface module to the activity container according to the location parameter of the at least one interface module to form the user interface of the activity.
The position parameter may be a relative position parameter between the interface modules, or may also be an absolute position parameter of the interface module in the movable container, which is not limited in the embodiment of the present application.
Illustratively, with continued reference to FIG. 3, the title module may be disposed uppermost in the acquisition container, the live play module may be disposed between the title module and the anchor task module, and the anchor task module may be disposed lowermost in the acquisition container.
In an optional implementation manner, after the interface of the activity is composed, the client may further receive activity data sent by the server. And then, the client determines the interface module corresponding to the activity data according to the identification of the activity data and the type of the activity data. And finally, the client processes the activity data through the module code of the interface module corresponding to the activity data, and displays the content corresponding to the activity data on the interface module.
The activity data may be, for example, anchor line data, gift data for live activities, anchor popularity data, and the like.
It should be noted that, in the embodiment of the present application, a processing manner of the module code for the activity data is not limited, and may be specifically set according to an actual situation.
According to the method for generating the user interface of the activity, the client receives the configuration file of the activity sent by the server; the client loads a module code corresponding to at least one prestored interface module according to the configuration file to generate at least one interface module, and different interface modules are used for displaying contents of different functions of activities; the client composes at least one interface module into an active user interface. Compared with the prior art, the client can be directly matched with the corresponding interface module through the configuration file so as to form the active user interface, so that the active user interface does not need to be repeatedly developed, the generation speed of the active user interface is increased, and the development cost of the active user interface is reduced.
On the basis of the above embodiment, how the client generates the interface module is described below. Fig. 4 is a signaling interaction diagram of another method for generating an active user interface according to an embodiment of the present application, where this embodiment relates to a specific process of how to generate an active user interface. As shown in fig. 4, the method includes:
s301, the server determines the active configuration file.
S302, the server side sends an activity configuration file to the client side, the configuration file is used for determining module codes corresponding to at least one interface module of the activity, the at least one interface module is used for forming a user interface of the activity, and different interface modules are used for displaying contents of different functions of the activity.
S303, the client loads a pre-stored module code corresponding to at least one interface module according to the configuration file to generate at least one interface module.
The technical terms, technical effects, technical features, and alternative embodiments of S301 to S403 can be understood with reference to S201 to S202 shown in fig. 2, and repeated descriptions thereof will not be repeated here.
S304, the client analyzes the description file of the at least one interface module to obtain the element attribute of the at least one interface module.
In the embodiment of the application, the configuration file includes a description file of at least one interface module, and after the client loads the module code to generate the interface module, the client can analyze the description file of the at least one interface module through the module code, so that the element attribute of the at least one interface module is obtained.
The elements may be titles, dates, pictures, and the like of the interface modules, and the element attributes may be sizes, colors, relative positions, and the like of the elements.
S305, the client adds the element attribute to the interface module.
In the application, after determining the element attributes of each interface module, the client may add the element attributes to the interface modules, so as to adjust the elements of each interface module.
S306, the client receives the picture resource to be displayed sent by the server.
It should be noted that, in the embodiment of the present application, the execution order of step S306 is not limited.
S307, the client adds the resource file name of the picture resource to be displayed in the interface module corresponding to the picture resource to be displayed as the element attribute of the interface module.
For example, for a module needing to display a picture resource, the configuration file further includes a resource file name of the picture resource to be displayed. After receiving the configuration file, the client may add the resource file name of the picture resource to be displayed to the interface module as an element attribute of the interface module.
It should be appreciated that in order to display the picture resource on the active user interface in the live application, a directory of saved resources is also provided in the live application, and the picture resource is located in the directory of saved resources.
S308, the client side enables at least one interface module to form an active user interface.
On the basis of the above embodiments, the following description is made as to when to generate an active user interface. In an alternative embodiment, the client generates the active user interface immediately after receiving the active configuration file sent by the server. In another optional implementation, after receiving the configuration file of the activity sent by the server, the client needs to determine the activation state of the activity, and only after the activity is activated, the client generates the user interface of the activity. Fig. 5 is a signaling interaction diagram of a method for generating an active user interface according to an embodiment of the present application, where the embodiment relates to a specific process of when to generate an active user interface. As shown in fig. 5, the method includes:
s401, the server side determines a configuration file of the activity, the configuration file is used for determining a module code corresponding to at least one interface module of the activity, the at least one interface module is used for forming an interface of the activity, and different interface modules are used for displaying contents of different functions of the activity.
S402, the server side sends the active configuration file to the client side.
S403, the client sends a query request to the server, and the query request is used for querying the opening state of the activity.
In this step, before the client generates the active user interface, a query request needs to be sent to the server to query the active start state.
Wherein, the query request includes the identification of the activity.
S404, the client receives the opening state of the activity sent by the server.
In this step, after the client sends the query request to the server, the server may determine the activation status of the activity through the identifier of the activity. The server may then feed back the active on state to the client.
In other embodiments, when the server needs to start the live broadcast activity, the client does not send a query request to the server in time, and the server may also directly send the obtained identifier in the start state to the client to instruct the client to directly generate an activity page.
S405, if the activity is in the starting state, the client loads module codes of at least one interface module corresponding to the pre-stored configuration file, and at least one interface module is generated.
In other embodiments, the client does not generate an interface module if the activity is in an unopened state.
In the application, the client only generates the active interface module in the open state, so that the memory overhead can be saved, and the speed of live broadcast application is improved.
S406, the client side enables at least one interface module to form an active user interface.
On the basis of the above embodiments, how to process the interface module before generating the active user interface and save the module code corresponding to the interface module in the client is described below. Fig. 6 is a schematic flowchart of a processing method of an interface module according to an embodiment of the present application, where an execution main body of the embodiment may be a client or a server, and how to process the interface module is specifically described below by taking the client as an example. As shown in fig. 6, the method includes:
s501, at least one interface module with the same function is divided from the user interfaces of the plurality of activities, and different interface modules correspond to different module codes.
The client can modularize parts with the same function on the user interface of the activities in a plurality of activities, and divide the parts into different interface modules.
It should be understood that modularity may be understood as placing interface logic into a separate code block. The embodiment of the present application does not limit the interface logic stored in the module code. The exemplary method may include elements to be created in the interface module, a display processing manner for each element after receiving activity data sent by the server, a processing manner for element layout through a description language, and the like.
S502, describing the element attributes in at least one interface module by using a description language, and acquiring a description file of at least one interface module.
The elements may be titles, dates, pictures and the like of the interface module, the element attributes may be sizes, colors, relative positions and the like of the elements, and the description language may be xml, json and the like.
In some embodiments, the description language may use the identifier of the element setting in the interface module as a key index, and the QT as an interface library to describe the attribute of the element in at least one interface module.
For example, if the description language is json, in the modularization process, when an element is created, an objectname is set as an identifier for the element, and in the json, the objectname is used as a key value, and the position, the size, and the color value are stored as each element under the key. With continued reference to fig. 3, the picture attribute, the location attribute, and the size attribute of the name of the activity in the title module may be described in json to obtain a description file of the title module.
S503, modifying the elements in at least one interface module by using the description file of at least one interface module, and generating the processed interface module.
Illustratively, after the description file of at least one interface module is obtained, the description file may be parsed, the parsed description file is read into a live application, a key value is used for traversal, a corresponding element in the interface module is found, the attribute of the element is modified according to the content provided by the description file, and a processed interface module is generated.
And S504, storing the module codes corresponding to the processed interface modules in the client.
In some embodiments, if the processing of the interface module is completed by the client, the client may directly save the module code corresponding to the interface module.
In other embodiments, if the processing of the interface module is completed by the server, the server may send the module code corresponding to the interface module to the client, and then the client stores the module code.
According to the method for generating the user interface of the activity, the client receives the configuration file of the activity sent by the server; the client loads a module code corresponding to at least one pre-stored interface module according to the configuration file to generate at least one interface module, and different interface modules are used for displaying contents of different functions of activities; and the client moves at least one interface module into the activity container to form the user interface of the activity. Compared with the prior art, the client can be directly matched with the corresponding interface module through the configuration file so as to form the active user interface, so that the active user interface does not need to be repeatedly developed, the generation speed of the active user interface is increased, and the development cost of the active user interface is reduced.
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.
Fig. 7 is a schematic structural diagram of an apparatus for generating an active user interface according to an embodiment of the present application. The generation device of the active user interface may be implemented by software, hardware or a combination of the two, and may be, for example, the client or the chip of the client in the above embodiments, to execute the generation method of the active user interface in the above embodiments. As shown in fig. 7, the apparatus 600 for generating the user interface of the activity includes:
a receiving module 601, configured to receive an active configuration file sent by a server;
a processing module 602, configured to load a pre-stored module code corresponding to at least one interface module according to the configuration file, and generate at least one interface module, where different interface modules are used to display contents of different functions of an activity; at least one interface module is composed into an active user interface.
In an alternative embodiment, the configuration file includes a description file of at least one interface module;
the processing module 602 is further configured to analyze the description file of the at least one interface module by the client, and obtain an element attribute of the at least one interface module; the element attributes are added to the interface module.
In an optional embodiment, the at least one interface module includes an interface module for displaying the picture resource;
the receiving module 601 is further configured to receive a picture resource to be displayed, which is sent by the server;
the processing module 602 is further configured to add a resource file name of the picture resource to be displayed in the interface module corresponding to the picture resource to be displayed, as an element attribute of the interface module.
In an optional embodiment, the configuration file further includes a location parameter of at least one interface module;
the processing module 602 is specifically configured to add at least one interface module to the activity container according to the location parameter of the at least one interface module, so as to form an activity user interface.
In an alternative embodiment, the apparatus further comprises:
a sending module 603, configured to send a query request to a server, where the query request is used to query an active start state;
the receiving module 601 is further configured to receive an active start state sent by the server.
In an optional embodiment, the processing module 602 is specifically configured to, if the activity is in an on state, load a module code of at least one interface module corresponding to a pre-stored configuration file, and generate the at least one interface module.
In an optional implementation manner, the receiving module 601 is further configured to receive activity data sent by the server, where the activity data includes an identifier of the activity data and a type of the activity data;
the processing module 602 is further configured to determine, according to the identifier of the activity data and the type of the activity data, an interface module corresponding to the activity data; and processing the activity data through the module codes of the interface module corresponding to the activity data, and displaying the content corresponding to the activity data on the interface module.
The principle and technical effect of the apparatus for generating an active user interface provided in this embodiment are similar to those of the method for generating an active user interface, and are not described herein again.
Fig. 8 is a schematic structural diagram of an apparatus for generating a user interface of another activity according to an embodiment of the present application. The generation device of the active user interface may be implemented by software, hardware or a combination of the two, and may be, for example, the server or the chip of the server in the above embodiments, to execute the generation method of the active user interface in the above embodiments. As shown in fig. 8, the apparatus 700 for generating the user interface of the activity includes:
a processing module 701, configured to determine a configuration file of an activity;
a sending module 702, configured to send a configuration file of an activity to a client, where the configuration file is used to determine a module code corresponding to at least one interface module of the activity, the at least one interface module is used to form a user interface of the activity, and different interface modules are used to display contents of different functions of the activity.
The principle and technical effect of the apparatus for generating an active user interface provided in this embodiment are similar to those of the method for generating an active user interface, and are not described herein again.
Fig. 9 is a schematic structural diagram of a processing device of another interface module according to an embodiment of the present application. The interface module generating device may be implemented by software, hardware, or a combination of the two, and may be, for example, a client or a server in the foregoing embodiments, to execute the interface module processing method in the foregoing embodiments. As shown in fig. 9, the processing device 800 of the interface module includes:
a dividing module 801, configured to divide at least one interface module having the same function from multiple active user interfaces, where different interface modules correspond to different module codes;
the processing module 802 is configured to describe the element attributes in at least one interface module by using a description language, and obtain a description file of the at least one interface module; modifying elements in at least one interface module by using the description file of at least one interface module to generate a processed interface module; and storing the module code corresponding to the processed interface module in the client.
The principle and technical effect of the generation apparatus of the active user interface provided in this embodiment are similar to those of the implementation of the processing method of the interface module, and are not described herein again.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 10, the electronic device may include: at least one processor 901 and memory 902. Fig. 10 shows an electronic device as an example of a processor.
And a memory 902 for storing programs. In particular, the program may include program code including computer operating instructions.
Memory 902 may comprise high-speed RAM memory and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The processor 901 is configured to execute computer-executable instructions stored in the memory 902 to implement a method for generating a user interface or a method for processing an interface module of the above-mentioned activity;
processor 901 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present Application.
Optionally, in a specific implementation, if the communication interface, the memory 902 and the processor 901 are implemented independently, the communication interface, the memory 902 and the processor 901 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. Buses may be classified as address buses, data buses, control buses, etc., but do not represent only one bus or type of bus.
Optionally, in a specific implementation, if the communication interface, the memory 902 and the processor 901 are integrated into a chip, the communication interface, the memory 902 and the processor 901 may complete communication through an internal interface.
The embodiment of the application further provides a chip which comprises a processor and an interface. Wherein the interface is used for inputting and outputting data or instructions processed by the processor. The processor is adapted to perform the method provided in the above method embodiments.
The present application also provides a computer-readable storage medium, which may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, are specifically, the computer-readable storage medium stores program information, and the program information is used for the above method.
Embodiments of the present application further provide a program, which when executed by a processor is configured to perform the method provided by the above method embodiments.
Embodiments of the present application further provide a program product, such as a computer-readable storage medium, having instructions stored therein, which when executed on a computer, cause the computer to perform the method provided by the above method embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the invention are brought about in whole or in part when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (20)

1. A method of generating an active user interface, the method comprising:
the client receives an active configuration file sent by the server;
the client loads a module code corresponding to at least one pre-stored interface module according to the configuration file to generate the at least one interface module, and different interface modules are used for displaying contents of different functions of the activity;
the client side makes the at least one interface module into the active user interface;
before loading the pre-stored module code corresponding to at least one interface module, the method further comprises the following steps:
at least one interface module with the same function is divided from the user interfaces of the plurality of activities, and different interface modules correspond to different module codes.
2. The method of claim 1, wherein the configuration file comprises a description file of the at least one interface module, and wherein after the generating the at least one interface module, the method further comprises:
the client analyzes the description file of the at least one interface module to acquire the element attribute of the at least one interface module;
the client adds the element attribute to the interface module.
3. The method of claim 1, wherein the at least one interface module comprises an interface module for displaying picture resources, and the method further comprises:
the client receives the picture resource to be displayed sent by the server;
and the client adds the resource file name of the picture resource to be displayed in an interface module corresponding to the picture resource to be displayed as the element attribute of the interface module.
4. The method according to any one of claims 1-3, wherein the configuration file further includes location parameters of the at least one interface module, and the client composes the at least one interface module into the active user interface, including:
and the client adds the at least one interface module into the activity container according to the position parameter of the at least one interface module to form the user interface of the activity.
5. The method of any of claims 1-3, wherein prior to said generating said at least one interface module, said method further comprises:
the client sends a query request to the server, wherein the query request is used for querying the starting state of the activity;
and the client receives the opening state of the activity sent by the server.
6. The method of claim 5, wherein the generating the at least one interface module comprises:
and if the activity is in an opening state, the client loads a module code of at least one interface module corresponding to the configuration file, which is prestored, and generates the at least one interface module.
7. The method of claim 1, wherein after the composing the active interface, the method further comprises:
the client receives activity data sent by the server, wherein the activity data comprises an identifier of the activity data and the type of the activity data;
the client determines an interface module corresponding to the activity data according to the identification of the activity data and the type of the activity data;
and the client processes the activity data through the module code of the interface module corresponding to the activity data, and displays the content corresponding to the activity data on the interface module.
8. The method of claim 1, further comprising, after dividing at least one interface module having the same function from among a plurality of active user interfaces:
describing the element attributes in the at least one interface module by using a description language, and acquiring a description file of the at least one interface module;
modifying the elements in the at least one interface module by using the description file of the at least one interface module to generate a processed interface module;
and storing the module code corresponding to the processed interface module in the client.
9. A method of generating an active user interface, the method comprising:
the server determines the configuration file of the activity;
the server side sends a configuration file of the activity to a client side, wherein the configuration file is used for determining a module code corresponding to at least one interface module of the activity, the at least one interface module is used for forming a user interface of the activity, and different interface modules are used for displaying contents of different functions of the activity;
further comprising:
at least one interface module with the same function is divided from the user interfaces of the plurality of activities, and different interface modules correspond to different module codes.
10. An apparatus for generating an active user interface, the apparatus comprising:
the receiving module is used for receiving the active configuration file sent by the server;
the processing module is used for loading a pre-stored module code corresponding to at least one interface module according to the configuration file to generate the at least one interface module, and different interface modules are used for displaying contents of different functions of the activity; composing the at least one interface module into a user interface for the activity;
the dividing module is used for dividing at least one interface module with the same function from a plurality of active user interfaces before loading the pre-stored module code corresponding to the at least one interface module, and different interface modules correspond to different module codes.
11. The apparatus of claim 10, wherein the configuration file comprises a description file of the at least one interface module;
the processing module is further used for the client to analyze the description file of the at least one interface module and obtain the element attribute of the at least one interface module; adding the element attribute to the interface module.
12. The apparatus of claim 10, wherein the at least one interface module comprises an interface module for displaying picture resources;
the receiving module is also used for receiving the picture resources to be displayed sent by the server;
the processing module is further configured to add the resource file name of the picture resource to be displayed in the interface module corresponding to the picture resource to be displayed, as an element attribute of the interface module.
13. The apparatus according to any one of claims 10-12, wherein the configuration file further comprises location parameters of the at least one interface module;
the processing module is specifically configured to add the at least one interface module to the activity container according to the position parameter of the at least one interface module to form the user interface of the activity.
14. The apparatus of any one of claims 10-12, further comprising:
a sending module, configured to send a query request to the server, where the query request is used to query the activation status of the activity;
the receiving module is further configured to receive the active start state sent by the server.
15. The apparatus according to claim 14, wherein the processing module is specifically configured to, if the activity is in an on state, load a module code of at least one interface module corresponding to the pre-stored configuration file, and generate the at least one interface module.
16. The apparatus according to claim 10, wherein the receiving module is further configured to receive activity data sent by the server, where the activity data includes an identifier of the activity data and a type of the activity data;
the processing module is further used for determining an interface module corresponding to the activity data according to the identification of the activity data and the type of the activity data; and processing the activity data through the module code of the interface module corresponding to the activity data, and displaying the content corresponding to the activity data on the interface module.
17. The apparatus of claim 10, further comprising:
the processing module is used for describing the element attributes in the at least one interface module by using a description language and acquiring a description file of the at least one interface module; modifying elements in the at least one interface module by using the description file of the at least one interface module to generate a processed interface module; and storing the module code corresponding to the processed interface module in the client.
18. An apparatus for generating an active user interface, the apparatus comprising:
a processing module for determining a profile of an activity;
a sending module, configured to send the configuration file of the activity to a client, where the configuration file is used to determine a module code corresponding to at least one interface module of the activity, the at least one interface module is used to form a user interface of the activity, and different interface modules are used to display contents of different functions of the activity;
the dividing module is used for dividing at least one interface module with the same function from a plurality of active user interfaces before loading the pre-stored module code corresponding to the at least one interface module, and different interface modules correspond to different module codes.
19. An electronic device, comprising: a memory and a processor;
the memory for storing executable instructions of the processor;
the processor is configured to perform the method of any of claims 1-9 via execution of the executable instructions.
20. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-9.
CN202011296275.6A 2020-11-18 2020-11-18 Generation method and device of active user interface Active CN112367535B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011296275.6A CN112367535B (en) 2020-11-18 2020-11-18 Generation method and device of active user interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011296275.6A CN112367535B (en) 2020-11-18 2020-11-18 Generation method and device of active user interface

Publications (2)

Publication Number Publication Date
CN112367535A CN112367535A (en) 2021-02-12
CN112367535B true CN112367535B (en) 2022-10-04

Family

ID=74533133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011296275.6A Active CN112367535B (en) 2020-11-18 2020-11-18 Generation method and device of active user interface

Country Status (1)

Country Link
CN (1) CN112367535B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114489621A (en) * 2022-01-28 2022-05-13 上海商汤智能科技有限公司 Experiment display method and device, electronic equipment and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1506814A (en) * 2002-12-10 2004-06-23 联想(北京)有限公司 Method of describing application program interface with expandable markup language
CN101202665B (en) * 2007-12-06 2011-04-13 中兴通讯股份有限公司 Method for generating graphical user interface
CN104090749B (en) * 2014-05-30 2015-09-16 爱培科科技开发(深圳)有限公司 A kind of WinCE Product Interface theme upgrades transform process method and system
CN106201458A (en) * 2016-06-27 2016-12-07 上海波汇科技股份有限公司 A kind of interface creating method can joined flexibly and system
EP3364292A1 (en) * 2017-02-20 2018-08-22 Gebauer GmbH Method for generating a dynamic user interface at run time
US10379844B2 (en) * 2017-03-29 2019-08-13 Ca, Inc. Validating user interface templates for software probe configuration
CN108664242B (en) * 2017-04-01 2022-02-01 北京京东尚科信息技术有限公司 Method and device for generating visual interface, electronic equipment and readable storage medium
CN107344020A (en) * 2017-06-06 2017-11-14 深圳天珑无线科技有限公司 One kind game login interface method to set up, game terminal and game center server
CN109189387A (en) * 2018-08-01 2019-01-11 广州南方智能技术有限公司 A kind of method and system of the GNSS data processing based on QT component
CN111552537B (en) * 2020-05-06 2023-10-20 深圳市卡牛科技有限公司 Theme switching method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112367535A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
CN112866785A (en) Picture generation method, device, equipment and storage medium
CN111259037B (en) Data query method and device based on rule configuration, storage medium and terminal
CN111427576B (en) Method, device, storage medium and terminal for configuring application program interface
CN110798501A (en) Data processing method and device and readable storage medium
US8651951B2 (en) Game processing server apparatus
CN111381749A (en) Image display and processing method, device, equipment and storage medium
CN113031943A (en) Code generation method, device, storage medium and electronic equipment
CN110070467A (en) Source of houses dissemination method, equipment, storage medium and device by all kinds of means
CN112286904A (en) Cluster migration method and device and storage medium
CN110888634B (en) Game floor page generation method, game floor page generation device, computer equipment and storage medium
CN112367535B (en) Generation method and device of active user interface
CN114816308A (en) Information partition display method and related equipment
CN116301866A (en) Cloud rendering method, device, equipment and storage medium based on custom software
CN115269090A (en) Marketing page generation method and device, terminal and storage medium
CN116112485A (en) Cloud resource using method and related equipment
CN113144619B (en) Method and system for visually configuring dynamic functions
CN114090083B (en) Visual component configuration method, device, equipment and storage medium
CN114546375A (en) Page configuration method, page configuration device and electronic equipment
CN112650763A (en) Configuration method of product quota, related equipment and storage medium
CN114064429A (en) Audit log acquisition method and device, storage medium and server
CN115114280A (en) Report generation processing method, device and equipment
CN112035133A (en) Homepage upgrading method and terminal
CN109636724A (en) A kind of display methods of list interface, device, equipment and storage medium
CN115250259B (en) Information interaction method and device and electronic equipment
CN114205651B (en) Resource processing method, device, equipment and 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