Live broadcast data backflow method and device, electronic equipment and storage medium
In live media data communication, the first server directly returns the response after receiving the client's media negotiation request and obtains data in parallel, solving the problem of low media negotiation efficiency in the prior art, achieving faster live broadcast start-up speed and lower data reflow delay.
Patent Information
- Application Number
- CN202411892810.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, in live media data communication, media negotiation efficiency is low, resulting in slow live broadcast start speed and extended data reflow.
After receiving the client's media negotiation request on the first server, it directly returns the response and obtains live media data in parallel during the media negotiation process, thereby improving media negotiation efficiency and data reflow efficiency.
It improves the efficiency of media negotiation between the client and the server, reduces the delay in data reflow, and speeds up the start-up speed of live broadcasts.
Smart Images

Figure CN119629430A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, specifically to the technical fields of communication, data processing, etc., and more particularly to a live data reflow method, device, electronic device and storage medium. Background Art
[0002] Before obtaining live media data, the client needs to perform media negotiation with the server to determine the media parameters that the communicating parties will use, thereby ensuring that the communicating parties can reach an agreement on the media parameters that they support, so that they can transmit and receive media data under the same media parameters to achieve effective and stable live media data communication. Summary of the invention
[0003] The present disclosure provides a live data reflow method, device, electronic device, storage medium and computer program product.
[0004] According to a first aspect of the present disclosure, a live data reflow method is provided, which is executed by a first server, and includes: receiving a first request sent by a first client, wherein the first request includes multimedia protocol information supported by the first client and a first multimedia data identifier; returning a first response to the first client, wherein the first response includes a first content distribution network identifier allocated by the first server to the first client; sending a data acquisition request to a source server associated with the first multimedia data identifier; and storing the first multimedia description information based on the first content distribution network identifier when receiving the first multimedia description information returned by the source server.
[0005] According to a second aspect of the present disclosure, a live data reflow method is provided, which is executed by a client, comprising: sending a first request to a server, wherein the first request includes multimedia protocol information supported by the client and a first multimedia data identifier; receiving a first response returned by the server, wherein the first response includes a first content distribution network identifier allocated by the first server to the client.
[0006] According to a third aspect of the present disclosure, a live data reflow device is provided, which is executed by a first server, and the device includes: a first receiving module, used to receive a first request sent by a first client, wherein the first request includes multimedia protocol information supported by the first client and a first multimedia data identifier; a returning module, used to return a first response to the first client, wherein the first response includes a first content distribution network identifier allocated by the first server to the first client; a first sending module, used to send a data acquisition request to a source server associated with the first multimedia data identifier; and a storage module, used to store the first multimedia description information based on the first content distribution network identifier when receiving the first multimedia description information returned by the source server.
[0007] According to a fourth aspect of the present disclosure, a live data reflow device is provided, which is executed by a client, and the device includes: a fifth sending module, used to send a first request to a server, wherein the first request includes multimedia protocol information supported by the client and a first multimedia data identifier; a fourth receiving module, used to receive a first response returned by the server, wherein the first response includes a first content distribution network identifier allocated by the first server to the client.
[0008] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:
[0009] at least one processor; and
[0010] a memory communicatively connected to at least one processor; wherein,
[0011] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to execute the live data reflow method as in the first aspect, or execute the live data reflow method as in the second aspect.
[0012] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the live data reflow method of the first aspect, or to execute the live data reflow method of the second aspect.
[0013] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the steps of the live data reflow method of the first aspect, or execute the steps of the live data reflow method of the second aspect.
[0014] The live data reflow method, device, electronic device and storage medium provided by the present disclosure have the following beneficial effects:
[0015] In the disclosed embodiment, the first server receives a first request sent by the first client, wherein the first request includes multimedia protocol information supported by the first client and a first multimedia data identifier, returns a first response to the first client, wherein the first response includes a first content distribution network identifier allocated by the first server to the first client, sends a data acquisition request to the source server associated with the first multimedia data identifier, and stores the first multimedia description information based on the first content distribution network identifier when receiving the first multimedia description information returned by the source server. Thus, the media negotiation efficiency between the first server and the first client can be improved, and live media data can be obtained in parallel during the media negotiation process, thereby reducing data reflux delay and accelerating the start of live broadcast.
[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0018] Figure 1 It is a flowchart of a live data reflow method provided according to an embodiment of the present disclosure;
[0019] Figure 2 is a flowchart of a live data reflow method provided according to another embodiment of the present disclosure;
[0020] Figure 3 is a flow chart of a live data reflow method provided according to another embodiment of the present disclosure;
[0021] Figure 4 is a flow chart of a live data reflow method provided according to another embodiment of the present disclosure;
[0022] Figure 5 This is a flowchart of a live data reflow method provided by an embodiment of the present disclosure.
[0023] Figure 6 It is a structural schematic diagram of a live data reflow device provided according to an embodiment of the present disclosure;
[0024] Figure 7 is a structural schematic diagram of a live data reflow device provided according to another embodiment of the present disclosure;
[0025] Figure 8 It is a block diagram of an electronic device used to implement the live data reflow method of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0027] It should be noted that in the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0028] In the related technology, after receiving the offer sent by the client, the server will first obtain the information of the corresponding live stream from the upstream server, and then send an answer to the client after parsing the media information of the stream. As a result, the client has to wait for a long time to obtain the answer, affecting the efficiency of media negotiation between the client and the server, which will increase the time it takes for the client to obtain the live media data stream and affect the start speed of the live broadcast.
[0029] In the disclosed embodiment, after receiving the first request for media negotiation sent by the first client, the first server can directly return a first response, thereby improving the efficiency of media negotiation between the first server and the first client, and can obtain live media data in parallel during the media negotiation process, thereby reducing data reflow delay and speeding up the start of live broadcast.
[0030] The following describes the live data reflow method, device, electronic device and storage medium of the embodiments of the present disclosure with reference to the accompanying drawings.
[0031] It should be noted that the executor of the live data reflow method of this embodiment is the first server end, which can be implemented by software and / or hardware. The first server end can be configured in an electronic device, and the electronic device may include but is not limited to a terminal, a server end, etc.
[0032] Figure 1 It is a flowchart of a live data reflow method provided according to an embodiment of the present disclosure.
[0033] like Figure 1 As shown, the live data reflow method includes:
[0034] S101: Receive a first request sent by a first client, wherein the first request includes multimedia protocol information supported by the first client and a first multimedia data identifier.
[0035] The live data reflow method in the embodiment of the present disclosure is specifically executed by the first server.
[0036] The first client refers to an electronic device used to present live media data, such as a mobile phone, a television, etc., and there is no limitation on this.
[0037] The first request refers to a request (offer) sent by the client and forwarded by the gateway for performing media negotiation with the first server.
[0038] Among them, media negotiation refers to the negotiation between the client and the server before starting to obtain media data to determine the encoding format, transmission protocol, bandwidth and other parameters that the communicating parties will use, thereby ensuring that the communicating parties can reach an agreement on the commonly supported media parameters, so that they can transmit and receive media data under the same media parameters and achieve effective and stable media data communication.
[0039] Among them, the multimedia protocol information supported by the first client refers to the Session Description Protocol (SDP) information containing its media capabilities (such as audio, video codecs, network transmission protocols, etc.), which includes: the media stream type (video or audio, etc.), transmission protocol, media format (different codecs) and other session and media stream parameters supported by the first client, without any restrictions.
[0040] The multimedia data is video stream data transmitted in Flash Video (FLV) format.
[0041] Among them, the first multimedia data identifier refers to the identifier of the first multimedia data to be presented by the first client, which can be, for example, the name of the live broadcast room, the link address of the live broadcast room, etc., and there is no limitation on this.
[0042] S102: Return a first response to the first client, wherein the first response includes a first content distribution network identifier allocated by the first server to the first client.
[0043] The first response is the SDP information generated by the first client after receiving the first request sent by the first server, that is, answer.
[0044] The answer is a response to the offer, indicating that the media parameter negotiation between the first server and the first client has been completed and subsequent media data communication can begin.
[0045] The first content delivery network identifier allocated to the first client includes: a content delivery network (Content Delivery Network, CDN) node identifier and a network port allocated by the server to the first client.
[0046] That is, in the embodiment of the present disclosure, after receiving the first request (offer) sent by the first client, the first server may generate a first response and return the first response to the first client via the gateway.
[0047] S103: Send a data acquisition request to the source server associated with the first multimedia data identifier.
[0048] The source server is an upstream server of the first server, and stores multimedia data related to the live broadcast.
[0049] The data acquisition request is a request made by the first server to obtain multimedia data from the source server.
[0050] The source server associated with the first multimedia data identifier refers to the source server storing the first multimedia data, that is, each source server has an associated multimedia data identifier.
[0051] That is to say, in the embodiment of the present disclosure, after receiving the first request sent by the first client, the first server will directly return a first response to the first client, thereby realizing media negotiation between the first client and the first server. At the same time, during the media negotiation process between the first client and the first server, there is no need to wait, and a data acquisition request can be sent in parallel to the source server associated with the first multimedia data identifier, thereby reducing the media negotiation delay between the first client and the first server and improving the reflow efficiency of the live media data.
[0052] In the disclosed embodiment, sending a data acquisition request to a source server associated with a first multimedia data identifier may be performed by, after receiving a first request sent by a first client, determining a first multimedia data stream identifier from corresponding multimedia data identifiers among a plurality of source servers, thereby determining a source server associated with the first multimedia data identifier, and sending a data acquisition request to the source server associated with the first multimedia data identifier.
[0053] S104: When the first multimedia description information returned by the source server is received, the first multimedia description information is stored based on the first content delivery network identifier.
[0054] The first multimedia description information includes: multimedia protocol information in the first request and related information of the first multimedia data, such as audio and video data, metadata and control information, etc., which are not limited.
[0055] That is to say, in the embodiment of the present disclosure, when the first server receives the first multimedia description information returned by the source server, the first server may associate and store the first content delivery network identifier with the first multimedia description information.
[0056] Optionally, in some embodiments, storing the first multimedia description information based on the content distribution network identifier may be performed by determining a first storage address corresponding to the first content distribution network identifier through a preset rule; and sending the first multimedia description information and the first content distribution network identifier to a second server corresponding to the first storage address.
[0057] The preset rule may be, for example, a consistent hashing algorithm, which is not limited.
[0058] The second server is different from the first server.
[0059] The first storage address is a storage address in the second server.
[0060] That is to say, in the embodiments of the present disclosure, the first storage address corresponding to the first content distribution network identifier can be determined based on a consistent hashing algorithm, that is, the first storage address can be determined as the second server based on a consistent hashing algorithm, and then the first multimedia description information and the first content distribution network identifier can be stored in the second server, so that in the subsequent execution of the live data reflow method, the distribution efficiency of the first multimedia description information and the first content distribution network identifier can be improved, and the subsequent convenient acquisition of the first multimedia description information and the first content distribution network identifier from the second server can be supported.
[0061] In the disclosed embodiment, the first server receives a first request sent by the first client, wherein the first request includes multimedia protocol information supported by the first client and a first multimedia data identifier, returns a first response to the first client, wherein the first response includes a first content distribution network identifier allocated by the first server to the first client, sends a data acquisition request to the source server associated with the first multimedia data identifier, and stores the first multimedia description information based on the first content distribution network identifier when receiving the first multimedia description information returned by the source server. Thus, the media negotiation efficiency between the first server and the first client can be improved, and live media data can be obtained in parallel during the media negotiation process, thereby reducing data reflux delay and accelerating the start of live broadcast.
[0062] Figure 2 is a flow chart of a live data reflow method provided according to another embodiment of the present disclosure;
[0063] like Figure 2 As shown, the live data reflow method includes:
[0064] S201: Receive a first request sent by a first client, wherein the first request includes multimedia protocol information supported by the first client and a first multimedia data identifier.
[0065] S202: Return a first response to the first client, wherein the first response includes a first content distribution network identifier allocated by the first server to the first client.
[0066] S203: Send a data acquisition request to the source server associated with the first multimedia data identifier.
[0067] S204: When the first multimedia description information returned by the source server is received, the first multimedia description information is stored based on the first content delivery network identifier.
[0068] The specific description of S201 - S204 can be found in the above embodiment, which will not be repeated here.
[0069] S205: Receive a second request sent by a second client, wherein the second request includes a second content distribution network identifier.
[0070] The second client is the same as or different from the first client.
[0071] The second request is a Session Traversal Utilities for NAT (STUN) protocol request sent by the second client, and the second request includes a second content distribution network identifier.
[0072] The second content delivery network identifier includes: a content delivery network (CDN) node identifier and a network port of the second client.
[0073] That is to say, in the embodiment of the present disclosure, the first server may receive the second request sent by the second client and forwarded by the gateway.
[0074] S206: When the second multimedia description information returned by the third server is not received, a callback function registration request is sent to the third server, wherein the registration request includes a second content delivery network identifier.
[0075] The third server is the same as or different from the first server.
[0076] The second multimedia description information includes: the multimedia protocol information in the first request and related information of the first multimedia data, such as audio and video data, metadata and control information, etc., without limitation.
[0077] The callback function registration request includes the second content distribution network identifier, and the callback function registration request is used to request to call back the second multimedia description information in the third server to the first server.
[0078] That is to say, in the embodiment of the present disclosure, when the first server does not receive the second multimedia description information returned by the third server, it can send a callback function registration request to the third server to request that the second multimedia description information in the third server be called back to the first server, thereby facilitating the subsequent calling of the second multimedia description information from the first server.
[0079] S207: When receiving the second multimedia description information returned by the third server, acquiring target multimedia data based on the second multimedia description information.
[0080] The target multimedia data refers to multimedia data in a real-time transport protocol (RTP) format.
[0081] In the embodiment of the present disclosure, the first server may determine the source server identifier based on the second multimedia description information returned by the third server, and then send a data acquisition request to the source server related to the source server identifier, thereby acquiring multimedia data in the flv format, and then converting the multimedia data in the flv format into target multimedia data in the RTP format that is easy to transmit.
[0082] S208: Send the target multimedia data to the second client.
[0083] In the disclosed embodiment, upon receiving the second multimedia description information returned by the third server, after acquiring the target multimedia data based on the second multimedia description information, the first server may forward the target multimedia data to the gateway, and then the gateway sends the target multimedia data to the second client.
[0084] In the embodiment of the present disclosure, a callback function registration request is sent to the third server without receiving the second multimedia description information returned by the third server, wherein the registration request includes the second content distribution network identifier; and upon receiving the second multimedia description information returned by the third server, target multimedia data is obtained based on the second multimedia description information, and the target multimedia data is sent to the second client. The callback function mechanism avoids invalid waiting and repeated requests of the client, reduces unnecessary network traffic and server load, and receiving the second multimedia description information through the callback function helps the client to accurately parse and present multimedia data, avoiding problems caused by missing or erroneous data. The callback function mechanism allows the server to asynchronously notify the client after preparing the data without the client remaining in a blocked state waiting for a response, thereby improving the concurrent processing capability and response speed of the system.
[0085] S209: Determine a second storage address corresponding to the second content distribution network identifier according to a preset rule.
[0086] In the embodiment of the present disclosure, after receiving the second request sent by the second client, the first server may determine the second storage address corresponding to the second content distribution network identifier according to a preset rule.
[0087] In the disclosed embodiment, there is a mapping relationship between the content distribution network identifier and the storage address, that is, after receiving the second request, the second storage address corresponding to the second content distribution network identifier is determined according to the mapping relationship between the content distribution network identifier and the storage address.
[0088] S210: Send a second content distribution network identifier to a third server corresponding to the second storage address.
[0089] In the embodiment of the present disclosure, after determining the second storage address corresponding to the second content distribution network identifier through a preset rule, the first server may send the second content distribution network identifier to the third server corresponding to the second storage address.
[0090] S211: When receiving the second multimedia description information returned by the third server, acquiring target multimedia data based on the second multimedia description information.
[0091] In the embodiment of the present disclosure, when the first server receives the second multimedia description information returned by the third server, the first server obtains the target multimedia data based on the second multimedia description information.
[0092] S212: Send the target multimedia data to the second client.
[0093] In the disclosed embodiment, after the first server obtains the target multimedia data from the second multimedia description information, the target multimedia data can be forwarded to the gateway. After receiving the target multimedia data, the gateway can send the target multimedia data to the second client. Thus, the second storage address corresponding to the second content distribution network identifier is quickly located through preset rules, which reduces the time for subsequent information query and locating the storage location, and quickly and accurately obtains and sends the target multimedia data to the second client, thereby improving the efficiency of live data reflow.
[0094] In the embodiment of the present disclosure, a first request sent by a first client is received, a first response is returned to the first client, and a data acquisition request is sent to a source server associated with a first multimedia data identifier. When the first multimedia description information returned by the source server is received, the first multimedia description information is stored based on the first content distribution network identifier. A second request sent by a second client is received. When the second multimedia description information returned by the third server is not received, a callback function registration request is sent to the third server. When the second multimedia description information returned by the third server is received, target multimedia data is acquired based on the second multimedia description information, and the target multimedia data is sent to the second client, thereby avoiding invalid waiting of the client through the callback function mechanism. and repeated requests, reducing unnecessary network traffic and server load, without the client remaining in a blocked state waiting for a response, improving the system's concurrent processing capability and response speed, determining a second storage address corresponding to a second content distribution network identifier through a preset rule, sending the second content distribution network identifier to a third server corresponding to the second storage address, and acquiring target multimedia data based on the second multimedia description information when receiving second multimedia description information returned by the third server, thereby being able to quickly locate the second storage address corresponding to the second content distribution network identifier through the preset rule, reducing the time for subsequent information query and locating the storage location, and quickly and accurately acquiring and sending the target multimedia data to the second client, thereby improving the efficiency of live data reflow.
[0095] Figure 3 is a flow chart of a live data reflow method provided according to another embodiment of the present disclosure;
[0096] like Figure 3 As shown, the live data reflow method includes:
[0097] S301: Receive a first request sent by a first client, wherein the first request includes multimedia protocol information supported by the first client and a first multimedia data identifier.
[0098] S302: Return a first response to the first client, wherein the first response includes a first content distribution network identifier allocated by the first server to the first client.
[0099] S303: Send a data acquisition request to the source server associated with the first multimedia data identifier.
[0100] S304: When the first multimedia description information returned by the source server is received, the first multimedia description information is stored based on the first content delivery network identifier.
[0101] The specific description of S301 - S304 can be found in the above embodiment, which will not be repeated here.
[0102] S305: When receiving the third content delivery network identifier sent by any server, traverse the stored multimedia description information based on the third content delivery network identifier.
[0103] The content distribution network identifier sent by any server is the third content distribution network identifier.
[0104] That is to say, in the embodiment of the present disclosure, when the first server receives the third content distribution network identifier sent by any server, it can traverse the multimedia description information stored in the first server based on the third content distribution network identifier.
[0105] S306: If the multimedia description information corresponding to the third content delivery network identifier is not obtained, a multimedia description information query failure response is returned to any server.
[0106] The multimedia description information query failure response is used to indicate that the multimedia description information corresponding to the third content distribution network identifier is not obtained in the first server.
[0107] That is to say, in the embodiment of the present disclosure, when the first server fails to obtain the multimedia description information corresponding to the third content distribution network identifier, it will return a multimedia description information query failure response to any server to notify the corresponding server that it has not obtained the multimedia description information corresponding to the third content distribution network identifier in the first server, so that the corresponding server can take countermeasures in time after receiving the information query failure response.
[0108] S307: Receive a callback function registration request sent by any server, wherein the registration request includes a third content distribution network identifier.
[0109] In the embodiment of the present disclosure, the first server may also receive a callback function registration request sent by any server, wherein the registration request includes a third content distribution network identifier.
[0110] S308: When the third multimedia description information associated with the third content delivery network identifier is acquired, the third multimedia description information is sent to any server.
[0111] In the embodiment of the present disclosure, after receiving the callback function registration request sent by any server, the first server can query the third multimedia description information associated with the third content distribution network identifier from other servers according to the third content distribution network identifier in the callback function registration request, and send the third multimedia description information to any server when the third multimedia description information associated with the third content distribution network identifier is obtained. Therefore, by centrally querying and distributing multimedia description information, data acquisition efficiency is improved, resource allocation is optimized, data consistency is enhanced, and server logic is simplified.
[0112] Optionally, in some embodiments, obtaining third multimedia description information associated with a third content distribution network identifier includes any one of the following: receiving a third content distribution network identifier and third multimedia description information sent by a fourth server; detecting that a storage area contains the third content distribution network identifier, thereby being able to flexibly obtain the required third multimedia description information in two ways, namely, when the fourth server actively sends information, being able to instantly update or obtain new multimedia description information, and when the storage area already contains relevant information, being able to quickly retrieve and obtain the multimedia description information without the need for additional queries or waiting.
[0113] The fourth server is the same as or different from the first server.
[0114] That is to say, in the embodiment of the present disclosure, obtaining the third multimedia description information associated with the third content distribution network identifier may be by receiving the third content distribution network identifier and the third multimedia description information sent by the fourth server, or by querying the third content distribution network identifier from the storage area of the first server.
[0115] Optionally, in some embodiments, after receiving the third content distribution network identifier and the third multimedia description information sent by the fourth server, the third multimedia description information can be associated with the third content distribution network identifier and stored in a storage area, thereby enabling subsequent queries and retrievals of data to quickly and accurately find multimedia description information related to a specific content distribution network.
[0116] In the embodiment of the present disclosure, after receiving the third content distribution network identifier and the third multimedia description information sent by the fourth server, the third multimedia description information can be associated with the third content distribution network identifier and stored in the storage area, so that during the execution of the subsequent live data reflow method, the third multimedia description information can be accurately and efficiently determined from the storage area according to the third content distribution network identifier.
[0117] In the disclosed embodiment, a first request sent by a first client is received, a first response is returned to the first client, a data acquisition request is sent to a source server associated with a first multimedia data identifier, and when the first multimedia description information returned by the source server is received, the first multimedia description information is stored based on the first content distribution network identifier; when a third content distribution network identifier sent by any server is received, the stored multimedia description information is traversed based on the third content distribution network identifier; when the multimedia description information corresponding to the third content distribution network identifier is not obtained, a multimedia description information query failure response is returned to any server, so that after receiving the information query failure response, the corresponding server can take countermeasures in time to receive a callback function registration request sent by any server, and when the third multimedia description information associated with the third content distribution network identifier is obtained, the third multimedia description information is sent to any server. Thus, by centrally querying and distributing multimedia description information, data acquisition efficiency is improved, resource allocation is optimized, data consistency is enhanced, and server logic is simplified.
[0118] Figure 4 It is a flowchart of a live data reflow method provided according to another embodiment of the present disclosure.
[0119] like Figure 4 As shown, the live data reflow method includes:
[0120] S401: Send a first request to a server, wherein the first request includes multimedia protocol information supported by the client and a first multimedia data identifier.
[0121] For the explanation of the same terms in the embodiments of the present disclosure and in the above embodiments, please refer to the above embodiments and will not be repeated here.
[0122] The live data reflow method described in the embodiment of the present disclosure may be executed by a first client, which may be, for example, a mobile phone, a television, etc., without limitation.
[0123] In the disclosed embodiment, the first client may send a first request to the server, so that the first client can perform media negotiation with the first server based on the first request.
[0124] S402: Receive a first response returned by the server, wherein the first response includes a first content distribution network identifier allocated by the first server to the client.
[0125] In the disclosed embodiment, after sending the first request to the server, the first client can directly receive the first response returned by the server without waiting, regardless of whether the multimedia data is obtained, thereby improving the media negotiation efficiency between the first client and the first server.
[0126] In the disclosed embodiment, the first client sends a first request to the server, wherein the first request includes multimedia protocol information supported by the client and a first multimedia data identifier, and then receives a first response returned by the server, wherein the first response includes a first content distribution network identifier allocated by the first server to the client, thereby speeding up the media negotiation process between the first client and the first server and reducing the start time of the live broadcast.
[0127] Figure 5 It is a flowchart of a live data reflow method provided by an embodiment of the present disclosure.
[0128] like Figure 5 As shown, the live data reflow method includes:
[0129] S501: The client sends a first request to the first server;
[0130] S502: The first server returns a first response to the client;
[0131] S503: The first server sends a data acquisition request to a source server associated with the first multimedia stream data identifier to acquire multimedia data;
[0132] S504: When the first server receives the multimedia description information of the multimedia data returned by the source server, the first server stores the multimedia description information in the second server based on the first content delivery network identifier.
[0133] S505: The first server receives a second request sent by the second client;
[0134] S506: The first server obtains multimedia description information from the third server based on the second content delivery network identifier in the second request;
[0135] S507: The first server sends a callback function registration request to the third server without receiving the second multimedia description information returned by the third server. After receiving the callback function registration request, the third server returns the multimedia description information to the first server.
[0136] S508: The first server obtains target multimedia data based on the multimedia description information;
[0137] S509: The first server sends the target multimedia data to the client.
[0138] Figure 6 It is a structural schematic diagram of a live data reflow device provided according to an embodiment of the present disclosure;
[0139] like Figure 6As shown, the live data backflow device 60 is executed by the first server, and the device includes:
[0140] A first receiving module 601 is configured to receive a first request sent by a first client, wherein the first request includes multimedia protocol information supported by the first client and a first multimedia data identifier;
[0141] A returning module 602 is configured to return a first response to the first client, wherein the first response includes a first content distribution network identifier allocated by the first server to the first client;
[0142] A first sending module 603, configured to send a data acquisition request to a source server associated with the first multimedia data identifier;
[0143] The storage module 604 is configured to store the first multimedia description information based on the first content delivery network identifier when receiving the first multimedia description information returned by the source server.
[0144] In some embodiments of the present disclosure, the storage module 604 is further used to:
[0145] Determine, by a preset rule, a first storage address corresponding to the first content distribution network identifier;
[0146] The first multimedia description information and the first content distribution network identifier are sent to the second server corresponding to the first storage address.
[0147] In some embodiments of the present disclosure, the apparatus further comprises:
[0148] A second receiving module, configured to receive a second request sent by a second client, wherein the second request includes a second content distribution network identifier;
[0149] A determination module, configured to determine a second storage address corresponding to a second content distribution network identifier according to a preset rule;
[0150] A second sending module, configured to send a second content distribution network identifier to a third server corresponding to the second storage address;
[0151] A first acquisition module, configured to acquire target multimedia data based on the second multimedia description information when receiving the second multimedia description information returned by the third server;
[0152] The third sending module is used to send the target multimedia data to the second client.
[0153] In some embodiments of the present disclosure, the second sending module is further configured to:
[0154] After sending the second content distribution network identifier to the third server corresponding to the storage address, if the second multimedia description information returned by the third server is not received, sending a callback function registration request to the third server, wherein the registration request includes the second content distribution network identifier;
[0155] When receiving the second multimedia description information returned by the third server, acquiring the target multimedia data based on the second multimedia description information;
[0156] The target multimedia data is sent to the second client.
[0157] In some embodiments of the present disclosure, the device further comprises:
[0158] A traversal module, configured to traverse the stored multimedia description information based on the third content distribution network identifier when receiving the third content distribution network identifier sent by any server;
[0159] The returning module is used to return a multimedia description information query failure response to any server when the multimedia description information corresponding to the third content distribution network identifier is not obtained.
[0160] In some embodiments of the present disclosure, the device further comprises:
[0161] A third receiving module, configured to receive a callback function registration request sent by any server, wherein the registration request includes a third content distribution network identifier;
[0162] The fourth sending module is configured to send the third multimedia description information to any server when the third multimedia description information associated with the third content distribution network identifier is acquired.
[0163] In some embodiments of the present disclosure, the fourth sending module is further configured to:
[0164] receiving a third content distribution network identifier and third multimedia description information sent by a fourth server;
[0165] It is detected that the storage area contains a third content distribution network identifier.
[0166] In some embodiments of the present disclosure, the fourth sending module is further configured to:
[0167] After receiving the third content distribution network identifier and the third multimedia description information sent by the fourth server, the third multimedia description information is associated with the third content distribution network identifier and stored in the storage area.
[0168] It should be noted that the aforementioned explanation of the live data reflow method is also applicable to the live data reflow device of this embodiment and will not be repeated here.
[0169] In the disclosed embodiment, the first server receives a first request sent by the first client, wherein the first request includes multimedia protocol information supported by the first client and a first multimedia data identifier, returns a first response to the first client, wherein the first response includes a first content distribution network identifier allocated by the first server to the first client, sends a data acquisition request to the source server associated with the first multimedia data identifier, and stores the first multimedia description information based on the first content distribution network identifier when receiving the first multimedia description information returned by the source server. Thus, the media negotiation efficiency between the first server and the first client can be improved, and live media data can be obtained in parallel during the media negotiation process, thereby reducing data reflux delay and accelerating the start of live broadcast.
[0170] Figure 7 is a structural schematic diagram of a live data reflow device provided according to another embodiment of the present disclosure;
[0171] like Figure 7 As shown, the live data backflow device 70 is executed by the client, and the device includes:
[0172] The fifth sending module 701 is used to send a first request to the server, wherein the first request includes multimedia protocol information supported by the client and a first multimedia data identifier;
[0173] The fourth receiving module 702 is used to receive a first response returned by the server, wherein the first response includes a first content distribution network identifier allocated by the first server to the client.
[0174] It should be noted that the aforementioned explanation of the live data reflow method is also applicable to the live data reflow device of this embodiment and will not be repeated here.
[0175] In the disclosed embodiment, the first client sends a first request to the server, wherein the first request includes multimedia protocol information supported by the client and a first multimedia data identifier, and then receives a first response returned by the server, wherein the first response includes a first content distribution network identifier allocated by the first server to the client, thereby speeding up the media negotiation process between the first client and the first server and reducing the start time of the live broadcast.
[0176] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0177] Figure 8A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0178] like Figure 8 As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0179] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0180] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the live data reflow method. For example, in some embodiments, the live data reflow method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the live data reflow method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the live data reflow method in any other appropriate manner (e.g., by means of firmware).
[0181] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0182] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0183] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0184] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0185] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network, the Internet, and a blockchain network.
[0186] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0187] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0188] In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the description of the present disclosure, the words "if" and "if" used can be interpreted as "at the time of" or "when" or "in response to determination" or "under the circumstances of".
[0189] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A live data reflow method, executed by a first server, comprising: Receiving a first request sent by a first client, wherein the first request includes multimedia protocol information supported by the first client and a first multimedia data identifier; Returning a first response to the first client, wherein the first response includes a first content distribution network identifier allocated by the first server to the first client; Sending a data acquisition request to a source server associated with the first multimedia data identifier; When the first multimedia description information returned by the source server is received, the first multimedia description information is stored based on the first content delivery network identifier.
2. The method of claim 1, wherein: The storing the first multimedia description information based on the content distribution network identifier includes: Determine, by a preset rule, a first storage address corresponding to the first content distribution network identifier; The first multimedia description information and the first content delivery network identifier are sent to a second server corresponding to the first storage address.
3. The method of claim 1, wherein: The method further comprises: receiving a second request sent by a second client, wherein the second request includes a second content distribution network identifier; Determining, by a preset rule, a second storage address corresponding to the second content distribution network identifier; Sending the second content distribution network identifier to a third server corresponding to the second storage address; When receiving the second multimedia description information returned by the third server, acquiring target multimedia data based on the second multimedia description information; The target multimedia data is sent to the second client.
4. The method of claim 3, wherein: After sending the second content distribution network identifier to the third server corresponding to the storage address, the method further includes: In the case of not receiving the second multimedia description information returned by the third server, sending a callback function registration request to the third server, wherein the registration request includes the second content distribution network identifier; When receiving the second multimedia description information returned by the third server, acquiring target multimedia data based on the second multimedia description information; The target multimedia data is sent to the second client.
5. The method according to claims 1 to 4, wherein: The method further comprises: Upon receiving a third content delivery network identifier sent by any server, traversing the stored multimedia description information based on the third content delivery network identifier; In the case where the multimedia description information corresponding to the third content distribution network identifier is not obtained, a multimedia description information query failure response is returned to any of the servers.
6. The method of claim 5, wherein: The method further comprises: receiving a callback function registration request sent by any of the servers, wherein the registration request includes the third content distribution network identifier; When the third multimedia description information associated with the third content distribution network identifier is acquired, the third multimedia description information is sent to any one of the servers.
7. The method of claim 6, wherein: The acquiring of the third multimedia description information associated with the third content distribution network identifier includes any one of the following: receiving the third content delivery network identifier and the third multimedia description information sent by the fourth server; It is detected that the storage area contains the third content distribution network identifier.
8. The method of claim 7, wherein: After receiving the third content distribution network identifier and the third multimedia description information sent by the fourth server, the method further includes: The third multimedia description information is associated with the third content distribution network identifier and stored in the storage area.
9. A live data reflow method, executed by a client, comprising: Sending a first request to the server, wherein the first request includes multimedia protocol information supported by the client and a first multimedia data identifier; A first response returned by the server is received, wherein the first response includes a first content distribution network identifier allocated by the server to the client.
10. A live data backflow device, executed by a first server, comprising: A first receiving module, configured to receive a first request sent by a first client, wherein the first request includes multimedia protocol information supported by the first client and a first multimedia data identifier; A returning module, configured to return a first response to the first client, wherein the first response includes a first content distribution network identifier allocated by the server to the first client; A first sending module, configured to send a data acquisition request to a source server associated with the first multimedia data identifier; The storage module is configured to store the first multimedia description information based on the first content distribution network identifier when receiving the first multimedia description information returned by the source server.
11. The device according to claim 10, characterized in that The storage module is further used for: Determine, by a preset rule, a first storage address corresponding to the first content distribution network identifier; The first multimedia description information and the first content delivery network identifier are sent to a second server corresponding to the first storage address.
12. The device according to claim 10, wherein: The device also includes: A second receiving module, configured to receive a second request sent by a second client, wherein the second request includes a second content distribution network identifier; A determination module, configured to determine a second storage address corresponding to the second content distribution network identifier according to a preset rule; A second sending module, configured to send the second content distribution network identifier to a third server corresponding to the second storage address; A first acquisition module, configured to acquire target multimedia data based on the second multimedia description information when receiving the second multimedia description information returned by the third server; A third sending module is configured to send the target multimedia data to the second client.
13. The device according to claim 12, wherein: The second sending module is further used for: After sending the second content delivery network identifier to the third server corresponding to the storage address, in the case of not receiving the second multimedia description information returned by the third server, sending a callback function registration request to the third server, wherein the registration request includes the second content delivery network identifier; When receiving the second multimedia description information returned by the third server, acquiring target multimedia data based on the second multimedia description information; The target multimedia data is sent to the second client.
14. The device according to claims 10-13, wherein: The device also includes: A traversal module, configured to traverse the stored multimedia description information based on the third content distribution network identifier when receiving the third content distribution network identifier sent by any server; The returning module is configured to return a multimedia description information query failure response to any of the servers if the multimedia description information corresponding to the third content distribution network identifier is not obtained.
15. The device according to claim 12, wherein: The device also includes: A third receiving module, configured to receive a callback function registration request sent by any server, wherein the registration request includes the third content distribution network identifier; The fourth sending module is configured to send the third multimedia description information to any one of the servers when the third multimedia description information associated with the third content delivery network identifier is acquired.
16. The device according to claim 16, wherein: The fourth sending module is further used for: receiving the third content delivery network identifier and the third multimedia description information sent by the fourth server; It is detected that the storage area contains the third content distribution network identifier.
17. The device according to claim 16, wherein: The fourth sending module is further used for: After receiving the third content delivery network identifier and the third multimedia description information sent by the fourth server, the third multimedia description information is associated with the third content delivery network identifier and stored in the storage area.
18. A live data reflow device, executed by a client, comprising: A fifth sending module, configured to send a first request to the server, wherein the first request includes multimedia protocol information supported by the client and a first multimedia data identifier; The fourth receiving module is configured to receive a first response returned by the server, wherein the first response includes a first content distribution network identifier allocated by the server to the client.
19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 9.
21. A computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 9.