HLS intranet source returning method

文档序号:1908583 发布日期:2021-11-30 浏览:27次 中文

阅读说明:本技术 一种hls内网回源方法 (HLS intranet source returning method ) 是由 蔡坤松 于 2021-08-31 设计创作,主要内容包括:本发明公开了一种HLS内网回源方法,包括如下步骤:S1:客户端向边缘节点发送资源获取请求,边缘节点转送请求至调度中心,调度中心发送资源地址至边缘节点;S2:边缘节点将资源地址发送至连接池并与连接池内的元组信息匹配;S3:连接池元组将带有资源地址的请求信息转送至资源节点处进行匹配;S4:对应的资源节点将资源数据发送至连接池中;S5:通过连接池将资源数据发送至边缘节点,边缘节点返回资源数据给客户端。通过设置边缘节点实现内域网络与外部网络的连接,资源数据统一经过边缘节点进行内外传输,对于内域网络资源来说更加安全。同时边缘节点还具有存储功能,降低了调度中心与资源节点的负载。(The invention discloses an HLS intranet back-source method, which comprises the following steps: s1: the client sends a resource acquisition request to the edge node, the edge node forwards the request to a dispatching center, and the dispatching center sends a resource address to the edge node; s2: the edge node sends the resource address to the connection pool and matches the tuple information in the connection pool; s3: the connection pool tuple transfers the request information with the resource address to the resource node for matching; s4: the corresponding resource node sends the resource data to the connection pool; s5: and sending the resource data to the edge node through the connection pool, and returning the resource data to the client by the edge node. The connection between the inner domain network and the external network is realized by arranging the edge nodes, and the resource data is uniformly transmitted inside and outside through the edge nodes, so that the inner domain network resources are safer. Meanwhile, the edge nodes also have a storage function, so that the loads of the dispatching center and the resource nodes are reduced.)

1. An HLS intranet back-source method is characterized by comprising the following steps:

s1: the client sends a resource acquisition request to the edge node, the edge node forwards the request to a dispatching center, and the dispatching center sends a resource address to the edge node;

s2: the edge node sends the resource address to a connection pool and matches the tuple information in the connection pool, the connection pool realizes the link connection between the edge node and the resource node, and the connection pool and the edge node have the function of storing the resource and can be directly called according to the resource address;

s3: the connection pool tuple transfers the request information with the resource address to the resource node for matching, and the request information is matched to the corresponding resource node through the resource address;

s4: the corresponding resource node sends the resource data to the connection pool and adds the resource data to the tuple information;

s5: and sending the resource data to the edge node through the connection pool, and returning the resource data to the client by the edge node.

2. The HLS intranet back-source method according to claim 1, wherein the resource addresses are provided with stream ids for matching specific resource nodes, and each resource node corresponds to one stream id.

3. The HLS intranet back-source method according to claim 2, wherein the construction process of the connection pool is as follows:

a1: establishing a database connection pool object;

a2, creating an initial number of database connections according to the maximum connection number specified in advance;

a3, creating a connection pool tuple according to the resource request data;

a4, establishing the connection of the connection pool with the edge node and the resource node.

4. The HLS intranet feed-back method according to claim 3, wherein if there is no free connection tuple in the connection pool in A3 and the number of connection pool tuples does not reach the maximum, a new connection pool tuple is created.

5. The HLS intranet back-source method according to claim 3, wherein the connection pool tuple creation and resource calling process is as follows:

b1: creating an initial connection pool tuple and setting the maximum connection number;

b2: storing resource data returned by the resource nodes, and only storing newly-increased resource information in the connection pool tuples until the storage quantity of the connection pool tuples reaches the maximum connection quantity, and establishing new connection pool tuples in the connection pool;

b3: the system firstly searches whether the connection pool tuple contains matched resource data or not according to the stream id in the resource address, if the matched resource data exists, the system is directly called, and if the matched resource data does not exist, the system further matches the resource data in the resource node and simultaneously stores the resource data in the connection pool tuple.

6. The HLS intranet back-source method according to claim 1, wherein the edge node stores resource address information requested by a scheduling center.

Technical Field

The invention relates to the technical field of wireless communication, in particular to an HLS intranet return source method.

Background

The back source is a means for the client to obtain the resource, the existing method is that the client directly requests the scheduling center to obtain the address of the resource node, and the client initiates a request to the corresponding resource node according to the address of the resource node and pulls the resource.

However, the above resource acquisition method has the following disadvantages: 1, a scheduling center directly provides service to an external client side and has a load problem; 2, the resource node directly provides service to an external client, so that the safety problem exists; and 3, any resource is requested to request a scheduling server first, and the actual resource address is taken by a scheduling center, so that the resource link is too long and the delay is large.

Disclosure of Invention

The invention aims to provide an HLS intranet back-source method, which is used for solving the technical problems in the background technology.

The technical scheme of the invention is that an HLS intranet back-source method comprises the following steps:

s1: the client sends a resource acquisition request to the edge node, the edge node forwards the request to a dispatching center, and the dispatching center sends a resource address to the edge node;

s2: the edge node sends the resource address to a connection pool and matches the tuple information in the connection pool, the connection pool realizes the link connection between the edge node and the resource node, and the connection pool and the edge node have the function of storing the resource and can be directly called according to the resource address;

s3: the connection pool tuple transfers the request information with the resource address to the resource node for matching, and the request information is matched to the corresponding resource node through the resource address;

s4: the corresponding resource node sends the resource data to the connection pool and adds the resource data to the tuple information;

s5: and sending the resource data to the edge node through the connection pool, and returning the resource data to the client by the edge node.

In a preferred embodiment, the resource addresses are provided with flow ids for matching specific resource nodes, one for each resource node.

In a preferred embodiment, the construction process of the connection pool is as follows:

a1: establishing a database connection pool object;

a2, creating an initial number of database connections according to the maximum connection number specified in advance;

a3, creating a connection pool tuple according to the resource request data;

a4, establishing the connection of the connection pool with the edge node and the resource node.

In a preferred embodiment, a new connection pool tuple is created in a3 if there is no free connection tuple in the connection pool and the number of connection pool tuples is not maximized.

In a preferred embodiment, the connection pool tuple creation and resource calling process is:

b1: creating an initial connection pool tuple and setting the maximum connection number;

b2: storing resource data returned by the resource nodes, and only storing newly-increased resource information in the connection pool tuples until the storage quantity of the connection pool tuples reaches the maximum connection quantity, and establishing new connection pool tuples in the connection pool;

b3: the system firstly searches whether the connection pool tuple contains matched resource data or not according to the stream id in the resource address, if the matched resource data exists, the system is directly called, and if the matched resource data does not exist, the system further matches the resource data in the resource node and simultaneously stores the resource data in the connection pool tuple.

In a preferred embodiment, the edge node stores resource address information requested by the dispatching center.

The technical scheme of the invention has the beneficial effects that:

1. the connection between the inner domain network and the external network is realized by arranging the edge nodes, and the resource data is uniformly transmitted inside and outside through the edge nodes, so that the inner domain network resources are safer. Meanwhile, the edge nodes also have a storage function, so that the loads of the dispatching center and the resource nodes are reduced.

2. The link connection between the edge node and the resource node is realized by setting the connection pool, and the resource data stored in the connection pool can be directly called, so that the load of the resource node is further reduced, the time consumption of the link is reduced, and the resource calling rate is improved.

Drawings

Figure 1 is an overall flow chart of the present invention,

FIG. 2 is a diagram of the HLS intranet feed-back procedure of the present invention,

FIG. 3 is a flow chart of the construction of the connection pool according to the present invention,

FIG. 4 is a flow chart of connection pool tuple creation and resource invocation in accordance with the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments. The embodiments of the present invention have been presented for purposes of illustration and description, and are not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

The noun explains: returning a source: when the edge node does not find the resources requested by the client in the connection pool, initiating a request to the resource node, and pulling the resources; edge nodes: a node directly requested by a client; connecting the tanks: a pre-connection mechanism, which realizes the connection between edge nodes and resource nodes; the dispatching center: the resource management server records the storage positions of all resources; stream id, the unique identification of the video stream.

Referring to fig. 1-4, the HLS intranet back-source method according to the technical scheme of the present invention includes the following specific processes:

the client sends a resource acquisition request to the edge node, the edge node forwards the request to the dispatching center, and the dispatching center sends a resource address to the edge node. The edge node stores the resource address information requested by the dispatching center, and when the requested resource address is stored in the edge node, the resource address does not need to be acquired from the dispatching center, and the resource calling can be directly carried out through the edge node.

The edge node sends the resource address to the connection pool and matches the tuple information in the connection pool, the connection pool realizes the link connection between the edge node and the resource node, and the connection pool has the function of storing the resource and can be directly called according to the resource address. If the tuple information (here, the tuple information is resource storage information in the connection pool tuple hereinafter) contains the call resource, the resource is directly returned to the client through the edge node, and if the resource does not exist, the step S3 is continued.

The connection pool tuple transfers the request information with the resource address to the resource node for matching, and the request information is matched to the corresponding resource node through the resource address. Each resource address can be matched to a unique corresponding resource node because the resource address carries a flow id for matching a particular resource node, one for each resource node.

And the corresponding resource node sends the resource data to the connection pool and adds the resource data to the tuple information. The corresponding resource node is the node which requests to contain the requested resource data.

And sending the resource data to the edge node through the connection pool, and returning the resource data to the client by the edge node.

The connection between the inner domain network and the external network is realized by arranging the edge nodes, and the resource data is uniformly transmitted inside and outside through the edge nodes, so that the inner domain network resources are safer. Meanwhile, the edge nodes also have a storage function, so that the loads of the dispatching center and the resource nodes are reduced.

The link connection between the edge node and the resource node is realized by setting the connection pool, and the resource data stored in the connection pool can be directly called, so that the load of the resource node is further reduced, the time consumption of the link is reduced, and the resource calling rate is improved.

In a preferred embodiment, the construction process of the connection pool is as follows: a1: establishing a database connection pool object; a2, creating an initial number of database connections according to the maximum connection number specified in advance; a3, creating a connection pool tuple according to the resource request data; a4, establishing the connection of the connection pool with the edge node and the resource node.

In a preferred embodiment, a new connection pool tuple is created in a3 if there is no free connection tuple in the connection pool and the number of connection pool tuples is not maximized. Each connection pool tuple stores different resource data.

In a preferred embodiment, the connection pool tuple creation and resource calling process is:

b1: creating an initial connection pool tuple and setting the maximum connection number;

b2: storing resource data returned by the resource nodes, and only storing newly-increased resource information in the connection pool tuples until the storage quantity of the connection pool tuples reaches the maximum connection quantity, and establishing new connection pool tuples in the connection pool;

b3: the system firstly searches whether the connection pool tuple contains matched resource data or not according to the stream id in the resource address, if the matched resource data exists, the system is directly called, and if the matched resource data does not exist, the system further matches the resource data in the resource node and simultaneously stores the resource data in the connection pool tuple.

It is to be understood that the described embodiments are merely a few embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by one of ordinary skill in the art and related arts based on the embodiments of the present invention without any creative effort, shall fall within the protection scope of the present invention. Structures, devices, and methods of operation not specifically described or illustrated herein are generally practiced in the art without specific recitation or limitation.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:封面图片的确定方法、装置、服务器及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类