Data distribution method and device, server and computer readable storage medium

By constructing a distributed selective forwarding unit server cluster and utilizing regional information to select target servers for data distribution, the communication quality problem of a single SFU server accessing different regions is solved, achieving low latency and efficient bandwidth utilization, and improving the real-time data communication quality of clients.

CN122027701APending Publication Date: 2026-05-12BEIJING 360 INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING 360 INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2024-11-12
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

When a single SFU server connects to clients in different regions, the quality of real-time data communication for the clients is low due to the remote communication involved.

Method used

By constructing a distributed selective forwarding unit server cluster, the target selective forwarding unit server is selected using regional information, and the data is distributed to the remote selective forwarding unit server to be sent to the subscribing client. This avoids the high latency caused by direct remote communication and allows more remotely distributed subscribing clients to be accommodated by diverting the outbound bandwidth.

Benefits of technology

It effectively avoids high latency caused by remote communication, improves the quality of real-time data communication, and solves the communication quality problem of a single SFU server when accessing from different regions by splitting the outbound bandwidth to handle more clients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122027701A_ABST
    Figure CN122027701A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data distribution method and device, a server and a computer readable storage medium, and the method comprises the steps: a local selective forwarding unit server in a distributed selective forwarding unit server cluster receives target distribution data, and determines regional information of a subscription client corresponding to the target distribution data, determining a target selective forwarding unit server from a distributed selective forwarding unit server cluster based on the regional information, and when determining that the target selective forwarding unit server is a remote selective forwarding unit server, sending the target distribution data to the remote selective forwarding unit server, and sending the target distribution data to the subscription client by the remote selective forwarding unit server in the distributed selective forwarding unit server cluster. Therefore, the technical problem that when a single SFU server accesses clients in different regions, due to remote communication, the real-time data communication quality of the clients is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a data distribution method, apparatus, server, and computer-readable storage medium. Background Technology

[0002] A single SFU (Selective Forwarding Unit) server offers advantages in Web RTC (Web Real-Time Communication) such as low latency and low resource consumption. However, when a single SFU server connects to clients in different regions, the remote communication involved can result in lower quality of real-time data communication to the clients. Summary of the Invention

[0003] This application provides a data distribution method, apparatus, server, and computer-readable storage medium, which can solve the technical problem that when a single SFU server accesses clients in different regions, the real-time data communication quality to the clients is low due to remote communication.

[0004] In a first aspect, embodiments of this application provide a data distribution method applied to a local selective forwarding unit server in a distributed selective forwarding unit server cluster, wherein the distributed selective forwarding unit server cluster further includes remote selective forwarding unit servers; the method includes:

[0005] Receive target distribution data, and determine the subscription client corresponding to the target distribution data and the geographic information of the subscription client;

[0006] The target selective forwarding unit server is determined from the distributed selective forwarding unit server cluster based on the geographical information;

[0007] When the target selective forwarding unit server is determined to be the remote selective forwarding unit server, the target distribution data is sent to the remote selective forwarding unit server so that the remote selective forwarding unit server sends the target distribution data to the subscription client.

[0008] Optionally, determining the target selective forwarding unit server from the distributed selective forwarding unit server cluster based on the geographical information includes:

[0009] Obtain the service region information corresponding to the local selective forwarding unit server and the remote selective forwarding unit server respectively;

[0010] The service region information is used to match the region information to obtain target service region information that matches the service region information;

[0011] The target selective forwarding unit server is determined from the local selective forwarding unit server and the remote selective forwarding unit server based on the target service region information.

[0012] Optionally, the step of matching the regional information with the service regional information to obtain target service regional information that matches the regional information includes:

[0013] Obtain the current egress bandwidth load value and egress bandwidth threshold corresponding to the local selective forwarding unit server, and obtain the current egress bandwidth load value and egress bandwidth threshold corresponding to each remote selective forwarding unit server;

[0014] Determine the additional egress bandwidth value of the target distribution data for the local selective forwarding unit server, and determine the additional egress bandwidth value of the target distribution data for each remote selective forwarding unit server;

[0015] A reference selective forwarding unit server is determined from the local selective forwarding unit server and the remote selective forwarding unit server; wherein, the sum of the current egress bandwidth load value and the egress bandwidth increment value of the reference selective forwarding unit server is used as the egress bandwidth prediction value, and the egress bandwidth prediction value is less than or equal to the egress bandwidth threshold of the reference selective forwarding unit server.

[0016] Based on the service region information corresponding to the reference selective forwarding unit server, the region information is matched to obtain the target service region information that matches the region information.

[0017] Optionally, receiving the target distribution data includes:

[0018] The selective forwarding unit server receives the target distribution data based on the local service region information; wherein, the local service region information is the region information in the service region information that matches the local region information of the publishing client corresponding to the target distribution data;

[0019] The selective forwarding unit server that receives the target distribution data is designated as the local selective forwarding unit server corresponding to the publishing client, and the remaining selective forwarding unit servers are designated as remote selective forwarding unit servers corresponding to the publishing client.

[0020] Optionally, before receiving the target distribution data, the method further includes:

[0021] Based on the distributed selective forwarding unit server cluster, the server status of the local selective forwarding unit server and the remote selective forwarding unit server is detected, and an abnormal selective forwarding unit server with a fault status is identified. The abnormal selective forwarding unit server is then controlled to stop the data distribution service.

[0022] Obtain the abnormal service region information corresponding to the abnormal selective forwarding unit server, and perform service region information addition processing on the service region information corresponding to the remaining selective forwarding unit servers based on the abnormal service region information.

[0023] Optionally, receiving the target distribution data includes:

[0024] Receive target distribution data sent by the publishing client, store the target distribution data in the storage unit, and determine the data packet sequence number and data packet feature information corresponding to each data packet in the target distribution data;

[0025] Based on the data packet sequence number and the data packet feature information, a first data index is constructed for each data packet corresponding to the target distributed data in the storage unit;

[0026] When determining that the target selective forwarding unit server is the remote selective forwarding unit server, sending the target distribution data to the remote selective forwarding unit server includes:

[0027] When the target selective forwarding unit server is determined to be a remote selective forwarding unit server, the first data index is stored in the remote dual-end queue according to the first sequence order of the data packet sequence number corresponding to each first data index, thus obtaining the target remote dual-end queue.

[0028] Using the first data index in the target remote dual-end queue, which is sorted according to the first sequence order, the data packets are retrieved from the storage unit in sequence and sent to the remote selective forwarding unit server in sequence, so as to control the remote selective forwarding unit server to send the data packets to the subscription client in sequence according to the first sequence order.

[0029] Optionally, controlling the remote selective forwarding unit server to sequentially send the data packets to the subscribing client according to the first sequence order includes:

[0030] The remote selective forwarding unit server is controlled to store the data packets in the remote storage unit corresponding to the remote selective forwarding unit server, and a second data index is constructed for each data packet in the remote storage unit using the current data packet sequence number and data packet feature information corresponding to each data packet in the target distribution data.

[0031] Based on the remote selective forwarding unit server, the second data index is stored in the local double-ended queue corresponding to the remote selective forwarding unit server by using the second sequence order corresponding to the data packet sequence number of each second data index, so as to obtain the target local double-ended queue.

[0032] Using the second data index in the target remote dual-end queue, which is sorted according to the second sequence order, data packets are sequentially retrieved from the remote storage unit and sent to the subscription client in sequence.

[0033] Optionally, the method further includes:

[0034] Obtain the target local double-ended queue, and verify the target local double-ended queue based on the target remote double-ended queue to obtain the verification result;

[0035] When the data transmission completion type of the data packet is determined to be a data distribution anomaly type based on the verification result, the data packets are sequentially determined from the storage unit using the first data index in the target remote dual-end queue sorted according to the first sequence order, and the data packets are sequentially sent to the remote selective forwarding unit server.

[0036] Optionally, the method further includes:

[0037] When the target selective forwarding unit server is determined to be the local selective forwarding unit server, the target distribution data is forwarded to the subscribing client.

[0038] Optionally, determining the subscription client corresponding to the target distribution data and the geographic information of the subscription client includes:

[0039] The subscription client information in the target distribution data is determined, and the subscription client corresponding to the target distribution data and the geographic information of the subscription client are determined based on the subscription client information.

[0040] Secondly, embodiments of this application provide a data distribution method applied to remote selective forwarding unit servers in a distributed selective forwarding unit server cluster, wherein the distributed selective forwarding unit server cluster further includes local selective forwarding unit servers; the method includes:

[0041] Receive the target distribution data sent by the local selective forwarding unit server, and send the target distribution data to the subscribing client;

[0042] Wherein, the remote selective forwarding unit server is a target selective forwarding unit server; the target selective forwarding unit server is determined by the local selective forwarding unit server from the distributed selective forwarding unit server cluster using the regional information; the regional information and the subscription client are determined by the local selective forwarding unit server based on the received target distribution data.

