A streaming media server access method, device, equipment and storage medium

By deploying proxy servers and load balancers in the internal network of the enterprise, the client can access the edge streaming media server nearby, solving the problems of poor live broadcast experience and high bandwidth, achieving a low latency and efficient live broadcast experience.

CN114124894BActive Publication Date: 2025-01-10HANGZHOU YAGU TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111473095.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-02
Publication Date
2025-01-10
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

In the internal network of the enterprise, the live broadcast experience is poor and the bandwidth demand is high, especially in areas with high network delays, and the existing technology is difficult to achieve smooth live broadcast experience and low bandwidth usage.

Method used

By deploying proxy servers and load balancers in edge areas, clients can access edge streaming servers nearby, reducing direct access to the central area source servers, and reducing egress bandwidth and latency.

Benefits of technology

It realizes a smooth live broadcast experience in the internal network of the enterprise, reduces network delay and bandwidth requirements, improves access efficiency, and can dynamically adjust server resources to cope with traffic changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114124894B_ABST
    Figure CN114124894B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and storage medium for accessing a streaming media server, including: obtaining a first access request from a client located in an edge area and sending the first access request to a first load balancer located in a central area through a proxy server located in the edge area, so that after receiving the first access request, the first load balancer allocates an edge streaming media server in the edge area to the client according to the correspondence between the proxy server and the edge area; wherein the edge area is a remote area of ​​the central area; and accessing the source station streaming media server in the central area by controlling the client to access the edge streaming media server in the edge area to which it is allocated. It can be seen that the present application enables the client to access the streaming media server nearby, thereby reducing the export bandwidth, reducing the access delay and improving the access efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a streaming media server access method, device, equipment and storage medium. Background Art

[0002] As the scale of enterprises gradually expands, the office locations and employees of enterprises are distributed all over the country or the world. The enterprise has an exclusive internal network, and employees in various places use the internal network for office work, without interacting with the public network. When deploying a live broadcast platform in the enterprise, the enterprise needs to set up a live broadcast platform on the internal network for live broadcast, training, etc. When live broadcasting, employees in the enterprise expect to have a relatively smooth viewing experience and cannot have too high requirements for bandwidth. At present, it is mainly achieved by deploying servers in various offices across the country or the world, and enterprise employees access the servers in local public offices. The network latency of accessing the headquarters server in some areas will be relatively high, and the live broadcast experience is poor. In addition, all users access the headquarters server, which requires a high export bandwidth of the headquarters. In addition, for areas where no servers are deployed, access to the servers of other nearest offices, this not only reduces the latency of live broadcasting, but also reduces the bandwidth requirements of certain areas.

[0003] Therefore, how to solve the problem that employees can watch the live broadcast of the enterprise intranet normally and smoothly through the enterprise intranet is a technical problem that needs to be solved urgently by technical personnel in this field. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a streaming media server access method, device, equipment and storage medium, so that the client can access the streaming media server nearby, thereby reducing the export bandwidth, reducing the access delay and improving the access efficiency. The specific scheme is as follows:

[0005] The first aspect of the present application provides a streaming media server access method, comprising:

[0006] Obtaining a first access request from a client located in an edge area and sending the first access request to a first load balancer located in a central area through a proxy server located in the edge area, so that after receiving the first access request, the first load balancer allocates an edge streaming media server in the edge area to the client according to a correspondence between the proxy server and the edge area; wherein the edge area is a remote area of ​​the central area;

[0007] The source station streaming media server in the central area is accessed by controlling the client to access the edge streaming media server in the edge area to which it is allocated.

[0008] Optionally, after receiving the first access request, the first load balancer allocates an edge streaming media server in the edge area to the client according to a correspondence between the proxy server and the edge area, including:

[0009] After receiving the first access request, the first load balancer obtains the first identification information of the proxy server; wherein the first identification information corresponds to the edge area;

[0010] The first load balancer determines the edge streaming media server matching the identification information from the edge area according to the first identification information, and returns the determined second identification information of the edge streaming media server to the corresponding client through the proxy server.

