Live broadcast room data paging method and its device, equipment and medium
By adopting data paging methods and data feature code mechanisms in the live broadcast platform, the performance problems of the live broadcast platform when processing a large number of live broadcast information requests are solved, achieving more efficient data processing and a more stable user experience.
Patent Information
- Application Number
- CN202210470830.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-04-28
AI Technical Summary
When existing Internet live broadcast platforms handle large amounts of live broadcast room information requests, they can easily lead to server downtime and link blockage, affecting the user experience.
The live broadcast room data paging method is adopted to store live broadcast room information through the data paging pool, and generate data feature codes for each data page, respond to timed refresh and live broadcast status update events, and optimize the data update and query process.
It effectively reduces network bandwidth consumption, improves data acquisition efficiency, improves the stability of online services, and optimizes the data update efficiency of data paging pool.
Smart Images

Figure CN114969106B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method for paging data in a live broadcast room, and also to corresponding devices, equipment and non-volatile storage media of the method. Background Art
[0002] Existing Internet live broadcast platforms generally collect the live broadcast room information of each live broadcast room currently performing live broadcast business in the platform, so that the Internet live broadcast platform can build corresponding online services in the platform based on the live broadcast room information. For example, online services such as live broadcast room recommendation online services, live broadcast room ranking online services or live broadcast room browsing online services are provided to platform users in the platform to enhance the user experience of the platform users.
[0003] Most Internet live broadcast platforms usually store the information of each live broadcast room in the platform in a corresponding database. The calling end of the online service directly obtains the live broadcast room information from the database through a data communication link for use. However, when different calling ends push requests to the server with the database to obtain data at a high rate, the server often crashes due to the need to respond to a large number of requests, and the huge amount of data transmission will cause link congestion, which causes the online services to be unable to operate due to the inability to obtain the live broadcast room information, thereby affecting the user experience of the platform.
[0004] In view of the problems existing in the storage of live broadcast room information in the existing live broadcast platform, the applicant has made corresponding explorations in order to solve the problem. Summary of the invention
[0005] The purpose of this application is to provide a live broadcast room data paging method to meet user needs. In addition, it also involves corresponding devices, equipment, non-volatile storage media and computer program products of this method.
[0006] In order to achieve the purpose of this application, the following technical solutions are adopted:
[0007] A live broadcast room data paging method proposed for the purpose of this application includes the following steps:
[0008] Obtain a full set of live broadcast room information in the cache space, allocate and store each live broadcast room information to a corresponding data page in a data paging pool according to the live broadcast room channel number of each live broadcast room information in the full set of live broadcast room information, and generate a data feature code for each data page according to the live broadcast room information set of each data page;
[0009] In response to the timed refresh instruction acting on the data paging pool, the data pages corresponding to the storage of each live broadcast room information of the full live broadcast room information set in the cache space are reallocated, and a new data feature code is generated for the data page updated in the live broadcast room information set, and the update record of the updated data page and its data page number are stored in the update record table in correspondence;
[0010] In response to the current live broadcast status update event of the target live broadcast room, the target live broadcast room information of the target live broadcast room is determined, so as to update the full live broadcast room information set according to the current live broadcast status of the target live broadcast room, and update the live broadcast room information set and data feature code of the data page storing the target live broadcast room information in the data paging pool, and store the update record of the data page and its data page number in the update record table in correspondence;
[0011] Respond to the data page query request pushed by the calling end, obtain the target data feature code and target data page number contained in the request, and when the data feature code of the target data page corresponding to the target data page number is the target data feature code, feedback the data consistency result, otherwise feedback the target update record of the target data page, and if the target update record does not exist, feedback the live broadcast room information set of the target data page.
[0012] In a further embodiment, the step of distributing and storing each of the live room information to a corresponding data page in a data paging pool according to the live room channel number of each live room information in the full live room information set includes the following steps performed by the server:
[0013] Obtaining the live broadcast room channel number included in the target live broadcast room information in the full live broadcast room information set;
[0014] According to a preset data page allocation algorithm, the number of data pages in the data paging pool is used as a remainder to perform a remainder operation with the live broadcast room channel number, and the remainder value is used as the target data page number;
[0015] The target data page corresponding to the target data page number in the data paging pool is queried to store the target live broadcast room information in the live broadcast room information set of the target data page.
[0016] In a further embodiment, the step of generating the data feature code of each data page according to the live broadcast room information set of each data page includes the following steps performed by the server:
[0017] Obtaining a target live broadcast room information set of a target data page in the data paging pool;
[0018] Calling a preset feature code generation algorithm to generate a data feature code corresponding to the target data page according to the target live broadcast room information set;
[0019] The data page number of the target data page and the data feature code are stored in a paging feature code table in correspondence.
[0020] In a further embodiment, the step of responding to the timed refresh instruction acting on the data paging pool and reallocating the data pages corresponding to the storage of each live broadcast room information of the full live broadcast room information set in the cache space includes the following steps performed by the server:
[0021] Determine whether the current duration exceeds the dynamic refresh duration. If so, trigger a timed refresh instruction acting on the data paging pool. The dynamic refresh duration is updated according to the full load duration and the preset refresh duration.
[0022] Acquire the current full live broadcast room information set in the cache space, and reallocate the data pages corresponding to the live broadcast room information stored in the data paging pool according to the live broadcast room channel number contained in each live broadcast room information in the full live broadcast room information set;
[0023] When the full live broadcast room information set in the cache space is updated, the full loading duration will be updated accordingly to update the dynamic refresh duration accordingly.
[0024] In a further embodiment, the step of generating a new data feature code for the data page of the live broadcast room information set that is updated at the same time, and storing the update record of the updated data page in correspondence with its data page number in the update record table includes the following steps performed by the server:
[0025] In response to a live broadcast room information set update event acting on a target data page in the data paging pool, a new data feature code is generated for the target event page;
[0026] Determine, according to the live broadcast room information respectively possessed by the unupdated live broadcast room information set and the updated live broadcast room information set of the target data page, one or more update identifiers of the updated live broadcast room information of the target data page, wherein the update identifier is a new addition identifier or a deletion identifier;
[0027] An update record including the updated live broadcast room information and the update identifier thereof is generated, and the update record and the data page number of the target data page are correspondingly stored in the update record table.
[0028] In a further embodiment, the step of responding to the current live broadcast status update event of the target live broadcast room, determining the target live broadcast room information of the target live broadcast room, and correspondingly updating the full live broadcast room information set according to the current live broadcast status of the target live broadcast room, and correspondingly updating the live broadcast room information set and data feature code of the data page storing the target live broadcast room information in the data paging pool, includes the following steps performed by the server:
[0029] In response to a current live broadcast status update event acting on a target live broadcast room, a current live broadcast status corresponding to the current live broadcast status update event is determined, and target live broadcast room information of the target live broadcast room is obtained;
[0030] When the current live broadcast state is characterized by the start of the live broadcast room, the target live broadcast room information is stored in the cache space to update the full live broadcast room information set, and according to the live broadcast room channel number of the target live broadcast room information, the target live broadcast room information is allocated and stored in the target data page corresponding to the data paging pool;
[0031] When the current live broadcast state is characterized as the live broadcast room being closed, the target live broadcast room information is deleted from the cache space, and according to the live broadcast room channel number of the target live broadcast room information, the target data page having the target live broadcast room information in the data paging pool is queried to delete the target live broadcast room information;
[0032] The data feature code of the target data page is regenerated, and the update record of the target data page is stored in the update record table.
[0033] In a further embodiment, in response to a data page query request pushed by the calling end, a target data feature code and a target data page number contained in the request are obtained, and when the data feature code of the target data page corresponding to the target data page number is the target data feature code, a data consistency result is fed back, otherwise a target update record of the target data page is fed back, and if the target update record does not exist, the live broadcast room information set of the target data page is fed back, the step includes the following steps executed by the calling end:
[0034] Pushing a data page query request acting on a target data page in a data page pool to a server, so as to obtain a request feedback result acting on the data page query request pushed by the server;
[0035] When the request feedback result contains a data consistent result, the live broadcast room information set of the target data page is pushed to the associated online service for use;
[0036] When the request feedback result includes a target update record, the live broadcast room information set of the target data page will be updated according to the target update record, and the data feature code of the target data page will be regenerated, and the updated live broadcast room information set will be pushed to the associated online service for use;
[0037] When the request feedback result includes the latest live broadcast room information set, the live broadcast room information set currently stored in the target data page is replaced with the live broadcast room information set, and the data feature code of the target data page is regenerated, and the updated live broadcast room information set is pushed to the associated online service for use.
[0038] A live broadcast room data paging device proposed for the purpose of this application includes:
[0039] A live broadcast room paging module is used to obtain a full live broadcast room information set in the cache space, and according to the live broadcast room channel number of each live broadcast room information in the full live broadcast room information set, allocate and store each live broadcast room information to a corresponding data page in the data paging pool, and generate a data feature code for each data page according to the live broadcast room information set of each data page;
[0040] A timed refresh paging module is used to respond to the timed refresh instruction acting on the data paging pool, reallocate the data pages corresponding to the storage of each live broadcast room information of the full live broadcast room information set in the cache space, and generate a new data feature code for the data page updated in the live broadcast room information set, and store the update record of the updated data page and its data page number in the update record table in correspondence;
[0041] A data page update module is used to respond to the current live broadcast status update event of the target live broadcast room, determine the target live broadcast room information of the target live broadcast room, and update the full live broadcast room information set according to the current live broadcast status of the target live broadcast room, and update the live broadcast room information set and data feature code of the data page storing the target live broadcast room information in the data paging pool, and store the update record of the data page and its data page number in the update record table in correspondence;
[0042] The query request feedback module is used to respond to the data page query request pushed by the calling end, obtain the target data feature code and the target data page number contained in the request, and feedback the data consistency result when the data feature code of the target data page corresponding to the target data page number is the target data feature code, otherwise feedback the target update record of the target data page, and if the target update record does not exist, feedback the live broadcast room information set of the target data page.
[0043] In a further embodiment, the live broadcast room paging module includes:
[0044] A live broadcast room channel acquisition submodule, used to obtain the live broadcast room channel number contained in the target live broadcast room information in the full live broadcast room information set;
[0045] A target data page number determination submodule is used to perform a remainder operation on the number of data pages in the data paging pool and the live broadcast room channel number according to a preset data page allocation algorithm, and use the remainder as the target data page number;
[0046] The target data page query submodule is used to query the target data page corresponding to the target data page number in the data paging pool, so as to store the target live broadcast room information in the live broadcast room information set of the target data page.
[0047] In a further embodiment, the live broadcast room paging module includes:
[0048] A live broadcast room information set acquisition submodule is used to acquire a target live broadcast room information set of a target data page in the data paging pool;
[0049] A feature code generation submodule, used to call a preset feature code generation algorithm to generate a data feature code corresponding to the target data page according to the target live broadcast room information set;
[0050] The feature code storage submodule is used to store the data page number of the target data page and the data feature code in a paging feature code table in correspondence with each other.
[0051] In a further embodiment, the timed refresh paging module includes:
[0052] The duration judgment submodule is used to judge whether the current duration exceeds the dynamic refresh duration. If so, a timed refresh instruction acting on the data paging pool is triggered. The dynamic refresh duration is updated according to the full load duration and the preset refresh duration.
[0053] A data page reallocation submodule is used to obtain the current full live broadcast room information set in the cache space, and reallocate the data pages corresponding to the live broadcast room information stored in the data paging pool according to the live broadcast room channel number contained in each live broadcast room information in the full live broadcast room information set;
[0054] The refresh duration update submodule is used to update the full loading duration accordingly when the full live broadcast room information set in the cache space is updated, so as to update the dynamic refresh duration accordingly.
[0055] In a preferred embodiment, the timed refresh paging module further includes:
[0056] A new feature code generation submodule is used to respond to a live broadcast room information set update event acting on a target data page in the data paging pool, and generate a new data feature code for the target event page;
[0057] An update information determination submodule, used to determine one or more update identifiers of updated live broadcast room information of the target data page according to the live broadcast room information of the unupdated live broadcast room information set and the updated live broadcast room information set of the target data page, wherein the update identifier is a new addition identifier or a deletion identifier;
[0058] The update record generation submodule is used to generate an update record including the updated live broadcast room information and the update identifier, and store the update record and the data page number of the target data page in the update record table accordingly.
[0059] In a further embodiment, the data page update module includes:
[0060] The current live broadcast status update submodule is used to respond to the current live broadcast status update event acting on the target live broadcast room, determine the current live broadcast status corresponding to the current live broadcast status update event, and obtain the target live broadcast room information of the target live broadcast room;
[0061] A live broadcast room start processing submodule is used for storing the target live broadcast room information into the cache space to update the full live broadcast room information set when the current live broadcast state is characterized as live broadcast room start, and according to the live broadcast room channel number of the target live broadcast room information, allocating and storing the target live broadcast room information into the target data page corresponding to the data paging pool;
[0062] A live broadcast room closing processing submodule is used for deleting the target live broadcast room information from the cache space when the current live broadcast state is characterized as the live broadcast room being closed, and querying the target data page having the target live broadcast room information in the data paging pool according to the live broadcast room channel number of the target live broadcast room information to delete the target live broadcast room information;
[0063] The feature code new generation submodule is used to regenerate the data feature code of the target data page and store the update record of the target data page in the update record table.
[0064] In a further embodiment, the query request feedback module includes:
[0065] A request feedback result acquisition submodule is used to push a data page query request acting on a target data page in a data page pool to a server, so as to obtain a request feedback result acting on the data page query request pushed by the server;
[0066] A data consistency processing submodule, used for pushing the live broadcast room information set of the target data page to the associated online service for use when the request feedback result contains a data consistency result;
[0067] A data update processing submodule, which is used to update the live broadcast room information set of the target data page according to the target update record when the request feedback result includes a target update record, regenerate the data feature code of the target data page, and push the updated live broadcast room information set to the associated online service for use;
[0068] The data replacement processing submodule is used to replace the live broadcast room information set currently stored in the target data page with the live broadcast room information set when the request feedback result contains the latest live broadcast room information set, regenerate the data feature code of the target data page, and push the updated live broadcast room information set to the associated online service for use.
[0069] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the above-mentioned live broadcast room data paging method.
[0070] In order to solve the above technical problems, an embodiment of the present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the above-mentioned live broadcast room data paging method.
[0071] In order to solve the above technical problems, an embodiment of the present application also provides a computer program product, including a computer program and computer instructions. When the computer program and computer instructions are executed by a processor, the processor executes the steps of the above-mentioned live broadcast room data paging method.
[0072] Compared with the prior art, the advantages of this application are as follows:
[0073] The present application constructs a data paging pool to store the information of each live broadcast room in the live broadcast platform in pages, so as to prevent the online service business of the calling end from timing out due to the excessive amount of data requested by the calling end for the live broadcast platform for the live broadcast room information, and the server will generate a data feature code representing the data characteristics stored in each data page in the data paging pool for the calling end. The server can judge whether the live broadcast room information set stored in the data page requested by the calling end is updated by pushing the data feature code to the calling end, and thus there is no need to push the live broadcast room information it already has to the calling end, which greatly reduces the consumption of network bandwidth, and the server will record the update record of the updated data page, and then by pushing the update record of the data page requested by the calling end to the calling end, the calling end only needs to update its data page according to the update record, without having to push the full amount of live broadcast room information after the data page is updated, which can effectively improve the data acquisition efficiency of the calling end, thereby saving transmission traffic and improving the stability of online services.
[0074] Secondly, when performing paging storage of the live broadcast room information, the present application will allocate data pages according to the live broadcast room channel number of each live broadcast room information to ensure the uniqueness of the live broadcast room information stored in the data paging pool, and when updating the live broadcast room information in the data paging pool, it is only necessary to locate the data page according to the live broadcast room channel number of the live broadcast room information to be updated, without traversing each data page in the data paging pool, thereby realizing partial update of the data paging pool, thereby improving the data update efficiency of the data paging pool.
[0075] In addition, this application will monitor the live broadcast status of the live broadcast room in the platform in real time. When any live broadcast room starts or closes the live broadcast service, the full live broadcast room information stored in the cache space and the live broadcast room information stored in the data paging pool will be updated immediately to ensure the timeliness and effectiveness of the live broadcast room information.
[0076] Furthermore, this application will periodically refresh the live broadcast room information stored in the data paging pool to correct the data consistency between the live broadcast room information stored in the data paging pool and the full live broadcast room information stored in the cache space, and perform data consistency protection to ensure the timeliness of the data stored in each data page in the data paging pool. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0078] Figure 1 A schematic diagram of a typical network deployment architecture related to implementing the technical solution of this application;
[0079] Figure 2 This is a flowchart of a typical embodiment of the live broadcast room data paging method of the present application;
[0080] Figure 3 A flowchart of a specific implementation method for allocating data pages for live broadcast room information in this application;
[0081] Figure 4 A flowchart of a specific implementation method for generating a data feature code for a data page in this application;
[0082] Figure 5 A flowchart diagram of a specific implementation method for responding to a timed refresh event of a target data page in this application;
[0083] Figure 6 A flowchart of a specific implementation method for generating an update record of an updated data page in the present application;
[0084] Figure 7 A flowchart of a specific implementation method for responding to a current live broadcast status update event of a target live broadcast room in this application;
[0085] Figure 8 A flowchart formed by a specific implementation method of updating the live broadcast room information set of its own data page according to the feedback result in the present application;
[0086] Fig. 9 This is a principle block diagram of a typical embodiment of the live broadcast room data paging device of the present application;
[0087] Fig.10 This is a basic structural block diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0088] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.
[0089] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0090] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0091] It will be understood by those skilled in the art that the "client", "terminal" and "terminal device" used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capabilities, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of two-way communication on a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers, tablet computers, which have single-line displays or multi-line displays or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service, personal communication system), which can combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant, personal digital assistant), which may include a radio frequency receiver, pager, Internet / intranet access, web browser, notepad, calendar and / or GPS (Global Positioning System, global positioning system) receiver; traditional laptop and / or palmtop computers or other devices, which have and / or include radio frequency receivers. The "client", "terminal" and "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or suitable for and / or configured to run locally, and / or in a distributed form, at any other location on the earth and / or in space. The "client", "terminal" and "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playing terminal, for example, a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or a smart TV, a set-top box and other devices.
[0092] The hardware referred to by the names such as "server", "client", and "work node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. The computer program is stored in its memory, and the central processing unit calls the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.
[0093] It should be pointed out that the concept of "server" referred to in this application can also be extended to the case of server clusters. According to the network deployment principle understood by those skilled in the art, the servers should be logically divided. In physical space, these servers can be independent of each other but can be called through interfaces, or integrated into a physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility, and should not use it to restrict the implementation of the network deployment method of this application.
[0094] See also Figure 1 , the hardware foundation required for the implementation of the relevant technical solutions of this application can be deployed according to the architecture shown in the figure. The server 80 referred to in this application is deployed in the cloud. As an online server, it can be responsible for further connecting relevant data servers and other servers that provide relevant support, etc., so as to form a logically related service cluster to provide services for related terminal devices such as the smartphone 81 and personal computer 82 shown in the figure or a third-party server (not shown). The smartphone and personal computer can access the Internet through a well-known network access method and establish a data communication link with the server 80 in the cloud to run terminal applications related to the services provided by the server.
[0095] For the server, the application is usually constructed as a service process, opening the corresponding program interface for remote calls by applications running on various terminal devices. The relevant technical solutions suitable for running on the server in this application can be implemented in the server in this way.
[0096] The application described herein refers to an application running on a server or terminal device. This application implements the relevant technical solutions of the present application in a programming manner. Its program code can be stored in a non-volatile storage medium recognizable by a computer in the form of computer executable instructions, and can be loaded into the memory by the central processing unit for execution. The relevant device of the present application is constructed by the operation of the application on the computer.
[0097] For the server, the application is usually constructed as a service process, opening the corresponding program interface for remote calls by applications running on various terminal devices. The relevant technical solutions suitable for running on the server in this application can be implemented in the server in this way.
[0098] Those skilled in the art should be aware that, although the various methods of the present application are described based on the same concept and thus present commonality to each other, unless otherwise specified, these methods can be independently executed. Similarly, for each embodiment disclosed in the present application, they are all proposed based on the same inventive concept, therefore, concepts with the same expression, and concepts that are appropriately changed for convenience despite different expressions, should be understood as equivalent.
[0099] See also Figure 2 A live broadcast room data paging method of the present application, in its typical embodiment, comprises the following steps:
[0100] Step S11, obtaining the full live broadcast room information set in the cache space, and according to the live broadcast room channel number of each live broadcast room information in the full live broadcast room information set, allocating and storing each live broadcast room information to the corresponding data page in the data paging pool, and generating data feature codes for each data page according to the live broadcast room information set of each data page:
[0101] The server obtains the full live broadcast room information set in the cache space, and allocates the multiple live broadcast room information contained in the full live broadcast room information set to the corresponding data pages in the data paging pool for storage.
[0102] The cache space is used to cache the complete live room information set, and the server obtains it from the live broadcast database that stores the complete live room information set. The live broadcast platform stores the live room information set of each live room in the platform into the live broadcast database to form the complete live room information set, so that the server can obtain the complete live room information set from the live broadcast database for paged storage periodically or in response to corresponding events.
[0103] The full live broadcast room information set generally only contains the live broadcast room information of the live broadcast room currently conducting live broadcast business on the live broadcast platform. The live broadcast room information includes the live broadcast room feature information and anchor user feature information of the corresponding live broadcast room, wherein the live broadcast room feature information includes the live broadcast room channel number, the number of live broadcast room fans and the number of live broadcast room viewers, etc., and the anchor user feature information includes the anchor user ID and the anchor user device feature code, etc.
[0104] After the server obtains the full live room information set from the cache space, it will parse the full live room information set to obtain the multiple live room information contained therein, and then obtain the live room channel numbers contained in each of the live room information, and then allocate the corresponding data pages in the data page pool for storage for the live room information according to the respective live room channel numbers of the live room information. Specifically, after the server obtains the live room channel number contained in any live room information, it will use the preset data page allocation algorithm to take the number of data pages in the data page pool as the remainder and perform a remainder operation with the live room channel number, and use the remainder value as the target data page number to query the target data page corresponding to the target data page number in the data page pool, so as to store the live room information in the live room information set of the target data page. Of course, the data page corresponding to the live room information can also be determined according to the data page allocation algorithm based on the anchor user ID or anchor user device feature code contained in the live room information.
[0105] The data paging pool has multiple preset data pages so that the multiple live broadcast room information included in the full live broadcast room information set can be stored in the corresponding data pages, wherein the data page generally stores a live broadcast room information set composed of multiple live broadcast room information, and the server stores the data page number of each data page in the data paging pool and the live broadcast room information set it has in the data paging table for recording.
[0106] After the server initially allocates and stores the live broadcast room information contained in the full live broadcast room information set to the corresponding data pages in the data paging pool, it will generate data feature codes corresponding to each of the data pages based on the live broadcast room information sets stored in these data pages. The data feature codes generally refer to md5 feature codes, which are used to characterize the data features of the live broadcast room information stored in the data pages. After the server generates corresponding data feature codes for each of the data pages, it stores the data page numbers of the data pages in correspondence with the data feature codes in the paging feature code table, so that the server can determine whether the live broadcast room information sets stored in each of the data pages have been updated through the paging feature code table.
[0107] Step S12, in response to the timed refresh instruction acting on the data paging pool, reallocate the data pages corresponding to the storage of each live broadcast room information of the full live broadcast room information set in the cache space, and generate a new data feature code for the data page updated in the live broadcast room information set, and store the update record of the updated data page and its data page number in the update record table in correspondence:
[0108] The server responds to the timed refresh instruction acting on the data paging pool to reallocate the data pages corresponding to the storage of each live room information in the full live room information set currently stored in the cache space to ensure that the live room information set stored in the data page is the latest live room information set.
[0109] The timed refresh instruction is generally triggered by the server performing timed monitoring after completing the initial data page allocation and storage of the full live room information, so as to obtain the latest full live room information from the cache space for paging storage at regular intervals. Specifically, the server determines whether the current duration exceeds the dynamic refresh duration. If it exceeds, the timed refresh instruction acting on the data paging pool is triggered to obtain the current full live room information set in the cache space, and then according to the live room channel number contained in each live room information in the full live room information set, the data page corresponding to the storage of each live room information in the data paging pool is reallocated; wherein the dynamic refresh duration is updated according to the full loading duration and the preset refresh duration, and the refresh duration is generally set within a time range of 3 to 5 seconds. Correspondingly, when the server monitors that the full live room information set in the cache space is updated, the full loading duration will be updated accordingly to update the dynamic refresh duration accordingly.
[0110] After the server responds to the timed refresh instruction and completes the paging storage of the full live room information set recently obtained from the cache space, it will determine one or more data pages in the live room information set stored in the data paging pool that have been updated, so as to generate new data feature codes for these data pages for replacement and update, and simultaneously obtain the update records corresponding to these data pages, wherein the update records record the live room information in which the live room information set has been updated, and these live room information have corresponding update identifiers, wherein the update identifiers are new addition identifiers or deletion identifiers, so as to indicate that the corresponding live room information is new data or deleted data, and each of the update records and the data page numbers of its data pages are stored in the update record table accordingly.
[0111] Step S13, responding to the current live broadcast status update event of the target live broadcast room, determining the target live broadcast room information of the target live broadcast room, and correspondingly updating the full live broadcast room information set according to the current live broadcast status of the target live broadcast room, and correspondingly updating the live broadcast room information set and data feature code of the data page storing the target live broadcast room information in the data paging pool, and storing the update record of the data page and its data page number in the update record table in correspondence:
[0112] After the server initially obtains the full set of live broadcast room information from the cache space and completes paging storage, it will respond to the current live broadcast room status update event of any live broadcast room in the live broadcast platform. Specifically, after any live broadcast room in the live broadcast platform starts the live broadcast service, it will trigger the current live broadcast room status update event acting on the live broadcast room to change the live broadcast status of the live broadcast room from offline to online. Correspondingly, when any live broadcast room stops the live broadcast service, it will trigger the current live broadcast room update event acting on the live broadcast room to change the live broadcast status of the live broadcast room from online to offline. Then, the server responds to the current live broadcast status update event of the live broadcast room whose live broadcast status is updated to update the live broadcast room information set of the data page storing the live broadcast room information of the live broadcast room accordingly.
[0113] After the server responds to the current live broadcast status update event acting on the target live broadcast room, it will obtain the current live broadcast status of the target live broadcast room and determine the target live broadcast room information corresponding to the target live broadcast room. When the current live broadcast status is characterized by the live broadcast room being on, the target live broadcast room information is stored in the cache space to update the full live broadcast room information set, and according to the live broadcast room channel number of the target live broadcast room information, the target live broadcast room information is allocated and stored in the target data page corresponding to the data paging pool; when the current live broadcast status is characterized by the live broadcast room being closed, the target live broadcast room information will be deleted from the cache space, and according to the live broadcast room channel number of the target live broadcast room information, the target data page with the target live broadcast room information in the data paging pool will be queried to delete the target live broadcast room information.
[0114] After the server completes the live broadcast room information set of the target data page storing the target live broadcast room information, it will regenerate the data feature code of the target data page and store the update record of the target data page in the update record table.
[0115] Step S14, responding to the data page query request pushed by the calling end, obtaining the target data feature code and the target data page number contained in the request, and feeding back the data consistency result when the data feature code of the target data page corresponding to the target data page number is the target data feature code, otherwise feeding back the target update record of the target data page, and if the target update record does not exist, feeding back the live broadcast room information set of the target data page:
[0116] After the server completes allocating the information of each live broadcast room in the full live broadcast room information set to the corresponding data page in the data paging pool for storage, it will open the data page query service to the calling end that establishes a data communication link with the server, so that the calling end can push the data page query request to the server to query whether the live broadcast room information set stored in the corresponding target data page is updated, so that the calling end can synchronize the data of the live broadcast room information set of the target data page in its own data paging pool.
[0117] The data page query request includes the data page code of the target data page and its corresponding data feature code. The data page query request is triggered and pushed by the calling end to respond to the data synchronization event of the target data page in its own data paging pool at a regular interval, or when the online service corresponding to the calling end needs to call the live broadcast information set of any data page in the data paging pool of the calling end itself, the calling end page will trigger the generation of the data page query request acting on the data page for push, so as to ensure the data validity of the live broadcast information set called by the online service; when generating the data page query request for the target data page, the calling end will obtain the data feature code of the target data page from its own paging feature code table, so as to encapsulate the data feature code and the data page code of the target data page to generate the data page query request acting on the target data page for push.
[0118] The calling end has its own data paging pool and a corresponding paging feature code table. The paging structure of the data paging pool of the calling end is the same as the paging structure of the data paging pool of the server, and the live broadcast room information set stored in each data page in the data paging pool of the calling end and the live broadcast room information set stored in the data page of the data paging pool of the server need to maintain data synchronization. Correspondingly, the paging feature code table of the calling end also needs to ensure data synchronization. For this purpose, the calling end needs to push the data page query request to the server to ensure the data validity of the live broadcast room information and data feature code stored therein.
[0119] After receiving the data page query request, the server will parse the data page query request to obtain the target data page number and the target data feature code contained therein. First, the server will query the mapping relationship data with the target data page number in the paging feature code table to determine whether the data feature code stored in the mapping relationship data is the target data feature code. If so, it indicates that the live broadcast room information set stored in the target data page corresponding to the target data page number has not been updated. The server will push the data consistency result indicating that the target data page is the live broadcast room information set that has not been updated to the calling end, so that the calling end can determine that the live broadcast room information set stored in the target data page in its own data paging pool has not been updated, and then push the live broadcast room information set as the latest data to its associated online service for business use.
[0120] When the server determines that the data feature code of the target data page corresponding to the target data page number is not the target data feature code, it indicates that the live broadcast room information set stored in the target data page has been updated, and the server queries whether there is a target update record corresponding to the target data page in the update record table. If so, the target update record is pushed to the calling end, so that the calling end updates the live broadcast room information set of the target data page number in its own data paging pool according to the target update record, and generates a new data feature code for the target data page and stores it in its own paging feature code table, and then pushes the updated live broadcast room information set to its associated online service for business use.
[0121] If the server cannot query the target update record of the target data page corresponding to the target data page number from the update record table, it will obtain the target live broadcast room information set stored in the target data page number from the data paging pool, and then push the target live broadcast room information set to the calling end, so that the calling end can replace the live broadcast room information set stored in the target data page in its own data paging pool with the target live broadcast room information set, and generate a new data feature code for the target data page and store it in its own paging feature code table, so as to push the target information set to its associated online service for business use.
[0122] Through the typical implementation of the method, it can be known that the method constructs a data paging pool to store the information of each live broadcast room in the live broadcast platform in pages, so as to prevent the online service business of the calling end from timing out due to the excessive amount of data requested by the calling end for the live broadcast platform for the live broadcast room information, and the server will generate a data feature code representing the data characteristics stored in each data page in the data paging pool for the calling end. The server can judge whether the live broadcast room information set stored in the data page requested by it is updated by pushing the data feature code to the calling end, and then there is no need to push the live broadcast room information it already has to the calling end, which greatly reduces the consumption of network bandwidth, and the server will record the update record of the updated data page, and then by pushing the update record of the data page requested by it to the calling end, the calling end only needs to update its data page according to the update record, without pushing the full amount of live broadcast room information after the data page is updated, which can effectively improve the data acquisition efficiency of the calling end, thereby saving transmission traffic and improving the stability of online services.
[0123] Secondly, when performing paging storage of the live broadcast room information, this method will allocate data pages according to the live broadcast room channel number of each live broadcast room information to ensure the uniqueness of the live broadcast room information stored in the data paging pool, and when updating the live broadcast room information in the data paging pool, it is only necessary to locate the data page according to the live broadcast room channel number of the live broadcast room information to be updated, without traversing each data page in the data paging pool, thereby realizing partial update of the data paging pool, thereby improving the data update efficiency of the data paging pool.
[0124] In addition, this method will monitor the live broadcast status of the live broadcast room in the platform in real time. When any live broadcast room starts or closes the live broadcast service, the full live broadcast room information stored in the cache space and the live broadcast room information stored in the data paging pool will be updated immediately to ensure the timeliness and effectiveness of the live broadcast room information.
[0125] Furthermore, this method will periodically refresh the live broadcast room information stored in the data paging pool to correct the data consistency between the live broadcast room information stored in the data paging pool and the full live broadcast room information stored in the cache space, and perform data consistency protection to ensure that the data stored in each data page in the data paging pool is timely.
[0126] The above typical embodiments and their variations fully reveal the implementation scheme of the live broadcast room data paging method of the present application. However, various variations of the method can still be derived by changing and amplifying some technical means. Other embodiments are briefly described as follows:
[0127] In one embodiment, please refer to Figure 3 , the step of allocating and storing each of the live broadcast room information to a corresponding data page in a data paging pool according to the live broadcast room channel number of each live broadcast room information in the full live broadcast room information set includes the following steps executed by the server:
[0128] Step S111, obtaining the live broadcast room channel number included in the target live broadcast room information in the full live broadcast room information set:
[0129] After the server obtains the full live room information set from the cache space, it will obtain the live room information contained in the full live room information set to parse the live room information and obtain the live room channel number contained in each of the live room information.
[0130] Step S112, according to a preset data page allocation algorithm, the number of data pages in the data page pool is used as the remainder and the live broadcast room channel number is used for a remainder operation, and the remainder value is used as the target data page number:
[0131] After the server obtains the live broadcast room channel number contained in the target live broadcast room information, it will calculate the data page number of the target data page corresponding to the target live broadcast room information according to the preset data page allocation algorithm.
[0132] The calculation formula of the data page allocation algorithm is as follows:
[0133] pageNum=CID%N+1
[0134] Among them, CID refers to the live broadcast room channel number, N is the number of data pages in the data paging pool, and pageNum is the target data page number.
[0135] Step S113, querying the target data page corresponding to the target data page number in the data paging pool, so as to store the target live broadcast room information in the live broadcast room information set of the target data page:
[0136] After the server obtains the target data page number corresponding to the live broadcast room channel number, it will query the target data page corresponding to the target data page number in the data paging pool, and then store the target live broadcast room information in the target data page.
[0137] In this embodiment, the corresponding data page is determined for storage through the live broadcast room channel number included in the live broadcast room information, thereby improving the allocation efficiency of the data page and ensuring the uniqueness of the live broadcast room information in the data paging pool.
[0138] In one embodiment, please refer to Figure 4 The step of generating the data feature code of each data page according to the live broadcast room information set of each data page includes the following steps executed by the server:
[0139] Step S111', obtaining the target live broadcast room information set of the target data page in the data paging pool:
[0140] After the server completes the data page allocation of the full live broadcast room information, it will obtain the live broadcast room information set stored in each data page in the data paging.
[0141] Step S112', calling a preset feature code generation algorithm, and generating a data feature code corresponding to the target data page according to the target live broadcast room information set:
[0142] After the server obtains the live broadcast room information set of each of the data pages, it will call the preset feature code generation algorithm to generate the data feature code corresponding to each of the data pages based on the live broadcast room information set of each of the data pages; the data feature code is generally the md5 feature code, and the corresponding feature code generation algorithm is the md5 feature code generation algorithm.
[0143] Step S113', storing the data page number of the target data page and the data feature code in a paging feature code table in correspondence:
[0144] After the server calculates the data feature code of each of the data pages, the server stores the data feature codes of the data pages and their corresponding data page codes as mapping relationship data in the paging feature table.
[0145] In this embodiment, a data feature code corresponding to the data page is generated through the live broadcast room information set of the data page for storage, so that when a subsequent caller pushes a request, it is determined based on the data feature code whether the live broadcast room information set stored in the data page is updated.
[0146] In one embodiment, please refer to Figure 5 , the step of responding to the timed refresh instruction acting on the data paging pool and reallocating the data pages corresponding to the storage of each live broadcast room information of the full live broadcast room information set in the cache space includes the following steps executed by the server:
[0147] Step S121, determine whether the current duration exceeds the dynamic refresh duration. If so, trigger a timed refresh instruction acting on the data page pool. The dynamic refresh duration is updated according to the full load duration and the preset refresh duration:
[0148] After completing the data page allocation of the full live broadcast room information set, the server will periodically refresh the live broadcast information set of the data page pool. The server determines whether the current duration exceeds the dynamic refresh duration. If it exceeds, it will trigger a timed refresh instruction acting on the data page pool.
[0149] The dynamic refresh duration is updated according to the full loading duration and the preset refresh duration. The full loading duration refers to the time consumed by the server to complete loading of the full live broadcast room information set for data page allocation, that is, the full loading duration will be updated according to the data volume of the full live broadcast room information.
[0150] Step S122, obtaining the current full live broadcast room information set in the cache space, and reallocating the data pages corresponding to the live broadcast room information stored in the data paging pool according to the live broadcast room channel number contained in each live broadcast room information in the full live broadcast room information set:
[0151] In response to the timed refresh instruction, the server will re-allocate the data page corresponding to the live broadcast room information contained in the full live broadcast room information set currently stored in the cache space.
[0152] Step S123, when the full live broadcast room information set in the cache space is updated, the full loading duration will be updated accordingly to update the dynamic refresh duration accordingly:
[0153] When the server monitors that the full set of live broadcast room information in the cache space is updated, such as when the amount of data changes by adding or deleting live broadcast room information, the full loading duration will be updated accordingly to update the dynamic refresh duration accordingly, and then updated based on the updated dynamic refresh duration in subsequent timed refresh event monitoring.
[0154] In this embodiment, data pages are allocated by periodically obtaining the latest stored full live room information set from the cache space to ensure the validity of the live room information stored in the data paging pool. At the same time, the judgment duration of the timed refresh is dynamically controlled. In any case, the data volume of the full live room information set changes, which causes confusion in the execution chain of the timed refresh.
[0155] In one embodiment, please refer to Figure 6 , the step of generating a new data feature code for the data page where the live broadcast room information set is updated, and storing the update record of the updated data page in correspondence with its data page number in the update record table, includes the following steps executed by the server:
[0156] Step S121', in response to the live broadcast room information set update event acting on the target data page in the data page pool, a new data feature code is generated for the target event page:
[0157] When the server detects that the live broadcast room information set of any data page in the data paging pool is updated, a new data feature code will be generated for the live broadcast room information set to replace it to ensure that the data feature code of the data page can effectively represent the data features of the live broadcast room information set stored therein.
[0158] Step S122', according to the live broadcast room information of the unupdated live broadcast room information set and the updated live broadcast room information set of the target data page, determine the update identifier of one or more updated live broadcast room information of the target data page, wherein the update identifier is a new identifier or a deletion identifier:
[0159] When the server generates a new data feature code for replacing the updated target data page, it will also determine the newly added or deleted updated live room information in the live room information set of the target data page based on the unupdated live room information set of the target data page and its updated live room information set, and determine the update identifiers corresponding to those live room information, so as to determine through the update identifiers that the corresponding live room information is the newly added or deleted live room information of the target data page.
[0160] The server determines that the updated live broadcast room information of the live broadcast room information set of the updated data page and its corresponding update identifier are generally determined by a diff algorithm.
[0161] Step S123', generating an update record including each of the updated live broadcast room information and the update identifier, and storing the update record and the data page number of the target data page in the update record table in correspondence:
[0162] The server encapsulates the live broadcast room information updated by the updated target data page and its update identifier to generate the latest update record of the target data page, and stores the data page number of the target data page and the update record as mapping relationship data in the update record table.
[0163] In this embodiment, an update record is generated for the updated data page for storage, and the update record is subsequently pushed to the calling end, so that the calling end only needs to update the live broadcast room information set of the corresponding data page through the update record, thereby improving the data update efficiency of the calling end and saving push traffic.
[0164] In one embodiment, please refer to Figure 7 , the step of responding to the current live broadcast status update event of the target live broadcast room, determining the target live broadcast room information of the target live broadcast room, and correspondingly updating the full live broadcast room information set according to the current live broadcast status of the target live broadcast room, and correspondingly updating the live broadcast room information set and data feature code of the data page storing the target live broadcast room information in the data paging pool, includes the following steps executed by the server:
[0165] Step S131, responding to the current live broadcast status update event acting on the target live broadcast room, determining the current live broadcast status corresponding to the current live broadcast status update event, and obtaining the target live broadcast room information of the target live broadcast room:
[0166] When the live broadcast status of any live broadcast room in the live broadcast platform is updated, such as when the live broadcast room starts or stops broadcasting, the live broadcast platform will update the current live broadcast status of the live broadcast room and trigger the current live broadcast status update event acting on the live broadcast room, so that the server responds to the current live broadcast room status event and updates the live broadcast room information stored in the pages in the data paging pool accordingly.
[0167] The server responds to the current live broadcast status update event acting on the target live broadcast room, determines the current live broadcast status of the target live broadcast room, and obtains the target live broadcast room information of the target live broadcast room.
[0168] Step S132, when the current live broadcast state is characterized by the live broadcast room being broadcast, the target live broadcast room information is stored in the cache space to update the full live broadcast room information set, and according to the live broadcast room channel number of the target live broadcast room information, the target live broadcast room information is allocated and stored in the target data page corresponding to the data paging pool:
[0169] When the current live broadcast status of the target live broadcast room is the broadcasting status, the server caches the target live broadcast room information of the target live broadcast room into the cache space to update the full live broadcast room information set, and at the same time, according to the live broadcast room channel number contained in the target live broadcast room information, queries the corresponding target data page in the data paging pool to store the live broadcast room information in the target data page.
[0170] Step S133, when the current live broadcast state is characterized as the live broadcast room being closed, the target live broadcast room information is deleted from the cache space, and according to the live broadcast room channel number of the target live broadcast room information, the target data page having the target live broadcast room information in the data paging pool is queried to delete the target live broadcast room information:
[0171] When the current live broadcast status of the target live broadcast room is the offline state set and the live broadcast room is closed, the server will delete the target live broadcast room information from the full live broadcast room information set in the cache space, and at the same time, according to the live broadcast room channel number contained in the target live broadcast room information, query the corresponding target data page in the data paging pool to delete the live broadcast room information from the target data page.
[0172] Step S134, regenerate the data feature code of the target data page, and store the update record of the target data page in the update record table:
[0173] After the server adds the target live room information to the target data page or deletes the target live room information, the live room information set representing the target data page is updated. At this time, a new data feature code is generated for the target data page, and an update record of the live room page is generated and stored in the update record table.
[0174] In this embodiment, by responding to the start or end event of any live broadcast room in the live broadcast platform, the full live broadcast room information set stored in the cache space is updated accordingly, and at the same time, the live broadcast room information set of the corresponding data page in the data paging pool is updated accordingly to ensure the validity of the live broadcast room information.
[0175] In one embodiment, please refer to Figure 8 , responding to the data page query request pushed by the calling end, obtaining the target data feature code and the target data page number contained in the request, and feeding back the data consistency result when the data feature code of the target data page corresponding to the target data page number is the target data feature code, otherwise feeding back the target update record of the target data page, and if the target update record does not exist, feeding back the live broadcast room information set of the target data page, including the following steps executed by the calling end:
[0176] Step S141, pushing a data page query request acting on a target data page in a data page pool to a server, so as to obtain a request feedback result of the data page query request pushed by the server:
[0177] The data page query request is triggered and pushed by the calling end to respond to a data synchronization event of a target data page in its own data paging pool, or is triggered when the online service corresponding to the calling end needs to call the live broadcast information set of any data page in the calling end's own data paging pool, so as to ensure the data validity of the live broadcast information set called by the online service.
[0178] The calling end has its own data paging pool and corresponding paging feature code table, and the paging structure of the data paging pool is the same as the paging structure of the data paging pool of the server, and the live broadcast room information set stored in each data page in the data paging pool of the calling end and the live broadcast room information set stored in the data page of the data paging pool of the server need to maintain data synchronization. Correspondingly, the paging feature code table of the calling end also needs to ensure data synchronization. For this purpose, the calling end needs to push the data page query request to the server to ensure the data validity of the live broadcast room information and data feature code stored therein.
[0179] Step S142: When the request feedback result contains a data consistency result, the live broadcast room information set of the target data page is pushed to the associated online service for use:
[0180] When the feedback request received by the calling end contains the data consistency result acting on the target data page, it indicates that the live broadcast room information set stored in the data page corresponding to the target data page in the server has not been updated. At this time, the calling end pushes the live broadcast room information set of the target data page to the latest service associated with it for business use.
[0181] Step S143, when the request feedback result includes a target update record, the live broadcast room information set of the target data page will be updated according to the target update record, and the data feature code of the target data page will be regenerated, and the updated live broadcast room information set will be pushed to the associated online service for use:
[0182] When the feedback request received by the calling end includes a target update record acting on the target data page, the calling end will update the live broadcast room information set of the target data page according to the target update record, and generate a new data feature code for the target data page and store it in its own paging feature code table for replacement, and push the updated live broadcast room information set to the latest service associated with it for business use.
[0183] Step S144, when the request feedback result includes the latest live broadcast room information set, the live broadcast room information set currently stored in the target data page is replaced with the live broadcast room information set, and the data feature code of the target data page is regenerated, and the updated live broadcast room information set is pushed to the associated online service for use:
[0184] When the feedback request received by the calling end contains the latest live broadcast room information set acting on the target data page, the calling end replaces the live broadcast room information set currently stored in the target data page with the live broadcast room information set, generates a new data feature code for the target data page and stores it in its own paging feature code table for replacement, and pushes the updated live broadcast room information set to the latest service associated with it for business use.
[0185] In this embodiment, the calling end has a data paging pool and paging feature code table that are the same as the server paging structure. In order to ensure that the live broadcast room information in its own data paging pool is synchronized with the server, it is necessary to push a query request to the server when the live broadcast room information is needed or at a regular interval when executing the service, so as to verify the data validity of the data paging pool according to the query results pushed by the server.
[0186] Furthermore, by functionalizing each step in the method disclosed in the above embodiments, a live broadcast room data paging device of the present application can be constructed. According to this idea, please refer to Fig. 9In a typical embodiment, the device includes: a live broadcast room paging module 11, which is used to obtain a full live broadcast room information set in a cache space, and according to the live broadcast room channel number of each live broadcast room information in the full live broadcast room information set, each live broadcast room information is allocated and stored in a corresponding data page in a data paging pool, and according to the live broadcast room information set of each data page, a data feature code of each data page is generated respectively; a timed refresh paging module 12, which is used to respond to a timed refresh instruction acting on the data paging pool, reallocate the data page corresponding to each live broadcast room information of the full live broadcast room information set in the cache space, and generate a new data feature code for the data page where the live broadcast room information set is updated, and store the update record of the updated data page in correspondence with its data page number in an update record table; a data page update module 13, which is used to In response to the current live broadcast status update event of the target live broadcast room, the target live broadcast room information of the target live broadcast room is determined, so as to update the full live broadcast room information set according to the current live broadcast status of the target live broadcast room, and update the live broadcast room information set and data feature code of the data page storing the target live broadcast room information in the data paging pool, and store the update record of the data page and its data page number in the update record table in correspondence; the query request feedback module 14 is used to respond to the data page query request pushed by the calling end, obtain the target data feature code and target data page number contained in the request, and feedback the data consistency result when the data feature code of the target data page corresponding to the target data page number is the target data feature code, otherwise feedback the target update record of the target data page, and if the target update record does not exist, feedback the live broadcast room information set of the target data page.
[0187] In one embodiment, the live broadcast room paging module 11 includes: a live broadcast room channel acquisition submodule, which is used to obtain the live broadcast room channel number contained in the target live broadcast room information in the full live broadcast room information set; a target data page number determination submodule, which is used to calculate the remainder of the number of data pages in the data paging pool and the live broadcast room channel number according to a preset data page allocation algorithm, and use the remainder as the target data page number; a target data page query submodule, which is used to query the target data page corresponding to the target data page number in the data paging pool, so as to store the target live broadcast room information in the live broadcast room information set of the target data page.
[0188] In another embodiment, the live broadcast room paging module also includes: a live broadcast room information set acquisition submodule, used to obtain the target live broadcast room information set of the target data page in the data paging pool; a feature code generation submodule, used to call a preset feature code generation algorithm, and generate a data feature code corresponding to the target data page according to the target live broadcast room information set; a feature code storage submodule, used to store the data page number of the target data page and the data feature code in a paging feature code table in correspondence.
[0189] In one embodiment, the timed refresh paging module 12 includes: a duration judgment submodule, used to judge whether the current duration exceeds the dynamic refresh duration. If it exceeds, a timed refresh instruction acting on the data paging pool is triggered, and the dynamic refresh duration is updated according to the full loading duration and the preset refresh duration; a data page reallocation submodule, used to obtain the current full live broadcast room information set in the cache space, and reallocate the data pages corresponding to the storage of each live broadcast room information in the data paging pool according to the live broadcast room channel number contained in each live broadcast room information in the full live broadcast room information set; a refresh duration update submodule, used to update the full loading duration accordingly when the full live broadcast room information set in the cache space is updated, so as to update the dynamic refresh duration accordingly.
[0190] In another embodiment, the timed refresh paging module 12 also includes: a new feature code generation submodule, which is used to respond to the live broadcast information set update event acting on the target data page in the data paging pool, and generate a new data feature code for the target event page; an update information determination submodule, which is used to determine the update identifier of one or more updated live broadcast information of the target data page based on the live broadcast information of the unupdated live broadcast information set and the updated live broadcast information set of the target data page, wherein the update identifier is a new addition identifier or a deletion identifier; an update record generation submodule, which is used to generate an update record containing each of the updated live broadcast information and its update identifier, and store the update record and the data page number of the target data page in the update record table accordingly.
[0191] In one embodiment, the data page update module 13 includes: a current live broadcast status update submodule, which is used to respond to the current live broadcast status update event acting on the target live broadcast room, determine the current live broadcast status corresponding to the current live broadcast status update event, and obtain the target live broadcast room information of the target live broadcast room; a live broadcast room start processing submodule, which is used to store the target live broadcast room information in the cache space to update the full live broadcast room information set when the current live broadcast status is characterized by the live broadcast room start, and according to the live broadcast room channel number of the target live broadcast room information, the target live broadcast room information is allocated and stored in the target data page corresponding to the data paging pool; a live broadcast room closing processing submodule, which is used to delete the target live broadcast room information from the cache space when the current live broadcast status is characterized by the live broadcast room closing, and according to the live broadcast room channel number of the target live broadcast room information, query the target data page with the target live broadcast room information in the data paging pool to delete the target live broadcast room information; a feature code new generation submodule, which is used to regenerate the data feature code of the target data page, and store the update record of the target data page in the update record table.
[0192] In one embodiment, the query request feedback module 14 includes: a request feedback result acquisition submodule, which is used to push a data page query request acting on a target data page in a data paging pool to a server, so as to obtain a request feedback result of the data page query request pushed by the server; a data consistency processing submodule, which is used to push the live broadcast information set of the target data page to an associated online service for use when the request feedback result contains a data consistency result; a data update processing submodule, which is used to update the live broadcast information set of the target data page according to the target update record when the request feedback result contains a target update record, and regenerate the data feature code of the target data page, and push the updated live broadcast information set to an associated online service for use; a data replacement processing submodule, which is used to replace the live broadcast information set currently stored in the target data page with the live broadcast information set when the request feedback result contains the latest live broadcast information set, and regenerate the data feature code of the target data page, and push the updated live broadcast information set to an associated online service for use.
[0193] In order to solve the above technical problems, the embodiment of the present application also provides a computer device for running a computer program implemented according to the live broadcast room data paging method. Fig.10 , Fig.10 This is a basic structural block diagram of the computer device in this embodiment.
[0194] like Fig.10 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected via a system bus. Among them, the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a live broadcast room data paging method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute a live broadcast room data paging method. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art can understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0195] In this embodiment, the processor is used to execute the specific functions of each module / submodule in the live broadcast room data paging device of the present application, and the memory stores the program code and various data required to execute the above modules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the live broadcast room data paging device, and the server can call the server's program code and data to execute the functions of all submodules.
[0196] The present application also provides a non-volatile storage medium, in which the live broadcast room data paging method is written into a computer program and stored in the storage medium in the form of computer-readable instructions. When the computer-readable instructions are executed by one or more processors, it means that the program is running in the computer, thereby enabling one or more processors to execute the steps of the live broadcast room data paging method of any of the above-mentioned embodiments.
[0197] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0198] In summary, the present application effectively ensures the timeliness and validity of paging data and saves data transmission bandwidth.
[0199] 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.
[0200] Those skilled in the art will appreciate that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, altered, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted.
[0201] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A live broadcast room data paging method, characterized in that: The steps include: Obtain a full set of live broadcast room information in the cache space, allocate and store each live broadcast room information to a corresponding data page in a data paging pool according to the live broadcast room channel number of each live broadcast room information in the full set of live broadcast room information, and generate a data feature code for each data page according to the live broadcast room information set of each data page; In response to the timed refresh instruction acting on the data paging pool, the data pages corresponding to the storage of each live broadcast room information of the full live broadcast room information set in the cache space are reallocated, and a new data feature code is generated for the data page updated in the live broadcast room information set, and the update record of the updated data page and its data page number are stored in the update record table in correspondence; In response to the current live broadcast status update event of the target live broadcast room, the target live broadcast room information of the target live broadcast room is determined, so as to update the full live broadcast room information set according to the current live broadcast status of the target live broadcast room, and update the live broadcast room information set and data feature code of the data page storing the target live broadcast room information in the data paging pool, and store the update record of the data page and its data page number in the update record table in correspondence; Respond to the data page query request pushed by the calling end, obtain the target data feature code and target data page number contained in the request, and when the data feature code of the target data page corresponding to the target data page number is the target data feature code, feedback the data consistency result, otherwise feedback the target update record of the target data page, and if the target update record does not exist, feedback the live broadcast room information set of the target data page.
2. The method according to claim 1, characterized in that The step of distributing and storing each of the live broadcast room information to a corresponding data page in a data paging pool according to the live broadcast room channel number of each live broadcast room information in the full live broadcast room information set includes the following steps performed by the server: Obtaining the live broadcast room channel number included in the target live broadcast room information in the full live broadcast room information set; According to a preset data page allocation algorithm, the number of data pages in the data paging pool is used as a remainder to perform a remainder operation with the live broadcast room channel number, and the remainder value is used as the target data page number; The target data page corresponding to the target data page number in the data paging pool is queried to store the target live broadcast room information in the live broadcast room information set of the target data page.
3. The method according to claim 1, characterized in that The step of generating the data feature code of each data page according to the live broadcast room information set of each data page includes the following steps performed by the server: Obtaining a target live broadcast room information set of a target data page in the data paging pool; Calling a preset feature code generation algorithm to generate a data feature code corresponding to the target data page according to the target live broadcast room information set; The data page number of the target data page and the data feature code are stored in a paging feature code table in correspondence.
4. The method according to claim 1, characterized in that: The step of responding to the timed refresh instruction acting on the data paging pool and reallocating the data pages corresponding to the storage of each live broadcast room information of the full live broadcast room information set in the cache space includes the following steps executed by the server: Determine whether the current duration exceeds the dynamic refresh duration. If so, trigger a timed refresh instruction acting on the data paging pool. The dynamic refresh duration is updated according to the full load duration and the preset refresh duration. Acquire the current full live broadcast room information set in the cache space, and reallocate the data pages corresponding to the live broadcast room information stored in the data paging pool according to the live broadcast room channel number contained in each live broadcast room information in the full live broadcast room information set; When the full live broadcast room information set in the cache space is updated, the full loading duration will be updated accordingly to update the dynamic refresh duration accordingly.
5. The method according to claim 1, characterized in that: The step of generating a new data feature code for the data page whose live broadcast room information set is updated, and storing the update record of the updated data page and its data page number in the update record table in correspondence thereto, includes the following steps executed by the server: In response to a live broadcast room information set update event acting on a target data page in the data paging pool, a new data feature code is generated for the target data page; Determine, according to the live broadcast room information respectively possessed by the unupdated live broadcast room information set and the updated live broadcast room information set of the target data page, one or more update identifiers of the updated live broadcast room information of the target data page, wherein the update identifier is a new addition identifier or a deletion identifier; An update record including the updated live broadcast room information and the update identifier thereof is generated, and the update record and the data page number of the target data page are correspondingly stored in the update record table.
6. The method according to claim 1, characterized in that The step of responding to the current live broadcast status update event of the target live broadcast room, determining the target live broadcast room information of the target live broadcast room, and correspondingly updating the full live broadcast room information set according to the current live broadcast status of the target live broadcast room, and correspondingly updating the live broadcast room information set and data feature code of the data page storing the target live broadcast room information in the data paging pool, includes the following steps performed by the server: In response to a current live broadcast status update event acting on a target live broadcast room, a current live broadcast status corresponding to the current live broadcast status update event is determined, and target live broadcast room information of the target live broadcast room is obtained; When the current live broadcast state is characterized by the start of the live broadcast room, the target live broadcast room information is stored in the cache space to update the full live broadcast room information set, and according to the live broadcast room channel number of the target live broadcast room information, the target live broadcast room information is allocated and stored in the target data page corresponding to the data paging pool; When the current live broadcast state is characterized as the live broadcast room being closed, the target live broadcast room information is deleted from the cache space, and according to the live broadcast room channel number of the target live broadcast room information, the target data page having the target live broadcast room information in the data paging pool is queried to delete the target live broadcast room information; The data feature code of the target data page is regenerated, and the update record of the target data page is stored in the update record table.
7. The method according to claim 1, characterized in that In response to the data page query request pushed by the calling end, the target data feature code and the target data page number contained in the request are obtained, and when the data feature code of the target data page corresponding to the target data page number is the target data feature code, a data consistency result is fed back, otherwise, a target update record of the target data page is fed back, and if the target update record does not exist, the live broadcast room information set of the target data page is fed back, including the following steps performed by the calling end: Pushing a data page query request acting on a target data page in a data page pool to a server, so as to obtain a request feedback result acting on the data page query request pushed by the server; When the request feedback result contains a data consistent result, the live broadcast room information set of the target data page is pushed to the associated online service for use; When the request feedback result includes a target update record, the live broadcast room information set of the target data page will be updated according to the target update record, and the data feature code of the target data page will be regenerated, and the updated live broadcast room information set will be pushed to the associated online service for use; When the request feedback result includes the latest live broadcast room information set, the live broadcast room information set currently stored in the target data page is replaced with the live broadcast room information set, and the data feature code of the target data page is regenerated, and the updated live broadcast room information set is pushed to the associated online service for use.
8. A live broadcast room data paging device, characterized in that: include: A live broadcast room paging module is used to obtain a full live broadcast room information set in the cache space, and according to the live broadcast room channel number of each live broadcast room information in the full live broadcast room information set, allocate and store each live broadcast room information to a corresponding data page in the data paging pool, and generate a data feature code for each data page according to the live broadcast room information set of each data page; A timed refresh paging module is used to respond to the timed refresh instruction acting on the data paging pool, reallocate the data pages corresponding to the storage of each live broadcast room information of the full live broadcast room information set in the cache space, and generate a new data feature code for the data page updated in the live broadcast room information set, and store the update record of the updated data page and its data page number in the update record table in correspondence; A data page update module is used to respond to the current live broadcast status update event of the target live broadcast room, determine the target live broadcast room information of the target live broadcast room, and update the full live broadcast room information set according to the current live broadcast status of the target live broadcast room, and update the live broadcast room information set and data feature code of the data page storing the target live broadcast room information in the data paging pool, and store the update record of the data page and its data page number in the update record table in correspondence; The query request feedback module is used to respond to the data page query request pushed by the calling end, obtain the target data feature code and the target data page number contained in the request, and feedback the data consistency result when the data feature code of the target data page corresponding to the target data page number is the target data feature code, otherwise feedback the target update record of the target data page, and if the target update record does not exist, feedback the live broadcast room information set of the target data page.
9. An electronic device, comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run a computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 7.
10. A non-volatile storage medium, characterized in that: It stores a computer program implemented according to the method described in any one of claims 1 to 7 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the method are executed.
Citation Information
Patent Citations
Business interface component configuration method and device, equipment and medium
CN114296833A
Paging partition arbitration of paging devices to shared memory partitions
US20100250863A1