[0043] Thirdly, embodiments of this application provide a data distribution device applied to a local selective forwarding unit server in a distributed selective forwarding unit server cluster, wherein the distributed selective forwarding unit server cluster further includes remote selective forwarding unit servers; the data distribution device includes:

[0044] A receiving module is adapted to receive target distribution data and determine the subscription client corresponding to the target distribution data and the geographic information of the subscription client;

[0045] The determination module is adapted to determine the target selective forwarding unit server from the distributed selective forwarding unit server cluster based on the geographical information;

[0046] The sending module is adapted to send the target distribution data to the remote selective forwarding unit server when it determines that the target selective forwarding unit server is the remote selective forwarding unit server, so that the remote selective forwarding unit server sends the target distribution data to the subscription client.

[0047] Fourthly, embodiments of this application provide a data distribution apparatus applied to a geographically located selective forwarding unit server in a distributed selective forwarding unit server cluster, wherein the distributed selective forwarding unit server cluster further includes a local selective forwarding unit server; the data distribution apparatus includes:

[0048] The distribution module is adapted to receive target distribution data sent by the local selective forwarding unit server and send the target distribution data to the subscription client;

[0049] Wherein, the remote selective forwarding unit server is a target selective forwarding unit server; the target selective forwarding unit server is determined by the local selective forwarding unit server from the distributed selective forwarding unit server cluster using the regional information; the regional information and the subscription client are determined by the local selective forwarding unit server based on the received target distribution data.

[0050] Fifthly, embodiments of this application provide a server, the server comprising:

[0051] Processor; and

[0052] A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method according to any one of the preceding descriptions.

[0053] Sixthly, embodiments of this application provide a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, which, when executed by a processor, implement the method described in any one of the above.

[0054] The beneficial effects of the technical solution provided in this application include at least the following: By constructing a distributed selective forwarding unit server cluster using local and remote selective forwarding unit servers located in different regions, after determining the geographical location of the subscribing client, the client can access the nearest target selective forwarding unit server. Since low-latency communication can be achieved between the selective forwarding unit servers in the distributed selective forwarding unit server cluster, high latency caused by direct remote communication can be effectively avoided during the distribution of target distribution data. Therefore, when the target selective forwarding unit server is determined to be a remote selective forwarding unit server, the process of sending target distribution data to the remote selective forwarding unit server through the local selective forwarding unit server can effectively avoid high latency caused by direct remote communication. Furthermore, the selective forwarding unit servers in the distributed selective forwarding unit server cluster can effectively distribute outbound bandwidth, avoiding exceeding the outbound bandwidth threshold, thereby handling more remotely distributed subscribing clients. This solves the technical problem of low real-time data communication quality for clients when a single SFU server accesses clients in different regions due to remote communication. Attached Figure Description

[0055] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 An exemplary system architecture diagram of a data distribution method provided in this application embodiment;

[0057] Figure 2 A flowchart illustrating a data distribution method provided in an embodiment of this application;

[0058] Figure 3A flowchart illustrating the process of determining a target selective forwarding unit server, as provided in an embodiment of this application;

[0059] Figure 4 A flowchart illustrating another method for determining a target selective forwarding unit server, as provided in an embodiment of this application;

[0060] Figure 5 This application provides a schematic diagram of a process for adding service area information in an embodiment of the present application.

[0061] Figure 6 This application provides a schematic diagram of a process for receiving target distributed data in an embodiment of the present application.

[0062] Figure 7 This is a schematic diagram illustrating another process for receiving target distributed data, provided in an embodiment of this application.

[0063] Figure 8 This application provides a schematic diagram of a data flow architecture for data distribution.

[0064] Figure 9 This is a schematic diagram illustrating a process for sending target distribution data to a remote selective forwarding unit server, as provided in an embodiment of this application.

[0065] Figure 10 This is a schematic diagram illustrating a process for sequentially sending data packets to a subscription client, as provided in an embodiment of this application.

[0066] Figure 11 This is a schematic diagram of a data verification process provided in an embodiment of this application;

[0067] Figure 12 This is a schematic diagram of the structure of a data distribution device provided in an embodiment of this application;

[0068] Figure 13 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation

[0069] To make the features and advantages of the embodiments of this application more apparent and understandable, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the embodiments of this application.

[0070] In related technologies, the single SFU architecture offers advantages in Web RTC audio and video communication due to its low latency and low resource consumption. However, in practical deployments, especially in online education scenarios, it faces a series of challenges. First, the single SFU architecture suffers from bandwidth limitations when handling a large number of users. For example, with a 1080p, 30FPS (Frames Per Second) video stream, each student requires approximately 3.5MB (megabytes) of bandwidth. When two hundred students are attending classes simultaneously, the server needs at least 700MB of outbound bandwidth to meet the demand, often exceeding the outbound bandwidth limit. Second, geographical distribution and proximity-based access are also challenges that the single SFU architecture needs to overcome. In a star topology, all clients transmit audio and video data through the central SFU server, and the server's geographical location significantly impacts user experience. For instance, if the user cluster is concentrated in Beijing while the server is located in Shanghai, it may lead to latency and communication quality issues.

[0071] To address related technical issues, this application provides a data distribution method applied to a local selective forwarding unit server in a distributed selective forwarding unit server cluster. The distributed selective forwarding unit server cluster also includes remote selective forwarding unit servers. The method includes: receiving target distribution data; determining the subscription client corresponding to the target distribution data and the geographical information of the subscription client; determining a target selective forwarding unit server from the distributed selective forwarding unit server cluster based on the geographical information; and when the target selective forwarding unit server is determined to be a remote selective forwarding unit server, sending the target distribution data to the remote selective forwarding unit server so that the remote selective forwarding unit server sends the target distribution data to the subscription client. This solves the technical problem of low real-time data communication quality for clients when a single SFU server accesses clients in different regions due to remote communication.

[0072] Please see Figure 1 , Figure 1 This is an exemplary system architecture diagram of a data distribution method provided in an embodiment of this application.

[0073] like Figure 1As shown, the system architecture may include a publishing client 101, a network 102, a distributed selective forwarding unit server cluster 103, and a subscription client 104. The network 102 serves as the medium for providing a communication link between the terminal 101 and the distributed selective forwarding unit server cluster 103. The network 102 may include various types of wired or wireless communication links, such as fiber optic, twisted-pair, or coaxial cable for wired communication links, and Bluetooth, Wi-Fi (Wireless Fidelity), or microwave communication links for wireless communication links. It should be noted that the roles of the publishing client 101 and the subscription client 104 can be interchanged, meaning the data flow is reversed. In the distributed selective forwarding unit server cluster 103, the network 102 is preferably a communication medium such as fiber optic that provides a low-latency network.

[0074] The client 101 can communicate with the distributed selective forwarding unit server cluster 103 (see network 102) via network 102. Figure 1 The publishing client 101 interacts with the distributed selective forwarding unit server cluster 103 (dashed box) to receive messages from or send messages to the distributed selective forwarding unit server cluster 103, or the publishing client 101 can interact with the distributed selective forwarding unit server cluster 103 via network 102 to receive messages or data sent to the distributed selective forwarding unit server cluster 103 by other users. The publishing client 101 can be hardware or software. When the publishing client 101 is hardware, it can be various terminals, including but not limited to smartwatches, smartphones, tablets, laptops, and desktop computers. When the publishing client 101 is software, it can be installed in the terminals listed above, and it can be implemented as multiple software or software modules (e.g., to provide distributed services) or as a single software or software module, without specific limitations.

[0075] The distributed selective forwarding unit server cluster 103 can be a business server providing various services. The distributed selective forwarding unit server cluster 103 includes a local selective forwarding unit server 103a and a remote selective forwarding unit server 103b. Here, the local selective forwarding unit server 103a and the remote selective forwarding unit server 103b are identical selective forwarding unit servers distributed in different geographical areas. The distributed selective forwarding unit server cluster 103 has at least two selective forwarding unit servers. When one selective forwarding unit server is selected as the local selective forwarding unit server 103a, the remaining selective forwarding unit servers are remote selective forwarding unit servers 103a. It should be noted that the distributed selective forwarding unit server cluster 103 can be hardware or software. When the distributed selective forwarding unit server cluster 103 is hardware, it can be implemented as a distributed server cluster composed of multiple servers. When the distributed selective forwarding unit server cluster 103 is software, it can be implemented as multiple geographically distributed software or software modules (e.g., used to provide distributed services).