[0011] Optionally, before the first load balancer determines the edge streaming media server matching the first identification information from the edge area according to the first identification information, the method further includes:

[0012] According to the target requirements, the first identification information of the proxy server and the second identification information of the streaming media server in the edge area that has a corresponding relationship with the proxy server are associated and configured on the first load balancer, so that the first load balancer can determine the matching edge streaming media server according to the configured association relationship.

[0013] Optionally, before the first load balancer determines the edge streaming media server matching the first identification information from the edge area according to the first identification information, the method further includes:

[0014] After registering the edge streaming media server in the edge area on the first load balancer, heartbeat information is sent to the first load balancer according to a preset period, so that the load balancer monitors the service status of the edge streaming media server according to the heartbeat information to determine the edge streaming media server in the edge area that is in an available state and matches the first identification information.

[0015] Optionally, the streaming media server access method further includes:

[0016] The configured association relationship and the heartbeat information are stored in a preset database. When the first load balancer receives the first access request, the corresponding edge streaming media server is allocated to the client by querying the association relationship and the heartbeat information from the preset database.

[0017] Optionally, accessing the source streaming media server in the central area by controlling the client to access the edge streaming media server in the edge area to which the client is assigned includes:

[0018] Obtain a second access request from the client and send the second access request to the edge streaming server in the edge area assigned to it, so that after receiving the second access request, the edge streaming server sends the second access request to the source station streaming server through a second load balancer located in the central area for access.

[0019] Optionally, after receiving the second access request, the edge streaming media server sends the second access request to the source streaming media server through a second load balancer located in the central area for access, including:

[0020] After receiving the second access request, the edge streaming server sends the second access request to the corresponding source streaming server for access in accordance with the hierarchical architecture order of the source streaming servers in the central area through the second load balancer located in the central area.

[0021] A second aspect of the present application provides a streaming media server access device, comprising:

[0022] an acquisition module, configured to acquire a first access request from a client located in an edge area and send the first access request to a first load balancer located in a central area through a proxy server located in the edge area, so that after receiving the first access request, the first load balancer allocates an edge streaming media server in the edge area to the client according to a correspondence between the proxy server and the edge area; wherein the edge area is a remote area of ​​the central area;

[0023] The access module is used to access the source station streaming media server in the central area by controlling the client to access the edge streaming media server in the edge area allocated to it.

[0024] A third aspect of the present application provides an electronic device, comprising a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the aforementioned streaming media server access method.

[0025] A fourth aspect of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the aforementioned streaming media server access method is implemented.

[0026] In the present application, the first access request of the client is first obtained and the first access request is sent to the first load balancer located in the central area through the proxy server located in the edge area, so that after the first load balancer receives the first access request, the edge streaming media server in the edge area is allocated to the client according to the correspondence between the proxy server and the edge area; wherein the edge area is a remote area of ​​the central area; and then the source station streaming media server in the central area is accessed by controlling the client to access the edge streaming media server in the edge area allocated to it. It can be seen that there is a corresponding relationship between the proxy server deployed in the edge area of ​​the present application and the edge area. When the client has an access demand, data is exchanged between the proxy server and the first load balancer deployed in the central area. The first load balancer allocates the corresponding streaming media server to the client in the edge area where the proxy server is located according to the correspondence between the two, so that the client can access the streaming media server nearby, thereby reducing the export bandwidth and reducing the access delay to improve the access efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0028] Figure 1 A flow chart of a streaming media server access method provided by this application;

[0029] Figure 2 A schematic diagram of an existing streaming media server access method provided for this application;

[0030] Figure 3 A specific streaming media server access relationship diagram provided for this application;

[0031] Figure 4 A schematic diagram of a specific streaming media server access method provided for this application;

[0032] Figure 5 A schematic diagram of an egress bandwidth provided for this application;

[0033] Figure 6 A schematic diagram of the structure of a streaming media server access device provided in this application;

