Information processing method and device, electronic equipment, storage medium and program product
By caching gift data in the live broadcast server and transmitting it using concurrent RPC protocol, the problem of high performance requirements for the live broadcast server is solved, and the system efficiency and reliability are improved.
Patent Information
- Application Number
- CN202310709243.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2024-12-17
AI Technical Summary
In online live broadcast, the implementation of gift sending function requires frequent penetration of the relational database of the live broadcast server, resulting in high performance requirements and affecting system performance.
By cache gift data in the live broadcast server, obtain and send gift data from the cache to the live broadcast client, avoid direct penetration of relational databases, and use concurrent RPC protocol to transmit gift data to improve performance.
Reduces the demand for live server performance, improves the efficiency and latency of gift data transmission, reduces bandwidth growth during peak periods, and reduces maintenance costs.
Smart Images

Figure CN119155487A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic computers and Internet technology, and in particular to an information processing method, device, electronic device, storage medium and program product. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.
[0003] In live streaming, gift sending is an interactive mode, and viewers can interact with the anchor through gift sending. The implementation of the gift sending function depends on gift data. Part of the gift data is used to form the content displayed when opening the gift panel and operating in the gift panel, and the other part of the gift data is used to form the animation effect displayed after the gift is sent.
[0004] However, when the live broadcast client obtains gift data from the live broadcast server, the traffic usually needs to penetrate the relational database of the live broadcast server, which places high demands on performance. Summary of the invention
[0005] In view of this, the purpose of the present disclosure is to propose an information processing method, device, electronic device, storage medium and program product, which at least to a certain extent solve one of the technical problems in the related art.
[0006] Based on the above purpose, the first aspect of the exemplary embodiment of the present disclosure provides an information processing method, which is applied to a live broadcast server, and the method includes:
[0007] Receive a live video data acquisition request sent by a live client;
[0008] Based on the live video data acquisition request, sending the live video data to the live client;
[0009] Receiving a gift sending request sent by the live broadcast client;
[0010] Based on the gift sending request, gift data is obtained from the cache of the live broadcast server, and the gift data is sent to the live broadcast client.
[0011] Based on the same inventive concept, the second aspect of the exemplary embodiment of the present disclosure provides an information processing method, which is applied to a live broadcast client, and the method includes:
[0012] Send a request to the live broadcast server for obtaining live video data;
[0013] Receiving live video data sent by the live server, and displaying the live video according to the live video data;
[0014] Sending a gift sending request to the live broadcast server;
[0015] Receive gift data sent by the live broadcast server in response to the gift sending request, wherein the gift data is stored in a cache of the live broadcast server.
[0016] Based on the same inventive concept, the third aspect of the exemplary embodiment of the present disclosure provides an information processing device, which is applied to a live broadcast server, and the device includes:
[0017] A live video data acquisition request receiving module is configured to receive a live video data acquisition request sent by a live client;
[0018] A live video data sending module, configured to send live video data to the live client based on the live video data acquisition request;
[0019] A gift sending request receiving module is configured to receive a gift sending request sent by the live broadcast client;
[0020] The gift data sending module is configured to obtain gift data from the cache of the live broadcast server based on the gift sending request, and send the gift data to the live broadcast client.
[0021] Based on the same inventive concept, the fourth aspect of the exemplary embodiment of the present disclosure provides an information processing device, which is applied to a live broadcast client, and the device includes:
[0022] A live video data acquisition request sending module is configured to send a live video data acquisition request to a live broadcast server;
[0023] A live video data receiving module is configured to receive the live video data sent by the live server and display the live video according to the live video data;
[0024] A gift sending request sending module is configured to send a gift sending request to the live broadcast server;
[0025] The gift data receiving module is configured to receive gift data sent by the live broadcast server in response to the gift sending request, wherein the gift data is stored in the cache of the live broadcast server.
[0026] Based on the same inventive concept, the fifth aspect of the exemplary embodiment of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the first aspect or the method described in the second aspect is implemented.
[0027] Based on the same inventive concept, the sixth aspect of the exemplary embodiment of the present disclosure provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method described in the first aspect or the method described in the second aspect.
[0028] Based on the same inventive concept, a seventh aspect of the exemplary embodiment of the present disclosure provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes the method described in the first aspect or the method described in the second aspect.
[0029] From the above, it can be seen that the information processing method, device, electronic device, storage medium and program product provided by the embodiments of the present disclosure include: receiving a live video data acquisition request sent by a live broadcast client; based on the live video data acquisition request, sending live video data to the live broadcast client; receiving a gift sending request sent by the live broadcast client; based on the gift sending request, obtaining gift data from the cache of the live broadcast server, and sending the gift data to the live broadcast client. In the present disclosure, gift data is obtained from the cache of the live broadcast server, and traffic does not need to penetrate the relational database of the live broadcast server, which reduces performance requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0031] Figure 1 A schematic diagram of an application scenario of the information processing method provided by an embodiment of the present disclosure;
[0032] Figure 2 A flowchart of an information processing method provided by an embodiment of the present disclosure;
[0033] Figure 3 Another flowchart of the information processing method provided by the embodiment of the present disclosure;
[0034] Figure 4 A schematic diagram of another application scenario of the information processing method provided in the embodiment of the present disclosure;
[0035] Figure 5 A schematic diagram of the structure of an information processing device provided by an embodiment of the present disclosure;
[0036] Figure 6Another structural schematic diagram of an information processing device provided by an embodiment of the present disclosure;
[0037] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0038] It is understandable that before using the technical solutions disclosed in the embodiments of this application, the type, scope of use, usage scenarios, etc. of the personal information involved in this application should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0039] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present application according to the prompt message.
[0040] As a non-limiting implementation in some embodiments, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0041] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation method of the present application. Other methods that meet the relevant laws and regulations may also be applied to the implementation method of the present application.
[0042] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0043] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, the principles and spirit of the present disclosure will be described with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0044] It should be understood herein that any number of elements in the drawings is for illustration rather than limitation, and any naming is only for distinction rather than having any limiting meaning.
[0045] The principle and spirit of the present disclosure are explained in detail below with reference to several representative embodiments of the present disclosure.
[0046] refer to Figure 1 , which is a schematic diagram of an application scenario of the information processing method provided by an embodiment of the present disclosure. The application scenario includes a terminal device 101 and a live broadcast server 102. Among them, the terminal device 101 and the live broadcast server 102 can be connected via a wired or wireless communication network. The terminal device 101 includes but is not limited to a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, a personal digital assistant (PDA) or other electronic devices that can realize the above functions. The live broadcast server 102 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0047] The live broadcast server 102 is used to provide live broadcast services to users of the terminal device 101. The terminal device 101 is installed with a live broadcast client that communicates with the live broadcast server 102. Users can watch the live broadcast through the live broadcast client and send gifts while watching the live broadcast.
[0048] The live broadcast server 102 stores live broadcast video data and gift data. A portion of the gift data is used to form the content displayed when the gift panel is opened and operations are performed in the gift panel, and another portion of the gift data is used to form an animation effect displayed after the gift is sent. The live broadcast server 102 sends the live broadcast video data and gift data to the live broadcast client, so that the live broadcast client can realize the function of watching the live broadcast and sending gifts during the process of watching the live broadcast.
[0049] Combine the following Figure 1 The information processing method according to the exemplary embodiment of the present disclosure is described by using the application scenario. It should be noted that the above application scenario is only shown to facilitate understanding of the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0050] refer to Figure 2 , which is a flow chart of the information processing method provided by an embodiment of the present disclosure.
[0051] The information processing method comprises the following steps:
[0052] Step S210: receiving a live video data acquisition request sent by a live broadcast client, and sending live video data to the live broadcast client based on the live video data acquisition request.
[0053] The live broadcast server may send the target live broadcast video data to the live broadcast client in response to a request for obtaining the target live broadcast video data sent by the live broadcast client.
[0054] In some embodiments, S210 specifically includes:
[0055] Receiving a request for obtaining live video data of a target live broadcast room sent by the live broadcast client;
[0056] The live video data of the target live broadcast room is sent to the live broadcast client.
[0057] In some embodiments, the request for obtaining live video data of a target live broadcast room includes at least: an account identifier and a live broadcast room identifier.
[0058] In some embodiments, after receiving the request for obtaining live video data of the target live room sent by the live broadcast client, the method further includes:
[0059] Verify whether the account currently logged in by the live broadcast client has the authority to view the target live broadcast room;
[0060] If permission is granted, the live video data of the target live room is sent to the live client.
[0061] In some embodiments, the live broadcast server may also actively send live broadcast video data to the live broadcast client.
[0062] Step S220: receiving a gift sending request sent by the live broadcast client, obtaining gift data from the cache of the live broadcast server based on the gift sending request, and sending the gift data to the live broadcast client.
[0063] In some embodiments, the gift sending request includes a gift panel display request and a gift giving request for a target gift on the gift panel;
[0064] The gift data includes first gift data and second gift data;
[0065] The acquiring gift data from the cache of the live broadcast server based on the gift sending request, and sending the gift data to the live broadcast client, comprises:
[0066] Based on the gift panel display request, acquiring the first gift data from the cache of the live broadcast server, and sending the first gift data to the live broadcast client, so that the live broadcast client displays a gift panel based on the first gift data;
[0067] Based on the gift request for the target gift on the gift panel, the second gift data is obtained from the cache of the live broadcast server, and the second gift data is sent to the live broadcast client, so that the live broadcast client displays the gift effects of the target gift based on the second gift data.
[0068] The first gift data is used to form the content displayed when the gift panel is opened and operations are performed in the gift panel.
[0069] In some embodiments, the first gift data includes data for generating a panel layout, a panel background, a category menu navigation bar (category tap), and gift attribute information (such as thumbnails, corner marks, gift names, and resource values corresponding to the gift, etc.).
[0070] In some embodiments, the first gift data also includes data for generating gift details when any gift is selected, such as a skinning area, a buff card, a toolbar, and a banner.
[0071] The first gift data in the cache of the live broadcast server is obtained from the relational database of the live broadcast server through asynchronous back-source.
[0072] In some embodiments, the method for storing the first gift data includes:
[0073] In the relational database of the live broadcast server, the first gift data is stored in a plurality of isomorphic tables, and different isomorphic tables have different access rights;
[0074] In the cache of the live broadcast server, the first gift data is stored in a key through a string data structure, or the first gift data is stored in a key through a list data structure, or each gift information in the first gift data is stored in an independent key, and the value of the independent key is the metadata of the gift information.
[0075] As an example: MySQL (relational database) uses two isomorphic tables, the first isomorphic table and the second isomorphic table, to store gift metadata. Each row represents a gift record, which includes various gift attribute fields such as gift ID, gift name, type, thumbnail, superscript, bound special effect ID, combo configuration, buff (gain) card configuration, banner (banner advertisement) image and its jump link, vertical category label, etc. The first isomorphic table is used to store gift data used in the internal testing environment, and the second isomorphic table is used to store gift data used in the formal environment. Only gift data that has been tested in the internal testing environment can be synchronized from the first isomorphic table to the second isomorphic table, so that the data is isolated. In addition, there is a second isomorphic table _list used to control the listing / delisting of gifts. There are only two rows of records in it, one row stores the ID array of gifts that have been put on the shelves in the internal testing environment, and the other row stores the ID array of gifts that have been put on the shelves in the formal environment. When reading the gift list, first get the ID array of gifts that have been put on the shelves from the second isomorphic table _list, and then access the first isomorphic table or the second isomorphic table according to the environment identifier to aggregate the gift metadata, and finally get the complete gift list data. There are also two types of data structures in redis (cache). One is to cache the complete gift list data mentioned above into the same key (one key for each internal test and official environment), and use string structure to split the large key for storage. You can also use list structure directly. The current size of the gift ID array that has been put on the shelf is normally within 400. With the asynchronous local cache strategy of the upstream service, there will be no large key or hot key problems. The other type is that each gift ID is an independent redis key (also one key for each internal test and official environment), and the value stores the metadata of the single gift, which is used for upstream query scenarios of single gifts. Among them, the upstream service is the external access layer of the gift system, which has some lightweight packaging logic inside, and the entry point for the client to access the server.
[0076] In some embodiments, the first gift data includes non-volatile data and volatile data, and the caching method of the first gift data includes:
[0077] For the non-volatile data, the non-volatile data is obtained from the relational database of the live broadcast server through asynchronous back-source, and stored in the cache of the live broadcast server;
[0078] For the volatile data, based on the first filtering process, the volatile data is obtained from the relational database of the live broadcast server through asynchronous back-source, and stored in the cache of the live broadcast server.
[0079] In some embodiments, based on the first filtering process, the process includes:
[0080] Receive user request data sent by the live broadcast client, filter preset information in the user request data, obtain user request data without preset information, and construct a request based on the user request data without preset information.
[0081] In some embodiments, after obtaining the first gift data from the cache of the live broadcast server, the method further includes:
[0082] Divide the first gift data into a plurality of data packets, wherein there is no dependency relationship between the plurality of data packets;
[0083] The sending the first gift data to the live broadcast client includes:
[0084] The multiple data packets are concurrently sent to the live broadcast client.
[0085] In some embodiments, the present disclosure implements data transmission (sending and receiving) through the RPC protocol (Remote Procedure Call Protocol).
[0086] As an example: The present disclosure adopts a concurrent RPC method to split and merge loaders without dependencies where all subsequent calculations of the first gift data interface require RPC calls to load data, and then initiate requests at the same time to pull all data locally at one time. In this way, the time spent in the data loading stage is compressed to the time spent in one RPC, which significantly reduces request latency and improves interface performance.
[0087] The timing of sending the first gift data to the live broadcast client includes but is not limited to at least one of the following:
[0088] In some embodiments, the live broadcast server may actively send the first gift data to the live broadcast client.
[0089] In some embodiments, sending the first gift data to the live broadcast client includes:
[0090] Get the traffic of the live broadcast server in different time periods;
[0091] In a time period in which the traffic is less than the traffic threshold in the several time periods, the first gift data is sent to the live broadcast client.
[0092] Traffic may be an indicator such as the number of users accessing a server and the number of server resources browsed by the users, and is an indicator that characterizes the busyness of the server.
[0093] In some embodiments, the flow threshold is an average or median of flows in different time periods.
[0094] Among them, sending the first gift data during the off-peak period (a time period when the traffic is less than the traffic threshold) can reduce the bandwidth growth caused by the concentration of traffic during the peak period and reduce the bandwidth cost.
[0095] In some embodiments, the live broadcast server may also send the first gift data to the live broadcast client in response to a request for obtaining the first gift data sent by the live broadcast client.
[0096] The timing of the live broadcast client sending the request for obtaining the first gift data to the live broadcast server will be described in detail in subsequent embodiments.
[0097] Among them, the second gift data is used to form a gift special effect, and the gift special effect is the animation effect displayed after the gift is sent.
[0098] In some embodiments, the format of the second gift data includes, but is not limited to, at least one of the following: MP4, lynx, webp, loki, font.
[0099] In some embodiments, the first gift data and the second gift data are sent to the live broadcast client respectively, wherein the first gift data and the second gift data are independent of each other.
[0100] Among them, the first gift data and the second gift data are sent independently, that is, there is no binding relationship between the two. In this case, on the one hand, the coupling of the information processing solution provided by the present invention can be reduced, and the maintenance cost is reduced; on the other hand, the second gift data can not only be used to give gifts, but also can be used to form animation effects such as entry animation and activity reward animation, enriching the use scenarios and usage rate of the second gift data.
[0101] The timing of sending the second gift data to the live broadcast client includes but is not limited to at least one of the following:
[0102] In some embodiments, the live broadcast server may actively send the second gift data to the live broadcast client.
[0103] In some embodiments, sending the second gift data to the live broadcast client includes:
[0104] Get the traffic of the live broadcast server in different time periods;
[0105] In a time period in which the traffic is less than the traffic threshold in several time periods, the second gift data is sent to the live broadcast client.
[0106] Traffic may be an indicator such as the number of users accessing a server and the number of server resources browsed by the users, and is an indicator that characterizes the busyness of the server.
[0107] In some embodiments, the flow threshold is an average or median of flows in different time periods.
[0108] Among them, sending the second gift data during the off-peak period (the time period when the traffic is less than the traffic threshold) can reduce the bandwidth growth caused by the peak traffic concentration and reduce the bandwidth cost.
[0109] In some embodiments, the live broadcast server may also send the second gift data to the live broadcast client in response to a request for obtaining the second gift data sent by the live broadcast client.
[0110] The timing of the live broadcast client sending the request for obtaining the second gift data to the live broadcast server will be described in detail in subsequent embodiments.
[0111] In some embodiments, the method for storing the second gift data includes:
[0112] In the relational database of the live broadcast server, the same gift special effect in the second gift data corresponds to different download addresses, and the same gift special effect at different download addresses has different performance requirements;
[0113] In the cache of the live broadcast server, the second gift data is stored in a key through a string data structure, or the second gift data is stored in a key through a list data structure, or each gift effect in the second gift data is stored in an independent key, and the value of the independent key is the metadata of the gift effect.
[0114] As an example: In MySQL (relational database), a table t_assets is used to store special effect metadata. Each row represents a special effect resource record, including special effect id, name, type, status (online / offline, etc.), resource package download address, resource package MD5 (information summary) and other fields. Each special effect can have multiple resource package download addresses, so that high-end / low-end models can be adapted to send resource packages of different resolutions or formats to ensure the experience of all users as much as possible. There are two types of data structures in redis (cache). One is to directly serialize all the special effects in MySQL that are online, and cache them all in the same key. The string structure is used to split the large key for storage, or the list structure can be used directly. The current online special effect list size is normally within 500. With the asynchronous local cache strategy of the upstream service, there will be no large key or hot key problems. The other is that each special effect id is an independent redis key, and the value stores the metadata of the single special effect, which is used for upstream query of a single special effect. Among them, the upstream service is the external access layer of the gift system, which has some lightweight packaging logic inside and is the entrance for the client to access the server.
[0115] In some embodiments, the second gift data in the cache of the live broadcast server is obtained from the relational database of the live broadcast server through asynchronous back-source.
[0116] As an example: the upstream service adopts the strategy of asynchronous caching + local caching. The core service of the gift operation background asynchronously returns to the source at preset intervals to pull the latest special effect list data and update it to the local cache. When the client accesses it, it directly accesses the local cache to get the special effect metadata, eliminating performance bottlenecks. Because of the asynchronous return to the source, the core service of the gift operation background becomes a weak dependency, which also reduces the network time of online requests and improves stability. Among them, the core service of the gift operation background manages the addition, deletion, modification and query operations of gift metadata; the upstream service is the external access layer of the gift system, which has some lightweight packaging logic inside and is the entry point for the client to access the server.
[0117] In some embodiments, sending the gift data to the live broadcast client includes:
[0118] Perform a second filtering process on the second gift data corresponding to the target gift, and send the filtered second gift data corresponding to the target gift to the live broadcast client.
[0119] In some embodiments, the second filtering process specifically includes:
[0120] Obtaining an acquisition request for target second gift data sent by the live broadcast client, wherein the acquisition request includes an identity identification number and a version identification number of the local second gift data locally stored by the live broadcast client;
[0121] The second gift data in the target second gift data whose identity identification number and version identification number are the same as those of the local second gift data are filtered, and the filtered target second gift data is sent to the live broadcast client.
[0122] In some embodiments, the method further comprises:
[0123] Receiving a request for obtaining a first information digest of target second gift data sent by the live broadcast client;
[0124] Send the first information summary to the live broadcast client.
[0125] In some embodiments, the method for sending the second gift data includes:
[0126] The fields sent in the special effects list are basically static, and the packaging logic is relatively simple. The core is to send the download address of all resource packages. This address has been confirmed when the resource package is uploaded in the gift management background. Therefore, the C-end interface service upstream service directly accesses the core service (or local cache) of the gift operation background, which then accesses redis and returns to mysql as needed to obtain these field data. After returning to the upstream service, some calculations (such as sending different resource packages according to the performance of the user's model, etc.) and packaging logic are performed, and finally returned to the client. Among them, the core service of the gift operation background manages the addition, deletion, modification and query operations of gift metadata; the upstream service is the external access layer of the gift system, which has some lightweight packaging logic inside, and the entrance for the client to access the server.
[0127] In some embodiments, the first gift data and the second gift data are stored in a relational database and a cache of a live broadcast server, and the method further includes:
[0128] In response to a modification operation on the first gift data and / or the second gift data, updating the modified first gift data and / or the modified second gift data into the relational database;
[0129] In response to a query operation on the first gift data and / or the second gift data, determining a source of the query operation;
[0130] If the source of the query operation is the live broadcast server, querying in the database;
[0131] If the source of the query operation is the live broadcast client, a query is performed in the cache. If the query is not found in the cache, a query is performed in the relational database, and the query result is updated in the cache.
[0132] As an example: Provide a gift management backend, which is a control plane for the operators of the enterprise user management platform (B-side) to perform a series of operational operations such as adding, deleting, modifying, checking, putting on shelves, and removing the metadata of gifts and special effects. It is the entrance to gift / special effects management. The upstream is the front-end service, and the downstream is the gift metadata core service. MySQL and redis are used for storage. MySQL is used as the final data source, and redis is used as a cache. Write operations such as adding, deleting, modifying, putting on shelves, and removing shelves are directly updated to the MySQL database through the gift metadata core service; query operations first check redis, and if the data in redis does not exist or has expired, then go back to the source to query MySQL and update it to redis. The exception is that when the query request comes from the gift management backend page, redis is skipped and directly accessed. This is because when actually operating the gift management backend, it is necessary to see the modification results quickly to avoid the problem of writing first and reading later.
[0133] In some embodiments, the gift panel includes at least one gift, the at least one gift includes the target gift, and the method further includes:
[0134] Transferring resources corresponding to the target gift according to the first gift data corresponding to the target gift;
[0135] In response to successful resource transfer, a verification result is sent to the live broadcast client.
[0136] In some embodiments, after sending the verification result to the live broadcast client, the method further includes:
[0137] Generate a first gift sending message and a second gift sending message according to the gift sending request;
[0138] Broadcasting the first gift sending message in the target live broadcast room corresponding to the gift sending request;
[0139] Broadcast the second gift sending message in the live broadcast server.
[0140] Optionally, the first gift sending message is an IM message, and the message body content includes gift ID, gift sender ID, recipient ID, gift name, icon, tray information (including avatar, background image, text, etc.), number of gifts sent at a time, combo information, comment area text, etc., and some control fields.
[0141] The second gift sending message is an MQ message, and the message body content includes the gift ID, gift sender ID, recipient ID, live broadcast room information, the number of gifts sent this time, order ID, gift sending source, anchor information, etc.
[0142] refer to Figure 3 , which is a flow chart of the information processing method provided by an embodiment of the present disclosure.
[0143] The information processing method comprises the following steps:
[0144] Step S310: Send a live video data acquisition request to a live broadcast server, receive the live video data sent by the live broadcast server, and display the live video according to the live video data.
[0145] In some embodiments, the live broadcast client may actively send an acquisition request for target live broadcast video data to the live broadcast server, and receive the target live broadcast video data for the acquisition request sent by the live broadcast server.
[0146] In some embodiments, S310 specifically includes:
[0147] Sending a request to the live broadcast server for obtaining live video data of the target live broadcast room;
[0148] Receive live video data of the target live room sent by the live server for the acquisition request.
[0149] In some embodiments, the timing at which the live broadcast client sends a request for obtaining live video data of a target live broadcast room to the live broadcast server includes but is not limited to at least one of the following:
[0150] In response to the target account entering the target live broadcast room, the live broadcast client logged in by the target account sends a request for obtaining live video data of the target live broadcast room to the live broadcast server.
[0151] In some embodiments, the live broadcast client can also passively receive live broadcast video data actively sent by the live broadcast server.
[0152] Step S320: sending a gift sending request to the live broadcast server, and receiving gift data sent by the live broadcast server in response to the gift sending request, wherein the gift data is stored in the cache of the live broadcast server.
[0153] In some embodiments, the gift sending request includes a gift panel display request and a gift giving request for a target gift on the gift panel;
[0154] The gift data includes first gift data and second gift data;
[0155] The sending of a gift sending request to the live broadcast server; and receiving gift data sent by the live broadcast server in response to the gift sending request include:
[0156] Sending the gift panel display request to the live broadcast server, receiving the first gift data sent by the live broadcast server in response to the gift panel display request, and displaying a gift panel based on the first gift data;
[0157] Send the donation request for the target gift on the gift panel to the live broadcast server, receive the second gift data sent by the live broadcast server in response to the donation request for the target gift on the gift panel, and display the gift special effects of the target gift based on the second gift data.
[0158] In some embodiments, the method further comprises:
[0159] Configure the display status and order status of the gifts in the first gift data;
[0160] The gift panel is obtained based on the first gift data, the display state and the sequence state.
[0161] As an example: the first gift data receiving process involves many upstream and downstream interactions, heavy packaging logic, and complex returned content, so there is an additional gift core service layer (including most of the gift system's core logic) in the middle to handle the core logic, while the gift system's external access layer (with some lightweight packaging logic inside, the client's entry to the server) only serves as a lightweight transparent C-end interface, plus some backup caching logic. In the gift core service layer, there are 4 steps in total:
[0162] Load data: load all the data required in the calculation process. The gift list calculation logic is complex, and there are many related upstream and downstream businesses, such as live broadcast room data, user honor level data, task data, and gift metadata. Except for the gift list metadata, which can be cached locally, most of the data cannot be cached locally due to the large amount of data or high real-time requirements. If these data are obtained serially through rpc, the interface delay will increase greatly, and repeated calls may occur as the code complexity increases. Here, the concurrent rpc method is adopted to split and merge the places where all subsequent calculations of the gift list interface require rpc calls to load data. Loaders with no dependencies, and then initiate requests at the same time to pull all data locally at one time. In this way, the time spent in the load data stage is compressed to the time spent in one rpc, which significantly reduces the request delay and improves the interface performance.
[0163] Filter: Controls the visibility of each gift in the gift list. Although the full amount of gift data that has been listed will be returned to the user, after calculation in this step, it will be determined that only a part of the gifts need to be displayed in the gift panel, and the other gifts are hidden. The reason for hiding is that some "special gifts" can only be displayed in the gift panel by some authorized users or in specific activities, but if an authorized user sends it, other unauthorized users in the live broadcast room also need to see the effect of this gift (tray, icon, special effects, etc.), so it is often necessary to return all gifts from the gift list interface to all users, so that when other people send gifts, the client can directly get the data of this gift from the local and display it.
[0164] In some embodiments, the timing at which the live broadcast client sends a request for obtaining the target first gift data to the live broadcast server includes but is not limited to at least one of the following:
[0165] In response to the target account logging into the target application, the live broadcast client logged into by the target account sends a request for obtaining the target first gift data to the live broadcast server.
[0166] Among them, the first gift data is obtained when the App is opened, and the time for obtaining the first gift data is sufficient. When the first gift data is used, the timeliness is good.
[0167] In response to the target account entering the target live broadcast room, the live broadcast client logged in by the target account sends a request for obtaining the target first gift data to the live broadcast server.
[0168] Among them, the first gift data is obtained when entering the live broadcast room, and the time for obtaining the first gift data is sufficient. When using the first gift data, the timeliness is also good. Moreover, compared with obtaining the first gift data when opening the App, it avoids the situation where the user does not enter the live broadcast room and does not use the first gift data after obtaining the first gift data, resulting in a waste of traffic, thereby reducing resource costs.
[0169] In response to the target account opening the gift panel, the live broadcast client logged in by the target account sends a request for obtaining the target first gift data to the live broadcast server.
[0170] Among them, starting to obtain the first gift data when the gift panel is opened, compared with starting to obtain the first gift data when the App is opened and starting to obtain the first gift data when entering the live broadcast room, avoids the situation where the first gift data is not used after obtaining it, causing waste of traffic, and reduces resource costs.
[0171] In response to receiving the gift sending message broadcast by the live broadcast server, it is queried whether the target first gift data targeted by the first gift sending message exists locally. If not, a request for obtaining the target first gift data is sent to the live broadcast server.
[0172] Among them, starting to obtain the first gift data when it is needed can reduce resource costs to the greatest extent compared to the above timing.
[0173] In some embodiments, for solutions with sufficient time to obtain the first gift data (such as starting to obtain the first gift data when opening the application and starting to obtain the first gift data when entering the live broadcast room), all the first gift data can be obtained; for solutions with less time to obtain the first gift data (such as starting to obtain the first gift data when opening the gift panel and starting to obtain the first gift data when the first gift data is needed), only part of the first gift data may be obtained, such as the first gift data of recently popular gifts or a specific one or several first gift data.
[0174] In some embodiments, the live broadcast client can passively receive the second gift data actively sent by the live broadcast server.
[0175] As an example, when a special activity or special gameplay in which all live broadcast clients participate is launched, the clients are required to download certain second gift data in advance, and the live broadcast server can actively send the second gift data to the live broadcast clients.
[0176] In some embodiments, the live broadcast client may also actively send a request to obtain the second gift data to the live broadcast server, and receive the second gift data sent by the live broadcast server in response to the request.
[0177] In some embodiments, specifically including:
[0178] Sending a request to the live broadcast server for obtaining target second gift data;
[0179] Receive the target second gift data sent by the live broadcast server for the acquisition request.
[0180] The target second gift data includes at least part of the second gift data stored in the live broadcast server.
[0181] The timing when the live broadcast client sends a request for obtaining the target second gift data to the live broadcast server includes but is not limited to at least one of the following:
[0182] In response to the target account logging into the target app (application), the live broadcast client logged into by the target account sends a request for obtaining the target second gift data to the live broadcast server.
[0183] Among them, the second gift data is obtained when the App is opened, and the time for obtaining the second gift data is sufficient. When the second gift data is used, the timeliness is good.
[0184] In response to the target account entering the target live broadcast room, the live broadcast client logged in by the target account sends a request for obtaining the target second gift data to the live broadcast server.
[0185] Among them, the second gift data is obtained when entering the live broadcast room, the time for obtaining the second gift data is sufficient, and the timeliness is also good when using the second gift data; and compared with obtaining the second gift data when opening the App, it avoids the situation where the user does not enter the live broadcast room and does not use the second gift data after obtaining the second gift data, causing a waste of traffic, thereby reducing resource costs.
[0186] In response to the target account opening the gift panel, the live broadcast client logged in by the target account sends a request for obtaining the target second gift data to the live broadcast server.
[0187] Among them, starting to obtain the second gift data when the gift panel is opened, compared with starting to obtain the second gift data when the App is opened and starting to obtain the second gift data when entering the live broadcast room, avoids the situation where the second gift data is not used after obtaining it, causing waste of traffic, and reduces resource costs.
[0188] In response to receiving the gift sending message broadcast by the live broadcast server, it is queried whether the target second gift data targeted by the first gift sending message exists locally. If not, a request for obtaining the target second gift data is sent to the live broadcast server.
[0189] Among them, starting to obtain the second gift data when the second gift data is needed can reduce resource costs to the greatest extent compared to the above timing.
[0190] In some embodiments, for solutions with sufficient time to obtain the second gift data (such as starting to obtain the second gift data when opening the App and starting to obtain the second gift data when entering the live broadcast room), all the second gift data can be obtained; for solutions with less time to obtain the second gift data (such as starting to obtain the second gift data when opening the gift panel and starting to obtain the second gift data when the second gift data is needed), only part of the second gift data may be obtained, such as the second gift data of recently popular gifts or a specific one or several second gift data.
[0191] In some embodiments, the method further comprises:
[0192] Sending a request for obtaining the first information digest of the target second gift data to the live broadcast server;
[0193] Receiving the first information summary for the acquisition request sent by the live broadcast server;
[0194] Obtain a second information summary of the second gift data stored locally;
[0195] filtering the information digests in the first information digests that are identical to the second information digest to obtain a third information digest;
[0196] Based on the third information digest, sending a request for obtaining second gift data corresponding to the third information digest to the live broadcast server;
[0197] Receive the second gift data corresponding to the third information summary of the acquisition request sent by the live broadcast server.
[0198] In some embodiments, in response to a target account entering a target live broadcast room, a gift control is displayed, wherein the gift control is configured to display a gift panel in response to a trigger operation on the gift control.
[0199] In some embodiments, a gift panel is displayed in response to a trigger operation on a gift effect or a gift tray.
[0200] In some embodiments, the gift panel includes a number of gift logos;
[0201] In response to a selection operation on any of the gift identifiers, controlling the display of a gift control;
[0202] The donation operation is a trigger operation for the donation control.
[0203] In some embodiments, the gift panel includes a number of gift logos;
[0204] The gift giving operation is a preset gesture operation for any of the gift tags.
[0205] In some embodiments, the preset gesture includes at least one of the following:
[0206] Double-click, double-tap, or long-press.
[0207] In some embodiments, the gift panel includes a gift control and a number of gift icons;
[0208] When any of the gift identifiers is selected, the gift operation is a trigger operation for the gift control.
[0209] In some embodiments, in response to the gift sending operation for the target gift in the gift panel, displaying the gift special effect of the target gift includes:
[0210] In response to a gift sending operation for a target gift in the gift panel, generating a gift sending request, and sending the gift sending request to the live broadcast server;
[0211] Receive the verification result of the gift sending request sent by the live broadcast server, and if the verification result is passed, display the gift effects of the target gift.
[0212] In some embodiments, the displaying of the gift special effect of the target gift includes:
[0213] Add the gift special effects of the target gift to the first queue to be played;
[0214] The gift special effects of the target gift are displayed according to the order of the gift special effects in the first queue to be played.
[0215] refer to Figure 4 In some embodiments, the method further comprises:
[0216] Step S410: receiving the first gift sending message broadcast by the live broadcast server.
[0217] Step S420, query whether the second gift data targeted by the first gift sending message exists locally.
[0218] Step S430: If it does not exist, send a request for obtaining the second gift data to the live broadcast server; and receive the second gift data sent by the live broadcast server in response to the obtaining request.
[0219] Step S440, obtaining a target gift special effect based on the target second gift data; adding the target gift special effect to a second queue to be played; and displaying the target gift special effect according to the order of the gift special effects in the second queue to be played.
[0220] As an example: after the client receives a gift and sends an IM message, it needs to check whether a gift is a big gift, that is, whether special effects need to be played. For gifts that require special effects, it needs to check whether there is a corresponding special effects resource package locally. If not, it needs to pull the special effects list and download the resource package. After the download is complete, it will eventually enter the queue to be played.
[0221] The local queues to be played on the client include two queues: self-view (first queue to be played) and others' (second queue to be played). The former is used to show the special effects when the gift sender sends his own gift, and the latter is used to show the special effects when other people send gifts. The client will process the gift messages in the two queues according to a certain priority and play the gift sending special effects. The processing priority of the self-view queue is higher than that of the others' queue. The self-view queue is sorted from early to late according to the gift sending time, and the others' queue is sorted from high to low according to the resource value corresponding to the gift. In addition, because the gift sender needs to see the special effects immediately after the gift is successfully sent, the gift sender needs to insert a message into the self-view queue when successfully receiving the gift sending request reply, instead of triggering it through IM, because there is generally a delay of several seconds from the successful gift sending to the IM reaching the client.
[0222] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0223] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0224] Based on the same inventive concept, corresponding to the above-mentioned embodiment method, the present disclosure also provides an information processing device.
[0225] refer to Figure 5 , the information processing device comprises:
[0226] The live video data acquisition request receiving module 510 is configured to receive a live video data acquisition request sent by a live broadcast client;
[0227] A live video data sending module 520 is configured to send live video data to the live client based on the live video data acquisition request;
[0228] The gift sending request receiving module 530 is configured to receive a gift sending request sent by the live broadcast client;
[0229] The gift data sending module 540 is configured to obtain gift data from the cache of the live broadcast server based on the gift sending request, and send the gift data to the live broadcast client.
[0230] In some embodiments, the gift data in the cache of the live broadcast server is obtained from the relational database of the live broadcast server through asynchronous back-sourcing.
[0231] In some embodiments, the gift sending request includes a gift panel display request and a gift giving request for a target gift on the gift panel; the gift data includes first gift data and second gift data; the gift data sending module 540 is specifically configured as follows:
[0232] Based on the gift panel display request, acquiring the first gift data from the cache of the live broadcast server, and sending the first gift data to the live broadcast client, so that the live broadcast client displays a gift panel based on the first gift data;
[0233] Based on the gift request for the target gift on the gift panel, the second gift data is obtained from the cache of the live broadcast server, and the second gift data is sent to the live broadcast client, so that the live broadcast client displays the gift effects of the target gift based on the second gift data.
[0234] In some embodiments, the gift data sending module 540 is specifically configured to:
[0235] Divide the first gift data into a plurality of data packets, wherein there is no dependency relationship between the plurality of data packets;
[0236] The sending the first gift data to the live broadcast client includes:
[0237] The multiple data packets are concurrently sent to the live broadcast client.
[0238] In some embodiments, the gift data sending module 540 is specifically configured to:
[0239] Obtaining the traffic of the live broadcast server in multiple time periods;
[0240] In a time period in which the traffic volume among the multiple time periods is less than the traffic volume threshold, the second gift data is sent to the live broadcast client.
[0241] In some embodiments, the gift panel includes at least one gift, the at least one gift includes the target gift, and the information processing device is further configured to:
[0242] Transferring resources corresponding to the target gift according to the first gift data corresponding to the target gift;
[0243] In response to successful resource transfer, a verification result is sent to the live broadcast client.
[0244] In some embodiments, after sending the verification result to the live broadcast client, the information processing device is further configured to:
[0245] Generate a first gift sending message and a second gift sending message according to the gift sending request;
[0246] Broadcasting the first gift sending message in the target live broadcast room corresponding to the gift sending request;
[0247] Broadcast the second gift sending message in the live broadcast server.
[0248] In some embodiments, the information processing device is further configured to:
[0249] In the relational database of the live broadcast server, the second gift data includes gift special effect data, and the same gift special effect data with different performance attributes corresponds to different download addresses;
[0250] In the cache of the live broadcast server, the first gift data is stored in a key, or each gift information in the first gift data is stored in an independent key, and the value of the independent key is the metadata of the gift information;
[0251] In the cache of the live broadcast server, the second gift data is stored in a key, or each gift effect in the second gift data is stored in an independent key, and the value of the independent key is the metadata of the gift effect.
[0252] In some embodiments, the first gift data includes non-volatile data and volatile data, and the information processing device is further configured to:
[0253] For the non-volatile data, the non-volatile data is obtained from the relational database of the live broadcast server through asynchronous back-source, and stored in the cache of the live broadcast server;
[0254] For the volatile data, based on the first filtering process, the volatile data is obtained from the relational database of the live broadcast server through asynchronous back-source, and stored in the cache of the live broadcast server.
[0255] In some embodiments, the information processing device is further configured to:
[0256] In response to a modification operation on the first gift data and / or the second gift data, storing the modified first gift data and / or the modified second gift data in a relational database of the live broadcast server;
[0257] In response to a query operation on the first gift data and / or the second gift data, determining a source of the query operation;
[0258] If the source of the query operation is the live broadcast server, querying in the relational database of the live broadcast server;
[0259] If the source of the query operation is the live broadcast client, a query is performed in the cache of the live broadcast server. If the query is not found in the cache of the live broadcast server, a query is performed in the relational database of the live broadcast server, and the query result is stored in the cache of the live broadcast server.
[0260] In some embodiments, the gift data sending module 540 is specifically configured to:
[0261] Perform a second filtering process on the second gift data corresponding to the target gift, and send the filtered second gift data corresponding to the target gift to the live broadcast client.
[0262] Based on the same inventive concept, corresponding to the above-mentioned embodiment method, the present disclosure also provides an information processing device.
[0263] refer to Figure 6 , the information processing device comprises:
[0264] The live video data acquisition request sending module 610 is configured to send a live video data acquisition request to the live broadcast server;
[0265] The live video data receiving module 620 is configured to receive the live video data sent by the live server and display the live video according to the live video data;
[0266] A gift sending request sending module 630 is configured to send a gift sending request to the live broadcast server;
[0267] The gift data receiving module 640 is configured to receive gift data sent by the live broadcast server in response to the gift sending request, wherein the gift data is stored in the cache of the live broadcast server.
[0268] In some embodiments, the gift sending request includes a gift panel display request and a gift giving request for a target gift on the gift panel; the gift data includes first gift data and second gift data; the gift sending request sending module 630 and the gift data receiving module 640 are specifically configured as follows:
[0269] Sending the gift panel display request to the live broadcast server, receiving the first gift data sent by the live broadcast server in response to the gift panel display request, and displaying a gift panel based on the first gift data;
[0270] Send the donation request for the target gift on the gift panel to the live broadcast server, receive the second gift data sent by the live broadcast server in response to the donation request for the target gift on the gift panel, and display the gift special effects of the target gift based on the second gift data.
[0271] In some embodiments, the information processing device is further configured to:
[0272] Configure the display status and order status of the gifts in the first gift data;
[0273] The gift panel is obtained based on the first gift data, the display state and the sequence state.
[0274] In some embodiments, the information processing device is further configured to:
[0275] Sending a request for obtaining the first information digest of the target second gift data to the live broadcast server;
[0276] Receiving the first information summary for the acquisition request sent by the live broadcast server;
[0277] Obtain a second information summary of the second gift data stored locally;
[0278] filtering the information digests in the first information digests that are identical to the second information digest to obtain a third information digest;
[0279] Based on the third information digest, sending a request for obtaining second gift data corresponding to the third information digest to the live broadcast server;
[0280] Receive the second gift data corresponding to the third information summary of the acquisition request sent by the live broadcast server.
[0281] In some embodiments, the information processing device is further configured to:
[0282] Add the gift special effects of the target gift to the first queue to be played;
[0283] The gift special effects of the target gift are displayed according to the order of the gift special effects in the first queue to be played.
[0284] In some embodiments, the information processing device is further configured to:
[0285] Receive a first gift sending message broadcast by the live broadcast server;
[0286] Query whether the second gift data targeted by the first gift sending message exists locally; if not, send a request for obtaining the second gift data to the live broadcast server;
[0287] receiving the second gift data sent by the live broadcast server in response to the acquisition request, and obtaining a target gift special effect based on the second gift data;
[0288] Add the target gift special effect to the second waiting-to-play queue;
[0289] Display the target gift special effects according to the order of the gift special effects in the second queue to be played.
[0290] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0291] The device of the above embodiment is used to implement the corresponding information processing method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0292] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the information processing method described in any of the above embodiments is implemented.
[0293] Figure 7 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 710, a memory 720, an input / output interface 730, a communication interface 740, and a bus 750. The processor 710, the memory 720, the input / output interface 730, and the communication interface 740 are connected to each other in communication within the device through the bus 750.
[0294] The processor 710 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0295] The memory 720 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 720 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 720 and are called and executed by the processor 710.
[0296] The input / output interface 730 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0297] The communication interface 740 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0298] The bus 750 comprises a pathway that transmits information between the various components of the device (eg, the processor 710 , the memory 720 , the input / output interface 730 , and the communication interface 740 ).
[0299] It should be noted that, although the above device only shows the processor 710, the memory 720, the input / output interface 730, the communication interface 740 and the bus 750, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0300] The electronic device of the above embodiment is used to implement the corresponding information processing method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0301] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the information processing method described in any of the above embodiments.
[0302] The above-mentioned non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)), etc.
[0303] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the information processing method described in any embodiment in the above exemplary method part, and have the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0304] Based on the same inventive concept, corresponding to the information processing method described in any of the above embodiments, the present disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer so that the computer and / or the processor executes the information processing method. Corresponding to the execution subject corresponding to each step in each embodiment of the information processing method, the processor that executes the corresponding step may belong to the corresponding execution subject.
[0305] The computer program product of the above embodiment is used to enable the computer and / or the processor to execute the information processing method described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0306] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, method, or computer program product. Therefore, the present disclosure may be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." In addition, in some embodiments, the present disclosure may also be implemented in the form of a computer program product in one or more computer-readable media, which contains computer-readable program code.
[0307] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive examples) of computer-readable storage media may include, for example: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.
[0308] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0309] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0310] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0311] It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine, and these computer program instructions are executed by a computer or other programmable data processing device to produce a device that implements the functions / operations specified in the boxes in the flowchart and / or block diagram.
[0312] These computer program instructions may also be stored in a computer-readable medium that enables a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable medium produce a product that includes an instruction device that implements the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0313] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby enabling the instructions executed on the computer or other programmable device to provide a process for implementing the functions / operations specified in the blocks in the flowchart and / or block diagram.
[0314] In addition, although the operations of the disclosed method are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flow chart can be performed in a different order. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.
[0315] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly. The article "one" or "a" before an element does not exclude the existence of multiple such elements.
[0316] Although the spirit and principle of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims. The scope of the attached claims conforms to the broadest interpretation, thereby including all such modifications and equivalent structures and functions.
Claims
1. An information processing method, characterized in that: Applied to a live broadcast server, the method comprises: Receive a live video data acquisition request sent by a live client; Based on the live video data acquisition request, sending the live video data to the live client; Receiving a gift sending request sent by the live broadcast client; Based on the gift sending request, gift data is obtained from the cache of the live broadcast server, and the gift data is sent to the live broadcast client.
2. The method according to claim 1, characterized in that The gift data in the cache of the live broadcast server is obtained from the relational database of the live broadcast server through asynchronous back-source.
3. The method according to claim 1, characterized in that The gift sending request includes a gift panel display request and a gift giving request for a target gift on the gift panel; The gift data includes first gift data and second gift data; The acquiring gift data from the cache of the live broadcast server based on the gift sending request, and sending the gift data to the live broadcast client, comprises: Based on the gift panel display request, acquiring the first gift data from the cache of the live broadcast server, and sending the first gift data to the live broadcast client, so that the live broadcast client displays a gift panel based on the first gift data; Based on the gift request for the target gift on the gift panel, the second gift data is obtained from the cache of the live broadcast server, and the second gift data is sent to the live broadcast client, so that the live broadcast client displays the gift effects of the target gift based on the second gift data.
4. The method according to claim 3, characterized in that After acquiring the first gift data from the cache of the live broadcast server, the method further includes: Divide the first gift data into a plurality of data packets, wherein there is no dependency relationship between the plurality of data packets; The sending the first gift data to the live broadcast client includes: The multiple data packets are concurrently sent to the live broadcast client.
5. The method according to claim 3, characterized in that: The sending the second gift data to the live broadcast client includes: Obtaining the traffic of the live broadcast server in multiple time periods; In a time period in which the traffic volume among the multiple time periods is less than the traffic volume threshold, the second gift data is sent to the live broadcast client.
6. The method according to claim 3, characterized in that The gift panel includes at least one gift, the at least one gift includes the target gift, and the method further includes: Transferring resources corresponding to the target gift according to the first gift data corresponding to the target gift; In response to successful resource transfer, a verification result is sent to the live broadcast client.
7. The method according to claim 6, characterized in that After sending the verification result to the live broadcast client, the method further includes: Generate a first gift sending message and a second gift sending message according to the gift sending request; Broadcasting the first gift sending message in the target live broadcast room corresponding to the gift sending request; Broadcast the second gift sending message in the live broadcast server.
8. The method according to claim 3, characterized in that The method further comprises: In the relational database of the live broadcast server, the second gift data includes gift special effect data, and the same gift special effect data with different performance attributes corresponds to different download addresses; In the cache of the live broadcast server, the first gift data is stored in a key, or each gift information in the first gift data is stored in an independent key, and the value of the independent key is the metadata of the gift information; In the cache of the live broadcast server, the second gift data is stored in a key, or each gift effect in the second gift data is stored in an independent key, and the value of the independent key is the metadata of the gift effect.
9. The method according to claim 3, characterized in that: The first gift data includes non-volatile data and volatile data, and the method further includes: For the non-volatile data, the non-volatile data is obtained from the relational database of the live broadcast server through asynchronous back-source, and stored in the cache of the live broadcast server; For the volatile data, based on the first filtering process, the volatile data is obtained from the relational database of the live broadcast server through asynchronous back-source, and stored in the cache of the live broadcast server.
10. The method according to claim 3, characterized in that The method further comprises: In response to a modification operation on the first gift data and / or the second gift data, storing the modified first gift data and / or the modified second gift data in a relational database of the live broadcast server; In response to a query operation on the first gift data and / or the second gift data, determining a source of the query operation; If the source of the query operation is the live broadcast server, querying in the relational database of the live broadcast server; If the source of the query operation is the live broadcast client, a query is performed in the cache of the live broadcast server. If the query is not found in the cache of the live broadcast server, a query is performed in the relational database of the live broadcast server, and the query result is stored in the cache of the live broadcast server.
11. The method according to claim 3, characterized in that Sending the gift data to the live broadcast client includes: Perform a second filtering process on the second gift data corresponding to the target gift, and send the filtered second gift data corresponding to the target gift to the live broadcast client.
12. An information processing method, characterized in that: Applied to a live broadcast client, the method includes: Send a request to the live broadcast server for obtaining live video data; Receiving live video data sent by the live server, and displaying the live video according to the live video data; Sending a gift sending request to the live broadcast server; Receive gift data sent by the live broadcast server in response to the gift sending request, wherein the gift data is stored in a cache of the live broadcast server.
13. The method according to claim 12, characterized in that The gift sending request includes a gift panel display request and a gift giving request for a target gift on the gift panel; The gift data includes first gift data and second gift data; Sending a gift sending request to the live broadcast server; Receiving gift data sent by the live broadcast server in response to the gift sending request, including: Sending the gift panel display request to the live broadcast server, receiving the first gift data sent by the live broadcast server in response to the gift panel display request, and displaying a gift panel based on the first gift data; Send the donation request for the target gift on the gift panel to the live broadcast server, receive the second gift data sent by the live broadcast server in response to the donation request for the target gift on the gift panel, and display the gift special effects of the target gift based on the second gift data.
14. The method according to claim 13, characterized in that The method further comprises: Configure the display status and order status of the gifts in the first gift data; The gift panel is obtained based on the first gift data, the display state and the sequence state.
15. The method according to claim 13, characterized in that The method further comprises: Sending a request for obtaining the first information digest of the target second gift data to the live broadcast server; Receiving the first information summary for the acquisition request sent by the live broadcast server; Obtain a second information summary of the second gift data stored locally; filtering the information digests in the first information digests that are identical to the second information digest to obtain a third information digest; Based on the third information digest, sending a request for obtaining second gift data corresponding to the third information digest to the live broadcast server; Receive the second gift data corresponding to the third information summary of the acquisition request sent by the live broadcast server.
16. The method according to claim 13, characterized in that The displaying of the gift special effect of the target gift based on the second gift data includes: Add the gift special effects of the target gift to the first queue to be played; The gift special effects of the target gift are displayed according to the order of the gift special effects in the first queue to be played.
17. The method according to claim 13, characterized in that The method further comprises: Receiving a first gift sending message broadcasted by the live broadcast server; Check whether the second gift data targeted by the first gift sending message exists locally, and if not, send a request for obtaining the second gift data to the live broadcast server; receiving the second gift data sent by the live broadcast server in response to the acquisition request, and obtaining a target gift special effect based on the second gift data; Add the target gift special effect to the second waiting-to-play queue; Display the target gift special effects according to the order of the gift special effects in the second queue to be played.
18. An information processing device, characterized in that: Applied to a live broadcast server, the device comprises: A live video data acquisition request receiving module is configured to receive a live video data acquisition request sent by a live client; A live video data sending module, configured to send live video data to the live client based on the live video data acquisition request; A gift sending request receiving module is configured to receive a gift sending request sent by the live broadcast client; The gift data sending module is configured to obtain gift data from the cache of the live broadcast server based on the gift sending request, and send the gift data to the live broadcast client.
19. An information processing device, characterized in that: Applied to a live broadcast client, the device comprises: A live video data acquisition request sending module is configured to send a live video data acquisition request to a live broadcast server; A live video data receiving module is configured to receive the live video data sent by the live server and display the live video according to the live video data; A gift sending request sending module is configured to send a gift sending request to the live broadcast server; The gift data receiving module is configured to receive gift data sent by the live broadcast server in response to the gift sending request, wherein the gift data is stored in the cache of the live broadcast server.
20. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 11 or the method according to any one of claims 12 to 17 is implemented.
21. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method of any one of claims 1 to 11 or the method of any one of claims 12 to 17.
22. A computer program product, characterized in that The method comprises computer program instructions, which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 11 or the method according to any one of claims 12 to 17.