[0076] In this embodiment, the local selective forwarding unit server 103a can receive target distribution data, determine the subscription client corresponding to the target distribution data and the geographical information of the subscription client; determine the target selective forwarding unit server from the distributed selective forwarding unit server cluster based on the geographical information; when the target selective forwarding unit server is determined to be a remote selective forwarding unit server, the target distribution data is sent to the remote selective forwarding unit server so that the remote selective forwarding unit server sends the target distribution data to the subscription client.

[0077] The remote selective forwarding unit server 103b can receive target distribution data sent by the local selective forwarding unit server and send the target distribution data to the subscribing client; wherein, the remote selective forwarding unit server is the target selective forwarding unit server; the target selective forwarding unit server is determined by the local selective forwarding unit server from the distributed selective forwarding unit server cluster using regional information; the regional information and the subscribing client are determined by the local selective forwarding unit server based on the received target distribution data.

[0078] It should be understood that the number of clients, networks, and distributed selective forwarding unit server clusters mentioned above is only illustrative. Depending on the implementation needs, there can be any number of clients, networks, and distributed selective forwarding unit server clusters.

[0079] Please see Figure 2 , Figure 2This is a flowchart illustrating a data distribution method provided in an embodiment of this application. The execution entity in this embodiment can be a local selective forwarding unit server executing the data distribution method, a processor within the local selective forwarding unit server executing the data distribution method, or a data distribution service within the local selective forwarding unit server executing the data distribution method. For ease of description, the following uses the processor within the local selective forwarding unit server as an example to describe the specific execution process of the data distribution method.

[0080] This data distribution method is applied to local selective forwarding unit servers in a distributed selective forwarding unit server cluster, which also includes remote selective forwarding unit servers.

[0081] The distributed selective forwarding unit server cluster can include multiple geographically distributed selective forwarding unit servers, which can be connected to each other through a low-latency network, including but not limited to fiber optic networks.

[0082] In a distributed selective forwarding unit server cluster, after selecting one selective forwarding unit server as the local selective forwarding unit server, the remaining selective forwarding unit servers are designated as remote selective forwarding unit servers. It should be noted that the division between local and remote selective forwarding unit servers can be based on actual needs. For example, the selective forwarding unit server that receives target distribution data from the publishing user terminal can be designated as the local selective forwarding unit server, and the remaining selective forwarding unit servers can be designated as remote selective forwarding unit servers. The selective forwarding unit server is the server used for real-time communication. Specifically, the selective forwarding unit server is the central server corresponding to the Web RTC application, used for forwarding audio and video streams.

[0083] The data distribution method applied to the local selective forwarding unit server includes:

[0084] S202: Receive target distribution data and determine the subscription client corresponding to the target distribution data and the geographical information of the subscription client.

[0085] The target distribution data can be media data sent by the publishing client to the local selective forwarding unit server. Specifically, the target distribution data can include at least one of audio data and video data. The target distribution data includes subscription client information, which includes information about the subscription clients corresponding to the publishing client and the geographic information of the subscription clients.

[0086] For example, after the local selective forwarding unit server receives the target distribution data, it determines the subscription client corresponding to the target distribution data and the geographical information of the subscription client, including: determining the subscription client information in the target distribution data, and determining the subscription client corresponding to the target distribution data and the geographical information of the subscription client based on the subscription client information.

[0087] Here, obtaining the geographic information of the subscribing client is used to avoid direct remote communication between the local selective forwarding unit server and the subscribing client. In a distributed selective forwarding unit server cluster, the local selective forwarding unit server and the remote selective forwarding unit server are connected to each other via a low-latency network, thus enabling low-latency communication within the distributed selective forwarding unit server cluster and ensuring the quality of remote communication. However, it is difficult to ensure low-latency communication between the local selective forwarding unit server and the subscribing client when communicating remotely. Therefore, it is advisable to obtain the geographic information of the subscribing client before communicating with it.

[0088] S204: Determine the target selective forwarding unit server from the distributed selective forwarding unit server cluster based on geographical information.

[0089] After determining the geographic information of the subscribing client, the target selective forwarding unit server is determined from the distributed selective forwarding unit server cluster using this information. The service geographic region corresponding to the target selective forwarding unit server matches the geographic region corresponding to the subscribing client. The service geographic region corresponding to the target selective forwarding unit server is generally the geographic region where the target selective forwarding unit server is located, or a geographic region close to the geographic region where the target selective forwarding unit server is located.

[0090] When the service region corresponding to the target selective forwarding unit server matches the region corresponding to the subscription client, the region corresponding to the subscription client is located in the service region corresponding to the target selective forwarding unit server, or the region corresponding to the subscription client is adjacent to the service region corresponding to the target selective forwarding unit server.

[0091] For example, when a distributed selective forwarding unit server cluster includes one local selective forwarding unit server and one remote selective forwarding unit server, the geographic region corresponding to the subscribing client is region A, the service geographic region corresponding to the local selective forwarding unit server is region B, and the service geographic region corresponding to the remote selective forwarding unit server is region C. When region A is a sub-region corresponding to region B, or the geographic distance between region A and region B is less than the geographic distance between region A and region C, the local selective forwarding unit server in the distributed selective forwarding unit server cluster can be used as the target selective forwarding unit server. When region A is a sub-region corresponding to region C, or the geographic distance between region A and region C is less than the geographic distance between region A and region B, the remote selective forwarding unit server in the distributed selective forwarding unit server cluster can be used as the target selective forwarding unit server.

[0092] Of course, the distributed selective forwarding unit server cluster can also include a local selective forwarding unit server and multiple remote selective forwarding unit servers. In this case, when determining the target selective forwarding unit server, the principle of the geographical region corresponding to the subscription client being located in the service geographical region corresponding to the target selective forwarding unit server, or the geographical region corresponding to the subscription client being adjacent to the service geographical region corresponding to the target selective forwarding unit server, is also followed. Therefore, it will not be elaborated here.

[0093] It should also be noted that when determining the target selective forwarding unit server, the current egress bandwidth load value and egress bandwidth threshold of the corresponding selective forwarding unit server can also be considered to avoid the egress bandwidth exceeding the egress bandwidth threshold after the selective forwarding unit server accesses the target distribution data.

[0094] S206: When the target selective forwarding unit server is determined to be a remote selective forwarding unit server, the target distribution data is sent to the remote selective forwarding unit server so that the remote selective forwarding unit server sends the target distribution data to the subscribing client.

[0095] Specifically, when the target selective forwarding unit server is determined to be a remote selective forwarding unit server, the target distribution data is sent from the local selective forwarding unit server to the remote selective forwarding unit server. The remote selective forwarding unit server receives the target distribution data and then sends it to the subscribing clients. Here, there can be multiple subscribing clients, and these clients can be distributed in different regions.

[0096] Since the local selective forwarding unit servers and remote selective forwarding unit servers in the distributed selective forwarding unit server cluster are connected through a low-latency network (such as a fiber optic network), the high latency caused by direct remote communication can be effectively avoided when sending target distribution data from the local selective forwarding unit server to the remote selective forwarding unit server.

[0097] Furthermore, in one feasible implementation, when the target selective forwarding unit server is determined to be a local selective forwarding unit server, the target distribution data is sent to the subscribing client.

[0098] In the embodiments provided in this application, a distributed selective forwarding unit server cluster is constructed by using local selective forwarding unit servers and remote selective forwarding unit servers distributed in different regions. This allows the subscribing client to access the nearest target selective forwarding unit server after determining its geographical location. Since low-latency communication can be achieved between the selective forwarding unit servers in the distributed selective forwarding unit server cluster, the high latency caused by direct remote communication can be effectively avoided during the distribution of target distribution data. Therefore, when the target selective forwarding unit server is determined to be a remote selective forwarding unit server, the high latency caused by direct remote communication can be effectively avoided during the process of sending target distribution data to the remote selective forwarding unit server through the local selective forwarding unit server. Furthermore, the selective forwarding unit servers in the distributed selective forwarding unit server cluster can effectively distribute the outbound bandwidth, avoiding exceeding the outbound bandwidth threshold, thereby handling more remotely distributed subscribing clients. This solves the technical problem of low real-time data communication quality for clients when a single SFU server accesses clients in different regions due to remote communication.

[0099] Please see Figure 3 , Figure 3 This is a flowchart illustrating the process of determining a target selective forwarding unit server, as provided in an embodiment of this application. Figure 3 As shown, in S204, determining the target selective forwarding unit server from the distributed selective forwarding unit server cluster based on geographical information includes:

[0100] S302: Obtain the service region information corresponding to the local selective forwarding unit server and the remote selective forwarding unit server.

[0101] The number of remote selective forwarding unit servers can be one or more. The service area information corresponding to the local selective forwarding unit server is the service area served by the local selective forwarding unit server, and the service area information corresponding to the remote selective forwarding unit server is the service area served by the remote selective forwarding unit server.