[0034] Figure 7A structural diagram of a streaming media server accessing an electronic device provided in this application. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] The existing live streaming servers are all deployed in the same area, such as the headquarters of the enterprise, and all users are required to access the servers at the headquarters, which results in high network latency and poor live streaming experience. In addition, all users accessing the headquarters servers require a high export bandwidth of the headquarters. In view of the above technical defects, this application provides a streaming media server access solution, which allows the client to access the streaming media server nearby, thereby reducing export bandwidth, reducing access latency and improving access efficiency.

[0037] Figure 1 A flow chart of a method for accessing a streaming media server provided in an embodiment of the present application. Figure 1 As shown, the streaming media server access method includes:

[0038] S11: Obtain a first access request from a client located in an edge area and send the first access request to a first load balancer located in a central area through a proxy server located in the edge area, so that after receiving the first access request, the first load balancer allocates an edge streaming media server in the edge area to the client according to the correspondence between the proxy server and the edge area; wherein the edge area is a remote area of ​​the central area.

[0039] In order to further highlight the beneficial effects of this solution, this embodiment first describes the process of accessing a streaming media server based on a DNS server in the prior art. Figure 2 The processing steps shown are as follows: first, configure the domain name resolution on the DNS server, configure the live domain name to the enterprise intranet DNS server, and the domain name points to a fixed number of servers, such as resolving the domain name configuration to live server 1, live server 2, and live server 3. Then the user (audience) side obtains the live viewing address through some means, and the address contains domain name information, such as the live stream address. When the user's player opens the live viewing address and prepares to watch, the player will first access the DNS server and request to resolve the domain name in order to obtain an available server IP. At this time, the DNS returns the IP of one of the live servers according to the inherent strategy, and the user player accesses the above-returned server IP to obtain the live stream for viewing.

[0040] The implementation of DNS load balancing has the following technical drawbacks: (1) Domain name resolution on the DNS server can only configure a fixed number of servers. When adding or reducing servers, the DNS configuration needs to be modified manually, and it cannot take effect immediately (generally, it takes several minutes for the DNS domain name resolution to take effect after being updated); (2) DNS domain name resolution is not divided by region. No matter where the server is deployed, it is processed in the same way. It is possible that when a user in Hangzhou accesses the DNS server, the address of the live broadcast server in Beijing is returned, so the DNS domain name resolution cannot return the optimal server to the audience; (3) When a live broadcast server fails, the DNS cannot be detected. When using DNS domain name resolution, the DNS may still return the IP address of the failed server and failover cannot be performed; (4) It is impossible to save bandwidth resources. All viewers in a certain area may access the headquarters server to pull the stream. If there are 1,000 employees in a certain area who all need to watch the live broadcast, and the bit rate of each live broadcast stream is 3Mbps, then the office area needs at least 3Gbps of export bandwidth. The solution of this embodiment enables employees of enterprises across the country and around the world to watch live broadcasts through the enterprise intranet, reducing viewing delays caused by network connectivity issues in various regions and reducing requirements for export bandwidth in various regions, while solving the problem of being unable to watch due to live broadcast server failures.

[0041] In this embodiment, firstly, a first access request of a client located in an edge area is obtained and the first access request is sent to a first load balancer located in a central area through a proxy server located in the edge area, so that after receiving the first access request, the first load balancer allocates an edge streaming media server in the edge area to the client according to the corresponding relationship between the proxy server and the edge area. The edge area is a remote area of ​​the central area, the central area may be the location of the company's headquarters, and the edge area is the location of each branch. The proxy server is a reverse proxy server, which can usually be used as a Web acceleration, that is, the reverse proxy is used as a front-end machine of the Web server to reduce the load of the network and the server and improve the access efficiency. Generally speaking, the reverse proxy server is located between the user and the target server, but for the user, the reverse proxy server is equivalent to the target server, that is, the user can directly access the reverse proxy server to obtain the resources of the target server, and at the same time, the user does not need to know the address of the target server, and does not need to make any settings on the user side. The first load balancer ALB (Address Load Balance) is an address load balancer that realizes balancing based on IP addresses.

