CN108536492B - Method, device, equipment and storage medium for acquiring attribute information of live broadcast room - Google Patents

Method, device, equipment and storage medium for acquiring attribute information of live broadcast room Download PDF

Info

Publication number
CN108536492B
CN108536492B CN201810305811.0A CN201810305811A CN108536492B CN 108536492 B CN108536492 B CN 108536492B CN 201810305811 A CN201810305811 A CN 201810305811A CN 108536492 B CN108536492 B CN 108536492B
Authority
CN
China
Prior art keywords
live broadcast
attribute information
broadcast room
information
memory area
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
CN201810305811.0A
Other languages
Chinese (zh)
Other versions
CN108536492A (en
Inventor
张磊
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810305811.0A priority Critical patent/CN108536492B/en
Publication of CN108536492A publication Critical patent/CN108536492A/en
Application granted granted Critical
Publication of CN108536492B publication Critical patent/CN108536492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • H04N21/4431OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB characterized by the use of Application Program Interface [API] libraries

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for acquiring attribute information of a live broadcast room. The method comprises the following steps: receiving operation information of a user on a target live broadcast room; and when the operation information meets the attribute information acquisition condition, calling a predefined encapsulation information type encapsulation acquisition function, and acquiring the attribute information of the target live broadcast room from a static memory area, wherein the static memory area stores the attribute information. Through the technical scheme, the problems that the attribute information is transmitted layer by layer through local variables, the acquisition process of the attribute information is complex, the error rate is high, the program operation is unstable and the like are solved, so that the control of any level in the live broadcast room can directly acquire the attribute information of the live broadcast room from a static memory area, the convenience and the efficiency of attribute information acquisition are improved, and the stability of program operation is further improved.

Description

Method, device, equipment and storage medium for acquiring attribute information of live broadcast room
Technical Field
The embodiment of the invention relates to computer technology, in particular to a method, a device, equipment and a storage medium for acquiring attribute information of a live broadcast room.
Background
In the live broadcast platform, a plurality of controls with a plurality of hierarchies are distributed in each live broadcast room so as to display various information of the live broadcast room. When the controls acquire corresponding control display information, a network request for data loading needs to be sent, and the network request must contain attribute information of a live broadcast room, such as a live broadcast room id, a live broadcast room name, a live broadcast room creation date and the like. This means that each control needs to obtain property information.
In the prior art, the process of acquiring attribute information by a certain control is as follows: at least one local variable is firstly defined, such as at least one of an id local variable, a name local variable and a date local variable, and the scope of the at least one local variable is only the local program module corresponding to the control. And then requesting attribute information one by one from a local program module corresponding to the control of the previous layer of the control, and assigning a return result to the at least one local variable. That is, each sub-level controller needs to transmit and store the attribute information layer by layer when acquiring the attribute information. For example, when the third-level control element acquires the attribute information, the attribute information to be acquired needs to be transmitted and stored to the corresponding local variable corresponding to the second-level control element from the local variable corresponding to the first-level control element, and then transmitted to the corresponding local variable corresponding to the third-level control element from the local variable of the second-level control element. This results in that, inside the system, a plurality of local variables with different storage addresses are maintained for the attribute information of the same live broadcast room. When attribute information is acquired, multiple times of addressing and data acquisition are required for multiple local variables. In case of data error or addressing path error of some local variable, display disorder on the live-room page can be caused.
The existing mode of storing the attribute information of the live broadcast room in a plurality of local variable forms is difficult to combine the stability of a program and the simplicity and the high efficiency of acquiring the attribute information of the live broadcast room.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for acquiring attribute information of a live broadcast room, which are used for considering simplicity and high efficiency of acquiring the attribute information of the live broadcast room and operation stability of a program.
In a first aspect, an embodiment of the present invention provides a method for acquiring attribute information of a live broadcast room, including:
receiving operation information of a user on a target live broadcast room;
and when the operation information meets the attribute information acquisition condition, calling a predefined encapsulation information type encapsulation acquisition function, and acquiring the attribute information of the target live broadcast room from a static memory area, wherein the static memory area stores the attribute information.
Optionally, before the calling a package obtaining function of a predefined package information class and obtaining the attribute information of the target live broadcast room from a static memory area when the operation information meets the attribute information obtaining condition, the method further includes:
and when the operation information meets the attribute information storage condition, calling a packaging storage function of the predefined packaging information class, and storing the attribute information to the static memory area in advance.
Further, the encapsulation storage function and the encapsulation acquisition function are both static functions.
Optionally, when the operation information meets an attribute information obtaining condition, calling a package obtaining function of a predefined package information class, and obtaining the attribute information of the target live broadcast room from a static memory area includes:
when the switching of the live broadcast rooms is judged to be completed, updating the switched live broadcast rooms into a target live broadcast room;
and calling a packaging acquisition function of a predefined packaging information class, and acquiring the updated attribute information of the target live broadcast room from a static memory area.
Further, after the live broadcast room after the switching is updated to the target live broadcast room when it is determined that the live broadcast room switching is completed, the method further includes:
and calling the encapsulation storage function, and updating the updated attribute information of the target live broadcast room to the static memory area.
Optionally, when it is determined that the live broadcast room is switched, updating the live broadcast room after the switching to the target live broadcast room includes:
acquiring a switching state identification value of a live broadcast room;
and if the live broadcast room switching state identification value is a preset state identification value, judging that the live broadcast room is switched to be completed, and updating the switched live broadcast room into a target live broadcast room.
The live broadcast room switching state identification value comprises a switching start identification value, a switching middle range identification value and a switching completion identification value.
Optionally, the attribute information includes live broadcast room identification information, a live broadcast room name, and a live broadcast room creation date.
In a second aspect, an embodiment of the present invention further provides a device for acquiring attribute information of a live broadcast room, where the device includes:
the operation information receiving module is used for receiving operation information of a user on the target live broadcast room;
and the attribute information acquisition module is used for calling a predefined encapsulation information type encapsulation acquisition function and acquiring the attribute information of the target live broadcast room from a static memory area when the operation information meets an attribute information acquisition condition, wherein the static memory area stores the attribute information.
Optionally, on the basis of the above apparatus, the apparatus further includes:
and the attribute information storage module is used for calling a packaging acquisition function of a predefined packaging information class when the operation information meets the attribute information acquisition condition, calling a packaging storage function of the predefined packaging information class when the operation information meets the attribute information storage condition before acquiring the attribute information of the target live broadcast room from a static memory area, and storing the attribute information into the static memory area in advance.
Further, the encapsulation storage function and the encapsulation acquisition function are both static functions.
Optionally, the attribute information obtaining module includes:
the target live broadcast room updating submodule is used for updating the switched live broadcast room into the target live broadcast room when the live broadcast room is judged to be switched;
and the attribute information acquisition submodule is used for calling a predefined encapsulation acquisition function of the encapsulation information class and acquiring the updated attribute information of the target live broadcast room from the static memory area.
Further, on the basis of the above device, the device further comprises:
and the attribute information updating module is used for calling the encapsulation storage function and updating the updated attribute information of the target live broadcast room to the static memory area after the live broadcast room after switching is updated to the target live broadcast room when the live broadcast room switching is judged to be completed.
Optionally, the target live broadcast room updating sub-module is specifically configured to:
acquiring a switching state identification value of a live broadcast room;
and if the live broadcast room switching state identification value is a preset state identification value, judging that the live broadcast room is switched to be completed, and updating the switched live broadcast room into a target live broadcast room.
The live broadcast room switching state identification value comprises a switching start identification value, a switching middle range identification value and a switching completion identification value.
Optionally, the attribute information includes live broadcast room identification information, a live broadcast room name, and a live broadcast room creation date.
In a third aspect, an embodiment of the present invention further provides an apparatus, where the apparatus includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the live broadcast attribute information acquiring method provided by any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for acquiring attribute information of a live broadcast room provided in any embodiment of the present invention is implemented.
According to the embodiment of the invention, the attribute information of the target live broadcast room is acquired from the static memory area by calling the encapsulation acquisition function of the predefined encapsulation information class, so that the problems of complex attribute information acquisition process, high error rate, unstable program operation and the like caused by the fact that the attribute information is transmitted layer by layer through local variables in the prior art are solved, the control of any level in the live broadcast room can directly acquire the attribute information of the live broadcast room from the static memory area, the convenience and the high efficiency of acquiring the attribute information are improved, and the stability of program operation is further improved.
Drawings
Fig. 1 is a flowchart of a live broadcast room attribute information acquisition method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a live broadcast room attribute information acquisition method in the second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a live broadcast room attribute information acquisition apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
The method for acquiring the attribute information of the live broadcast room, provided by the embodiment, is applicable to acquiring the attribute information of the live broadcast room in a live broadcast application program. The method can be executed by a live broadcast room attribute information acquisition device, the device can be realized by software and/or hardware, and the device can be integrated in an intelligent device provided with a live broadcast application program, such as a typical user terminal device, for example, a mobile phone, a tablet computer, a desktop computer or an intelligent television. Referring to fig. 1, the method of the present embodiment specifically includes the following steps:
and S110, receiving operation information of the user on the target live broadcast room.
The target live broadcast room refers to a live broadcast room which is watched by the user and generates operation behaviors. The operation information refers to the operation behavior of the user on the live broadcast room and the corresponding operation instruction. For example, if the user clicks the live broadcast room, the corresponding operation information is a click behavior and an operation instruction for opening the live broadcast room; for another example, if the user switches the live broadcast room, the operation information is a switching behavior and an operation instruction for switching the live broadcast room; for example, if the user issues a barrage to the live broadcasting room, the operation information is the input behavior and the operation instruction for inputting the barrage.
And S120, when the operation information meets the attribute information acquisition condition, calling a predefined encapsulation information type encapsulation acquisition function, and acquiring the attribute information of the target live broadcast room from a static memory area.
The attribute information is information that is specific to the live broadcast room and can distinguish different live broadcast rooms. Illustratively, the attribute information includes live room identification information, a live room name, and a live room creation date. The attribute information obtaining condition refers to a trigger condition capable of triggering obtaining of attribute information, and may be a trigger instruction causing display or change of display information in a live broadcast room page, for example, an application program internal trigger instruction caused by a network failure or application program page update, or may be an operation instruction corresponding to a user operation, such as an opening operation instruction or a switching operation instruction for opening or switching a live broadcast room by a user, and further, such as an interactive operation instruction for giving comments, issuing a barrage, giving gifts, and the like by a user.
The predefined encapsulation information class is a predefined class used for managing attribute information of a live broadcast room, member variables and member functions can be defined in the predefined encapsulation information class, the member variables can be used for representing different attribute information, and the member functions can be used for operating the member variables, such as storage and acquisition of the member variables, so that the operation safety of the member variables can be ensured, and the error rate of a program can be reduced. The member variables and member functions inside the class are implemented in an encapsulated, invisible state relative to the outside of the class.
Managing attribute information by class is equivalent to managing each attribute information in a combined form collectively. Each live broadcast room can correspond to instantiation of a class, namely an object, and the object is to respectively assign attribute information of the corresponding live broadcast room to member variables in the class. The subsequent operation on the object can be understood as an operation on the combined attribute information. If the attribute information of a certain live broadcast room needs to be managed, only the object corresponding to the live broadcast room needs to be managed, and the management efficiency of the attribute information is greatly improved. In addition, the storage addresses of the variables in all the instantiated objects of one class are the same, namely the storage addresses of the variables in all the objects are the same memory address, so that the condition that different storage addresses are inquired layer by layer in the attribute information acquisition process is reduced.
In the embodiment of the invention, the definition of the encapsulation information class is illustrated according to the attribute information of the live broadcast room. Firstly, defining a direct broadcasting room class RoomInfo; then, each field information related to the live broadcast is defined in the roomlnfo class, for example, an id variable of a String (String) type is defined in the roomlnfo class for marking the live broadcast identification information of the live broadcast, a name variable of the String (String) type is defined in the roomlnfo class for marking the live broadcast name, and a data variable of a Date (Date) type is defined in the roomlnfo class for marking the live broadcast creation Date. By the definition of the live broadcast room class, all attribute information of the live broadcast room is packaged into a RoomInfo class, and the distributed attribute information of the live broadcast room can be uniformly managed.
Illustratively, the static memory area stores the attribute information.
Considering that variables in the classes are all stored in the heap memory, the memory allocation of the heap memory belongs to dynamic memory allocation, data in the dynamic memory allocation can be released by a system after the use is finished, and if the data is not released in time, the problem of memory leakage can be caused. Then, in order to facilitate information management and reduce program error rate, the embodiment of the present invention further defines the member variables in the package information class as static and global variables. Therefore, variable values (namely attribute information) can be stored in a static area (namely a static memory area) of a memory, so that the storage addresses of the variables are fixed, namely the storage addresses of the variables in all objects are not only the same memory address, but also the same fixed memory address, and thus, the process of inquiring the storage addresses layer by layer when the attribute information is acquired is directly eliminated, and the storage addresses are directly positioned to the fixed storage addresses.
For example, for the above direct-broadcast-type roomlnfo, the implementation method of defining a static and global variable is to define a static roomlnfo object, and specifically, to define a static roomlnfo object by means of a private static roomlnfo, so that the content of the later roomlnfo is stored in a static memory area in a system memory block.
In order to store and acquire data in the static memory area, two member functions are defined in the encapsulation message class: and the encapsulation storage function and the encapsulation acquisition function are respectively used for storing the attribute information to the static memory area and acquiring the attribute information from the static memory area. Illustratively, the encapsulation storage function and the encapsulation acquisition function are both static functions. That is, when defining the encapsulated storage function and the encapsulated retrieval function, they are declared to be of a static type, such as defined by static keywords. The method has the advantages that the encapsulation storage function and the encapsulation acquisition function can be directly called through the encapsulation information class, and related member functions do not need to be called through instantiated objects every time, so that the simplicity of function calling is improved, and the error rate is reduced.
For example, the member function may be defined as: public static void setRoomInfo (RoomInfo roomInfo) and public static RoomInfo getRoomInfo (). The internal implementation principle of setROOMInfo is that attribute information in transferred parameter ROOMInfo is cached in object ROOMInfo of the static memory area. The specific caching method is that data in the parameter roomlnfo are taken out one by one and set in a roomlnfo object in the static memory area. The implementation principle of getROOMInfo is that the roomInfo object in the static memory area is directly returned.
Specifically, the received operation information is compared with the attribute information acquisition condition, if the operation information meets the attribute information acquisition condition, for example, the operation information is a barrage input operation instruction or a comment operation instruction and the like, which belongs to an interactive operation instruction, it is determined that the operation information meets the attribute information acquisition condition, and then a package acquisition function of a predefined package information class is called to acquire the attribute information of the target live broadcast room from the static memory area.
Illustratively, before the calling a package obtaining function of a predefined package information class and obtaining the attribute information of the target live broadcast room from a static memory area when the operation information satisfies an attribute information obtaining condition, the method further includes: and when the operation information meets the attribute information storage condition, calling a packaging storage function of the predefined packaging information class, and storing the attribute information to the static memory area in advance.
The attribute information storage condition refers to a trigger condition capable of triggering storage of attribute information, and may be a trigger instruction for causing a change in the live broadcast room, for example, an open operation instruction for opening the live broadcast room by a user.
Specifically, when it is determined that the operation information satisfies the attribute information storage condition, a package storage function in a predefined package information class is called, and attribute information requested to be obtained from the network is stored in the static memory area in advance according to the structure type of the package information class. The method has the advantages that the attribute information acquired by the network terminal can be stored in the static memory area in advance by the class data structure, so that the subsequent attribute information acquisition operation can be conveniently executed, and the attribute information acquisition efficiency can be improved
According to the technical scheme, the attribute information of the target live broadcast room is acquired from the static memory area by calling the encapsulation acquisition function of the predefined encapsulation information class, the problems that the attribute information is transmitted layer by layer through local variables at present, the attribute information acquisition process is complex, the error rate is high, the program operation is unstable and the like are solved, the control of any level in the live broadcast room can directly acquire the attribute information of the live broadcast room from the static memory area, the convenience and the efficiency of acquiring the attribute information are improved, and the stability of the program operation is further improved.
Example two
In this embodiment, based on the first embodiment, further optimization is performed on "when the operation information satisfies the attribute information obtaining condition, a package obtaining function of a predefined package information class is called, and the attribute information of the target live broadcast room is obtained from a static memory area". Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. Referring to fig. 2, the method for acquiring attribute information of a live broadcast room provided by this embodiment includes:
and S210, receiving operation information of the user on the target live broadcast room.
And S220, updating the switched live broadcast room to be the target live broadcast room when judging that the live broadcast room is switched to be finished.
Specifically, in the process of acquiring the attribute information of the live broadcast room, attribute information acquisition abnormalities caused by switching of the live broadcast room may occur in a plurality of controls in the live broadcast application program. For example, in the process of switching the target live broadcast room by the user, the user performs an interactive operation on a certain target live broadcast room before switching, and the process of acquiring the attribute information is triggered. Then the attribute information obtained by the live application program is either the attribute information of the last target live room or the empty attribute information. If the attribute information of the last target live broadcast room is acquired, because the live broadcast room is switched, the response aiming at the acquired attribute data is not loaded in the live broadcast room after the switching, and the acquired data is redundant data or error data. If the attribute information is acquired as null, the null pointer exception condition can be caused, and thus a program operation error is caused. Therefore, aiming at the special situation of live broadcast room switching, the embodiment of the invention adds the operation of updating the target live broadcast room before acquiring the attribute information.
In specific implementation, whether the live broadcast room is switched can be judged by identifying an identification value of the switching state of the live broadcast room or sending an update instruction for updating the live broadcast room after the live broadcast room is switched. And when the switching of the live broadcast rooms is judged to be completed, updating the live broadcast rooms after the switching into the target live broadcast room.
Illustratively, when it is determined that the live broadcast switch is completed, updating the live broadcast after the switch to the target live broadcast includes: acquiring a switching state identification value of a live broadcast room; and if the live broadcast room switching state identification value is a preset state identification value, judging that the live broadcast room is switched to be completed, and updating the switched live broadcast room into a target live broadcast room.
The switching state identification value of the live broadcast room is an identification value for identifying the switching state of the live broadcast room, and may include a switching start identification value, a switching middle range identification value and a switching completion identification value. The preset state identification value is a preset identification value for identifying the completion of switching of the live broadcast room.
Specifically, in the live broadcast application program, a live broadcast room switching state identification variable is set, for example, an enumeration type variable RoomType is set, and a value of the enumeration variable is a live broadcast room switching state identification value, which may correspond to three values, namely a switching start identification value 1, a switching middle-range identification value 2, and a switching completion identification value 3. Before updating the target live broadcast room, the switching state identification value of the live broadcast room is obtained first so as to judge the switching state of the live broadcast room. The acquisition process can actively acquire the value of the corresponding variable, and can also broadcast the switching state identification value of the live broadcast room by the corresponding variable and passively receive the identification value. The broadcast format of the live broadcast switching status flag value will be described here. When the live broadcast room starts to be switched, the value of the enumeration variable is assigned to be 1, and then the state of the enumeration variable is broadcasted, so that all the controls can receive the state information of the current live broadcast room starting to be switched. When the live broadcast room is in the switching process, the enumeration variable is assigned to be 2, and then the enumeration variable is broadcasted. When the information switching of the live broadcast room is completed, the enumeration variable is assigned to be 3 and then is broadcasted.
And after the switching state identification value of the live broadcast room is acquired, comparing the switching state identification value with a preset state identification value. And when the live broadcasting room and the target live broadcasting room are consistent, judging that the live broadcasting room is switched and then updating the switched live broadcasting room into the target live broadcasting room.
Illustratively, after updating the live broadcast room after the switching to the target live broadcast room when the live broadcast room switching is judged to be completed, the method further includes: and calling the encapsulation storage function, and updating the updated attribute information of the target live broadcast room to the static memory area.
Specifically, after the target live broadcast room is updated, a packaging storage function of a packaging information class is called, and the updated attribute information of the target live broadcast room is stored in the static memory area to cover the original attribute information, so that the update of the attribute information is completed. Therefore, the attribute information of the static memory area is consistent with the target live broadcast room watched by the user all the time, and the condition that the attribute information is obtained wrongly is avoided. In addition, the determination steps of the attribute information storage condition can be reduced, and the attribute information updating rate can be increased.
And S230, calling a package obtaining function of a predefined package information class, and obtaining the updated attribute information of the target live broadcast room from a static memory area.
Specifically, after the target live broadcast room is updated, the updated attribute information in the static memory area is returned by calling a package acquisition function of a predefined package information class, so that the correctness of the attribute information acquired by the control of the attribute information to be acquired is ensured.
According to the technical scheme, the switching state of the live broadcast room is judged, and the corresponding attribute information of the target live broadcast room and the static memory area is updated after the live broadcast room is switched, so that the conversion of the target live broadcast room and the attribute information can be kept synchronous, the error rate of acquiring the attribute information is reduced, and the efficiency of acquiring the attribute information and the stability of program operation are further improved.
The following is an embodiment of a live broadcast room attribute information acquiring apparatus provided in an embodiment of the present invention, and the apparatus and the live broadcast room attribute information acquiring method in the above embodiments belong to the same inventive concept, and details that are not described in detail in the embodiment of the live broadcast room attribute information acquiring apparatus may refer to the embodiment of the live broadcast room attribute information acquiring method.
EXAMPLE III
This embodiment provides a live broadcast room attribute information acquisition device, refer to fig. 3, and the device specifically includes:
an operation information receiving module 310, configured to receive operation information of a user on a target live broadcast room;
an attribute information obtaining module 320, configured to, when the operation information meets an attribute information obtaining condition, call a package obtaining function of a predefined package information class, and obtain attribute information of the target live broadcast from a static memory area, where the static memory area stores the attribute information.
Optionally, on the basis of the above apparatus, the apparatus further includes:
and the attribute information storage module is used for calling a packaging acquisition function of a predefined packaging information class when the operation information meets the attribute information acquisition condition, calling a packaging storage function of the predefined packaging information class when the operation information meets the attribute information storage condition before acquiring the attribute information of the target live broadcast room from a static memory area, and storing the attribute information into the static memory area in advance.
Further, the encapsulation storage function and the encapsulation acquisition function are both static functions.
Optionally, the attribute information obtaining module 320 includes:
the target live broadcast room updating submodule is used for updating the switched live broadcast room into the target live broadcast room when the live broadcast room is judged to be switched;
and the attribute information acquisition submodule is used for calling a predefined encapsulation acquisition function of the encapsulation information class and acquiring the updated attribute information of the target live broadcast room from the static memory area.
Further, on the basis of the above device, the device further comprises:
and the attribute information updating module is used for calling the encapsulation storage function and updating the updated attribute information of the target live broadcast room to the static memory area after the live broadcast room after switching is updated to the target live broadcast room when the live broadcast room switching is judged to be completed.
Optionally, the target live broadcast room updating sub-module is specifically configured to:
acquiring a switching state identification value of a live broadcast room;
and if the live broadcast room switching state identification value is a preset state identification value, judging that the live broadcast room is switched to be completed, and updating the switched live broadcast room into a target live broadcast room.
The live broadcast room switching state identification value comprises a switching start identification value, a switching middle range identification value and a switching completion identification value.
Optionally, the attribute information includes live broadcast room identification information, a live broadcast room name, and a live broadcast room creation date.
Through the live broadcast room attribute information acquisition device provided by the third embodiment of the invention, the problems of complex attribute information acquisition process, high error rate, unstable program operation and the like caused by the fact that the attribute information is transmitted layer by layer through local variables in the prior art are solved, so that the control of any level in the live broadcast room can directly acquire the attribute information of the live broadcast room from a static memory area, the convenience and the high efficiency of attribute information acquisition are improved, and the stability of program operation is further improved.
The live broadcast room attribute information acquisition device provided by the embodiment of the invention can execute the live broadcast room attribute information acquisition method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the apparatus for acquiring attribute information of a live broadcast room, each unit and each module included in the apparatus are only divided according to functional logic, but are not limited to the above division, as long as corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Example four
Referring to fig. 4, the present embodiment provides an apparatus 400 comprising: one or more processors 420; the storage device 410 is configured to store one or more programs, and when the one or more programs are executed by the one or more processors 420, the one or more processors 420 implement the live broadcast attribute information acquiring method provided in the embodiment of the present invention, including:
receiving operation information of a user on a target live broadcast room;
and when the operation information meets the attribute information acquisition condition, calling a predefined encapsulation information type encapsulation acquisition function, and acquiring the attribute information of the target live broadcast room from a static memory area, wherein the static memory area stores the attribute information.
Of course, those skilled in the art will appreciate that the processor 420 may also implement aspects of the … … method provided by any of the embodiments of the invention.
The apparatus 400 shown in fig. 4 is only an example and should not bring any limitations to the functionality or scope of use of the embodiments of the present invention.
As shown in fig. 4, the apparatus 400 includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of the processors 420 in the device may be one or more, and one processor 420 is taken as an example in fig. 4; the processor 420, the storage device 410, the input device 430 and the output device 440 of the apparatus may be connected by a bus or other means, for example, the bus 450 in fig. 4.
The storage device 410 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the live broadcast attribute information acquiring method in the embodiment of the present invention (for example, an operation information receiving module and an attribute information acquiring module in the live broadcast attribute information acquiring device).
The storage device 410 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 for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage 410 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 non-volatile solid state storage device. In some examples, the storage 410 may further include memory located remotely from the processor 420, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the apparatus. The output device 440 may include a display device such as a display screen.
EXAMPLE five
The present embodiments provide a storage medium containing computer-executable instructions that, when executed by a computer processor, perform a live room attribute information acquisition method, the method comprising:
receiving operation information of a user on a target live broadcast room;
and when the operation information meets the attribute information acquisition condition, calling a predefined encapsulation information type encapsulation acquisition function, and acquiring the attribute information of the target live broadcast room from a static memory area, wherein the static memory area stores the attribute information.
Of course, the storage medium provided in the embodiment of the present invention includes computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the live broadcast room attribute information obtaining method provided in any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, where the computer software product may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk, or an optical disk of a computer, and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute the live broadcast attribute information acquiring method according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A live broadcast room attribute information acquisition method is characterized by comprising the following steps:
receiving operation information of a user on a target live broadcast room;
when the operation information meets the attribute information acquisition condition, calling a predefined encapsulation information type encapsulation acquisition function, and acquiring the attribute information of the target live broadcast room from a static memory area, wherein the static memory area stores the attribute information;
the predefined encapsulation information class is a predefined class used for managing the attribute information of the live broadcast room, member variables and member functions are defined in the predefined encapsulation information class, the member variables are used for representing different attribute information, and the member functions are used for operating the member variables.
2. The method according to claim 1, before the, when the operation information satisfies the attribute information obtaining condition, calling a package obtaining function of a predefined package information class to obtain the attribute information of the target live broadcast room from a static memory area, further comprising:
and when the operation information meets the attribute information storage condition, calling a packaging storage function of the predefined packaging information class, and storing the attribute information to the static memory area in advance.
3. The method of claim 2, wherein the capsule storage function and the capsule retrieval function are both static functions.
4. The method according to claim 1, wherein when the operation information satisfies an attribute information obtaining condition, calling a package obtaining function of a predefined package information class, and obtaining the attribute information of the target live broadcast room from a static memory area comprises:
when the switching of the live broadcast rooms is judged to be completed, updating the switched live broadcast rooms into a target live broadcast room;
and calling a packaging acquisition function of a predefined packaging information class, and acquiring the updated attribute information of the target live broadcast room from a static memory area.
5. The method of claim 4, further comprising, after updating the live broadcast after the switching to the target live broadcast when the live broadcast switching is determined to be completed, the step of:
and calling a packaging storage function, and updating the updated attribute information of the target live broadcast room to the static memory area.
6. The method according to claim 4 or 5, wherein when judging that the live broadcast switching is completed, updating the live broadcast after the switching to the target live broadcast comprises:
acquiring a switching state identification value of a live broadcast room;
and if the live broadcast room switching state identification value is a preset state identification value, judging that the live broadcast room is switched to be completed, and updating the switched live broadcast room into a target live broadcast room.
7. The method of claim 1, wherein the attribute information includes live room identification information, live room name, and live room creation date.
8. A live broadcast room attribute information acquisition apparatus, comprising:
the operation information receiving module is used for receiving operation information of a user on the target live broadcast room;
the attribute information acquisition module is used for calling a predefined encapsulation information type encapsulation acquisition function and acquiring the attribute information of the target live broadcast room from a static memory area when the operation information meets an attribute information acquisition condition, wherein the static memory area stores the attribute information;
the predefined encapsulation information class is a predefined class used for managing the attribute information of the live broadcast room, member variables and member functions are defined in the predefined encapsulation information class, the member variables are used for representing different attribute information, and the member functions are used for operating the member variables.
9. A live broadcast room attribute information acquisition device, characterized by comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a live space property information acquisition method as recited in any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing a live room property information acquiring method according to any one of claims 1 to 7.
CN201810305811.0A 2018-04-08 2018-04-08 Method, device, equipment and storage medium for acquiring attribute information of live broadcast room Active CN108536492B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810305811.0A CN108536492B (en) 2018-04-08 2018-04-08 Method, device, equipment and storage medium for acquiring attribute information of live broadcast room

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810305811.0A CN108536492B (en) 2018-04-08 2018-04-08 Method, device, equipment and storage medium for acquiring attribute information of live broadcast room

Publications (2)

Publication Number Publication Date
CN108536492A CN108536492A (en) 2018-09-14
CN108536492B true CN108536492B (en) 2021-09-07

Family

ID=63482919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810305811.0A Active CN108536492B (en) 2018-04-08 2018-04-08 Method, device, equipment and storage medium for acquiring attribute information of live broadcast room

Country Status (1)

Country Link
CN (1) CN108536492B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109413498B (en) * 2018-10-19 2021-04-23 武汉斗鱼网络科技有限公司 Bullet screen message distribution method, bullet screen message distribution device, terminal and storage medium
CN109089152B (en) * 2018-10-25 2021-05-14 广州虎牙科技有限公司 Operation method, device, equipment and storage medium of live broadcast room
CN109819330B (en) * 2019-01-17 2022-03-08 武汉斗鱼鱼乐网络科技有限公司 Live broadcast room jumping method, device, equipment and storage medium
CN112135162B (en) * 2020-09-25 2022-08-12 北京达佳互联信息技术有限公司 Service execution method, device and server
CN115134613A (en) * 2021-03-29 2022-09-30 武汉斗鱼网络科技有限公司 Method and related device for acquiring information of live broadcast room

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778077A (en) * 2015-04-27 2015-07-15 华中科技大学 High-speed extranuclear graph processing method and system based on random and continuous disk access
CN104809192A (en) * 2015-04-22 2015-07-29 北京奇虎科技有限公司 Method and device for extracting candidate items of input method
CN105678828A (en) * 2015-12-30 2016-06-15 合一网络技术(北京)有限公司 Method and apparatus for creating transition animations
CN106454481A (en) * 2016-09-30 2017-02-22 广州华多网络科技有限公司 Live broadcast interaction method and apparatus of mobile terminal
CN106911968A (en) * 2017-03-17 2017-06-30 武汉斗鱼网络科技有限公司 A kind of live middle realization method and system for obtaining privilege information
CN107291438A (en) * 2016-04-13 2017-10-24 阿里巴巴集团控股有限公司 Generation method, device and the electronic equipment of automatized script
CN107357576A (en) * 2017-06-30 2017-11-17 惠州市德赛西威汽车电子股份有限公司 The method and system that a kind of window application multiwindow is drawn parallel

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2172021A4 (en) * 2007-07-13 2011-07-20 Steelberg Ryan Open api digital video recorder and method of making and using same
CN101452387A (en) * 2008-12-09 2009-06-10 山东浪潮齐鲁软件产业股份有限公司 Service flow management method
US8533665B2 (en) * 2009-11-16 2013-09-10 Cisco Technology, Inc. Generating object annotations
CN102665128B (en) * 2012-04-27 2015-05-27 北京人民广播电台 Method and device for customizing timer-shaft content
CN103093136B (en) * 2012-12-27 2015-05-27 飞天诚信科技股份有限公司 Method enabling java application to access to intelligent secret key device
CN104598282B (en) * 2015-02-05 2017-10-27 广州华多网络科技有限公司 A kind of control method for catching and equipment
CN105554094B (en) * 2015-12-11 2019-03-08 北京奇虎科技有限公司 Data interactive method and device
US10944806B2 (en) * 2016-06-22 2021-03-09 The Directv Group, Inc. Method to insert program boundaries in linear video for adaptive bitrate streaming
US10606614B2 (en) * 2016-07-31 2020-03-31 Oracle International Corporation Container-based language runtime using a variable-sized container for an isolated method
CN107426598B (en) * 2017-03-02 2020-07-31 武汉斗鱼网络科技有限公司 Bullet screen information processing method and injection module

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104809192A (en) * 2015-04-22 2015-07-29 北京奇虎科技有限公司 Method and device for extracting candidate items of input method
CN104778077A (en) * 2015-04-27 2015-07-15 华中科技大学 High-speed extranuclear graph processing method and system based on random and continuous disk access
CN105678828A (en) * 2015-12-30 2016-06-15 合一网络技术(北京)有限公司 Method and apparatus for creating transition animations
CN107291438A (en) * 2016-04-13 2017-10-24 阿里巴巴集团控股有限公司 Generation method, device and the electronic equipment of automatized script
CN106454481A (en) * 2016-09-30 2017-02-22 广州华多网络科技有限公司 Live broadcast interaction method and apparatus of mobile terminal
CN106911968A (en) * 2017-03-17 2017-06-30 武汉斗鱼网络科技有限公司 A kind of live middle realization method and system for obtaining privilege information
CN107357576A (en) * 2017-06-30 2017-11-17 惠州市德赛西威汽车电子股份有限公司 The method and system that a kind of window application multiwindow is drawn parallel

Also Published As

Publication number Publication date
CN108536492A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
CN108536492B (en) Method, device, equipment and storage medium for acquiring attribute information of live broadcast room
CN112019475B (en) Resource access method, device, system and storage medium under server-free architecture
US9953639B2 (en) Voice recognition system and construction method thereof
CN110750315B (en) Class loading method, device, equipment and storage medium in Android system
CN109343983B (en) Information interaction method, device, equipment and storage medium between function modules
CN109388388B (en) Information interaction method, device, equipment and storage medium between function modules
CN111399860A (en) Light application deployment method and device, computer equipment and storage medium
CN109089163B (en) Bullet screen message distribution method, device, equipment and storage medium
CN113821226A (en) ONIE system installation method, apparatus, device and medium
CN109947488B (en) Object initialization method, device, equipment and storage medium of universal function module
US11431795B2 (en) Method, apparatus and storage medium for resource configuration
CN109254858B (en) Data sharing method, device and equipment of active window and storage medium
CN109144520B (en) Information interaction method, device, equipment and storage medium among different objects in Android
CN109005468B (en) Bullet screen message distribution method, device, equipment and storage medium
CN111338710A (en) Application program control method and device, electronic equipment and storage medium
CN108810645B (en) Bullet screen message distribution method, device, equipment and storage medium
CN116032614A (en) Container network micro-isolation method, device, equipment and medium
CN109005448B (en) Bullet screen message distribution method, device, equipment and storage medium
CN108810644B (en) Bullet screen message distribution method, device, equipment and storage medium
CN109819330B (en) Live broadcast room jumping method, device, equipment and storage medium
CN109684009B (en) Protocol-based countdown synchronization method, device, storage medium and equipment
CN107453950A (en) A kind of information processing method and monitoring system
CN109062647B (en) Data sharing method, device and equipment of active window and storage medium
CN110032406B (en) Message-based view loading method, device, equipment and storage medium
CN111400060A (en) Equipment linkage method, device, server and 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