Scheduling processing method and apparatus, device, and storage medium
By utilizing the scheduling results and verification information generated and fed back by the first server in the RTS 302 scheduling, the signaling interaction process is reduced, the first frame latency problem caused by HTTP signaling interaction is solved, the user experience is improved and the cost is reduced.
Patent Information
- Application Number
- CN202211291499.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-10-19
AI Technical Summary
In live video streaming scenarios, the HTTP signaling interaction process based on RTS 302 scheduling is relatively long, resulting in a longer first frame latency for the client and affecting the user's viewing experience.
The first server calls a content-based scheduling service to generate scheduling results and feed them back to the client, including the IP address and verification information of the second server. This reduces the signaling interaction process between the client and the second server, and uses the information generated by the second server during the signaling interaction phase for verification.
This reduces the time it takes for the client to obtain the first frame, improves the user's viewing experience, and reduces the internal transmission cost of the server.
Smart Images

Figure CN115665500B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, and more particularly, to a scheduling processing method and device, equipment and a storage medium. BACKGROUND
[0002] In a video live streaming scenario, a real-time transmission network based on content delivery network (CDN) nodes covering multiple regions can provide multi-region coverage, low-cost, low-latency communication-level real-time audio and video transmission capabilities. In actual applications, there are often tens of millions of concurrent live streaming scheduling phenomena, which may cause excessive live streaming bandwidth jitter. To solve this problem, a content-based low-latency live streaming (RTS) scheduling scheme (i.e., RTS 302 scheduling) is a commonly used scheduling method.
[0003] At present, in the RTS 302 scheduling, the client needs to use the Hyper Text Transfer Protocol (HTTP) protocol for signaling interaction, and the signaling interaction process is relatively long. When 302 scheduling is performed, the first frame time (the time consumed by the client from requesting content to pulling the to-be-played media is relatively long) is affected, and the user viewing experience is reduced. SUMMARY
[0004] The present application provides a scheduling processing method, device, equipment and storage medium, which is used to shorten the first frame time of the client in 302 scheduling and improve the user viewing experience.
[0005] In a first aspect, the present application provides a scheduling processing method applied to a first server, and the method comprises:
[0006] receiving a signaling request sent by a client, the signaling request being used to request a to-be-played media stream;
[0007] based on the signaling request, calling a content-based scheduling service to obtain a scheduling result, the scheduling result comprising an IP address of a second server where the media stream is located and first information, the first information being used for verification when a communication connection is established between the client and the second server;
[0008] feeding back a signaling response to the client, the signaling response comprising the IP address of the second server and the first information;
[0009] sending the first information to the second server.
[0010] In a second aspect, the present application provides a scheduling processing method applied to a second server, and the method comprises:
[0011] Receive first information sent by the first server, wherein the first information is generated by the first server invoking the content-based scheduling service based on the received signaling request;
[0012] Receive a Network Address Translation (NAT) traversal request sent by a client, the NAT traversal request being used by the client to request the establishment of a communication connection with the second server;
[0013] The client that issued the NAT traversal request is verified using the first information.
[0014] Thirdly, this application provides a scheduling processing method applied to a third server, the method comprising:
[0015] Receive first information sent by the first server, the first information being sent by the first server after the number of retransmissions to the client has reached a preset threshold;
[0016] Receive a verification request sent by a second server, the verification request being sent by the second server after the client's verification fails;
[0017] The client is verified using the first information to obtain a verification result;
[0018] A verification response is sent back to the second server, the verification response including the verification result.
[0019] Fourthly, this application provides a scheduling processing device applied to a first server, the device being used to request a media stream to be played;
[0020] The processing module is used to invoke a content-based scheduling service based on the signaling request to obtain a scheduling result. The scheduling result includes the IP address of the second server where the media stream is located and first information, which is used for verification when the client establishes a communication connection with the second server.
[0021] The sending module is used to send a signaling response to the client, the signaling response including the IP address of the second server and the first information, and to send the first information to the second server.
[0022] Fifthly, this application provides a scheduling processing apparatus applied to a second server, the apparatus comprising:
[0023] The receiving module is used to receive first information sent by the first server, which is generated by the first server calling the content-based scheduling service based on the received signaling request, and to receive a Network Address Translation (NAT) traversal request sent by the client, which is used by the client to request the establishment of a communication connection with the second server.
[0024] The processing module is used to verify the client that issued the NAT traversal request using the first information.
[0025] Sixthly, this application provides a scheduling processing apparatus applied to a third server, the apparatus comprising:
[0026] The receiving module is used to receive first information sent by a first server, which is sent after the first server has resent the client a preset number of times, and to receive a verification request sent by a second server, which is sent by the second server after the client fails to be verified.
[0027] The processing module is used to verify the client using the first information and obtain the verification result;
[0028] The sending module is used to send a verification response to the second server, the verification response including the verification result.
[0029] In a seventh aspect, this application provides a scheduling processing system, including: a first server, a second server, and a third server;
[0030] The first server is used to implement the method described in the first aspect above, the second server is used to implement the method described in the second aspect above, and the third server is used to implement the method described in the third aspect above.
[0031] Eighthly, this application provides a server, including: a processor, and a memory communicatively connected to the processor;
[0032] The memory stores computer-executed instructions;
[0033] The processor executes computer execution instructions stored in the memory to implement the methods described in the first, second, or third aspects above.
[0034] Ninthly, this application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the methods described in the first, second, or third aspects.
[0035] In the solution provided in this application, when the first server receives a signaling request from the client, it calls a content-based scheduling service to obtain a scheduling result. This scheduling result includes the IP address of the second server where the requested media stream is located and first information. This first information is used for verification when the client establishes a communication connection with the second server. Subsequently, the first server sends the IP address of the second server and the first information back to the client through a signaling response, and sends the first information to the second server. In this way, when the second server receives a NAT traversal request from the client, it can use the first information generated by the first server during the signaling interaction phase to verify the client. This reduces the signaling interaction process between the client and the second server, reduces the internal transmission cost of the server, shortens the first frame latency for the client, and improves the user's viewing experience. Attached Figure Description
[0036] Figure 1 This is an interactive flowchart based on the RTS 302 scheduling method;
[0037] Figure 2 This is a schematic diagram illustrating an application scenario applicable to the embodiments of this application;
[0038] Figure 3 yes Figure 2 The diagram shows the interaction process of each device in the application scenario shown.
[0039] Figure 4 This is an interactive illustration of the scheduling processing method provided in the first embodiment of this application;
[0040] Figure 5 This is a flowchart illustrating the scheduling processing method provided in the second embodiment of this application;
[0041] Figure 6 This is a schematic block diagram of the scheduling processing device provided in the embodiments of this application;
[0042] Figure 7 This is a schematic block diagram of the server provided in the embodiments of this application. Detailed Implementation
[0043] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0044] First, let's explain the relevant terms used in this application:
[0045] 1. Web Real-Time Communication (WebRTC) technology is a technology that enables real-time audio and video communication between web browsers. It can realize audio and video communication or multi-party conferencing between different browsers and between browsers and terminals.
[0046] 2. Low-latency live streaming (RTS) is based on video live streaming, and it optimizes underlying technologies such as end-to-end latency monitoring, CDN transmission protocol transformation, and user datagram protocol (UDP). By integrating a live streaming playback software development kit (SDK), it supports millisecond-level latency live streaming capabilities between nodes in scenarios with tens of millions of concurrent users. This makes up for the 3-6 second latency problem of traditional live streaming, ensuring an ultimate live streaming viewing experience with low latency, low buffering, and instant opening.
[0047] 3.302 service, or content-based scheduling service, is a scheduling method that allows content requested by a client to be rescheduled to a new server.
[0048] Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. In the following descriptions of embodiments, "a plurality of" means two or more, unless otherwise explicitly defined.
[0049] Figure 1 This is an interactive flowchart of an RTS 302-based scheduling method. This RTS 302-based scheduling method establishes sessions based on a Software-Defined Perimeter (SDP) proposal / response model. Figure 1 As shown, the RTS 302-based scheduling method may include the following steps:
[0050] S101. The client RTS player sends a first HTTP signaling request to the first server, which includes an SDP offer.
[0051] S102. After receiving the first HTTP signaling request, the first server obtains the 302 policy by calling the 302 service, and determines the address of the second server based on the 302 policy.
[0052] S103, The first server sends the first HTTP signaling response to the client RTS player.
[0053] The HTTP response code in the first HTTP signaling response is 302, and the first HTTP signaling response includes the address of the second server.
[0054] S104. After receiving the address of the second server, the client RTS player sends a second HTTP signaling request to the second server, which includes an SDP offer.
[0055] S105, The first server sends a second HTTP signaling response to the client RTS player.
[0056] The HTTP response code in the second HTTP signaling response is 200, and the second HTTP signaling response includes an SDP answer.
[0057] S106. After receiving the SDP answer, the client RTS player performs an Interactive Connectivity Establishment (ICE) process with the second server.
[0058] exist Figure 1 In the illustrated scheme, within the SDP proposal / response model, the client RTS player (the proposer) initiating the session generates an SDP message describing its desired session, which constitutes an SDP offer. Therefore, the first HTTP signaling request sent by the client RTS player to the first server includes the SDP offer.
[0059] Optionally, in the RTS 302 scheduling scheme, the session needs to be scheduled to another server. Therefore, when the first server receives the SDP offer, it needs to obtain the 302 policy through the scheduling 302 service, and then determine the second server that can be used to establish a session with the client RTS player based on the 302 policy. Therefore, the first HTTP signaling response sent by the first server to the client RTS player may include the response code 302 and the address of the second server. The response code 302 indicates the response sent through 302 scheduling, and the address of the second server indicates the target object for the client RTS player when initiating a subsequent session.
[0060] Accordingly, after receiving the first HTTP signaling response, the client RTS player can initiate a session with the second server. That is, the second HTTP signaling request sent by the client RTS player to the second server includes the aforementioned SDPoffer.
[0061] Optionally, after the SDP offer is sent to the second server, the second server may accept or reject the SDP offer. As an example, when the second server accepts the SDP offer, it needs to generate an SDP message describing the sessions it can accept based on the received SDP offer and its own capabilities; this is called an SDP answer.
[0062] Correspondingly, after receiving the SDP response, the client can execute the ICE process with the second server, that is, exchange ICE information (IP address, UDP port, etc.) in order to establish a communication link with the second server. In this way, the second server can transmit the media stream to the client in sequence.
[0063] As the above analysis shows, the first server uses the 302 response code to reschedule the media stream requested by the client RTS player to the second server, thereby achieving playback aggregation and reducing the internal transmission cost of the server. However, since the HTTP signaling interaction process itself is relatively long, when the 302 scheduling is executed, it will cause the client RTS player to take a long time from the start of playback to the retrieval of audio and video data and other media streams. There is a problem that the client takes a long time to obtain the first frame, resulting in a poor viewing experience for the user.
[0064] In view of this, this application provides a scheduling processing method. When a first server receives a signaling request sent by a client, it calls a content-based scheduling service to obtain a scheduling result. The scheduling result includes the address of the second server where the requested media stream is located and first information. This first information is used for verification when the client establishes a communication connection with the second server. Subsequently, the first server sends the address of the second server and the first information back to the client through a signaling response and sends the first information to the second server. In this way, when the second server receives a NAT traversal request sent by the client, it can use the first information generated by the first server during the signaling interaction phase to verify the client, reducing the signaling interaction process between the client and the second server, shortening the time for the client to obtain the first frame, and improving the user's viewing experience.
[0065] Before introducing the technical solution of this application, we will first introduce the application scenarios to which the embodiments of this application are applicable.
[0066] Figure 2 This is a schematic diagram of an application scenario applicable to the embodiments of this application. Figure 3 yes Figure 2 The diagram illustrates the interaction process of each device in the application scenario shown. Figure 2 and Figure 3As shown in the diagram, the application scenario may include: client 201, first server 202, second server 203 and third server 204.
[0067] The client 201 can be a client that interacts with the server based on WebRTC signaling. It has a player installed on it and can interact with the server via WebRTC signaling to retrieve the media stream of the content to be played. The first server 202 can be a signaling server, the second server 203 can be a media server, and the third server 204 can be a server cluster that can provide centralized services and achieve global server load balancing (GSLB).
[0068] Optionally, the WebRTC signaling can be an H5 signaling, and correspondingly, the player on the client 201 can be an H5RTS Player for playing the acquired media stream.
[0069] It is understood that the signaling used for interaction between the client 201 and the first server 202 can be any WebRTC signaling interaction method (since the standard WebRTC does not define a specific signaling interaction method), such as the H5 signaling interaction method. This application embodiment does not limit it.
[0070] In this embodiment, the first server 202 may be a signaling server, which can process received signaling requests, for example, referring to... Figure 3 As shown, in the 302 scheduling-based scheme, when client 201 sends a signaling request to first server 202 to request a media stream, first server 202 can determine, based on the signaling request, the second server 203 that caches the aforementioned media stream, as well as the first information generated through negotiation.
[0071] Optionally, the first information may include an interaction token used for security verification and SDP negotiation information. The SDP negotiation information may include the number of media and the media encoding format, etc.
[0072] In this embodiment, the first server 202 can send a signaling response to the client 201 the determined address of the second server 203 (e.g., Internet Protocol (IP) address) and the aforementioned first information, so that the client 201 can initiate an ICE process with the second server 203 based on the received first information.
[0073] Optionally, in addition to sending the address of the second server 203 and the first information back to the client 201, the first server 202 may also send the aforementioned first information back to the second server 203, see [link to relevant documentation].Figure 3 As shown, this first information is used by the second server 203 to verify the client 201 when it receives an ICE request from the client 201. For example, the second server 203 can use this first information to perform security verification on the client 201.
[0074] In another optional implementation of this application, when the first server 202 fails to send the first information to the second server 203, the first server 202 can send the first information to the third server 204. In this way, when the second server 203 fails to verify the client 201 that initiated the ICE process, it can request the third server 204 to verify the client 201. For example, when the third server 204 receives the verification request from the second server 203, it can use the received first information to verify the client 201 and send the verification result back to the second server 203. This avoids the problem of the ICE process failing due to network connectivity issues between servers.
[0075] In the embodiments of this application, leveraging the inherent isolation between WebRTC signaling interaction and / or the ICE process, the address of the second server (new server) is provided to the client during the signaling phase, allowing the client to initiate the ICE process to the second server, thereby achieving rescheduling (i.e., generalized 302 scheduling). Since the second server can obtain the verification information required for the ICE phase from the first server performing the 302 scheduling, it can directly rely on the information negotiated during the signaling interaction phase for verification. This reduces the number of signaling interactions between the client and server, shortens the time required for the client to obtain the first frame, and improves the user's viewing experience.
[0076] It should be understood that Figure 2 The application scenario diagram shown is only an example. This application embodiment does not limit the composition of the devices in the application scenario, nor does it limit the number of devices in the application scenario. It can be determined according to the needs of the actual scenario, which will not be elaborated here.
[0077] The following is combined Figure 2 The application scenarios shown illustrate the scheduling processing method provided in the embodiments of this application.
[0078] For example, Figure 4 This is an interactive schematic diagram of the scheduling processing method provided in the first embodiment of this application. This scheduling processing method implements a scheduling strategy based on 302 service through information interaction between the client, the first server, and the second server. Figure 4 As shown, the scheduling method may include the following steps:
[0079] S401. The client sends a signaling request to the first server, which is used to request a media stream.
[0080] In embodiments of this application, the client can be a WebRTC client with a player installed, such as an H5RTS Player or other client-side RTS player. Correspondingly, the signaling request can be any form of WebRTC signaling used to request a media stream.
[0081] Optionally, the signaling request may include an SDP offer. Optionally, the SDP offer may include the number of media and media encoding formats (e.g., codec set) that the client RTS player wants to use, as well as the IP address and port used by the client RTS player to receive the media. It is understood that this embodiment does not limit the content included in the SDP offer; it can be determined according to actual needs, and will not be elaborated here.
[0082] S402. The first server invokes the content-based scheduling service based on a signaling request and obtains a scheduling result, which includes the address of the second server where the requested media stream is located and the first information.
[0083] The first piece of information is used for verification when establishing a communication connection between the client and the second server.
[0084] Optionally, in an embodiment of this application, the first server parses the received signaling request and determines that the signaling request is for requesting a media stream. Then, by calling the content-based scheduling service, i.e. by requesting the 302 service, the first server can determine the new server (i.e., the second server) and obtain the address of the second server, such as its IP address.
[0085] It is understood that the content-based scheduling service in this embodiment is actually a 302 service, which is a service that centrally schedules playback requests for a certain stream to certain servers according to a certain strategy. Specifically, the first server requests the 302 service to obtain the specific scheduling strategy, and then determines the address of the second server used to provide the media stream, etc., based on the scheduling strategy.
[0086] Optionally, the scheduling result obtained by the first server through the content-based scheduling service may also include first information, which can be used for security verification during the subsequent establishment of a communication connection between the client and the second server.
[0087] S403, The first server sends the first message to the second server.
[0088] Optionally, in embodiments of this application, the first server may transmit the first information from the aforementioned scheduling result to the second server. Optionally, the first information may include SDP information and an interaction token.
[0089] It is understood that the embodiments of this application do not limit the protocol on which the first server transmits the first information to the second server, and it can be HTTP, User Datagram Protocol (UDP), KCP, etc. Among them, KCP is a fast and reliable protocol, an automatic repeat-request (ARQ) protocol, which realizes reliable transmission of UDP data packets through a retransmission mechanism.
[0090] Optionally, the SDP information may include the number of media, the specific encoding information of the media, etc. The token is an identifier returned to the client in the signaling response. It will be sent to the second server during the communication connection establishment process so that the second server can verify the client that initiated the communication connection establishment request.
[0091] Optionally, in embodiments of this application, the second server may store the first information after receiving it. That is, for the second server, the first information is generated by the first server calling the content-based scheduling service when it receives a signaling request.
[0092] S404. The first server sends a signaling response to the client, which includes the address of the second server and the first information.
[0093] Optionally, in this embodiment, when the first server receives the scheduling result, it can send the address of the second server and the first information back to the client in the form of a signaling response. For example, in the signaling response, the first server sets the IP address of the candidate server to the IP address of the second server.
[0094] It is understood that the execution order of S403 and S404 is not limited in the embodiments of this application. They can be executed simultaneously or not simultaneously. For example, the first server can execute S403 first and then S404, or execute S404 first and then S403. This will not be elaborated here.
[0095] S405. When the client receives the signaling response, it sends a NAT traversal request to the second server.
[0096] The NAT traversal request is used by the client to request the establishment of a communication connection with the second server.
[0097] In this embodiment, the client processes the received signaling response to determine the address of the second server, and then initiates a communication connection establishment process with the second server, i.e., a Network Address Translation (NAT) traversal process. For example, the client sends a NAT traversal request to the second server to request the establishment of a communication connection with the second server.
[0098] Optionally, NAT traversal is a technique that maps IP addresses visible on the external network to addresses used on the internal network in order to connect devices on different networks. It can include using Traversal Using Relaysaround NAT (TURN), Simple Traversal of UDP Through NATs (STUN), and Interactive Connectivity Establishment (ICE).
[0099] ICE (Interruptible Connection Interchange) is a comprehensive NAT traversal technique, specifically designed for UDP multimedia sessions based on the offer and answer model. Essentially, it's an extension of the offer and answer model by including diverse IP addresses and ports in SDP offers and answers, and then using STUN or TURN to perform connection checks. The purpose of ICE is to discover which address pairs are valid.
[0100] Optionally, the ICE process can be used as a NAT hole punching method in the embodiments of this application. It is not limited to ICE and can be any method for implementing NAT hole punching.
[0101] S406. The second server uses the received first information to verify the client that initiated the NAT traversal request and obtains the verification result.
[0102] Optionally, when the second server receives a NAT traversal request from a client, it can query the first information received in the second server and then use the first information to verify the client that initiated the NAT traversal request.
[0103] In one optional implementation, the first information includes an interaction token and the corresponding Software-Defined Boundary (SDP) negotiation information; the NAT traversal request includes the interaction token. In this case, step S406 (verifying the client initiating the NAT traversal request using the received first information) can be implemented through the following steps:
[0104] A1. The second server determines whether the aforementioned interaction token exists in the second server. If yes, execute A2; otherwise, execute A4.
[0105] A2. Based on the interaction token, determine whether the SDP negotiation information corresponding to the interaction token exists in the second server; if yes, proceed to A3; if no, proceed to A4.
[0106] A3. Confirm that the client verification is successful;
[0107] A4. Client verification failed.
[0108] In this embodiment, when the second server obtains the interaction token in the NAT traversal request, it can query the second server's cache to determine whether the interaction token exists in the second server.
[0109] As an example, if the second server contains the aforementioned interaction token and the corresponding SDP negotiation information, the client verification is deemed successful.
[0110] As another example, if the aforementioned interaction token is not present in the second server and / or the SDP negotiation information corresponding to the interaction token is not present in the second server, the client verification is determined to have failed.
[0111] In other words, the second server can use the first information it has already received from the first server to verify the client.
[0112] S407. The second server sends a NAT traversal response to the client based on the verification result.
[0113] The NAT traversal response is used to indicate the verification result for the client.
[0114] In this embodiment, when the second server obtains the verification result for the client, it can send a NAT traversal response back to the client to indicate the verification result for the client.
[0115] In one alternative embodiment of this application, when the client verification is successful, the second server can determine the media stream requested by the client based on the aforementioned SDP negotiation information, and then send the media stream to the client.
[0116] In other words, when the second server verifies the client's identity, it retrieves the media stream to be played from the client and begins sending the media stream, at which point the NAT traversal process ends.
[0117] In the embodiments of this application, when the first server receives a signaling request sent by the client, it calls a content-based scheduling service to obtain a scheduling result. The scheduling result includes the address of the second server where the requested media stream is located and first information. The first information is used for verification when the client establishes a communication connection with the second server. Subsequently, the first server sends the IP address of the second server and the first information back to the client through a signaling response, and sends the first information to the second server. In this way, when the second server receives a NAT traversal request sent by the client, it can use the first information generated by the first server during the signaling interaction phase to verify the client, reducing the signaling interaction process between the client and the second server, shortening the client's first frame latency, and improving the user's viewing experience.
[0118] For example, in the above Figure 4 Based on the illustrated embodiment, Figure 5 This is a flowchart illustrating the scheduling method provided in the second embodiment of this application. Figure 5 As shown, after S403 above, the scheduling processing method may further include the following steps:
[0119] S501. If the first information fails to be sent, the first information is resent to the second server until the first information is successfully sent or the number of resentments reaches a preset threshold.
[0120] In the embodiments of this application, after the first server sends the first information to the second server, it also monitors whether the first information has been successfully sent. As an example, if the first information is successfully sent, then the above applies. Figure 4 The successful execution of S406 in the illustrated embodiment laid the foundation.
[0121] As another example, the first server is equipped with a retransmission mechanism and a preset threshold for the number of retransmissions. In this case, if the first information fails to be sent, the first server can retransmit the first information to the second server until the first information is successfully sent or the number of retransmissions reaches the preset threshold.
[0122] S502. If the number of retransmissions reaches the above threshold but the first information still fails to be sent, the first information is transmitted to a third server, which is used to provide centralized services.
[0123] In one optional embodiment of this application, if the number of times the first server retransmits the first information to the second server reaches the aforementioned threshold but the first information still fails to be sent (i.e., the first server retransmits the information to the second server a certain number of times without successfully sending it), then the first server can transmit the first information to a third server capable of providing various centralized services. Accordingly, the third server can receive and store the first information. It is understood that, for the third server, the first information is sent after the number of retransmissions from the first server to the client reaches the preset threshold.
[0124] Optionally, the third server can be a distributed central server cluster capable of communicating with other servers of any type. Therefore, in this embodiment, when the first server fails to send the first information to the second server, the third server can act as an interaction platform between the first and second servers. The first server can upload the first information to the third server for storage, thus avoiding the problem of functional failure caused by network connectivity issues between different servers.
[0125] Accordingly, in the embodiments of this application, after S406 and before S407, the scheduling processing method may further include the following steps:
[0126] S503. In response to the client's verification failure, the second server sends a verification request to the third server. The verification request includes the interaction token and the client's identifier.
[0127] In the embodiments of this application, when the second server fails to verify the client, for example, when the second server does not have an interaction token and / or the SDP negotiation information corresponding to the interaction token, the second server can send a verification request to the third server. By carrying the interaction token and client identifier in the verification request, the third server can identify the client to be verified and the interaction token used in the verification process.
[0128] S504. The third server uses the first information to verify the client and obtain the verification result.
[0129] Optionally, since the first server has already transmitted the first information to the third server for storage when it fails to send the first information to the second server, the third server can query the received first information when it receives the verification request, and use the received first information to verify the client and obtain the verification result.
[0130] Optionally, as mentioned above Figure 4Similar to the embodiment described, the first information includes an interaction token and the corresponding soft SDP negotiation information. Furthermore, as described in S503 above, the verification request includes the interaction token and the client's identifier. Accordingly, in this embodiment, S504 (the third server verifies the client using the first information and obtains the verification result) can be implemented through the following steps:
[0131] B1. The third server determines whether the aforementioned interaction token exists in the third server; if yes, proceed to B2; otherwise, proceed to B4.
[0132] B2. Based on the interaction token, determine whether the SDP negotiation information corresponding to the interaction token exists in the third server; if yes, proceed to B3; if no, proceed to B4.
[0133] B3. Confirm that the client verification has passed;
[0134] B4. Client verification failed.
[0135] In this embodiment, when the third server receives a verification request, it can query its cache based on the interaction token in the verification request to determine whether the interaction token exists in the third server.
[0136] As an example, if the third server contains the aforementioned interaction token and the corresponding SDP negotiation information, then the client verification is deemed successful.
[0137] As another example, in response to the absence of the aforementioned interaction token in the third server, and / or the absence of SDP negotiation information corresponding to the interaction token in the third server, it is determined that the client verification failed.
[0138] S505. Based on the above verification results, send a verification response to the second server.
[0139] The verification response includes the verification results mentioned above.
[0140] In the embodiments of this application, after the third server determines the verification result for the client, it can send the verification result back to the second server so that the second server can promptly send back the verification result for the client.
[0141] Optionally, in this embodiment, when the second server receives the verification response from the third server, it can determine whether the verification for the client is successful by analyzing the verification result in the verification response, and based on the determined verification result, it sends a NAT traversal response back to the client.
[0142] In the embodiments of this application, when the first server fails to send the first information to the second server, the first server can upload the first information to the third server for storage. Correspondingly, when the second server fails to verify the client, it sends a verification request to the third server, and then uses the third server to verify the client to obtain the verification result. In this technical solution, by using the third server as an intermediate interaction platform between the first and second servers, the problem of functional failure caused by network connectivity issues between different servers can be effectively avoided, thus improving verification accuracy.
[0143] As can be seen from the analysis of the above embodiments, the scheduling processing method provided in this application utilizes the isolation characteristics of WebRTC signaling interaction and / or NAT traversal process. When the first server determines the scheduling result, it sends a signaling response to the client and also transmits the negotiated information to the second server, reducing the interaction process between the client and the second server. This results in extremely low client experience loss and reduces the internal transmission cost of the server based on the WebRTC player.
[0144] Figure 6 This is a schematic block diagram of a scheduling processing device provided in an embodiment of this application. This scheduling processing device can be used to implement the function of any one of the first server, second server, or third server described above. Figure 6 As shown, the scheduling processing device 600 may include a receiving module 601, a processing module 602, and a sending module 603.
[0145] In one possible implementation of this application embodiment, when the scheduling processing device 600 is used to implement the functions of the first server described above, the functions of each module included in the scheduling processing device 600 are as follows:
[0146] The receiving module 601 is used to receive a signaling request sent by the client, the signaling request being used to request a media stream;
[0147] The processing module 602 is used to invoke a content-based scheduling service based on the signaling request to obtain a scheduling result. The scheduling result includes the address of the second server where the media stream is located and first information, which is used for verification when the client establishes a communication connection with the second server.
[0148] The sending module 603 is used to send a signaling response to the client, the signaling response including the address of the second server and the first information, and to send the first information to the second server.
[0149] Optionally, in this possible implementation, the sending module 603 is further configured to resend the first information to the second server when the first information fails to be sent, until the first information is successfully sent or the number of resends reaches a preset threshold, and when the number of resends reaches the threshold but the first information still fails to be sent, transmit the first information to a third server, the third server being used to provide centralized services.
[0150] Optionally, the first information includes an interaction token and the software-defined boundary (SDP) negotiation information corresponding to the interaction token.
[0151] In one possible implementation of this application embodiment, when the scheduling processing device 600 is used to implement the functions of the second server described above, the functions of each module included in the scheduling processing device 600 are as follows:
[0152] The receiving module 601 is used to receive first information sent by the first server, the first information being generated by the first server based on a received signaling request to call a content-based scheduling service, and to receive a Network Address Translation (NAT) traversal request sent by the client, the NAT traversal request being used by the client to request the establishment of a communication connection with the second server.
[0153] The processing module 602 is used to verify the client that initiated the NAT traversal request using the first information.
[0154] Optionally, the first information includes an interaction token and the corresponding Software-Defined Boundary (SDP) negotiation information; the NAT traversal request includes the interaction token; correspondingly, the processing module 602 is specifically used for:
[0155] Determine whether the interaction token exists in the second server;
[0156] In response to the existence of the interaction token in the second server, the system determines whether the SDP negotiation information corresponding to the interaction token exists in the second server based on the interaction token.
[0157] In response to the existence of SDP negotiation information corresponding to the interaction token in the second server, it is determined that the client verification has passed;
[0158] If the interaction token and / or the SDP negotiation information corresponding to the interaction token are not present in the second server, the client verification is determined to have failed.
[0159] Optionally, the sending module 603 is configured to send a verification request to a third server in response to the client verification failure, the verification request including the interaction token and the client's identifier;
[0160] The receiving module 601 is used to receive the verification response fed back by the third server, the verification response including the verification result of the client.
[0161] Optionally, the processing module 602 is further configured to determine the verification result for the client;
[0162] The sending module 603 is also configured to send a NAT traversal response back to the client, the NAT traversal response being used to indicate the verification result for the client.
[0163] Optionally, the processing module 602 is configured to determine the media stream requested by the client based on the SDP negotiation information in response to the client's successful verification.
[0164] The sending module 603 is used to send the media stream to the client.
[0165] In one possible implementation of this application embodiment, when the scheduling processing device 600 is used to implement the functions of the third server described above, the functions of each module included in the scheduling processing device 600 are as follows:
[0166] The receiving module 601 is used to receive first information sent by the first server, which is sent after the first server has resent the client to the client a preset number of times, and to receive a verification request sent by the second server, which is sent by the second server after the client fails to be verified.
[0167] Processing module 602 is used to verify the client using the first information and obtain a verification result;
[0168] The sending module 603 is used to send a verification response to the second server, the verification response including the verification result.
[0169] Optionally, the first information includes an interaction token and the software-defined boundary (SDP) negotiation information corresponding to the interaction token, and the verification request includes the interaction token and the identifier of the client.
[0170] Accordingly, the processing module 602 is specifically used for:
[0171] Determine whether the interaction token exists in the third server;
[0172] In response to the existence of the interaction token in the third server, determine whether the SDP negotiation information corresponding to the interaction token exists in the third server based on the interaction token;
[0173] In response to the presence of the SDP negotiation information in the third server, it is determined that the client verification has passed;
[0174] If the interaction token and / or the SDP negotiation information corresponding to the interaction token are not present in the third server, the client verification is determined to have failed.
[0175] The scheduling processing device provided in this application embodiment is used to implement the above-mentioned technical solutions of the first server, the second server, or the third server. For the specific implementation of each technical solution, please refer to the description in the above method embodiments, which will not be repeated here.
[0176] Figure 7 This is a schematic block diagram of a server provided in an embodiment of this application. This server can be used to implement the functions of the first server, the second server, or the third server in the above-described scheduling and processing system.
[0177] like Figure 7 As shown, the server 700 may include at least one processor 701, which is used to implement the functions of the first server, the second server, or the third server in the scheduling processing method provided in the embodiments of this application.
[0178] Optionally, the server 700 further includes at least one memory 702 communicatively connected to at least one processor 701 for storing computer-executable instructions and / or data. The memory 702 and the processor 701 are coupled. The coupling in this embodiment is an indirect coupling or communication connection between devices, units, or modules, which can be electrical, mechanical, or other forms, for information exchange between devices, units, or modules. The processor 701 may operate in conjunction with the memory 702. The processor 701 may execute computer-executable instructions stored in the memory 702. At least one computer-executable instruction in at least one memory may be included in the processor.
[0179] Optionally, the server 700 further includes a communication interface 703 for communicating with other devices via a transmission medium, thereby enabling the server 700 to communicate with other devices. When the server 700 is used to implement the function of a first server, the other devices may include a client, a second server, and a third server; when the server 700 is used to implement the function of a second server, the other devices may include a client, a first server, and a third server; when the server 700 is used to implement the function of a third server, the other devices may include a first server and a second server.
[0180] The communication interface 703 may be, for example, a transceiver, interface, bus, circuit, or device capable of transmitting and receiving functions. The processor 701 may use the communication interface 703 to transmit and receive data and / or information, and to implement the functions of the first server, the second server, or the third server in the above embodiments.
[0181] This application embodiment does not limit the specific connection medium between the processor 701, memory 702, and communication interface 703. This application embodiment... Figure 7 The processor 701, memory 702, and communication interface 703 are connected via bus 704. Bus 740 is... Figure 7 The connections between other components are shown in thick lines only and are not intended to be limiting. This bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0182] It should be understood that the processor in the embodiments of this application can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by the integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0183] It should also be understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0184] This application also provides a scheduling processing system, including: a first server, a second server and a third server;
[0185] Wherein, the first server is used to implement the technical solution of the first server in the above method embodiment, the second server is used to implement the technical solution of the second server in the above method embodiment, and the third server is used to implement the technical solution of the third server in the above method embodiment.
[0186] This application also provides a computer-readable storage medium storing computer-executable instructions (also referred to as code or a program). When the computer program is executed by a processor, it is used to implement the functions of the first server, the second server, or the third server in the above embodiments.
[0187] The terms “unit”, “module”, etc., used in this specification may be used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution.
[0188] Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. In the several embodiments provided in this application, it should be understood that the disclosed apparatus, devices, and methods can be implemented in other ways. For example, the apparatus embodiments described above are illustrative; for example, the division of units is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0189] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0190] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0191] In the above embodiments, the functions of each functional unit can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. This computer program product includes one or more computer instructions (programs). When these computer program instructions (programs) are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage node such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disk, hard disk, magnetic tape), optical media (e.g., digital video disc (DVD)), or semiconductor media (e.g., solid state disk (SSD)).
[0192] If this function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer node (which may be a personal computer, a server, or a network node, etc.) to execute all or part of the steps of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0193] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A scheduling processing method, characterized in that, Applied to a first server, the method includes: Receive a signaling request sent by the client, the signaling request being used to request a media stream; Based on the signaling request, a content-based scheduling service is invoked to obtain a scheduling result. The scheduling result includes the address of the second server where the media stream is located and first information, which is used for verification when the client establishes a communication connection with the second server. A signaling response is sent back to the client, the signaling response including the address of the second server and the first information; The first information is sent to the second server so that the second server can use the first information generated by the first server during the signaling interaction phase to verify the client.
2. The method as described in claim 1, characterized in that, The method further includes: If the first information fails to be sent, the first information is resent to the second server until the first information is successfully sent or the number of resentments reaches a preset threshold. If the number of retransmissions reaches the threshold but the first information still fails to be sent, the first information is transmitted to a third server, which provides centralized services.
3. The method as described in claim 1 or 2, characterized in that, The first information includes an interaction token and the corresponding Software Defined Boundary (SDP) negotiation information.
4. A scheduling processing method, characterized in that, Applied to a second server, the method includes: Receive first information sent by the first server, wherein the first information is generated by the first server invoking the content-based scheduling service based on the received signaling request; Receive a Network Address Translation (NAT) traversal request sent by a client, the NAT traversal request being used by the client to request the establishment of a communication connection with the second server; The client that issued the NAT traversal request is verified using the first information generated by the first server during the signaling interaction phase.
5. The method as described in claim 4, characterized in that, The first information includes an interaction token and the corresponding Software Defined Boundary (SDP) negotiation information. The NAT traversal request includes an interaction token; The step of verifying the client that issued the NAT traversal request using the first information includes: Determine whether the interaction token exists in the second server; In response to the existence of the interaction token in the second server, the system determines whether the SDP negotiation information corresponding to the interaction token exists in the second server based on the interaction token. In response to the existence of SDP negotiation information corresponding to the interaction token in the second server, it is determined that the client verification has passed; If the interaction token and / or the SDP negotiation information corresponding to the interaction token are not present in the second server, the client verification is determined to have failed.
6. The method as described in claim 5, characterized in that, The method further includes: In response to the client's verification failure, a verification request is sent to a third server, the verification request including the interaction token and the client's identifier; The client receives a verification response from the third server, the verification response including the verification result for the client.
7. The method as described in claim 5 or 6, characterized in that, The method further includes: Determine the verification result for the client; A NAT traversal response is sent back to the client, which indicates the verification result for the client.
8. The method as described in claim 7, characterized in that, The method further includes: In response to the client's successful verification, the media stream requested by the client is determined based on the SDP negotiation information; The media stream is sent to the client.
9. A scheduling processing method, characterized in that, Applied to a third server, the method includes: The client receives first information sent by the first server. The first information is sent after the first server has resent the message to the client a preset threshold number of times. The first information is used for verification when the client establishes a communication connection with the second server. Receive a verification request sent by a second server, the verification request being sent by the second server after the client's verification fails; The client is verified using the first information generated by the first server during the signaling interaction phase, and a verification result is obtained. A verification response is sent back to the second server, the verification response including the verification result.
10. The method as described in claim 9, characterized in that, The first information includes an interaction token and the software-defined boundary (SDP) negotiation information corresponding to the interaction token; the verification request includes the interaction token and the identifier of the client. The client is verified using the first information to obtain a verification result, including: Determine whether the interaction token exists in the third server; In response to the existence of the interaction token in the third server, determine whether the SDP negotiation information corresponding to the interaction token exists in the third server based on the interaction token; In response to the presence of the SDP negotiation information in the third server, it is determined that the client verification has passed; If the interaction token and / or the SDP negotiation information corresponding to the interaction token are not present in the third server, the client verification is determined to have failed.
11. A scheduling and processing system, characterized in that, include: First server, second server, and third server; The first server is used to implement the method as described in any one of claims 1 to 3, the second server is used to implement the method as described in any one of claims 4 to 8, and the third server is used to implement the method as described in any one of claims 9 or 10.
12. A server, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 10.
Citation Information
Patent Citations
SDP-based self-test NAT traversal system and method
CN105391817A
Live broadcasting video streaming playing address authorization verification method and system
CN106028064A