[0042] Compared with the source streaming server, the edge streaming server provides streaming distribution capabilities and is deployed in various edge areas. The source streaming server is a live streaming server that provides streaming push and pull and is deployed in the central area computer room. In order to improve processing efficiency, the source streaming server can be structured in layers. Figure 3 The streaming media server access architecture in this embodiment is divided into three categories: primary source station, secondary source station, and edge server. The primary source station and secondary source station are deployed in the central computer room, and the edge server is deployed in each office area. Each area deploys a corresponding number of edge servers according to the number of people. The edge server is deployed in each office area. When the audience watches the live broadcast, they always return to the nearest server, and can take effect in real time when the live broadcast server is dynamically increased or decreased. The live broadcast platform can immediately share the traffic of the viewing client, saving bandwidth resources in each office area. Only a small amount of export bandwidth can meet the live broadcast demand.

[0043] In this embodiment, all users need to access the ALB service before pulling the stream, and users in each area will access the ALB through the reverse proxy in the area. After receiving the first access request, the first load balancer obtains the first identification information of the proxy server, wherein the first identification information corresponds to the edge area. Then the first load balancer determines the edge streaming media server that matches the identification information from the edge area based on the first identification information, and returns the second identification information of the determined edge streaming media server to the corresponding client through the proxy server. For example, when regional users need to watch live broadcasts, they can use the HTTP interface to access the ALB through the nginx service. ALB returns the IP of an edge streaming media server according to the policy. Since the client's request passes through nginx, ALB can obtain the IP of nginx, and then ALB can distinguish the area to which the user belongs based on the IP, and then find the edge streaming media server paired with the area, and return one of the available edge streaming media servers.

[0044] In the meantime, it is necessary to configure the corresponding relationship, etc. Specifically, the first identification information of the proxy server and the second identification information of the streaming media server in the edge area that has a corresponding relationship with the proxy server are associated and configured on the first load balancer according to the target requirements, so that the first load balancer can determine the matching edge streaming media server according to the configured association relationship. This process is to configure the edge streaming media server affiliation on the ALB. It can be understood that in order to improve the allocation efficiency, an edge area can have multiple nginx reverse proxies, and an nginx reverse proxy server can match the IP address information of multiple edge streaming media servers.

[0045] The JSON structure is used, and the configuration example is as follows. When ALB receives a request with IP 192.168.1.100, it matches the edge server corresponding to the IP. In this example, there are 3 edge servers. ALB will randomly select one of the available servers and return the IP information to the client.

[0046]

[0047]

[0048] When configuring the relationship between the reverse proxy and the edge streaming server, the edge server object is assumed to be EdgeServer, and the main variables are {edge server name}, {edge server IP}. The reverse proxy object is defined as ProxyServer, and the main variables are {proxy name}, {edge server cluster}, and {edge server cluster} is an array of edge servers, such as vector <edgeserver>The program maintains a reverse proxy information table, such as map<string,ProxyServer> During the configuration process, the pseudo code after receiving the above parameters is:

[0049] String proxyIP=json["edge-nginx"];

[0050] If exist(proxies[proxyIP])then

[0051] Print "Add failed, the same proxy server IP already exists";

[0052] Else

[0053] Vector <edgeserver>es;

[0054] Foreach(e:json["edge-cluster"])

[0055] do

[0056] es.append(e);

[0057] end

[0058] proxies[proxyIP] = es; / / Add to the collection

[0059] End

[0060] In addition, in order to monitor the service status of the edge streaming media server in real time, the edge streaming media server in the edge area can be further registered on the first load balancer and then heartbeat information can be sent to the first load balancer according to a preset period, so that the load balancer can monitor the service status of the edge streaming media server according to the heartbeat information to determine the edge streaming media server in the edge area that is in an available state and matches the first identification information. Among them, all edge streaming media servers are registered with ALB through the HTTP interface and send heartbeats regularly. When the edge server is unavailable due to a fault, ALB will detect a heartbeat timeout and set the faulty edge server to temporarily unavailable. After the fault is recovered, the edge server re-registers and sends a heartbeat, and ALB restores the server to an available state. Based on this, when a live broadcast server fails, the live broadcast platform immediately senses it. Thereafter, the platform ignores the faulty server during scheduling and enables it again when the fault is restored. Code example:

[0061] EdgeServer&es=findServer(edgeIP); / / edgeIP is the IP of edge service;

[0062] es.setEnable(true); / / Set to enabled state

[0063] Check the heartbeat timeout in the timer. Code example:

[0064] Foreach(es:vector <edgeserver>)

[0065] Do

[0066] Es.setEnable(false);

[0067] End

[0068] The ALB receives an access request and queries the available edge streaming servers for the following code:

[0069] Vector <edgeserver>&vv=proxies[proxyIP];

[0070] Then it searches for available servers in vv and returns the IP of one of them.

[0071] On this basis, the configured association relationship and the heartbeat information can be stored in a preset database. When the first load balancer receives the first access request, the corresponding edge streaming media server is allocated to the client by querying the association relationship and the heartbeat information from the preset database. The specific implementation logic reference Figure 4 shown.

[0072] S12: Access the source streaming media server in the central area by controlling the client to access the edge streaming media server in the edge area to which it is assigned.

[0073] In this embodiment, the source streaming media server in the central area is accessed by controlling the client to access the edge streaming media server in the edge area to which it is assigned. After obtaining the IP of the edge streaming media server, the regional users (audiences) can pull the stream. In this embodiment, a second load balancer SLB is also set in the central area to achieve load balancing between the edge streaming media server and the source streaming media server. Specifically, the second access request of the client is obtained and the second access request is sent to the edge streaming media server in the edge area to which it is assigned, so that after receiving the second access request, the edge streaming media server sends the second access request to the source streaming media server through the second load balancer located in the central area for access.

[0074] As mentioned above, the source streaming media server is structured in layers. This embodiment does not limit the specific layers. For example, it is divided into a primary source station and a secondary source station. On this basis, after receiving the second access request, the edge streaming media server sends the second access request to the corresponding source streaming media server for access through the second load balancer located in the central area in the order of the hierarchical architecture of the source streaming media server in the central area. The client accesses the edge streaming media server, and the edge streaming media server goes back to the secondary source station through SLB (or a device with similar functions), and the secondary source station randomly goes back to the primary source station.

[0075] It can be understood that under the architecture of this embodiment, users in the edge area only pull streams from the edge streaming server in the area, and the edge streaming server will cache the live stream after pulling a stream from the secondary source station. Therefore, if there are n users in a certain area, n streams are pulled from the edge streaming server, and each edge streaming server has only one stream to the secondary source station. Figure 5 As shown in the figure, there are n users in the region, pulling streams from two edge servers, and there are n streams in the region, but there are only two streams from the region to the source cluster, and the export bandwidth requirement is very low. In addition, the latency of regional users directly accessing the source is high. Although there is one more level of transit through the edge server, the latency is reduced. The main reason is that the network quality between the edge server and the source server is good, the latency is low, and the network quality of regional users accessing the edge server in the region is also good, while the network quality of regional users directly accessing the source cannot be guaranteed.

[0076] It can be seen that the embodiment of the present application first obtains the first access request of the client and sends the first access request to the first load balancer located in the central area through the proxy server located in the edge area, so that after the first load balancer receives the first access request, it allocates the edge streaming media server in the edge area to the client according to the correspondence between the proxy server and the edge area; wherein the edge area is a remote area of ​​the central area; and then accesses the source station streaming media server in the central area by controlling the client to access the edge streaming media server in the edge area allocated to it. In the embodiment of the present application, there is a corresponding relationship between the proxy server deployed in the edge area and the edge area. When the client has an access demand, data is exchanged between the proxy server and the first load balancer deployed in the central area. The first load balancer allocates the corresponding streaming media server to the client in the edge area where the proxy server is located according to the correspondence between the two, so that the client can access the streaming media server nearby, thereby reducing the export bandwidth and reducing the access delay to improve the access efficiency.