[0102] For example, when the number of remote selective forwarding unit servers is 2, the service region corresponding to the service of one remote selective forwarding unit server can be A1, the service region corresponding to the service of another remote selective forwarding unit server can be A2, and the service region corresponding to the service of the local selective forwarding unit server can be A3. The service regions served by each remote selective forwarding unit server are different, and the service regions served by the remote selective forwarding unit server and the local selective forwarding unit server are also different.

[0103] S304: Use service area information to match area information to obtain target service area information that matches the area information.

[0104] In this process, after determining the service region information of each selective forwarding unit server in the distributed selective forwarding unit server cluster, the service region information is used to match the region information corresponding to the subscribing client. Different subscribing clients may have different region information, that is, different region information can be matched with different target service region information.

[0105] For example, the number of subscribing clients can be 3. One subscribing client's geographic information can be A1, another subscribing client's geographic information can be A2, and the remaining subscribing clients' geographic information can be A3. It's easy to understand that, without considering the server's corresponding outbound bandwidth limitations, service geographic information A1 matches with other geographic information A1, service geographic information A2 matches with other geographic information A2, and service geographic information A3 matches with other geographic information A3.

[0106] S306: Determine the target selective forwarding unit server from the local selective forwarding unit server and the remote selective forwarding unit server based on the target service region information.

[0107] Specifically, after determining the target service region information, a local selective forwarding unit server or a remote selective forwarding unit server corresponding to each target service region information is identified, and this local selective forwarding unit server or remote selective forwarding unit server corresponding to each target service region information is designated as the target selective forwarding unit server. Here, the number of target selective forwarding unit servers can be one or more.

[0108] For example, in S304, both remote selective forwarding unit servers and the local selective forwarding unit server are target selective forwarding unit servers. When the target selective forwarding unit server is a remote selective forwarding unit server, the target distribution data is sent to the remote selective forwarding unit server so that the remote selective forwarding unit server can send the target distribution data to the subscription client. When the target selective forwarding unit server is a local selective forwarding unit server, the target distribution data can be sent directly to the subscription client based on the local selective forwarding unit server.

[0109] In the embodiments provided in this application, the service region information corresponding to the local selective forwarding unit server and the remote selective forwarding unit server are used to match the regional information of the subscribing client, thereby determining the target service region information that matches the regional information. Then, the selective forwarding unit server corresponding to the target service region information is used as the target selective forwarding unit server. Therefore, the subscribing client can access the target selective forwarding unit server nearby. Since the selective forwarding unit servers in the distributed selective forwarding unit server cluster can achieve low-latency communication, the high latency caused by remote direct communication can be effectively avoided during the distribution of target distribution data.

[0110] Please see Figure 4 , Figure 4 This is a schematic diagram illustrating another process for determining a target selective forwarding unit server, as provided in an embodiment of this application. Figure 4 As shown, in S302, the service area information is used to match the area information to obtain the target service area information that matches the area information, including:

[0111] S402: Obtain the current egress bandwidth load value and egress bandwidth threshold corresponding to the local selective forwarding unit server, and obtain the current egress bandwidth load value and egress bandwidth threshold corresponding to each remote selective forwarding unit server.

[0112] The current egress bandwidth load value is the data transmission volume carried by the current network egress, and the egress bandwidth threshold is the maximum data transmission volume that the network egress can carry. The egress bandwidth thresholds corresponding to local selective forwarding unit servers and remote selective forwarding unit servers can be the same or different, and the egress bandwidth thresholds corresponding to different remote selective forwarding unit servers can be the same or different.

[0113] Based on the current egress bandwidth load and egress bandwidth threshold of the local selective forwarding unit server, the amount of new egress bandwidth data that the local selective forwarding unit server can further carry can be determined; based on the current egress bandwidth load and egress bandwidth threshold of the remote selective forwarding unit server, the amount of new egress bandwidth data that the remote selective forwarding unit server can further carry can be determined.

[0114] S404: Determine the additional egress bandwidth value for the target distribution data for the local selective forwarding unit server, and determine the additional egress bandwidth value for the target distribution data for each remote selective forwarding unit server.

[0115] Specifically, the incremental value of the outbound bandwidth of the target distributed data for the local selective forwarding unit server can be calculated based on the data transmission parameters corresponding to the target distributed data, and the incremental value of the outbound bandwidth of the target distributed data for each remote selective forwarding unit server can be calculated based on the data transmission parameters corresponding to the target distributed data.

[0116] S406: Determine a reference selective forwarding unit server from the local selective forwarding unit server and the remote selective forwarding unit server; wherein, the sum of the current egress bandwidth load value and the egress bandwidth increment value of the reference selective forwarding unit server is used as the egress bandwidth prediction value, and the egress bandwidth prediction value is less than or equal to the egress bandwidth threshold of the reference selective forwarding unit server.

[0117] It should be understood that when the sum of the current egress bandwidth load and the increase in egress bandwidth for a local or remote selective forwarding unit server exceeds its corresponding egress bandwidth threshold, the local or remote selective forwarding unit server, upon receiving the target distribution data, will struggle to forward the data to the corresponding subscribed clients in a timely manner due to the egress bandwidth threshold limitation, resulting in high latency. Therefore, high latency can be avoided by selecting reference selective forwarding unit servers whose sum of current egress bandwidth load and increase in egress bandwidth is less than or equal to the corresponding egress bandwidth threshold. Here, the number of reference selective forwarding unit servers can be one or more.

[0118] The reference selective forwarding unit server can be a local selective forwarding unit server, a remote selective forwarding unit server, or both a local selective forwarding unit server and a remote selective forwarding unit server.

[0119] S408: Match the regional information based on the service regional information corresponding to the reference selective forwarding unit server to obtain the target service regional information that matches the regional information.

[0120] After determining the reference selective forwarding unit server, the service region information corresponding to each reference selective forwarding unit server is obtained. Then, the service region information corresponding to each reference selective forwarding unit server is used to match the region information of the subscribing client, so that the region corresponding to the subscribing client can be located in the service region corresponding to the reference selective forwarding unit server, or closer to the service region corresponding to the reference selective forwarding unit server, thereby minimizing the delay in the distribution of target data to the subscribing client.

[0121] In the embodiments provided in this application, reference selective forwarding unit servers are selected where the sum of the current egress bandwidth load value and the egress bandwidth increment value is less than or equal to the corresponding egress bandwidth threshold to avoid high latency in the forwarding process of target distribution data due to egress bandwidth threshold limitation. At the same time, the service region information corresponding to the reference selective forwarding unit server is matched with the regional information, so that the regional region corresponding to the subscription client can be located in the service region region corresponding to the reference selective forwarding unit server, or closer to the service region region corresponding to the reference selective forwarding unit server, thereby minimizing the latency in the process of target distribution data being distributed to the subscription client.

[0122] Please see Figure 5 , Figure 5 This is a schematic diagram illustrating a process for adding service area information, provided as an embodiment of this application. Figure 5 As shown, before receiving the target distribution data in S202, the following steps are also included:

[0123] S502: Based on the distributed selective forwarding unit server cluster, detect the server status of local selective forwarding unit servers and remote selective forwarding unit servers, identify abnormal selective forwarding unit servers with fault status, and control the abnormal selective forwarding unit servers to stop service.

[0124] When detecting the server status of local selective forwarding unit servers and remote selective forwarding unit servers based on the distributed selective forwarding unit server cluster, the server status can be detected based on the self-test modules of the local selective forwarding unit servers and remote selective forwarding unit servers, or a specific selective forwarding unit server in the distributed selective forwarding unit server cluster can be specified to detect the server status of the local selective forwarding unit servers and remote selective forwarding unit servers. For example, the specific selective forwarding unit server can be a local selective forwarding unit server.

[0125] When a server is detected to be in a fault state, it indicates that the selective forwarding unit server is unable to perform data distribution tasks. Therefore, an abnormal selective forwarding unit server with a fault state can be identified, and the abnormal selective forwarding unit server can be controlled to stop data distribution services.

[0126] It should be noted that the abnormal selective forwarding unit server that stops data distribution service at this time can be a previously assigned local selective forwarding unit server or a previously assigned remote selective forwarding unit server.

[0127] S504: Obtain the abnormal service region information corresponding to the abnormal selective forwarding unit server, and perform service region information addition processing on the service region information corresponding to the remaining selective forwarding unit servers based on the abnormal service region information.

[0128] Among them, the service region information corresponding to the abnormal selective forwarding unit server is abnormal service region information. Since the abnormal selective forwarding unit server stops data distribution service, it cannot provide services to the publishing clients that match the service region area corresponding to the abnormal service region information.

[0129] Therefore, the abnormal service region information can be used to add service region information to the service region information corresponding to the remaining selective forwarding unit servers. For example, the abnormal service region information can be divided into one or more abnormal service region sub-information according to the distance between the region corresponding to the abnormal service region information and the region corresponding to other service region information. Then, each abnormal service region sub-information can be added to the service region information corresponding to the region adjacent to its region.

