Audience list management method, device, equipment, and readable storage medium
By scanning room collections with changed data and generating paging viewer lists, the problem of frequent updates of viewer lists in live broadcast websites is solved, reducing system resource consumption and improving user experience.
Patent Information
- Application Number
- CN202410675298.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-05-28
AI Technical Summary
In live broadcast websites or applications, frequent operations such as user entry, exit and data changes lead to frequent updates of viewers' lists, consuming a large amount of system resources, and affecting the user experience.
By scanning the room collection where data changes occur, querying the user collection and generating a paging audience list, updating the audience list only when necessary, reducing the generation frequency, and adopting a multi-collection association update strategy.
It effectively reduces the frequency of audience list generation, reduces system resource consumption, and ensures timely updates of data and improves user experience.
Smart Images

Figure CN118283355B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of live video broadcasting, and in particular to an audience list management method, device, equipment, and readable storage medium. Background Art
[0002] There are often many live broadcast rooms running at the same time on live broadcast websites or live broadcast applications, and each room must display a list of online viewers. When users enter and exit different live broadcast rooms, modify their user information (such as avatar nicknames), or the user's sorting priority in the viewer list changes (for example, priority is generated according to specific rules, with high-level users sorted at the front), the viewer list of the corresponding room should be updated to the latest display data within a certain time limit.
[0003] However, the entry, exit, data change, and sorting priority change of each user in the live broadcast room are unpredictable, and the generation of the audience list will generate a large number of system internal query processing. For example, the audience list system needs to query the user system for user information and the medal system for medal information, etc. If the user generates a new operation, the audience list of the corresponding live broadcast room will be regenerated immediately. For example, if 10 users enter and exit the room within 1 second, the audience list must be regenerated 10 times, which will cause the audience list of the live broadcast room with a large number of viewers and a large amount of interaction to be continuously generated, consuming a large amount of system resources.
[0004] The above technical problems existing in the prior art have greatly affected the user experience. Summary of the invention
[0005] The present disclosure is completed to solve the above-mentioned problems, and its purpose is to provide an audience list management method, device, equipment, and readable storage medium that can effectively reduce the frequency of audience list generation to reduce system resource consumption while ensuring that the audience list data is updated in a timely manner.
[0006] The present disclosure provides this summary of the invention to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. This summary of the invention is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to be used to limit the scope of the technical solution claimed for protection.
[0007] In order to solve the above technical problems, the embodiment of the present disclosure provides a method for managing a viewer list, which adopts the following technical solution, including:
[0008] Scan the room set where data change operations have occurred to obtain the room numbers where data change operations have occurred;
[0009] Querying the user set in each of the room numbers, and generating a viewer list based on the user data combination of the user set;
[0010] Divide the audience list into pages according to preset rules to generate an audience list page set;
[0011] Determine the room number and page number for generating the audience list paging set;
[0012] Query the corresponding audience list according to the room number and page number and return the result;
[0013] The data change operation includes at least one of entering, exiting, changing user information, and changing sorting priority.
[0014] In order to solve the above technical problems, the embodiment of the present disclosure further provides a viewer list management device, which adopts the following technical solution, including:
[0015] A room set scanning module is used to scan the room set where data change operations have occurred to obtain the room number where data change operations have occurred;
[0016] A user set query module, used to query the user set in each room number, and generate a viewer list according to the user data combination of the user set;
[0017] An audience list paging set generating module, used for paging the audience list according to a preset rule to generate an audience list paging set;
[0018] The audience list returning module is used to determine the room number and page number for generating the audience list paging set, query the corresponding audience list according to the room number and page number and return the result;
[0019] The data change operation includes at least one of entering, exiting, changing user information, and changing sorting priority.
[0020] In order to solve the above technical problems, the embodiments of the present disclosure further provide a computer device, which adopts the technical solution described below, including: a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method described in any of the preceding items is implemented.
[0021] In order to solve the above technical problems, the embodiment of the present disclosure also provides a computer-readable storage medium, which adopts the technical solution described below, including: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the method described in any of the previous items.
[0022] According to the technical solution disclosed in the present invention, compared with the existing technology, different from the traditional practice of immediately triggering the refresh of the audience list according to data updates of operations such as user entry, exit, change of information, change of sorting priority, etc., through the method of multi-set associated update, the rooms that need to regenerate the audience list are calculated, which effectively reduces the generation frequency of the audience list to reduce system resource consumption, while ensuring that the data of the audience list is updated in time, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a schematic diagram of an embodiment of a system architecture according to the present disclosure;
[0024] Figure 2 is a flow chart of an embodiment of the audience list management method according to the present disclosure;
[0025] Figure 3 is a schematic diagram of an embodiment of a viewer list management device according to the present disclosure;
[0026] Figure 4 is a schematic diagram of one embodiment of a computer device according to the present disclosure.
[0027] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale. DETAILED DESCRIPTION
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure; the terms "including" and "having" and any variations thereof in the specification and claims of the present disclosure and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present disclosure or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0029] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present disclosure. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0030] In order to enable those skilled in the art to better understand the solution of the present disclosure, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0031] System Structure
[0032] First, the structure of a system according to an embodiment of the present disclosure is described. Figure 1 As shown, the system structure 100 may include terminal devices 101, 102, 103, 104, a network 105 and a server 106. The network 105 is used to provide a medium for communication links between the terminal devices 101, 102, 103, 104 and the server 106.
[0033] In this embodiment, the electronic device (e.g. Figure 1 The terminal devices 101, 102, 103 or 104 shown in the figure can transmit various information through the network 105. The network 105 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc. It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G / 5G connections, Wi-Fi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB connections, local area networks ("LAN"), wide area networks ("WAN"), Internet (e.g., the Internet) and peer-to-peer networks (e.g., ad hoc peer-to-peer networks) and other network connection methods currently known or developed in the future. The network 105 can communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and can be interconnected with digital data communications (e.g., communication networks) of any form or medium.
[0034] The user can use the terminal devices 101, 102, 103, 104 to interact with the server 106 through the network 105 to receive or send messages, etc. Various client applications can be installed on the terminal devices 101, 102, 103 or 104, such as video live broadcast and playback applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0035] The terminal devices 101, 102, 103 or 104 can be various electronic devices with a touch display and / or support for web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 (Moving Picture Experts Compressed Standard Audio Layer 3) players, MP4 (Moving Picture Experts Compressed Standard Audio Layer 4) players, head-mounted display devices, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., as well as mobile terminals such as digital TVs, desktop computers, etc.
[0036] The server 106 may be a server that provides various services, such as a background server that provides support for pages displayed on the terminal device 101 , 102 , 103 or 104 or data transmitted.
[0037] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0038] Here, the terminal device can independently or in cooperation with other electronic terminal devices run various operating systems such as applications in the Android system to implement the embodiment method of the present disclosure, and can also run applications in other operating systems to implement the embodiment method of the present disclosure.
[0039] Viewer list management method
[0040] First, the cache data structure used in this disclosure is described:
[0041] An ordered set zSet includes three definitions: the name key of the set, the member name member of the set, and the value score of the corresponding member. When multiple members are in the same set, they are sorted by the value of score. For example, in the audience list management method disclosed in the present invention, an ordered set zSet of online users in each room is defined, the name key=room_user, the concatenated room number is such as room_user_666, the name member member=userId (userID is, for example, the unique ID of the user), and the value score=num (num is, for example, the sorting weight value in the audience list).
[0042] The hash set hSet includes three definitions: the name key of the set, the member field field of the set, and the value value of the corresponding member. The members in the set are arranged in no order. For example, in the audience list management method disclosed in the present invention, it is defined that each room stores the generated audience list paging set hSet, for example, the name key of the set = room_audience_list, the concatenated room number is, for example, room_audience_list_666, the set member field field = pageNo (pageNo is, for example, the page number of the audience list paging), and the corresponding member value value = data (data is, for example, the data of the audience list).
[0043] A normal set (set) contains three definitions: the name of the set key, the member name of the set member; the members in the set are arranged in no order. For example, in the audience list management method disclosed in the present invention, the room set set in which a certain user is currently located is defined. When the user opens or enters pages of multiple different rooms in a PC browser or application, it is equivalent to the user staying in different rooms at the same time. For example, the name of the set key = my_enter_room, concatenated userId (for example, the user's unique ID is 111, my_enter_room_111), the member name of the set member = roomId (for example, the room number where the user is located). In addition, define the room set set in which data changes have occurred since the last execution of the management or generation of the audience list task, for example, the name of the set key = update_room, the member name of the set member = roomId (for example, the room number where the user is located).
[0044] In one or more embodiments, for example, if the minimum frequency of data list refresh required by the business is 3s, and the page size of the audience list pageSize = 20 users, then the system periodically executes the task of regenerating the audience list every 3s. Here, of course, it can also be set to 1s, 2s or other frequencies according to actual conditions, and the page size of the audience list pageSize can be set to 10 users, 50 users or other numbers according to needs, for example, without limitation.
[0045] refer to Figure 2 , shows a flow chart of an embodiment of a method for managing a viewer list according to the present disclosure. The method for managing a viewer list includes:
[0046] S21, scan the room set where data change operations have occurred to obtain the room numbers where data change operations have occurred, for example, scan update_room to obtain all members in the set (that is, the room numbers where data changes have occurred), for example, obtain two room numbers 888 and 999.
[0047] Here, the data change operation includes at least one of entering, exiting, changing user information, and changing sorting priority. For example, a delayed update strategy can be adopted for non-critical data changes (such as user information updates), by setting a time window, collecting all change requests during this period, and then updating them all at once. For critical operations (such as users entering or exiting the live broadcast room), for example, an event-driven model can be used to instantly update the audience list to ensure the real-time nature of the data.
[0048] In one or more embodiments, when the data change operation is entry or exit, the method further includes: changing the user set of the room; changing the room set where the user is currently located; and changing the room set where the data change operation occurs.
[0049] In one or more embodiments, when the data change operation is entry, for example, when user 2 and user 3 enter room 888, and user 2 and user 3 then enter room 999, the sorting weights of the corresponding users are first obtained. Assume that the sorting weight value of user 2 is 200 and the sorting weight value of user 3 is 100. Here, the weight values are, for example, sorted according to the user's activity or other indicators.
[0050] First, write an ordered set of online users to the room:
[0051] [key=room_user_888, member=2, score=200]
[0052] [key=room_user_888, member=3, score=100]
[0053] [key=room_user_999, member=2, score=200]
[0054] [key=room_user_999, member=3, score=100]
[0055] Next, write the room collection that the user is currently in:
[0056] [key=my_enter_room_2,member=888]
[0057] [key=my_enter_room_2,member=999]
[0058] [key=my_enter_room_3,member=888]
[0059] [key=my_enter_room_3,member=999]
[0060] Finally, write the room collection where data changes occurred:
[0061] [key=update_room, member=888]
[0062] [key=update_room, member=999]
[0063] In one or more embodiments, when the data change operation is exit, for example, when user 2 exits room 999, the specified data in the corresponding set is deleted by specifying key and member. First, [key=room_user_999&member=2] is deleted, and only user 3 is left in room room_user_999;
[0064] Secondly, delete [key=my_enter_room_2&member=999], and only room 888 remains in my_enter_room_2;
[0065] Finally, write the room collection where data change operations occurred [key=update_room, member=999].
[0066] In one or more embodiments, user data is processed by the first subsystem, and audience list management is processed by the second subsystem; for example, each web subsystem can access the message system, for example, divided into two roles: the producer role of the first subsystem and the consumer role of the second subsystem. The web subsystem as a producer, that is, the first subsystem, can send messages of a specific topic to the message system. The web subsystem as a consumer, that is, the second subsystem, for example, subscribes to messages of a specific topic through a long connection message system. After the producer's first subsystem sends the message content of the specified topic, the consumer's second subsystem can immediately receive the message content of the topic.
[0067] Here, all user information that needs to be displayed in the audience list is defined according to product requirements, including but not limited to: avatar, nickname, level, medal, IP, etc. This information is maintained or managed by other web subsystems, namely the first subsystem. Here, for example, for frequently accessed data (such as common user information and medal information), cache can be used to reduce database queries, and the cache can be in-memory or distributed to support large-scale user access.
[0068] In one or more embodiments, when the data change operation is to change the user profile, the method further includes: first, the first subsystem sends a corresponding subject message and content, for example, when user 3 changes his own user profile, other web subsystems access the public message system as producers. When the specific user profile maintained by them changes, for example, the user changes the avatar, a message is sent to the message system with the subject: A and the content: User 3 changes the avatar.
[0069] Secondly, the second subsystem receives the topic message and content. The second subsystem accesses the public message system as a consumer and subscribes to the topic: A. Receives the message through the message system: User 3 has modified the avatar.
[0070] Again, query all the room numbers that the user is in, for example, query my_enter_room_3, get all the members in the set (that is, all the room numbers that the user is currently in), and get room numbers 888 and 999. Here, if user 3 has already exited rooms 888 and 999, the query result is empty, and the previous step is not executed.
[0071] Finally, the room set where the data change operation occurred is determined based on the room number, and the room set where the data change operation occurred is written [key=update_room, member=888], [key=update_room, member=999].
[0072] In one or more embodiments, when the data change operation is to change the sorting priority, for example, when the sorting weight value of user 2 is changed (the new value is 300), the method further includes:
[0073] First, query all room numbers that the user is in, for example, query my_enter_room_2, get all members in the set (that is, all rooms currently in), and get room number 888. Here, if user 2 has exited room 888, the query result is empty and the subsequent steps are not executed.
[0074] Then, change the user set of the room according to the room number, for example, write the online user ordered set of the room [key=room_user_888, member=2, score=300] to overwrite the original score=200;
[0075] Finally, the room set where the data change operation occurred is determined based on the room number, for example, the room set where the data change operation occurred is written as [key=update_room, member=888].
[0076] S22, querying the user set in each room number, and generating a viewer list according to the user data combination of the user set;
[0077] First, traverse each room number obtained in step S21, such as room number 888, and query room_user_888 to obtain the online users of the room, and obtain all online users sorted from large to small according to the sorting weight value, for example, to obtain user 2 and user 3.
[0078] Then, the first subsystem is requested to obtain the user information of these online users to assemble into an audience list.
[0079] S23, paging the audience list according to the preset rules to generate audience list paging sets, for example, paging and cutting the generated complete audience list according to the preset pageSize, for example, 20, to generate multiple paging lists. For example, if there are only 2 users at present, it is cut into 1 paging list, and if there are 25 users at present, it is cut into 2 paging lists, where the first page is 20 data and the second page is 5 data, and these paging data are written into room_audience_list_888: [key=room_audience_list_888, field=1 (page number), value=page 1 audience list data], [key=room_audience_list_888, field=2 (page number), value=page 2 audience list data], and so on.
[0080] Here, if the data obtained by room_user_888 is empty, it means that since the last task, the remaining users in the room have also exited the live broadcast room, so you can save [key=room_audience_list_888, field=1(page number), value=empty list].
[0081] In one or more embodiments, the audience list management method of the present disclosure further includes: after step S23 is completed, the second subsystem user client or web traffic device sends a subject message: the audience list of room 888 has been updated.
[0082] In one or more embodiments, the audience list management method of the present disclosure further includes: after all the room numbers that have undergone data change operations are generated into an audience list paging set, the room numbers in the room set are cleared. For example, after all the room numbers obtained in step S21 are executed in steps S22 and S23 in this task, all members in update_room are cleared, indicating that the audience lists of all rooms that have undergone data changes since the last task have been regenerated.
[0083] S24, determine the room number and page number for generating the audience list paging set, for example, when the audience list is initialized for the first time on the client or web page, or when the client or web page traffic device receives a message that the audience list has been updated, submit the current room number xxx and page number yyy.
[0084] In one or more embodiments, for example, the initialization generation and update operations of the audience list are distributed to multiple servers to achieve load balancing. For example, a message queue can be used to coordinate the task allocation and collection of processing results between different servers.
[0085] In one or more embodiments, for example, a distributed cache system is used to store the audience list information to reduce the pressure on the database, and a cache invalidation policy is set to ensure the real-time nature of the data; a message queue is used to asynchronously process the entry and exit operations of the user, where the message queue can buffer sudden high-concurrency requests and smooth the system load; the audience list initialization generation and update services are split into microservices, which are independently deployed and expanded, and the microservices communicate with each other through an API gateway to achieve service decoupling and independent expansion; a load balancer is deployed at the front end of the server, and requests are dynamically allocated to different servers according to the load of the server; here, for example, the database can also be sharded to distribute the data to different servers to evenly distribute the load; here, for example, a core node can be set up to process global data, an edge node can be set up to process local data, the audience can interact with the nearest edge node, and the edge node can be synchronized with the core node regularly; here, for example, incremental synchronization of data can be achieved instead of full synchronization to reduce the amount of data transmission, and timestamps or version numbers can be used to control data synchronization; here, for example, the load of the service can also be monitored in real time, and when the load exceeds the threshold, the service instance can be automatically expanded.
[0086] S25, query the corresponding audience list according to the room number and page number and return the result, for example, query the generated audience list through [key=room_audience_list_xxx, field=yyy] and return it to the client or web page. Here, if the returned result is empty, it means that there is no audience in the room and the page number, and the client or web page displays an empty list.
[0087] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0088] Viewer list management device
[0089] In order to implement the technical solution in the embodiment of the present disclosure, an embodiment of the present disclosure provides a viewer list management device, such as Figure 3 As shown, it includes, for example, a room set scanning module 301, a user set query module 302, an audience list paging set generating module 303, and an audience list returning module 304. Of course, the audience list management device may also include other functional operation modules.
[0090] The room set scanning module 301 is used to scan the room set where data change operations have occurred to obtain the room number where the data change operation has occurred; here, the room set scanning module 301 can, for example, implement the corresponding functions or technical solutions in step S21 or other steps in the above method, which will not be repeated here.
[0091] Here, the data change operation includes, for example, at least one of entering, exiting, changing user information, and changing sorting priority.
[0092] In one or more embodiments, user information is processed by the first subsystem, and audience list management is processed by the second subsystem. When the data change operation is to change user information, the device is also used for: the first subsystem sends the corresponding subject message and content; the second subsystem receives the subject message and content; queries all room numbers where the user is located; determines the room set where the data change operation occurs based on the room number; wherein the second subsystem instantly receives the subject message and content sent by the first subsystem through the long connection message system.
[0093] The user set query module 302 is used to query the user set in each room number and generate an audience list based on the user data combination of the user set; here, the user set query module 302 can, for example, implement the corresponding functions or technical solutions in step S22 or other steps in the above method, which will not be repeated here.
[0094] The audience list paging set generation module 303 is used to generate an audience list paging set by paging the audience list according to preset rules; here, the audience list paging set generation module 303 can, for example, implement the corresponding functions or technical solutions in step S23 or other steps in the above method, which will not be repeated here.
[0095] The audience list returning module 304 is used to determine the room number and page number of the generated audience list paging set, query the corresponding audience list according to the room number and page number and return the result; here, the audience list returning module 304 can, for example, implement the corresponding functions or technical solutions in steps S24 and S25 or other steps in the above method, which will not be repeated here.
[0096] It should be understood that, although each box in the block diagram of the accompanying drawings may represent a module, a part of which contains one or more executable instructions for implementing a specified logical function, these modules are not necessarily executed in sequence. The modules and functional units in the device embodiments disclosed herein may be integrated into a processing module, or each unit may exist physically separately, or two or more modules or functional units may be integrated into one module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0097] Computer equipment
[0098] Reference below Figure 4 , which shows a schematic diagram of the structure of a computer device suitable for implementing the embodiment of the present disclosure. The computer device in the embodiment of the present disclosure is only an example and should not bring any limitation to the function and scope of use of the embodiment of the present disclosure.
[0099] like Figure 4 As shown, the electronic device 400 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 401 for controlling the overall operation of the electronic device. The processing device may include one or more processors to execute instructions to complete all or part of the steps of the above method. In addition, the processing device 401 may also include one or more modules for processing and interacting with other devices.
[0100] The storage device 402 is used to store various types of data. The storage device 402 may include various types of computer-readable storage media or combinations thereof, such as electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, device, or component.
[0101] The sensor device 403 is used to sense the specified measured information and convert it into a usable output signal according to a certain rule, and may include one or more sensors. For example, it may include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor, etc., for detecting changes in the opening / closing state, relative positioning, acceleration / deceleration, temperature, humidity and light of the electronic device.
[0102] The processing device 401 , the storage device 402 , and the sensor device 403 are connected to each other via a bus 404 . An input / output (I / O) interface 405 is also connected to the bus 404 .
[0103] The multimedia device 406 may include input devices such as a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, etc. for receiving input signals from a user. The various input devices may cooperate with the various sensors of the above-mentioned sensor device 403 to complete, for example, gesture operation input, image recognition input, distance detection input, etc. The multimedia device 406 may also include output devices such as a liquid crystal display (LCD), a speaker, a vibrator, etc.
[0104] The power supply device 407 is used to provide power to various devices in the electronic device, and may include a power management system, one or more power supplies, and components for distributing power to other devices.
[0105] The communication device 408 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data.
[0106] The above-mentioned devices can also be connected to the I / O interface 405 to implement the application of the electronic device 400.
[0107] Although the electronic device with various devices is shown in the figure, it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0108] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0109] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
[0110] It should be noted that the above-mentioned computer-readable medium of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. In the present disclosure, the computer-readable signal medium may include a data signal propagated in the baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in combination with an instruction execution system, device or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0111] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0112] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0114] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0115] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0116] According to one or more embodiments of the present disclosure, a method for managing a viewer list is provided, which adopts the following technical solution, including:
[0117] Scan the room set where data change operations have occurred to obtain the room numbers where data change operations have occurred;
[0118] Querying the user set in each of the room numbers, and generating a viewer list based on the user data combination of the user set;
[0119] Divide the audience list into pages according to preset rules to generate an audience list page set;
[0120] Determine the room number and page number for generating the audience list paging set;
[0121] Query the corresponding audience list according to the room number and page number and return the result;
[0122] The data change operation includes at least one of entering, exiting, changing user information, and changing sorting priority.
[0123] According to one or more embodiments of the present disclosure, a method for managing a viewer list is provided, which adopts the following technical solution, including:
[0124] When the data change operation is the entry or exit, the method further includes:
[0125] Changing the user set of the room;
[0126] Changing the room set in which the user is currently located;
[0127] The room set where the data change operation occurs is changed.
[0128] According to one or more embodiments of the present disclosure, a method for managing a viewer list is provided, which adopts the following technical solution, including:
[0129] The user data is processed by the first subsystem, and the viewer list management is processed by the second subsystem;
[0130] When the data modification operation is the modification of user data, the method further includes:
[0131] The first subsystem sends the corresponding subject message and content;
[0132] The second subsystem receives the subject message and content;
[0133] Query all room numbers where the user is located;
[0134] The room set where the data change operation occurs is determined according to the room number.
[0135] According to one or more embodiments of the present disclosure, a method for managing a viewer list is provided, which adopts the following technical solution, including:
[0136] The second subsystem instantly receives the subject message and content sent by the first subsystem through the long connection message system.
[0137] According to one or more embodiments of the present disclosure, a method for managing a viewer list is provided, which adopts the following technical solution, including:
[0138] When the data change operation is the change sorting priority, the method further includes:
[0139] Query all room numbers where the user is located;
[0140] Changing the user set of the room according to the room number;
[0141] The room set where the data change operation occurs is determined according to the room number.
[0142] According to one or more embodiments of the present disclosure, a method for managing an audience list is provided, which adopts the following technical solution and further includes:
[0143] After all the acquired room numbers that have undergone data change operations are generated into a paged set of audience lists, the room numbers in the room set are cleared.
[0144] According to one or more embodiments of the present disclosure, a viewer list management device is provided, which adopts the following technical solution, including:
[0145] A room set scanning module is used to scan the room set where data change operations have occurred to obtain the room number where data change operations have occurred;
[0146] A user set query module, used to query the user set in each room number, and generate a viewer list according to the user data combination of the user set;
[0147] An audience list paging set generating module, used for paging the audience list according to a preset rule to generate an audience list paging set;
[0148] The audience list returning module is used to determine the room number and page number for generating the audience list paging set, query the corresponding audience list according to the room number and page number and return the result;
[0149] The data change operation includes at least one of entering, exiting, changing user information, and changing sorting priority.
[0150] According to one or more embodiments of the present disclosure, a viewer list management device is provided, which adopts the following technical solution, including:
[0151] The user data is processed by the first subsystem, and the viewer list management is processed by the second subsystem;
[0152] When the data modification operation is the modification of user data, the device is further used for:
[0153] The first subsystem sends the corresponding subject message and content;
[0154] The second subsystem receives the subject message and content;
[0155] Query all room numbers where the user is located;
[0156] Determine the room set where the data change operation occurs according to the room number;
[0157] The second subsystem instantly receives the subject message and content sent by the first subsystem through the long connection message system.
[0158] According to one or more embodiments of the present disclosure, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the method as described in any of the preceding items is implemented.
[0159] According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any of the preceding items is implemented.
[0160] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0161] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0162] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for managing an audience list, characterized in that: include: Scan the room set where data change operations have occurred to obtain the room numbers where data change operations have occurred; Querying the user set in each room number, and generating a viewer list based on the user profile combination of the user set; Divide the audience list into pages according to preset rules to generate an audience list page set; Determining the room number and page number for generating the audience list pagination set; Query the corresponding audience list according to the room number and page number and return the result; Wherein, the data change operation at least includes entering or exiting, When the data change operation is a user entering or exiting a room, the method further includes: Changing the user set of the room according to the room number and user ID corresponding to the room; Changing the room set in which the user is currently located according to the user ID and the room number in which the user is currently located; Changing the room set where the data change operation occurs according to the room number; The user data is processed by the first subsystem, and the viewer list management is processed by the second subsystem; By adopting a message queue, the task allocation and processing result collection between different servers are coordinated, and the user's entry or exit operations are processed asynchronously to buffer sudden high-concurrency requests and smooth the system load; the user information of the online user is obtained through the first subsystem to combine into an audience list, and the audience list is paged according to preset rules to generate an audience list page set. The second subsystem user client or web traffic device sends a topic message to confirm that the audience list has been updated, so as to achieve the decoupling and independent expansion of the audience list initialization generation and update services.
2. The method for managing an audience list according to claim 1, wherein: The data change operation also includes changing user information, When the data modification operation is the modification of user information, the method further includes: The first subsystem sends the corresponding topic message and content; The second subsystem receives the subject message and content; Query all room numbers where the user is located; The room set where the data change operation occurs is determined according to the room number.
3. The method for managing an audience list according to claim 2, wherein: The second subsystem instantly receives the subject message and content sent by the first subsystem through the long connection message system.
4. The method for managing an audience list according to claim 1, wherein: The data change operation also includes changing the user sorting priority. When the data change operation is to change the user sorting priority, the method further includes: Query all room numbers where the user is located; Changing the user set of the room corresponding to the room number according to the room number; The room set where the data change operation occurs is determined according to the room number.
5. The method for managing an audience list according to claim 1, wherein: Also includes: After all the acquired room numbers that have undergone data change operations are generated into a paged set of audience lists, the room numbers in the room set are cleared.
6. A viewer list management device, used to implement the method according to any one of claims 1 to 5, characterized in that: include: The room set scanning module is used to scan the room set where data change operations have occurred to obtain the room number where data change operations have occurred; A user set query module is used to query the user set in each room number and generate an audience list based on the user data combination of the user set; An audience list paging set generating module, configured to paginate the audience list according to a preset rule to generate an audience list paging set; The audience list returning module is used to determine the room number and page number for generating the audience list paging set, query the corresponding audience list according to the room number and page number, and return the result.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 5.