[0077] See also Figure 6 As shown, the embodiment of the present application also discloses a streaming media server access device, including:

[0078] The acquisition module 11 is used to acquire a first access request from a client located in an edge area and send the first access request to a first load balancer located in a central area through a proxy server located in the edge area, so that after receiving the first access request, the first load balancer allocates an edge streaming media server in the edge area to the client according to a correspondence between the proxy server and the edge area; wherein the edge area is a remote area of ​​the central area;

[0079] The access module 12 is used to access the source streaming media server in the central area by controlling the client to access the edge streaming media server in the edge area allocated thereto.

[0080] It can be seen that the embodiment of the present application first obtains the first access request of the client and sends the first access request to the first load balancer located in the central area through the proxy server located in the edge area, so that after the first load balancer receives the first access request, it allocates the edge streaming media server in the edge area to the client according to the correspondence between the proxy server and the edge area; wherein the edge area is a remote area of ​​the central area; and then accesses the source station streaming media server in the central area by controlling the client to access the edge streaming media server in the edge area allocated to it. In the embodiment of the present application, there is a corresponding relationship between the proxy server deployed in the edge area and the edge area. When the client has an access demand, data is exchanged between the proxy server and the first load balancer deployed in the central area. The first load balancer allocates the corresponding streaming media server to the client in the edge area where the proxy server is located according to the correspondence between the two, so that the client can access the streaming media server nearby, thereby reducing the export bandwidth and reducing the access delay to improve the access efficiency.

[0081] In some specific embodiments, the acquisition module 11 specifically includes:

[0082] A receiving unit, configured to obtain, after the first load balancer receives the first access request, first identification information of the proxy server; wherein the first identification information corresponds to the edge area;

[0083] A determination unit is used for the first load balancer to determine the edge streaming server matching the identification information from the edge area according to the first identification information, and return the determined second identification information of the edge streaming server to the corresponding client through the proxy server.

[0084] In some specific embodiments, the server access device further includes:

[0085] a configuration module, configured to associate the first identification information of the proxy server and the second identification information of the streaming media server in the edge area corresponding to the proxy server on the first load balancer according to target requirements, so that the first load balancer determines the matching edge streaming media server according to the configured association relationship;

[0086] A registration module, configured to send heartbeat information to the first load balancer according to a preset period after registering the edge streaming media server in the edge area on the first load balancer, so that the load balancer monitors the service status of the edge streaming media server according to the heartbeat information to determine the edge streaming media server in the edge area that matches the first identification information and is in an available state;

[0087] A storage module is used to store the configured association relationship and the heartbeat information in a preset database. When the first load balancer receives the first access request, it allocates the corresponding edge streaming media server to the client by querying the association relationship and the heartbeat information from the preset database.

[0088] In some specific embodiments, the access module 12 specifically includes:

[0089] A first sending unit, configured to obtain a second access request from the client and send the second access request to the edge streaming media server in the edge area allocated thereto;

[0090] The second sending unit is used for sending the second access request to the corresponding source station streaming media server for access through the second load balancer located in the central area in accordance with the hierarchical architecture order of the source station streaming media servers in the central area after the edge streaming media server receives the second access request.

[0091] Furthermore, an embodiment of the present application also provides an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0092] Figure 7 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the streaming media server access method disclosed in any of the aforementioned embodiments.

[0093] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0094] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.

[0095] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the streaming media server access method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. The data 223 can include access requests collected by the electronic device 20.

[0096] Furthermore, an embodiment of the present application also discloses a storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the streaming media server access method disclosed in any of the aforementioned embodiments are implemented.

[0097] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0098] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0099] The streaming media server access method, device, equipment and storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.< / edgeserver> < / edgeserver> < / edgeserver> < / edgeserver>

Claims