[0130] In the embodiments provided in this application, the abnormal selective forwarding unit server is controlled to stop the data distribution service, and the service region information corresponding to the remaining selective forwarding unit servers is added based on the abnormal service region information, so that the remaining selective forwarding unit servers can take over the faulty selective forwarding unit server, thereby ensuring that the data distribution service is not interrupted.

[0131] Please see Figure 6 , Figure 6 This is a schematic diagram illustrating a process for receiving target distributed data, provided as an embodiment of this application. Figure 6 As shown, receiving target distribution data in S202 includes:

[0132] S602: The selective forwarding unit server receives the target distribution data based on the local service region information; wherein, the local service region information is the region information in the service region information that matches the local region information of the publishing client corresponding to the target distribution data.

[0133] Specifically, when the publishing client prepares to publish target distribution data, it uses the service region information of each selective forwarding unit server in the distributed selective forwarding unit server cluster to match the local region information of the publishing client to obtain the local service region information. This ensures that the region of the publishing client's corresponding local region information is located in the service region of the corresponding local service region information, or is adjacent to the service region of the corresponding local service region information, thereby minimizing the communication delay caused by uploading target distribution data.

[0134] S604: Designate the selective forwarding unit server that receives the target distribution data as the local selective forwarding unit server corresponding to the publishing client, and designate the remaining selective forwarding unit servers as the remote selective forwarding unit servers corresponding to the publishing client.

[0135] Specifically, after determining the selective forwarding unit server that receives the target distribution data, the local selective forwarding unit server and the remote selective forwarding unit server corresponding to the publishing client are updated. That is, the selective forwarding unit server that receives the target distribution data is set as the local selective forwarding unit server corresponding to the publishing client, and the selective forwarding unit servers with the remaining server status are set as the remote selective forwarding unit servers corresponding to the publishing client.

[0136] In the embodiments provided in this application, the local service region information of the publishing client is obtained by matching the local region information of the publishing client with the service region information of each selective forwarding unit server in the distributed selective forwarding unit server cluster. The target distribution data is then received based on the selective forwarding unit server set corresponding to the local service region information, thereby minimizing the communication delay caused by uploading the target distribution data.

[0137] Please see Figure 7 , Figure 7 This is a schematic diagram illustrating another process for receiving target distribution data, provided as an embodiment of this application. Please refer to... Figure 8 , Figure 8 This is a schematic diagram of a data flow architecture for data distribution provided in an embodiment of this application. Figure 7 and Figure 8 As shown, receiving target distribution data in S202 includes:

[0138] S702: Receive target distribution data sent by the publishing client, store the target distribution data in the storage unit, and determine the data packet sequence number and data packet characteristic information corresponding to each data packet in the target distribution data.

[0139] After the publishing client and the local selective forwarding unit server successfully exchange Offer and Answer (i.e., exchange communication parameter configurations), the publishing client begins capturing input data from the camera and microphone. This H.264 or Opus format data is encoded and encapsulated into SRTP (Secure Real-time Transport Protocol) format to ensure data integrity and confidentiality during transmission. Subsequently, this encapsulated SRTP data is sent to the local selective forwarding unit server through the uplink transmission channel.

