Disclosure of Invention
In view of this, embodiments of the present invention provide a live broadcast room style extension method and system, a server, and a storage medium, which can strip an extension process of a newly added live broadcast room style from a live broadcast room development framework and implement live broadcast room style extension and live broadcast room development framework decoupling.
In a first aspect of the embodiments of the present invention, a method for extending a style of a live broadcast room is provided, where the method for extending the style of the live broadcast room includes the following steps:
abstracting a live broadcast room style class, and replacing live broadcast room style information data in a live broadcast room development frame with live broadcast room style class data;
developing a new live broadcast room style object in a development interface of a live broadcast room development framework;
and adding the new live room style object into the live room style class to realize the extension of the live room style.
In a second aspect of the embodiments of the present invention, a live broadcast room style extension system is provided, where the live broadcast room style extension system includes the following functional modules:
the live broadcast room style class generation module is used for abstracting a live broadcast room style class and replacing live broadcast room style information data in a live broadcast room development frame with live broadcast room style class data;
the live broadcast room style development module is used for developing a new live broadcast room style object in a development interface of a live broadcast room development frame;
and the live broadcast room style extension module is used for adding the new live broadcast room style object into the live broadcast room style class to realize extension of the live broadcast room style.
In a third aspect of the embodiments of the present invention, there is provided a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the live room style extension method as described above when executing the computer program.
In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, where a computer program is stored, and when being executed by a processor, the computer program implements the steps of the live room style extension method described above.
The method and the system for expanding the live broadcast room style, the server and the storage medium have the advantages that the live broadcast room style class is abstracted, the live broadcast room style information data in the live broadcast room development frame is replaced by the live broadcast room style class data, the live broadcast room style data in the whole data of the development frame is induced and stripped to form an independent expansion module, then a new live broadcast room style object is developed in a development interface of the live broadcast room development frame, the new live broadcast room style object is added into the live broadcast room style class, the expansion process of the newly increased live broadcast room style is stripped from the live broadcast room development frame, the decoupling of the live broadcast room style expansion and the live broadcast room development frame is realized, and the expansibility and the robustness of the live broadcast room development frame are enhanced.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for extending a style of a live broadcast room, where the method for extending a style of a live broadcast room includes the following steps:
s1, abstracting a live broadcast room style class, and replacing live broadcast room style information data in the live broadcast room development frame with live broadcast room style class data;
as shown in fig. 2, the step S1 includes the following sub-steps:
s11, creating a style class of the live room;
s12, traversing the whole data of the live broadcast room development frame, and screening out live broadcast room style information data in the live broadcast room development frame;
s13, defining the style class of the live broadcast room according to the screened style information data of the live broadcast room;
and S14, replacing the screened live broadcasting room style information data with live broadcasting room style data, wherein the live broadcasting room style information data specifically comprise basic metadata such as live broadcasting room styles, names, screen styles and the like.
The data format of the live broadcast room style class is an InitParam data format, the InitParam data format is a data format between a development frame and live broadcast room style data codes, and in the development frame, the InitParam data format represents a live broadcast room style. Therefore, the data format of the style class of the live broadcast room is set to be the InitParam data format, the screened live broadcast room style information data is replaced by the live broadcast room style class data, namely, the live broadcast room style information data format is replaced by the InitParam data format, so that the live broadcast room style data in the whole data of the development frame is induced and stripped, and the expansion process of the newly added live broadcast room style is stripped from the live broadcast room development frame.
The style class of the live broadcast room comprises a live broadcast room style value roomType and interface style information, the interface style information comprises an active style parent container viewTypeMap, and the style class InitParam of the live broadcast room provides a setRoomType () method for setting the style of the live broadcast room for the live broadcast room style value roomType and a getRoomType () method for reading the style of the live broadcast room by a live broadcast room development frame; and provides a setViewFather (viewer type) method for registering self-supported interface styles in the live broadcast room to the live broadcast room development framework for the active style parent container viewer type Map, and a getViewFather (viewer type) method for distributing specific interface style views to the live broadcast room by the live broadcast room development framework.
S2, developing a new live broadcast room style object in a development interface of a live broadcast room development framework;
the live broadcast room development frame is a live broadcast room platform service rapid development frame shown in fig. 3, and comprises a live broadcast room activity demand block, a service development frame block and a live broadcast room display block, wherein the live broadcast room activity demand block is in communication connection with the service development frame block; the service development frame block is in communication connection with the live broadcast room display block; the service development frame block is used as a middle layer, and the live broadcast room activity demand block and the live broadcast room display block are completely isolated, so that the aim of completely decoupling live broadcast room service demand development and live broadcast room style development is fulfilled.
The business development frame block is a development interface provided for a live broadcast room activity demand block, and an activity developer develops and outputs a targeted activity interface according to an activity demand document through the development interface; meanwhile, as shown in fig. 3, the service development frame block provides a registration interface for the live broadcast room display block, and various live broadcast rooms in the live broadcast room display block register new live broadcast room style data with the service development frame block through the registration interface. Specific development steps can be found in the patent application with application number "2018104710949".
And S3, adding the new live room style object into the live room style class to realize the extension of the live room style.
The method comprises the steps that development and registration of a new live broadcast room style are completed through a registration interface provided by a service development frame block, and because the live broadcast room style data is stripped from the whole data of a development frame by the live broadcast room style class InitParam, an independent extension module is formed, and further, the extension process of a newly added live broadcast room style is stripped from the live broadcast room development frame. Therefore, the extension of the live-broadcast style in the live-broadcast development frame can be realized by adding the new live-broadcast style object to the live-broadcast style class InitParam. Specifically, when the style of the live broadcast room needs to be newly increased, after the development of the style object of the new live broadcast room is completed by referring to the registration interface provided by the live broadcast room development frame, the extension can be completed only by adding the corresponding style object of the new live broadcast room into the live broadcast room style class InitParam, and code change does not need to be performed on the live broadcast room development frame.
The method for expanding the style of the live broadcast room comprises the steps of abstracting a live broadcast room style class, replacing live broadcast room style information data in a live broadcast room development frame with live broadcast room style class data, accordingly, inducing and stripping live broadcast room style data in the whole data of a development frame to form an independent expansion module, then developing a new live broadcast room style object in a development interface of the live broadcast room development frame, adding the new live broadcast room style object into the live broadcast room style class, further, stripping an expansion process of a newly-increased live broadcast room style from the live broadcast room development frame, achieving decoupling of live broadcast room style expansion and the live broadcast room development frame, and enhancing expansibility and robustness of the live broadcast room development frame.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The above mainly describes a live broadcast room style extension method, and a live broadcast room style extension system will be described in detail below.
As shown in fig. 4, the system for extending style in a live broadcast room provided in the embodiment of the present invention includes the following functional modules:
the live broadcast room style class generation module 10 is used for abstracting a live broadcast room style class and replacing live broadcast room style information data in a live broadcast room development frame with live broadcast room style class data;
a live broadcast room style development module 20, configured to develop a new live broadcast room style object in a development interface of a live broadcast room development framework;
and the live room style extension module 30 is used for adding the new live room style object into the live room style class to realize extension of the live room style.
The style class of the live broadcast room comprises a live broadcast room style value and interface style information, the interface style information comprises an activity style parent container, and the data format of the live broadcast room style class is an InitParam data format.
As shown in fig. 5, the live room style class generation module 10 includes the following functional units:
a live room style class creating unit 11 configured to create a live room style class;
the live broadcast room style data screening unit 12 is used for traversing the whole data of the live broadcast room development frame and screening out live broadcast room style information data in the live broadcast room development frame;
a live broadcast room style class definition unit 13, configured to define a live broadcast room style class according to the screened live broadcast room style information data;
and a live room style data replacing unit 14, configured to replace the screened live room style information data with a live room style class.
The invention relates to an extension system of a live broadcast room style, which abstracts a live broadcast room style class through a live broadcast room style class generation module 10, replaces live broadcast room style information data in a live broadcast room development frame with live broadcast room style class data, so as to realize induction and stripping of the live broadcast room style data in the whole data of a development frame to form an independent extension module, then develops a new live broadcast room style object in a development interface of the live broadcast room development frame through a live broadcast room style development module 20, adds the new live broadcast room style object into the live broadcast room style class through a live broadcast room style extension module 30, further strips the extension process of a newly added live broadcast room style from the live broadcast room development frame, realizes the decoupling of the live broadcast room style extension and the live broadcast room development frame, and enhances the extensibility and the robustness of the live broadcast room development frame.
Fig. 6 is a schematic diagram of a server structure of a live room style extension according to an embodiment of the present invention. The server, which is a device providing computing services, generally refers to a computer with high computing power, and is provided to a plurality of users via a network. As shown in fig. 6, theserver 4 of this embodiment includes: amemory 41, aprocessor 42, and asystem bus 43, thememory 41 including anexecutable program 411 stored thereon, it being understood by those skilled in the art that the terminal device structure shown in fig. 6 does not constitute a limitation of the terminal device, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
The following specifically describes each constituent component of the terminal device with reference to fig. 6:
thememory 41 may be used to store software programs and modules, and theprocessor 42 executes various functional applications and data processing of the terminal by operating the software programs and modules stored in thememory 41. Thememory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc. Further, thememory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
Anexecutable program 411 containing a live-air style extension method is stored in amemory 41, theexecutable program 411 can be divided into one or more modules/units, the one or more modules/units are stored in thememory 41 and executed by aprocessor 42 to complete the transmission of the notification and obtain the notification implementation process, and the one or more modules/units can be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used for describing the execution process of thecomputer program 411 in theserver 4. For example, thecomputer program 411 may be divided into an acquisition module, a comparison module, a concatenation module and a sending module.
Theprocessor 42 is a control center of the server, connects various parts of the entire terminal device with various interfaces and lines, performs various functions of the terminal and processes data by running or executing software programs and/or modules stored in thememory 41 and calling data stored in thememory 41, thereby monitoring the terminal as a whole. Alternatively,processor 42 may include one or more processing units; preferably, theprocessor 42 may integrate an application processor, which primarily handles operating systems, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into theprocessor 42.
Thesystem bus 43 is used to connect functional units inside the computer, and can transmit data information, address information, and control information, and may be, for example, a PCI bus, an ISA bus, a VESA bus, or the like. The instructions of theprocessor 42 are transmitted to thememory 41 through the bus, thememory 41 feeds back data to theprocessor 42, and thesystem bus 43 is responsible for data and instruction interaction between theprocessor 42 and thememory 41. Of course, thesystem bus 43 may also access other devices such as network interfaces, display devices, etc.
The server at least includes a CPU, a chipset, a memory, a disk system, and the like, and other components are not described herein again.
In the embodiment of the present invention, the executable program executed by theprocessor 42 included in the terminal specifically includes: a method for extending styles of a live broadcast room comprises the following steps:
step 1, creating a style class of a live broadcast room;
step 2, traversing the whole data of the live broadcast room development frame, and screening out live broadcast room style information data in the live broadcast room development frame;
step 3, replacing the screened live broadcasting room style information data with live broadcasting room style class data;
step 4, defining the style class of the live broadcast room according to the screened style information data of the live broadcast room;
step 5, developing a new live broadcast room style object in a development interface of a live broadcast room development frame;
and 6, adding the style object of the new live broadcast room into the style class of the live broadcast room to realize the extension of the style of the live broadcast room.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art would appreciate that the modules, elements, and/or method steps of the various embodiments described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.