1. A method for accessing a streaming media server, characterized in that: include: Obtaining a first access request from a client located in an edge area and sending the first access request to a first load balancer located in a central area through a proxy server located in the edge area, so that after receiving the first access request, the first load balancer allocates an edge streaming media server in the edge area to the client according to a correspondence between the proxy server and the edge area; wherein the edge area is a remote area of ​​the central area; Accessing the source station streaming media server in the central area by controlling the client to access the edge streaming media server in the edge area assigned thereto; The proxy server is a reverse proxy server, the edge area corresponds to a plurality of the reverse proxy servers, and each of the reverse proxy servers corresponds to IP address information of a plurality of the edge streaming media servers.

2. The method for accessing a streaming media server according to claim 1, characterized in that: After receiving the first access request, the first load balancer allocates an edge streaming media server in the edge area to the client according to the correspondence between the proxy server and the edge area, including: After receiving the first access request, the first load balancer obtains the first identification information of the proxy server; wherein the first identification information corresponds to the edge area; The first load balancer determines the edge streaming media server matching the identification information from the edge area according to the first identification information, and returns the determined second identification information of the edge streaming media server to the corresponding client through the proxy server.

3. The method for accessing a streaming media server according to claim 2, characterized in that: Before the first load balancer determines the edge streaming media server matching the first identification information from the edge area according to the first identification information, the method further includes: According to the target requirements, the first identification information of the proxy server and the second identification information of the streaming media server in the edge area that has a corresponding relationship with the proxy server are associated and configured on the first load balancer, so that the first load balancer can determine the matching edge streaming media server according to the configured association relationship.

4. The method for accessing a streaming media server according to claim 3, characterized in that: Before the first load balancer determines the edge streaming media server matching the first identification information from the edge area according to the first identification information, the method further includes: After registering the edge streaming media server in the edge area on the first load balancer, heartbeat information is sent to the first load balancer according to a preset period, so that the load balancer monitors the service status of the edge streaming media server according to the heartbeat information to determine the edge streaming media server in the edge area that is in an available state and matches the first identification information.

5. The method for accessing a streaming media server according to claim 4, characterized in that: Also includes: The configured association relationship and the heartbeat information are stored in a preset database. When the first load balancer receives the first access request, the corresponding edge streaming media server is allocated to the client by querying the association relationship and the heartbeat information from the preset database.

6. The streaming media server access method according to any one of claims 1 to 5, characterized in that: The accessing of the source station streaming media server in the central area by controlling the client to access the edge streaming media server in the edge area allocated thereto includes: Obtain a second access request from the client and send the second access request to the edge streaming server in the edge area assigned to it, so that after receiving the second access request, the edge streaming server sends the second access request to the source streaming server through a second load balancer located in the central area for access.

7. The method for accessing a streaming media server according to claim 6, characterized in that: After receiving the second access request, the edge streaming media server sends the second access request to the source streaming media server through a second load balancer located in the central area for access, including: After receiving the second access request, the edge streaming server sends the second access request to the corresponding source streaming server for access in accordance with the hierarchical architecture order of the source streaming servers in the central area through the second load balancer located in the central area.

8. A server access device, characterized in that: include: an acquisition module, configured to acquire a first access request from a client located in an edge area and send the first access request to a first load balancer located in a central area through a proxy server located in the edge area, so that after receiving the first access request, the first load balancer allocates an edge streaming media server in the edge area to the client according to a correspondence between the proxy server and the edge area; wherein the edge area is a remote area of ​​the central area; An access module, configured to access the source streaming media server in the central area by controlling the client to access the edge streaming media server in the edge area to which the client is assigned; The proxy server is a reverse proxy server, the edge area corresponds to a plurality of the reverse proxy servers, and each of the reverse proxy servers corresponds to IP address information of a plurality of the edge streaming media servers.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the streaming media server access method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store computer executable instructions, which, when loaded and executed by a processor, implement the streaming media server access method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Remote access method and device, computer equipment and storage medium

    CN113301184A