[0140] Once the local selective forwarding unit server receives the SRTP data, it initiates a decryption process to restore the SRTP data to its original RTP (Real-time Transport Protocol) data, i.e., the target distribution data. After the decryption process is complete, the local selective forwarding unit server stores the target distribution data in the storage unit ( Figure 8 Within the buffer corresponding to the local selective forwarding unit server, the key information in the RTP header is further analyzed to determine the packet sequence number and packet characteristic information corresponding to each packet in the target distribution data. Packet characteristic information includes, but is not limited to, timestamps, feature identifiers, synchronization source identifiers, or contribution source identifiers.

[0141] S704: Based on the data packet sequence number and data packet feature information, construct the first data index for each data packet corresponding to the target distribution data in the storage unit.

[0142] Specifically, a corresponding structure instance is constructed based on the data packet sequence number and data packet feature information. This structure instance is used to encapsulate the payload information of the corresponding data packet. Then, a mapping relationship is established between this structure instance and the data packet corresponding to its data packet feature information. Based on the mapping relationship and the structure instance corresponding to each data packet, the first data index of each data packet corresponding to the target distributed data in the storage unit is obtained. This facilitates data identification, tracking, and retransmission operations when necessary.

[0143] Please see Figure 9 , Figure 9 This is a schematic diagram illustrating a process for sending target distribution data to a remote selective forwarding unit server, as provided in an embodiment of this application. Figure 9 As shown, in S206, when the target selective forwarding unit server is determined to be a remote selective forwarding unit server, the target distribution data is sent to the remote selective forwarding unit server, including:

[0144] S902: When the target selective forwarding unit server is determined to be a remote selective forwarding unit server, the first data index is stored in the remote dual-end queue according to the first sequence order of the data packet sequence number corresponding to each first data index, thus obtaining the target remote dual-end queue.

[0145] Specifically, after determining that the target selective forwarding unit server is a remote selective forwarding unit server, the first sequence order of the data packet sequence numbers corresponding to each first data index is determined, and the first data indexes are stored in the remote dual-end queue of the local selective forwarding unit server according to the first sequence order. Figure 8 In the remote deque corresponding to the local selective forwarding unit server, the target remote double-ended queue is obtained. A double-ended queue is a data structure that allows insertion, deletion, and reading operations at both ends.

[0146] S904: Using the first data index in the target remote dual-end queue, which is sorted according to the first sequence order, data packets are retrieved from the storage unit in sequence and sent to the remote selective forwarding unit server in sequence, so as to control the remote selective forwarding unit server to send data packets to the subscription client in the first sequence order.

[0147] In this system, an RTP distributor acts as the distribution component for the target distributed data. Following the order of the target remote dual-end queue, it sequentially extracts the first data index of each data packet corresponding to the target distributed data from the local deque. Then, using the first data index sorted in sequence within the target remote dual-end queue, it precisely retrieves the corresponding data packets from the storage unit. The RTP distributor then sequentially sends the data packets to the remote selective forwarding unit server, controlling the server to send the data packets to the subscribing client in the correct sequence. This ensures that the receiving side can reassemble and play the audio and video streams in the correct order, avoiding image or sound errors. Data packets can be encrypted before being sent to the remote selective forwarding unit server. The distributor utilizes a low-latency network to create a network connection for each data stream, ensuring that these data packets are transmitted to the remote selective forwarding unit server with high efficiency and low latency. This process not only guarantees the security of data transmission but also optimizes the efficiency and reliability of data distribution, thereby constructing a stable and efficient real-time communication network.

[0148] In one feasible implementation provided in this application, when the target selective forwarding unit server is determined to be the local selective forwarding unit server, the target distribution data is directly forwarded to the subscribing client. At this time, the data packet sequence number and data packet feature information corresponding to each data packet in the target distribution data can be determined. Based on the data packet sequence number and data packet feature information, a local data index is constructed for each data packet corresponding to the target distribution data in the storage unit. Then, the local data index is stored in the local double-ended queue corresponding to the local selective forwarding unit server in the order of the first sequence. Figure 8 The local selective forwarding unit server (deque) then reads the local data index based on the RTP distributor to determine the corresponding data packet, encrypts the corresponding data packet into SRTP data, and finally forwards it to the corresponding subscription client through the pacer (data flow control mechanism).

[0149] In the embodiments provided in this application, data packets are sequentially sent to the remote selective forwarding unit server based on the target remote dual-end queue, thereby ensuring that the data packets can still be reassembled and played in the correct order after being received and stored in order, so as to avoid the disorder of picture or sound.

[0150] Please see Figure 10 , Figure 10 This is a schematic diagram illustrating a process for sequentially sending data packets to a subscribing client, as provided in an embodiment of this application. Figure 10 As shown, in S904, the remote selective forwarding unit server sends data packets to the subscribing clients sequentially according to the first sequence order, including:

[0151] S1002: Control the remote selective forwarding unit server to store data packets in the remote storage unit corresponding to the remote selective forwarding unit server, and use the current data packet sequence number and data packet feature information corresponding to each data packet in the target distribution data to construct a second data index for each data packet in the remote storage unit.

[0152] Among them, after receiving data packets, the remote selective forwarding unit server uses the current data packet sequence number and data packet feature information corresponding to each data packet in the target distribution data to reconstruct the remote storage unit in the remote selective forwarding unit server ( Figure 8 The second data index of each data packet in the buffer corresponding to the remote selective forwarding unit server. The current data packet sequence number corresponding to each data packet can be determined based on the sending order in which the local selective forwarding unit server sends the data packets to the remote selective forwarding unit server.

[0153] In this system, the sequence number of the first data packet sent by the local selective forwarding unit server is the same as the sequence number of the first data packet corresponding to the target distribution data received by the local selective forwarding unit server. For each subsequent new data packet sent, the sequence number of that data packet is incremented by 1. The encoding rule for the sequence number of the data packet corresponding to the target distribution data received by the local selective forwarding unit server is the same.

[0154] When the remote selective forwarding unit server receives a data packet, it distributes and processes the audio and video streams sent by the local selective forwarding unit server. It identifies and distributes data packets based on the unique identifier of each connection; here, the unique identifier of the audio and video stream, SSRC (Synchronous Source Identifier), is used as the connection identifier. Each stream corresponds to a specific SSRC, and each buffer corresponds to a specific SSRC, storing the corresponding audio and video streams into the corresponding buffer, thus avoiding data storage disorder when multiple data streams are connected.

[0155] S1004: Based on the remote selective forwarding unit server, the second data index is stored in the local double-ended queue corresponding to the remote selective forwarding unit server by using the second sequence order corresponding to the data packet sequence number of each second data index, thus obtaining the target local double-ended queue.

[0156] Specifically, the second sequence order corresponding to the data packet sequence number of each second data index is determined. The remote selective forwarding unit server uses the second sequence order to store the second data index into the local double-ended queue corresponding to the remote selective forwarding unit server, thereby obtaining the target local double-ended queue corresponding to the remote selective forwarding unit server. Figure 8 The deque corresponding to the remote selective forwarding unit server is updated in real time as data continues to flow in and out.

[0157] S1006: Using the second data index in the target remote double-ended queue, which is sorted according to the second sequence order, data packets are retrieved from the remote storage unit in sequence and sent to the subscribing client in sequence.

[0158] In this process, when sending target distribution data to subscription clients, the RTP distributor uses the second data index, ordered sequentially in the deque, to retrieve data packets from the buffer to determine the RTP data. These packets are then sent sequentially to the subscription clients; that is, the RTP data is sent to the corresponding subscription client. Alternatively, the RTP data can be encrypted to obtain SRTP data, which is then distributed to at least one subscription client via a pacer. The subscription client decapsulates the SRTP data to obtain H.264 or Opus format data, which is then rendered and displayed on the screen.

[0159] In the embodiments provided in this application, data packets are sent to the subscription client sequentially based on the target local double-ended queue, thereby ensuring that the data packets are received by the subscription client in the correct order and can be reassembled and played in the correct order to avoid picture or sound errors.

[0160] Please see Figure 11 , Figure 11 This is a schematic diagram illustrating a data verification process provided in an embodiment of this application. Figure 11 As shown, the method includes:

[0161] S1102: Obtain the target local double-ended queue, and verify the target local double-ended queue based on the target remote double-ended queue to obtain the verification result.

[0162] Specifically, the target local double-ended queue corresponding to the remote selective forwarding unit server is obtained, and the target remote double-ended queue corresponding to the local selective forwarding unit server is used to verify the target local double-ended queue, thereby ensuring that there are no missing or out-of-order data packets during data transmission. If there are missing or out-of-order data packets during data transmission, the data transmission completion type of the data packets is the data distribution missing type; if there are no missing or out-of-order data packets during data transmission, the data transmission completion type of the data packets is the data distribution normal type.

[0163] S1104: When the data transmission completion type of the data packet is determined to be a data distribution missing type based on the verification result, the data packets are sequentially determined from the storage unit by using the first data index in the target remote dual-end queue sorted in the first sequence order, and the data packets are sequentially sent to the remote selective forwarding unit server.

[0164] In this process, if a data packet is missing or out of order during data transmission, the data transmission completion type of the data packet is determined to be a data distribution missing type. At this time, the target distribution data is retransmitted to the remote selective forwarding unit server. The data index in the target remote dual-end queue, which is sorted according to the first sequence order, is used again to determine the data packets from the storage unit in turn, and the data packets are sent to the remote selective forwarding unit server in turn, thereby completing the retransmission of the target distribution data. At the same time, the target distribution data received earlier is deleted in the remote selective forwarding unit server.

[0165] The embodiments provided in this application utilize the target remote dual-end queue to verify the target local dual-end queue. In this way, when the data transmission completion type of the data packet is the data distribution missing type, the target distribution data is retransmitted to the remote selective forwarding unit server, thereby preventing the subscription client from being unable to play streaming media data normally.

[0166] This application also provides a data distribution method. The executing entity in this application embodiment can be a remote selective forwarding unit server executing the data distribution method, a processor within the remote selective forwarding unit server executing the data distribution method, or a data distribution service within the remote selective forwarding unit server executing the data distribution method. For ease of description, the following uses the processor within the remote selective forwarding unit server as an example to describe the specific execution process of the data distribution method.

[0167] This data distribution method is applied to geographically located selective forwarding unit servers in a distributed selective forwarding unit server cluster, which also includes local selective forwarding unit servers; the method includes:

[0168] Receive target distribution data sent by the local selective forwarding unit server, and send the target distribution data to the subscribing client;

[0169] Among them, the remote selective forwarding unit server is the target selective forwarding unit server; the target selective forwarding unit server is determined by the local selective forwarding unit server using regional information from the distributed selective forwarding unit server cluster; the regional information and the subscribing client are determined by the local selective forwarding unit server based on the received target distribution data.

[0170] The relevant description of this method can be found in steps S202 to S206, and will not be repeated here.

[0171] Please see Figure 12 , Figure 12 This is a schematic diagram of a data distribution device provided in an embodiment of this application. Figure 12As shown, the data distribution device is applied to a local selective forwarding unit server in a distributed selective forwarding unit server cluster, which also includes remote selective forwarding unit servers; the data distribution device 1200 includes:

[0172] The receiving module 1210 is adapted to receive target distribution data and determine the subscription client corresponding to the target distribution data and the geographical information of the subscription client;

[0173] The determination module 1220 is adapted to determine the target selective forwarding unit server from the distributed selective forwarding unit server cluster based on geographical information;

[0174] The sending module 1230 is adapted to send the target distribution data to the remote selective forwarding unit server when it is determined that the target selective forwarding unit server is a remote selective forwarding unit server, so that the remote selective forwarding unit server sends the target distribution data to the subscription client.

[0175] Optionally, the determining module 1220 includes:

[0176] The acquisition unit is suitable for acquiring the service region information corresponding to the local selective forwarding unit server and the remote selective forwarding unit server, respectively.

[0177] The matching unit is suitable for matching regional information with service regional information to obtain target service regional information that matches the regional information.

[0178] The determination unit is suitable for identifying the target selective forwarding unit server from local selective forwarding unit servers and remote selective forwarding unit servers based on the target service region information.

[0179] Optionally, the matching unit includes:

[0180] The parameter acquisition module is suitable for acquiring the current egress bandwidth load value and egress bandwidth threshold corresponding to the local selective forwarding unit server, and for acquiring the current egress bandwidth load value and egress bandwidth threshold corresponding to each remote selective forwarding unit server.

[0181] The parameter determination module is suitable for determining the additional value of the egress bandwidth of the target distributed data for the local selective forwarding unit server, and for determining the additional value of the egress bandwidth of the target distributed data for each remote selective forwarding unit server.

[0182] The reference selective forwarding unit server determination module is suitable for determining the reference selective forwarding unit server from local selective forwarding unit servers and remote selective forwarding unit servers; wherein, the sum of the current egress bandwidth load value and the egress bandwidth increment value of the reference selective forwarding unit server is used as the egress bandwidth prediction value, and the egress bandwidth prediction value is less than or equal to the egress bandwidth threshold of the reference selective forwarding unit server.

[0183] The geographic information matching module is suitable for matching geographic information based on the service geographic information corresponding to the reference selective forwarding unit server to obtain the target service geographic information that matches the geographic information.

[0184] Optionally, the receiving module 1210 includes:

[0185] The target distribution data receiving unit is adapted to receive target distribution data based on the selective forwarding unit server corresponding to the local service region information; wherein, the local service region information is the region information in the service region information that matches the local region information of the publishing client corresponding to the target distribution data.

[0186] The division unit is suitable for using the selective forwarding unit server that receives the target distribution data as the local selective forwarding unit server corresponding to the publishing client, and using the remaining selective forwarding unit servers as the remote selective forwarding unit servers corresponding to the publishing client.

[0187] Optionally, the receiving module 1210 further includes:

[0188] The control unit is adapted to detect the server status of local selective forwarding unit servers and remote selective forwarding unit servers based on a distributed selective forwarding unit server cluster, identify abnormal selective forwarding unit servers whose server status is faulty, and control the abnormal selective forwarding unit servers to stop data distribution services.

[0189] The service region information addition unit is suitable for obtaining abnormal service region information corresponding to the abnormal selective forwarding unit server, and for adding service region information to the service region information corresponding to the remaining selective forwarding unit servers based on the abnormal service region information.

[0190] Optionally, the receiving module 1210 includes:

[0191] The receiving unit is adapted to receive the target distribution data sent by the publishing client, store the target distribution data in the storage unit, and determine the data packet sequence number and data packet characteristic information corresponding to each data packet in the target distribution data;

[0192] The building unit is suitable for constructing a first data index for each data packet corresponding to the target distributed data in the storage unit, based on the data packet sequence number and data packet feature information.

[0193] The sending module 1230 includes:

[0194] The target remote dual-end queue generation unit is suitable for determining that the target selective forwarding unit server is a remote selective forwarding unit server. It stores the first data index into the remote dual-end queue according to the first sequence order of the data packet sequence number corresponding to each first data index to obtain the target remote dual-end queue.

[0195] The data packet sending unit is adapted to use the first data index in the target remote double-ended queue, which is sorted according to the first sequence order, to sequentially retrieve data packets from the storage unit and sequentially send the data packets to the remote selective forwarding unit server, so as to control the remote selective forwarding unit server to send the data packets to the subscription client in the first sequence order.

[0196] Optionally, the data packet sending unit includes:

[0197] The control subunit is adapted to control the remote selective forwarding unit server to store data packets in the remote storage unit corresponding to the remote selective forwarding unit server, and to construct a second data index for each data packet in the remote storage unit using the current data packet sequence number and data packet feature information corresponding to each data packet in the target distribution data.

[0198] The target local double-ended queue generation sub-unit is suitable for use with a remote selective forwarding unit server. It utilizes the second sequence order corresponding to the data packet sequence number of each second data index to store the second data index into the local double-ended queue corresponding to the remote selective forwarding unit server, thereby obtaining the target local double-ended queue.

[0199] The sending subunit is adapted to use the second data index, which is sorted in the second sequence order in the target remote double-ended queue, to sequentially retrieve data packets from the remote storage unit and send the data packets to the subscribing client in sequence.

[0200] Optionally, the data distribution device 1200 further includes:

[0201] The verification module is suitable for obtaining the target local double-ended queue and verifying the target local double-ended queue based on the target remote double-ended queue to obtain the verification result.

[0202] The retransmission module is suitable for determining the data transmission completion type of a data packet as a data distribution anomaly type based on the verification result. It uses the first data index in the target remote dual-end queue, which is sorted in the first sequence order, to sequentially determine the data packets from the storage unit and send the data packets to the remote selective forwarding unit server in sequence.

[0203] Optionally, the data distribution device 1200 also includes:

[0204] The forwarding module is suitable for forwarding target distribution data to the subscribing client when the target selective forwarding unit server is determined to be the local selective forwarding unit server.

[0205] Optionally, the receiving module 1210 is also adapted to determine the subscription client information in the target distribution data, and to determine the subscription client corresponding to the target distribution data and the geographical information of the subscription client based on the subscription client information.

[0206] This application embodiment also provides a data distribution device applied to a geographically located selective forwarding unit server in a distributed selective forwarding unit server cluster, the distributed selective forwarding unit server cluster further including a local selective forwarding unit server; the data distribution device includes:

[0207] The distribution module is adapted to receive target distribution data sent by the local selective forwarding unit server and send the target distribution data to the subscribing client;

[0208] Among them, the remote selective forwarding unit server is the target selective forwarding unit server; the target selective forwarding unit server is determined by the local selective forwarding unit server using regional information from the distributed selective forwarding unit server cluster; the regional information and the subscribing client are determined by the local selective forwarding unit server based on the received target distribution data.

[0209] Please see Figure 13 , Figure 13 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Figure 13 As shown, server 1300 may include: at least one processor 1301, at least one network interface 1304, user interface 1303, memory 1305, and at least one communication bus 1302.

[0210] The communication bus 1302 is used to realize the connection and communication between these components.

[0211] The user interface 1303 may include a display screen and a camera. Optionally, the user interface 1303 may also include a standard wired interface and a wireless interface.

[0212] The network interface 1304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0213] The processor 1301 may include one or more processing cores. The processor 1301 connects to various parts of the server 1300 via various interfaces and lines, and performs various functions and processes data of the server 1300 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1305, and by calling data stored in the memory 1305. Optionally, the processor 1301 may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1301 may integrate one or a combination of CPU (Central Processing Unit), GPU (Graphics Processing Unit), and modem. The CPU mainly handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem is used for wireless communication. It is understood that the modem may also not be integrated into the processor 1301 and may be implemented as a separate chip.

[0214] The memory 1305 may include RAM (Random Access Memory) or ROM (Read-Only Memory). Optionally, the memory 1305 may include a non-transitory computer-readable storage medium. The memory 1305 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1305 may also be at least one storage device located remotely from the aforementioned processor 1301. Figure 13 As shown, the memory 1305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a data distribution program.

[0215] exist Figure 13In the server 1300 shown, the user interface 1303 is mainly used to provide an interface for users to input data and obtain user input data; while the processor 1301 can be used to call the data distribution program stored in the memory 1305, which is applied to the local selective forwarding unit server in the distributed selective forwarding unit server cluster, and specifically perform the following operations:

[0216] Receive target distribution data and determine the corresponding subscription client and the geographic information of the subscription client;

[0217] The target selective forwarding unit server is determined from the distributed selective forwarding unit server cluster based on geographical information;

[0218] When the target selective forwarding unit server is determined to be a remote selective forwarding unit server, the target distribution data is sent to the remote selective forwarding unit server so that the remote selective forwarding unit server can send the target distribution data to the subscribing client.

[0219] Optionally, when processor 1301 determines the target selective forwarding unit server from the distributed selective forwarding unit server cluster based on regional information, it specifically executes:

[0220] Obtain the service region information corresponding to the local selective forwarding unit server and the remote selective forwarding unit server respectively;

[0221] By matching service area information with regional information, target service area information that matches the regional information is obtained;

[0222] The target selective forwarding unit server is determined from the local selective forwarding unit server and the remote selective forwarding unit server based on the target service region information.

[0223] Optionally, when processor 1301 performs matching of service region information with region information to obtain target service region information that matches the region information, it specifically executes:

[0224] Get the current egress bandwidth load value and egress bandwidth threshold corresponding to the local selective forwarding unit server, and get the current egress bandwidth load value and egress bandwidth threshold corresponding to each remote selective forwarding unit server;

[0225] Determine the additional egress bandwidth value for the target distribution data for the local selective forwarding unit server, and determine the additional egress bandwidth value for the target distribution data for each remote selective forwarding unit server.

[0226] A reference selective forwarding unit server is determined from the local selective forwarding unit server and the remote selective forwarding unit server; wherein, the sum of the current egress bandwidth load value and the egress bandwidth increment value of the reference selective forwarding unit server is used as the egress bandwidth prediction value, and the egress bandwidth prediction value is less than or equal to the egress bandwidth threshold of the reference selective forwarding unit server.

[0227] The service region information is matched based on the service region information corresponding to the reference selective forwarding unit server to obtain the target service region information that matches the region information.

[0228] Optionally, when processor 1301 executes the receiving target distribution data, it specifically performs the following:

[0229] The selective forwarding unit server receives the target distribution data based on the local service region information; wherein, the local service region information is the region information in the service region information that matches the local region information of the publishing client corresponding to the target distribution data.

[0230] The selective forwarding unit server that receives the target distribution data is designated as the local selective forwarding unit server corresponding to the publishing client, and the remaining selective forwarding unit servers are designated as remote selective forwarding unit servers corresponding to the publishing client.

[0231] Optionally, before the processor 1301 executes the receiving target distribution data, it also specifically executes:

[0232] Based on the distributed selective forwarding unit server cluster, the server status of local selective forwarding unit servers and remote selective forwarding unit servers is detected, and abnormal selective forwarding unit servers with fault status are identified and controlled to stop data distribution services.

[0233] Obtain the abnormal service region information corresponding to the abnormal selective forwarding unit server, and add service region information to the service region information corresponding to the remaining selective forwarding unit servers based on the abnormal service region information.

[0234] Optionally, when processor 1301 executes the receiving target distribution data, it specifically performs the following:

[0235] Receive target distribution data sent by the publishing client, store the target distribution data in the storage unit, and determine the data packet sequence number and data packet characteristic information corresponding to each data packet in the target distribution data;

[0236] Based on the data packet sequence number and data packet feature information, a first data index is constructed for each data packet corresponding to the target distributed data in the storage unit;

[0237] When the target selective forwarding unit server is determined to be a remote selective forwarding unit server, the target distribution data is sent to the remote selective forwarding unit server, including:

[0238] When the target selective forwarding unit server is determined to be a remote selective forwarding unit server, the first data index is stored in the remote double-ended queue according to the first sequence order of the data packet sequence number corresponding to each first data index, thus obtaining the target remote double-ended queue.

[0239] Using the first data index in the target remote double-ended queue, which is sorted according to the first sequence order, data packets are retrieved from the storage unit in sequence and sent to the remote selective forwarding unit server in sequence, so as to control the remote selective forwarding unit server to send the data packets to the subscription client in the first sequence order.

[0240] Optionally, when the processor 1301 executes the following when controlling the remote selective forwarding unit server to send data packets to the subscribing clients sequentially according to the first sequence order:

[0241] The remote selective forwarding unit server is controlled to store data packets in the remote storage unit corresponding to the remote selective forwarding unit server, and a second data index is constructed for each data packet in the remote storage unit using the current data packet sequence number and data packet feature information corresponding to each data packet in the target distribution data.

[0242] Based on the remote selective forwarding unit server, the second data index is stored in the local double-ended queue corresponding to the remote selective forwarding unit server by using the second sequence order corresponding to the data packet sequence number of each second data index, so as to obtain the target local double-ended queue.

[0243] Using the second data index in the target remote double-ended queue, which is sorted according to the second sequence order, data packets are retrieved from the remote storage unit in sequence and sent to the subscribing client in sequence.

[0244] Alternatively, processor 1301 is also adapted to perform:

[0245] Obtain the target local double-ended queue, and verify the target local double-ended queue based on the target remote double-ended queue to obtain the verification result;

[0246] When the data transmission completion type of the data packet is determined to be a data distribution anomaly based on the verification result, the data packets are sequentially determined from the storage unit using the first data index in the target remote dual-end queue, which is sorted according to the first sequence order, and then sent to the remote selective forwarding unit server in sequence.

[0247] Alternatively, processor 1301 is also adapted to perform:

[0248] When the target selective forwarding unit server is determined to be the local selective forwarding unit server, the target distribution data is forwarded to the subscribing client.

[0249] Optionally, when processor 1301 executes the process of determining the subscription client corresponding to the target distribution data and the geographical information of the subscription client, it specifically performs the following:

[0250] Determine the subscription client information in the target distribution data, and based on the subscription client information, determine the subscription clients corresponding to the target distribution data and the geographic information of the subscription clients.

[0251] exist Figure 13 In the server 1300 shown, the user interface 1303 is mainly used to provide an interface for users to input data and obtain user input data; while the processor 1301 can also be used to call the data distribution program stored in the memory 1305, which is applied to the remote selective forwarding unit servers in the distributed selective forwarding unit server cluster, and specifically perform the following operations:

[0252] Receive target distribution data sent by the local selective forwarding unit server, and send the target distribution data to the subscribing client;

[0253] Among them, the remote selective forwarding unit server is the target selective forwarding unit server; the target selective forwarding unit server is determined by the local selective forwarding unit server using regional information from the distributed selective forwarding unit server cluster; the regional information and the subscribing client are determined by the local selective forwarding unit server based on the received target distribution data.

[0254] The embodiments provided in this application also provide a computer-readable storage medium that stores one or more programs, which, when executed by a processor, implement any of the above-described data distribution methods.

[0255] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.

[0256] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0257] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0258] If the integrated module is implemented as a software functional module 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 embodiment, in essence, or the part that contributes to the prior art, or all or 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 device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in 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, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0259] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this application.

[0260] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0261] The above is a description of a data distribution method, apparatus, server, and computer-readable storage medium provided in the embodiments of this application. For those skilled in the art, based on the ideas of the embodiments of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation on the embodiments of this application.

Claims

1. A data distribution method, wherein, A local selective forwarding unit server is applied in a distributed selective forwarding unit server cluster, wherein the distributed selective forwarding unit server cluster further includes remote selective forwarding unit servers; the method includes: Receive target distribution data, and determine the subscription client corresponding to the target distribution data and the geographic information of the subscription client; The target selective forwarding unit server is determined from the distributed selective forwarding unit server cluster based on the geographical information; When the target selective forwarding unit server is determined to be the remote selective forwarding unit server, the target distribution data is sent to the remote selective forwarding unit server so that the remote selective forwarding unit server sends the target distribution data to the subscription client.

2. The method according to claim 1, wherein, The step of determining the target selective forwarding unit server from the distributed selective forwarding unit server cluster based on the geographical information includes: Obtain the service region information corresponding to the local selective forwarding unit server and the remote selective forwarding unit server respectively; The service region information is used to match the region information to obtain target service region information that matches the service region information; The target selective forwarding unit server is determined from the local selective forwarding unit server and the remote selective forwarding unit server based on the target service region information.

3. The method according to claim 2, wherein, The step of matching the service region information with the regional information to obtain target service region information that matches the regional information includes: Obtain the current egress bandwidth load value and egress bandwidth threshold corresponding to the local selective forwarding unit server, and obtain the current egress bandwidth load value and egress bandwidth threshold corresponding to each remote selective forwarding unit server; Determine the additional egress bandwidth value of the target distribution data for the local selective forwarding unit server, and determine the additional egress bandwidth value of the target distribution data for each remote selective forwarding unit server; A reference selective forwarding unit server is determined from the local selective forwarding unit server and the remote selective forwarding unit server; wherein, the sum of the current egress bandwidth load value and the egress bandwidth increment value of the reference selective forwarding unit server is used as the egress bandwidth prediction value, and the egress bandwidth prediction value is less than or equal to the egress bandwidth threshold of the reference selective forwarding unit server. Based on the service region information corresponding to the reference selective forwarding unit server, the region information is matched to obtain the target service region information that matches the region information.

4. The method according to claim 2, wherein, The received target distribution data includes: The selective forwarding unit server receives the target distribution data based on the local service region information; wherein, the local service region information is the region information in the service region information that matches the local region information of the publishing client corresponding to the target distribution data; The selective forwarding unit server that receives the target distribution data is designated as the local selective forwarding unit server corresponding to the publishing client, and the remaining selective forwarding unit servers are designated as remote selective forwarding unit servers corresponding to the publishing client.

5. The method according to claim 4, wherein, Before receiving the target distribution data, the method further includes: Based on the distributed selective forwarding unit server cluster, the server status of the local selective forwarding unit server and the remote selective forwarding unit server is detected, and an abnormal selective forwarding unit server with a fault status is identified. The abnormal selective forwarding unit server is then controlled to stop the data distribution service. Obtain the abnormal service region information corresponding to the abnormal selective forwarding unit server, and perform service region information addition processing on the service region information corresponding to the remaining selective forwarding unit servers based on the abnormal service region information.

6. A data distribution method, wherein, A remote selective forwarding unit server is applied in a distributed selective forwarding unit server cluster, wherein the distributed selective forwarding unit server cluster further includes a local selective forwarding unit server; the method includes: Receive the target distribution data sent by the local selective forwarding unit server, and send the target distribution data to the subscribing client; Wherein, the remote selective forwarding unit server is a target selective forwarding unit server; the target selective forwarding unit server is determined by the local selective forwarding unit server from the distributed selective forwarding unit server cluster using the regional information; the regional information and the subscription client are determined by the local selective forwarding unit server based on the received target distribution data.

7. A data distribution device, wherein, A local selective forwarding unit server is applied in a distributed selective forwarding unit server cluster, the distributed selective forwarding unit server cluster further including a remote selective forwarding unit server; the data distribution device includes: A receiving module is adapted to receive target distribution data and determine the subscription client corresponding to the target distribution data and the geographic information of the subscription client; The determination module is adapted to determine the target selective forwarding unit server from the distributed selective forwarding unit server cluster based on the geographical information; The sending module is adapted to send the target distribution data to the remote selective forwarding unit server when it determines that the target selective forwarding unit server is the remote selective forwarding unit server, so that the remote selective forwarding unit server sends the target distribution data to the subscription client.

8. A data distribution device, wherein, A geographically located selective forwarding unit server is used in a distributed selective forwarding unit server cluster, the distributed selective forwarding unit server cluster also including a local selective forwarding unit server; the data distribution device includes: The distribution module is adapted to receive target distribution data sent by the local selective forwarding unit server and send the target distribution data to the subscription client; Wherein, the remote selective forwarding unit server is a target selective forwarding unit server; the target selective forwarding unit server is determined by the local selective forwarding unit server from the distributed selective forwarding unit server cluster using the regional information; the regional information and the subscription client are determined by the local selective forwarding unit server based on the received target distribution data.

9. A server, wherein, The server includes: Processor; and A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method according to any one of claims 1 to 5 or 6.

10. A computer-readable storage medium, wherein, The computer-readable storage medium stores one or more programs that, when executed by a processor, implement the method of any one of claims 1 to 5 or 6.