WO2022188596A1 - Access control method and apparatus, data forwarding method and apparatus, and electronic device and storage medium - Google Patents

Access control method and apparatus, data forwarding method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2022188596A1
WO2022188596A1 PCT/CN2022/076230 CN2022076230W WO2022188596A1 WO 2022188596 A1 WO2022188596 A1 WO 2022188596A1 CN 2022076230 W CN2022076230 W CN 2022076230W WO 2022188596 A1 WO2022188596 A1 WO 2022188596A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
access
client
identifier
accessed
Prior art date
Application number
PCT/CN2022/076230
Other languages
French (fr)
Chinese (zh)
Inventor
王光
姜焰
朱敏
Original Assignee
百果园技术(新加坡)有限公司
王光
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 百果园技术(新加坡)有限公司, 王光 filed Critical 百果园技术(新加坡)有限公司
Publication of WO2022188596A1 publication Critical patent/WO2022188596A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/44Star or tree networks

Definitions

  • the present application relates to the field of network information technology, and in particular, to a method, apparatus, electronic device and storage medium for access control and data forwarding.
  • applications based on audio and video real-time communication are more and more widely used, such as webcasting, video conferencing, group chat and other application scenarios.
  • the above application scenarios are all based on the network connection between the mobile client and the back-end access point (ie the server).
  • the quality of the network at the end directly affects the user experience, and has higher requirements on the packet loss rate and delay of the network.
  • the demand for real-time communication between multiple people is getting higher and higher.
  • the real-time communication scenario between multiple people expands the end-to-end link into a mesh from point to point.
  • the choice of the access point (server), the service capacity, load balancing and scalability of the access point (server) all put forward higher requirements.
  • the way for clients to access the access point and data forwarding is as follows: multiple clients in a multi-person call access the same access point, and the audio and video data between the clients are all Forwarding is performed through the only access point.
  • the above method is only suitable for the scenario where the call members are relatively single and the physical distance between the call members is relatively close.
  • the quality is poor and it is not scalable.
  • the upper limit of the number of people connected to the access point is limited by the service capability of the access point.
  • the embodiment of the present application provides an access control and Data forwarding method, device, electronic device and storage medium.
  • an embodiment of the present application provides an access control method, including:
  • the tree-like network node structure in the target access subsystem includes nodes with available resources, select a corresponding access node for the client to be accessed from the current tree-like network node structure , the tree-like network node structure includes at least one layer, each node in the tree-like network node structure is an access point included in the target access subsystem, and each node in the tree-like network node structure Establish a communication connection through a tree structure;
  • each node in the tree-like network node structure in the target access subsystem When it is determined that each node in the tree-like network node structure in the target access subsystem does not have available resources, designate an access point as a new node in the tree-like network node structure, and select the The new node is used as the access node corresponding to the client to be accessed;
  • An access control instruction is sent to the to-be-accessed client to control the to-be-accessed client to access the access node, and the corresponding relationship between the to-be-accessed client identifier and the access node identifier is stored.
  • an access control apparatus including:
  • a receiving unit configured to receive an access request sent by a client, where the access request carries an identifier of the client to be accessed;
  • a selection unit configured to select a corresponding access node for the client to be accessed according to the following steps: selecting a target access subsystem to be accessed by the client to be accessed from the access system, where the access system includes at least one access subsystem; when it is determined that the tree-like network node structure in the target access subsystem includes a node with available resources, select the client to be accessed from the current tree-like network node structure
  • the terminal selects a corresponding access node, the tree-like network node structure includes at least one layer, each node in the tree-like network node structure is an access point included in the target access subsystem, and the network node
  • Each node in the structure establishes a communication connection through a tree-like structure; when it is determined that each node in the tree-like network node structure in the target access subsystem does not have available resources, an access point is designated as the tree a new node in the network node structure, and select the new node as the access node corresponding to the client to be
  • a control unit configured to send an access control instruction to the client to control the client to access the access node corresponding to the client, and store the correspondence between the client identifier and the access node identifier.
  • an embodiment of the present application provides a data forwarding method, which is applied to the tree-like network node structure established in the above access control method, including:
  • the root node in the tree-like network node structure receives a data forwarding request, and the data forwarding request includes the data to be forwarded and a destination client identifier;
  • the data to be forwarded is sent to the node corresponding to the node identifier accessed by the destination client, and the destination client The node corresponding to the node identifier accessed by the destination client sends the to-be-forwarded data to the client corresponding to the destination client identifier;
  • the data to be forwarded is forwarded to the first root node connected to the node identifier corresponding to the node identifier accessed by the destination client , the first root node sends the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and the node corresponding to the node identifier accessed by the destination client sends the data to be forwarded It is sent to the client corresponding to the destination client identifier.
  • an embodiment of the present application provides a data forwarding device, which is applied to the root node of the tree-like network node structure established in the above access control method, including:
  • a receiving unit configured to receive a data forwarding request, where the data forwarding request includes the data to be forwarded and a destination client identifier;
  • an acquiring unit configured to acquire the correspondence between the client identifier and the access point identifier, and search for the access node identifier corresponding to the destination client identifier from the correspondence between the client identifier and the access node identifier;
  • the first sending unit is configured to send the data to be forwarded to the node corresponding to the node identifier accessed by the destination client when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node.
  • the second sending unit is configured to send the data to be forwarded to the node corresponding to the node identifier accessed by the destination client when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is a child node.
  • the first root node connected to the node the first root node sends the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and the node identifier corresponding to the destination client access node
  • the node sends the data to be forwarded to the client corresponding to the destination client identifier.
  • an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the program when the processor executes the program.
  • the access control method or the data forwarding method described in this application is not limited to this application.
  • an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the steps in the access control method or the data forwarding method described in the present application.
  • the receiving control terminal selects a corresponding access node for the client to be accessed in the following manner: selecting the access node from the access system
  • the target access subsystem to be accessed by the access client the access system includes at least one access subsystem, when it is determined that there is a node with available resources in the tree-like network node structure in the target access subsystem, from the current In the tree-like network node structure, the corresponding access node is selected for the client to be accessed, wherein the tree-like network node structure includes at least one layer, and each node in the tree-like network node structure includes the target access subsystem Access point, each node in the tree-like network node structure establishes a communication connection through the tree-like structure.
  • an access point is designated. point as a new node in the tree-like network node structure, and select the new node as the access node corresponding to the client to be accessed, and then send an access control instruction to the client to be accessed to control the access to be accessed.
  • the client accesses the access node selected for it, and stores the correspondence between the identifier of the client to be accessed and the identifier of the access node.
  • the access system includes the access node.
  • the access subsystem is not limited by geographical location.
  • the access point is dynamically selected to establish a tree-like network node structure.
  • a new one is added.
  • the access point ensures enough accessible nodes for clients to access, and the tree-like network node structure provides service capabilities that meet the needs, so that the quality of multi-person calls is not good. Limited by physical distance and the number of call members, communication efficiency and user experience are improved.
  • FIG. 1 is a schematic structural diagram of an access control system provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of an implementation flow of an access control method provided by an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of an access control apparatus provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of the implementation of the data forwarding method provided by the embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a data forwarding apparatus provided by an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the embodiment of the present application provides an access control and Data forwarding method, device, electronic device and storage medium.
  • FIG. 1 is a schematic structural diagram of an access control system provided by an embodiment of the present application, which may include an access control terminal and an access system, and the access system includes at least one access subsystem.
  • Each access subsystem included in the access system can be an independent computer room, and the geographic location of each access subsystem can be located in different countries on the earth, or can be located in the same Different regions of a country are not limited in this embodiment of the present application.
  • Each access subsystem includes multiple access points, and the access points can be servers for forwarding data, such as communication data between clients during a multi-person audio and video conference. The data may include, but is not limited to, audio data, video data, and the like.
  • the access control terminal may be a quality detection system, and the instruction detection system may be implemented on a server.
  • the quality detection system may detect that the client has The network quality between the access points of the access subsystem selects an optimal access subsystem for the client.
  • the quality detection system instructs each access subsystem to create an access network according to the number of requesting access clients, and the access network structure in each access subsystem is a tree-like network node structure. The nodes establish a two-way communication connection through the tree structure.
  • Each new node added to the tree network node structure means that the number of clients connected to each node in the existing tree network node structure reaches the online level (that is, each node has no available resources), a two-way communication connection is established between the root node in the tree-like network node structure in each access subsystem and the root node in the tree-like network node structure in other access subsystems, to Data can be transmitted between each access subsystem through their respective root nodes.
  • the server may be an independent physical server, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, and cloud storage.
  • the client can be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., which is not limited in this embodiment of the present application.
  • FIG. 2 it is a schematic diagram of the implementation flow of the access control method provided by the embodiment of the present application.
  • the access control method can be applied to the above-mentioned access control terminal.
  • the access control terminal uses the quality
  • the control system is used as an example to illustrate, which may include the following steps:
  • S11 Receive an access request sent by a client, where the access request carries an identifier of the client to be accessed.
  • the quality control system receives an access request sent by a client, where the access request carries the identifier of the client to be accessed, and the client to be accessed includes the client that sent the access request, which is recorded as the source client , the client to be accessed may also include the destination client that the source client requests for communication. If the client to be accessed also includes the destination client, the quality control system queries the access node identifier corresponding to the destination client identifier from the locally stored correspondence between the client identifier and the access node identifier. The corresponding access node identifier indicates that the destination client has accessed the target access node. If the access node corresponding to the destination client identifier is not queried, no matter whether the client to be accessed is the source client or the destination client, Select the corresponding access node for the client to be accessed according to steps S12 to S14:
  • the quality control system selects a target access subsystem to be accessed by the client to be accessed from the access system, and the access system includes at least one access subsystem.
  • the quality control system stores the access point (that is, the server) identifier and IP (Internet Protocol, Internet Protocol) address information contained in each access subsystem in the access system, and the quality control system returns each access point to the client to be accessed.
  • the access point identifier and IP address information are specified in the access subsystem, and the client sends a detection packet to the designated access point in each access subsystem according to the access point identifier and IP address information specified in each access subsystem, and obtains corresponding detection results, and send each detection result to the quality control system, and the quality control system selects a target access subsystem to be accessed for the client to be accessed according to the detection result, wherein the detection result includes the client to be accessed.
  • the terminal sends information such as the delay and packet loss rate of the probe packet to the designated access point.
  • the target access subsystem is the client to be accessed and the designated access client determined by the quality control system according to the delay and packet loss rate of the probe packet sent.
  • the quality detection system selects the client to be accessed from the current tree-like network node structure
  • the terminal selects a corresponding access node
  • the tree-like network node structure includes at least one layer
  • each node in the tree-like network node structure is an access point included in the target access subsystem
  • the network node Each node in the structure establishes a bidirectional communication connection through the tree structure.
  • the highest level node of the current tree network node structure when it is determined that the highest level node of the current tree network node structure has available resources, the highest level node is selected as the access node corresponding to the client to be accessed, the highest level node is the root node, and other level nodes are the root The child node of the node; when it is determined that the highest-level node does not have available resources, select a node with available resources from the child nodes of the root node in the order from high to low as the access node corresponding to the client to be accessed. .
  • the tree-like network node structure in the target access subsystem is established node by node according to the number of client accesses. Initially, when it is determined that the tree-like network structure has not been established in the target access subsystem, an access point is designated as the root node of the tree-like network structure, and the root node is the highest level node of the tree-like network structure.
  • the number of accessed clients When the number of accessed clients is equal to the first preset threshold, specify an access point as the first child node of the next level of the root node, until the number of clients accessed by the child node is equal to the second preset threshold , designate an access point as the second child node of the level, and so on, until the number of child nodes contained in the current level is equal to the set value, and the clients connected to the root node and the child nodes of the current level are all available.
  • the upper limit is accessed, another access point is designated as the child node of the next level of the current level, and when the number of levels of the tree-like network node structure established is equal to the third preset threshold, the establishment of the next level is not continued. child node.
  • the first preset threshold, the second preset threshold, and the third preset threshold can be set according to the actual situation, and the first preset threshold can be set to the same value as the second preset threshold.
  • the first preset threshold can be set to the same value as the second preset threshold.
  • the preset threshold and the second preset threshold are both 10, and the third preset threshold is set to 3, which is not limited in this embodiment of the present application.
  • the root node of the tree-like network structure in the target access subsystem when it is determined that the number of clients currently accessed by the root node of the tree-like network structure in the target access subsystem is less than the first preset threshold, it is determined that the root node has available resources, and the root node is selected as the to-be-connected The access node corresponding to the client.
  • the root node When it is determined that the number of clients currently accessed by the root node is equal to the first preset threshold, and it is determined that there are no available resources at the root node, select a client that is accessed from the child nodes of the root node in descending order of hierarchy. Nodes whose number is less than the second preset threshold are used as access nodes corresponding to the client to be accessed.
  • each node in the tree-like network node structure in the target access subsystem does not have available resources, designate an access point as a new node in the tree-like network node structure, and The new node is selected as the access node corresponding to the client to be accessed.
  • the quality detection system designates an access point as the next level of the root node.
  • the number of child nodes of the current level is less than the set upper limit value corresponding to the current level, and there are no available resources in the root node and each child node.
  • an access point When it is determined that an access point is used as a child node of the current level; when it is determined that the number of child nodes of the current level is equal to the set upper limit value corresponding to the current level, and there are no available resources in the root node and each child node is specified, an access point is designated as the child node of the next level of the child node of the current level.
  • the quality detection system determines that the root node does not exist resource, a new access point is designated as a child node of the next level of the root node, for example, the first child node 1_1 of the next level of the root node 1 in the access subsystem 1 of FIG. 1 .
  • the quality detection system presets the upper limit of the number of sub-nodes that can be connected at each level, and can count and store the total number of sub-nodes that can be connected at most at each level according to the number of sub-nodes that can be connected to each node.
  • the upper limit of the number of child nodes that can be connected to a node is set to N
  • the upper limit of the number of child nodes that can be connected to the next level of the 0th level (ie the highest level), that is, the first level is N
  • the first level contains N child nodes
  • the number of child nodes of the next level that can be connected to each child node is N
  • the next level is the upper limit of the number of child nodes that can be connected to the second level
  • the quality detection system determines that the current tree-like network node structure in the target access subsystem includes a root node and child nodes, and the number of child nodes of the current level is less than the set upper limit value corresponding to the current level, and the root node is currently connected
  • the number of clients connected to the node is equal to the first preset threshold
  • the number of clients currently accessed by each child node is equal to the second preset threshold
  • a new access point is designated as a child node of the current level.
  • the first preset threshold and the second preset threshold are both set to 10 as an example for description.
  • Root node 1 currently includes two levels, and the number of corresponding child nodes of the first level is equal to The upper limit is set to 10, the number of clients currently connected to root node 1 is 10, the sub-nodes of the current level include: 1_1 and 1_2, and the number of clients currently connected to sub-nodes 1_1 and 1_2 are both 10. That is to say, root node 1 and child nodes 1_1 and 1_2 have no available resources, and the number of child nodes of the first level is 2, which is less than the set upper limit of 10, then a new access point is designated as the child node of the first level : 1_3.
  • the quality detection system determines that the number of child nodes at the current level is equal to the set upper limit value corresponding to the current level, and the number of clients currently accessed by the root node is equal to the first preset threshold, the number of clients currently accessed by each child node is When both are equal to the second preset threshold, a new access point is designated as the child node of the next level of the child node of the current level.
  • the current level of child nodes includes 10: 1_1 to 1_10, and the number of clients currently connected to child nodes 1_1 to 1_10 is 10.
  • the root node 1 and the child nodes 1_1 to 1_10 have no available resources, and the number of the child nodes of the first level reaches the set upper limit of 10, then a new access point is designated as the child node of the second level: 1_1_1.
  • the link paths between the clients connecting the sub-nodes will cause the server to process the link paths due to the increase in the number of transit nodes (ie, transit servers).
  • the increase of the delay may affect the experience of the corresponding user. Therefore, an upper limit is imposed on the number of layers of the tree-like network node structure.
  • the quality detection system specifies an access point As a new root node to establish a new tree-like network node structure.
  • the third preset threshold may be set by itself as required, for example, may be set to 3, which is not limited in this embodiment of the present application.
  • the quality detection system indicates that the newly established root node is in the access subsystem of other established root nodes in the access system.
  • the root node establishes a two-way communication connection.
  • access subsystem 1 is the first access subsystem to establish a root node
  • access subsystem 2 is the second access subsystem to establish a root node
  • access subsystem 3 is the last to establish a root node.
  • the access subsystem of the root node can record the tree-like network node structure in different access subsystems according to the order in which the root node is added.
  • the root node 1 in the access subsystem 1 can be recorded as LEVEL0, and the The root node 2 in the access subsystem 2 is denoted as LEVEL1, and the root node 3 in the access subsystem 3 is denoted as LEVEL2, wherein LEVEL0, LEVEL1, and LEVEL2 represent that the root node 1, the root node 2, and the root node 3 join
  • the quality detection system designates the root node 2 of the access subsystem 2
  • it instructs the root node 2 to establish a communication connection with the root node 1
  • the quality detection system designates the root node 3 of the access system 3
  • the quality detection system designates the root node M of the Mth access subsystem, it indicates the root node M and the first M-1 access subsystems.
  • the root nodes establish communication connections respectively. If an access subsystem includes multiple root nodes, communication connections can be established between the root nodes.
  • each root node in different access subsystems can maintain communication continuity by sending heartbeat packets.
  • each root node can exit the network as follows:
  • each root node is controlled to exit the current network one by one in the reverse order of establishment.
  • S15 Send an access control instruction to the to-be-accessed client to control the to-be-accessed client to access the access node, and store the correspondence between the to-be-accessed client identifier and the access node identifier relation.
  • the quality detection system sends an access control instruction to the client to be accessed, and the access control instruction includes the identifier of the node to be accessed and IP address information, and the client to access receives the access sent by the quality detection system.
  • the access control instruction After entering the control instruction, access the access node selected by the quality detection system according to the identity and IP address of the node to be accessed, and return an access success response message to the quality detection system, and the quality detection system stores the client identity and the access node. Correspondence of node IDs.
  • the present application since two-way communication connection is performed between nodes, and each node can access the client, that is, each client has the ability to connect to the microphone, therefore, the present application is not only applicable to the live broadcast mode, but also It is suitable for conference or group chat mode where many people are on the microphone at the same time, and the scope of application is wider.
  • the access points of the computer rooms in different regions of the world can be organized in the form of a combination of tree and mesh, which has strong horizontal and vertical expansion capabilities.
  • horizontal expansion has global expansion capability.
  • each continent establishes a communication connection through the root node selected by each continent, and each continent can expand vertically by establishing a tree-like network node structure in the computer room selected by each continent.
  • the upper limit of vertical expansion only depends on the access point in the computer room (ie During the conference, access points can be dynamically added or deleted according to the number of online clients, and in the embodiment of the present application, the number of clients that can be accessed by each node and the number of clients that can be connected to each node The number of sub-nodes at the next level is limited. When the upper limit is reached, new access points will be expanded, so that a single access point will not become a bottleneck for expansion.
  • the receiving control terminal selects the corresponding access node for the client to be accessed in the following manner:
  • the target access subsystem to be accessed by the client to be accessed is selected, and the access system includes at least one access subsystem.
  • each node in the tree-like network node structure When it is determined that there are available resources in the tree-like network node structure in the target access subsystem When the node is connected, select the corresponding access node for the client to be accessed from the current tree-like network node structure, wherein the tree-like network node structure includes at least one layer, and each node in the tree-like network node structure is targeted to connect Access points included in the sub-system, each node in the tree-like network node structure establishes a communication connection through the tree-like structure, when it is determined that each node in the tree-like network node structure in the target access system does not have available resources , then designate an access point as a new node in the tree-like network node structure, and select the new node as the access node corresponding to the client to be accessed, and then send an access control instruction to the client to be accessed , to control the access node to be accessed by the client to be accessed, and store the corresponding relationship between the identifier of
  • the access subsystem included in the access system is not limited by geographical location.
  • the access point is dynamically selected to establish a tree-like network node structure.
  • a new access point is added as a new node in the current tree-like network node structure to ensure enough accessible nodes for client access, and the tree-like network node structure provides service capabilities that meet the needs.
  • the quality of multi-person calls is not limited by physical distance and the number of call members, which improves communication efficiency and user experience.
  • an embodiment of the present application also provides an access control apparatus. Since the above-mentioned access control apparatus solves the problem in a similar manner to the access control method, the implementation of the above-mentioned apparatus can refer to the implementation of the method, and the repetitions are repeated. No longer.
  • FIG. 3 is a schematic structural diagram of an access control apparatus provided by an embodiment of the present application, which may include:
  • a receiving unit 21 configured to receive an access request sent by a client, where the access request carries an identifier of the client to be accessed;
  • the selection unit 22 is configured to select a corresponding access node for the client to be accessed according to the following steps: selecting a target access subsystem to be accessed by the client to be accessed from the access system, the access system At least one access subsystem is included; when it is determined that the tree-like network node structure in the target access subsystem includes nodes with available resources, the to-be-accessed node is selected from the current tree-like network node structure
  • the client selects a corresponding access node, the tree-like network node structure includes at least one layer, each node in the tree-like network node structure is an access point included in the target access subsystem, and the network Each node in the node structure establishes a communication connection through a tree structure; when it is determined that each node in the tree network node structure in the target access subsystem does not have available resources, an access point is designated as the a new node in the tree-like network node structure, and selecting the new node as the access node corresponding to the client to be accessed
  • a control unit 23 configured to send an access control instruction to the client to control the client to access the access node corresponding to the client, and store the correspondence between the client identifier and the access node identifier .
  • the selection unit 22 is specifically configured to select the highest-level node as the access corresponding to the client to be accessed when it is determined that the highest-level node of the tree-like network node structure has available resources.
  • node the highest-level node is the root node, and other hierarchical nodes are child nodes of the root node; when it is determined that the highest-level node does not have available resources, the order from high to low levels is from the root node.
  • a node with available resources is selected from among the child nodes of the node as the access node corresponding to the client to be accessed.
  • the device further includes:
  • a designating unit configured to designate an access point as the access point when it is determined that the tree-like network structure has not been established in the target access subsystem before selecting the corresponding access node for the to-be-accessed client the root node of the tree-like network structure;
  • the selection unit 22 is specifically configured to designate an access point as the next level of the root node when it is determined that the tree-like network node structure only includes the root node and the root node does not have available resources child nodes; when it is determined that the tree network node structure includes a root node and child nodes, the number of child nodes of the current level is less than the set upper limit value corresponding to the current level, and the root node and each child node are in the When there are no available resources, an access point is designated as a child node of the current level; when it is determined that the number of child nodes of the current level is equal to the set upper limit value corresponding to the current level, and the root node and each child node are When there is no available resource in the nodes, an access point is designated as the child node of the next level of the child node of the current level.
  • the selection unit 22 is specifically configured to determine that the root node does not have available resources in the following manner: when it is determined that the number of clients currently accessed by the root node is equal to a first preset threshold, determine the The root node does not have available resources; determine that any child node has no available resources in the following manner: when it is determined that the number of clients currently accessed by any child node is equal to the second preset threshold, determine that any child node does not have available resources. Available resources exist.
  • the specifying unit is further configured to determine that the number of levels of the tree-like network node structure is equal to a third preset threshold, and the number of child nodes of the lowest level is equal to the setting corresponding to the lowest level.
  • a third preset threshold When the limit is exceeded, an access point is designated as a new root node to establish a new tree-like network node structure.
  • two-way communication connection is performed between each node in the tree-like network node structure; two-way communication is established between the access subsystems in the tree-like network node structure established by the access system through their respective root nodes. connect.
  • control unit 23 is further configured to, when it is determined that the root node in the access subsystem in which the access system has established a tree-like network node structure needs to exit the current network, control each root node to follow the establishment sequence.
  • the reverse order exits the current network one by one.
  • FIG. 4 is a schematic flowchart of the implementation of the data forwarding method provided by the embodiment of the present application, which is applied to the tree-like network node structure established in the above-mentioned access control method provided by the embodiment of the present application.
  • the data forwarding method The following steps can be included:
  • the root node in the tree-like network node structure receives a data forwarding request, where the data forwarding request includes the data to be forwarded and a destination client identifier.
  • the root node of the tree-like network node structure in any access subsystem in the access control system receives a data forwarding request, where the data forwarding request is sent by a client accessing the root node, or is The client that accesses any child node of the root node sends the message to any child node and forwards it to the root node.
  • S32 Acquire the correspondence between the client identifier and the access point identifier, and search for the access node identifier corresponding to the target client identifier from the correspondence between the client identifier and the access node identifier.
  • the root node obtains the correspondence between the client identifier and the access node identifier from the access control terminal (quality detection system), and searches for the destination client identifier from the correspondence between the client identifier and the access node identifier.
  • the corresponding access node identifier that is, the node identifier accessed by the destination client.
  • the root node that receives the data forwarding request sends the data to be forwarded to the root node accessed by the destination client, and the client receives the data to be forwarded.
  • the incoming root node directly forwards the data to be forwarded to the destination client.
  • the root node that receives the data forwarding request directly sends the data to be forwarded to the destination client.
  • the root node that receives the data forwarding request sends the data to be forwarded to the root node connected to the child node accessed by the destination client.
  • the first root node forwards the data to be forwarded to the child node accessed by the destination client, and then the child node accessed by the destination client sends the data to be forwarded to the destination client.
  • the root nodes in different access subsystems will only send the data to be forwarded to the lower-level child nodes connected to the root node, and will not directly send it to other nodes.
  • the subordinate child nodes of the root node are forwarded through the connected root node.
  • the node accessed by the client that initiates the data forwarding request is the child node 1_1_1 in the tree-like network node structure in the access subsystem 1, and the node accessed by the destination client is the access subsystem 3.
  • the data forwarding path may be as follows: the client initiates a data forwarding request to the child node 1_1_1 to which it is connected, and the child node 1_1_1 forwards the data forwarding request to the upper-level child node 1_1 to which it is connected , the child node 1_1 sends the data forwarding request to the connected root node 1, the root node 1 extracts the data to be forwarded from the data forwarding request, and forwards the to-be-forwarded data to the root node 3 in the access subsystem 3, and the root node 3
  • the data to be forwarded is sent to its next-level child node 3_1, the child node 3_1 sends the to-be-forwarded data to its next-level child node 3_1_1, and the child node 3_1_1 sends the to-be-forwarded data to the destination client.
  • the root nodes of the cross-access subsystem can logically send data directly, they can also be transferred at the bottom layer through the third or more root nodes of the access subsystem.
  • Set the routing policy to set the specific path for forwarding.
  • the root node 1 in the process of sending the data to be forwarded from the root node 1 in the access subsystem 1 to the root node 3 in the access system 3, the root node 1 can also send the data to be forwarded to the root node 2, and then the root node 1 sends the data to be forwarded to the root node 2.
  • the root node 2 sends the data to be forwarded to the root node 3.
  • an embodiment of the present application also provides a data forwarding device. Since the principle of solving the problem of the above-mentioned data forwarding device is similar to that of the data forwarding method, the implementation of the above-mentioned device can refer to the implementation of the method, and the repetition will not be repeated. .
  • the data forwarding apparatus is applied to the root node of the tree-like network node structure established in the above access control method, and may include:
  • a receiving unit 41 configured to receive a data forwarding request, where the data forwarding request includes the data to be forwarded and a destination client identifier;
  • an obtaining unit 42 configured to obtain the correspondence between the client identifier and the access point identifier, and search for the access node identifier corresponding to the destination client identifier from the correspondence between the client identifier and the access node identifier;
  • the first sending unit 43 is configured to, when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node, send the data to be forwarded to the node identifier corresponding to the destination client access.
  • the node the node corresponding to the node identifier accessed by the destination client sends the data to be forwarded to the client corresponding to the destination client identifier;
  • the second sending unit 44 is configured to, when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is a child node, send the to-be-forwarded data to the node identifier corresponding to the destination client access.
  • the first root node connected to the node the first root node sends the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and the node identifier accessed by the destination client corresponds to The node sends the data to be forwarded to the client corresponding to the destination client identifier.
  • the data forwarding request is sent by a client accessing the root node, or sent by a client accessing any sub-node of the root node to any sub-node and then forwarded to any sub-node. of the root node.
  • an embodiment of the present application further provides an electronic device 500.
  • the electronic device 500 is configured to implement the access control method described in the foregoing method embodiments.
  • the electronic device 500 in this embodiment may include : a memory 501, a processor 502, and a computer program stored in the memory and executable on the processor, such as an access control program.
  • the steps in each of the foregoing embodiments of the access control method or the data forwarding method are implemented, for example, step S11 shown in FIG. 2 .
  • the processor executes the computer program
  • the functions of the modules/units in the foregoing device embodiments are implemented, for example, 21.
  • the specific connection medium between the above-mentioned memory 501 and the processor 502 is not limited in this embodiment of the present application.
  • the memory 501 and the processor 502 are connected by a bus 503 in FIG. 6 , and the bus 503 is represented by a thick line in FIG. 6 .
  • the bus 503 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 6, but it does not mean that there is only one bus or one type of bus.
  • the memory 501 may be a volatile memory (volatile memory), such as random-access memory (RAM); the memory 501 may also be a non-volatile memory (non-volatile memory), such as read-only memory, flash memory A flash memory, hard disk drive (HDD) or solid-state drive (SSD), or memory 501 is a device that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by Any other medium accessed by the computer, but not limited to this.
  • the memory 501 may be a combination of the above-mentioned memories.
  • the processor 502 is configured to implement an access control method as shown in FIG. 2, including:
  • the processor 502 is configured to call the computer program stored in the memory 501 to perform step S11 as shown in FIG. 2 , and receive an access request sent by the client, where the access request carries the client to be accessed
  • the target access subsystem to be accessed by the client to be accessed is selected from the access system, the access system includes at least one access subsystem, and step S13, when the target access subsystem is determined
  • the tree-like network node structure in the system includes a node with available resources, select a corresponding access node for the client to be accessed from the current tree-like network node structure, step S14, when it is determined that the
  • step S15 sending an access control instruction to the client to be accessed to control the client to access the access node
  • the processor 502 is configured to implement a data forwarding method as shown in FIG. 4 , including:
  • the processor 502 is configured to invoke the computer program stored in the memory 501 to execute step S31 as shown in FIG. 4 , the root node in the tree-like network node structure receives a data forwarding request, and the data forwarding request includes: The data to be forwarded and the destination client identifier, step S32, obtain the corresponding relationship between the client identifier and the access point identifier, and search for the destination client identifier corresponding to the corresponding relationship between the client identifier and the access node identifier.
  • the access node identifier when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node, then the data to be forwarded is sent to the node identifier corresponding to the destination client access.
  • the node corresponding to the node identifier accessed by the destination client sends the data to be forwarded to the client corresponding to the destination client identifier, and in step S34, when determining the destination client identifier
  • the data to be forwarded is forwarded to the first root node connected to the node corresponding to the node identifier accessed by the destination client, and the first root node is connected by the first root node.
  • Embodiments of the present application further provide a computer-readable storage medium, which stores computer-executable instructions to be executed by the above-mentioned processor, and includes a program to be executed by the above-mentioned processor.
  • various aspects of the access control method provided by the present application can also be implemented in the form of a program product, which includes program codes, and when the program product runs on an electronic device, the program The code is used to cause the electronic device to execute the steps in the access control method according to various exemplary embodiments of the present application described above in this specification.
  • the electronic device may execute steps S11, Receive an access request sent by the client, where the access request carries the identifier of the client to be accessed, step S12, select a target access subsystem to be accessed by the client to be accessed from the access system, and the access
  • the access system includes at least one access subsystem, and in step S13, when it is determined that the tree-like network node structure in the target access subsystem includes nodes with available resources, from the current tree-like network node structure as The to-be-accessed client selects a corresponding access node, and in step S14, when it is determined that each node in the tree-like network node structure in the target access subsystem does not have available resources, specify an access point as a new node in the tree-like network node structure, and select the new node as the access node corresponding to the client to be accessed, and step S15: send access to the client to be accessed
  • a control instruction is used to control the client to be accessed to access the access node, and to store
  • various aspects of the data forwarding method provided by this application can also be implemented in the form of a program product, which includes program code, and when the program product runs on an electronic device, the program code For causing the electronic device to perform the steps in the data forwarding method according to various exemplary embodiments of the present application described above in this specification, for example, the electronic device may perform step S31 as shown in FIG.
  • the root node in the network node structure receives the data forwarding request, and the data forwarding request includes the data to be forwarded and the destination client identifier.
  • Step S32 Obtain the correspondence between the client identifier and the access point identifier, and send the request from the client Searching for the access node identifier corresponding to the target client identifier in the corresponding relationship between the identifier and the access node identifier, step S33, when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node, then Send the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and send the data to be forwarded to the destination client by the node corresponding to the node identifier accessed by the destination client and step S34, when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is a child node, then forward the data to be forwarded to the destination client access point.
  • the first root node to which the node corresponding to the node identifier is connected the first root node sends the to-be-forwarded data to the node corresponding to the node identifier accessed by the destination client, and the node identified by the destination client accesses the node.
  • the node corresponding to the node identifier sends the data to be forwarded to the client corresponding to the destination client identifier.
  • the embodiments of the present application may be provided as a method, an apparatus, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions
  • the apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.

Abstract

The present application discloses an access control method and apparatus, a data forwarding method and apparatus, and an electronic device and a storage medium. The access control method comprises: receiving an access request sent by a client; selecting, from an access system, a target access subsystem to be accessed by an accessing client; when it is determined that a tree network node structure in the target access subsystem comprises a node with an available resource, selecting, from the current tree network node structure, a corresponding access node for the accessing client, wherein each node in the network node structure establishes a communication connection by means of a tree structure; when it is determined that each node in the tree network node structure in the target access subsystem has no available resources, specifying an access point as a new node in the tree network node structure, and selecting the new node as an access node corresponding to the accessing client; and sending an access control instruction to the accessing client, so as to control the accessing client to access the access node, and storing the correlation between an identifier of the accessing client and an identifier of the access node.

Description

接入控制与数据转发方法、装置、电子设备及存储介质Access control and data forwarding method, device, electronic device and storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求在2021年03月09日提交中国专利局、申请号为202110255660.4、申请名称为“接入控制与数据转发方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110255660.4 and the application name "Access Control and Data Forwarding Method, Device, Electronic Device and Storage Medium" filed with the China Patent Office on March 09, 2021, all of which The contents are incorporated herein by reference.
技术领域technical field
本申请涉及网络信息技术领域,尤其涉及接入控制与数据转发方法、装置、电子设备及存储介质。The present application relates to the field of network information technology, and in particular, to a method, apparatus, electronic device and storage medium for access control and data forwarding.
背景技术Background technique
在移动互联网环境下,基于音视频实时通信的应用得到越来越广泛的使用,如网络直播、视频会议、群聊等应用场景。上述应用场景均建立在移动客户端与后端接入点(即服务器)的网络连接之上,客户端通过接入接入点,将音视频数据通过接入点转发至目的客户端,端到端的网络质量直接影响到用户体验,对网络的丢包率和延时有较高的要求。为了满足更丰富的社交及办公属性,多人之间实时通信的需求越来越高,多人之间实时通信场景将端到端的链路由点到点扩展成网状,这样对接入点的选择,接入点(服务器)的服务能力、负载均衡以及扩展性都提出了更高的要求。In the mobile Internet environment, applications based on audio and video real-time communication are more and more widely used, such as webcasting, video conferencing, group chat and other application scenarios. The above application scenarios are all based on the network connection between the mobile client and the back-end access point (ie the server). The quality of the network at the end directly affects the user experience, and has higher requirements on the packet loss rate and delay of the network. In order to meet richer social and office attributes, the demand for real-time communication between multiple people is getting higher and higher. The real-time communication scenario between multiple people expands the end-to-end link into a mesh from point to point. The choice of the access point (server), the service capacity, load balancing and scalability of the access point (server) all put forward higher requirements.
目前多人实时通信场景中,客户端接入接入点与数据转发的方式如下:一个多人通话中的多个客户端接入到同一个接入点,客户端之间的音视频数据全部通过该唯一的接入点进行转发,然而,上述方式只适合通话成员比较单一,通话成员之间的物理距离比较近的场景,对于距离较远如跨国的国际通话质量不佳,不具备扩展性,并且,接入点接入的人数上限受到接入点的服务能力的限制。In the current multi-person real-time communication scenario, the way for clients to access the access point and data forwarding is as follows: multiple clients in a multi-person call access the same access point, and the audio and video data between the clients are all Forwarding is performed through the only access point. However, the above method is only suitable for the scenario where the call members are relatively single and the physical distance between the call members is relatively close. For international calls with long distances, such as transnational calls, the quality is poor and it is not scalable. , and the upper limit of the number of people connected to the access point is limited by the service capability of the access point.
发明内容SUMMARY OF THE INVENTION
为了解决现有的多人实时通信场景中,客户端接入接入点与数据转发的方式使得通话质量受到物理距离和通话成员数量限制的问题,本申请实施例提供了一种接入控制与数据转发方法、装置、电子设备及存储介质。In order to solve the problem that in the existing multi-person real-time communication scenario, the way that the client accesses the access point and data forwarding makes the call quality limited by the physical distance and the number of call members, the embodiment of the present application provides an access control and Data forwarding method, device, electronic device and storage medium.
第一方面,本申请实施例提供了一种接入控制方法,包括:In a first aspect, an embodiment of the present application provides an access control method, including:
接收客户端发送的接入请求,所述接入请求中携带有待接入客户端标识;receiving an access request sent by a client, where the access request carries an identifier of the client to be accessed;
按照以下步骤为所述待接入客户端选择对应的接入节点:Select the corresponding access node for the client to be accessed according to the following steps:
从接入系统中选择待接入客户端待接入的目标接入子系统,所述接入系统包括至少一个接入子系统;Selecting a target access subsystem to be accessed by the client to be accessed from an access system, where the access system includes at least one access subsystem;
当确定所述目标接入子系统中的树状网络节点结构中包括存在可用资源的节点时,从所述当前的树状网络节点结构中为所述待接入客户端选择对应的接入节点,所述树状网络节点结构至少包括一层,所述树状网络节点结构中的各节点为所述目标接入子系统中包含的接入点,所述树状网络节点结构中的各节点通过树状结构建立通信连接;When it is determined that the tree-like network node structure in the target access subsystem includes nodes with available resources, select a corresponding access node for the client to be accessed from the current tree-like network node structure , the tree-like network node structure includes at least one layer, each node in the tree-like network node structure is an access point included in the target access subsystem, and each node in the tree-like network node structure Establish a communication connection through a tree structure;
当确定所述目标接入子系统中的树状网络节点结构中的各节点均不存在可用资源时,则指定一个接入点作为所述树状网络节点结构中的新的节点,并选择所述新的节点作为所述待接入客户端对应的接入节点;When it is determined that each node in the tree-like network node structure in the target access subsystem does not have available resources, designate an access point as a new node in the tree-like network node structure, and select the The new node is used as the access node corresponding to the client to be accessed;
向所述待接入客户端发送接入控制指令,以控制所述待接入客户端接入所述接入节点,并存储所述待接入客户端标识与接入节点标识的对应关系。An access control instruction is sent to the to-be-accessed client to control the to-be-accessed client to access the access node, and the corresponding relationship between the to-be-accessed client identifier and the access node identifier is stored.
第二方面,本申请实施例提供了一种接入控制装置,包括:In a second aspect, an embodiment of the present application provides an access control apparatus, including:
接收单元,用于接收客户端发送的接入请求,所述接入请求中携带有待接入客户端标识;a receiving unit, configured to receive an access request sent by a client, where the access request carries an identifier of the client to be accessed;
选择单元,用于按照以下步骤为所述待接入客户端选择对应的接入节点:从接入系统中选择待接入客户端待接入的目标接入子系统,所述接入系统包括至少一个接入子系统;当确定所述目标接入子系统中的树状网络节点结构中包括存在可用资源的节点时,从所述当前的树状网络节点结构中为所述待接入客户端选择对应的接入节点,所述树状网络节点结构至少包括一层,所 述树状网络节点结构中的各节点为所述目标接入子系统中包含的接入点,所述网络节点结构中的各节点通过树状结构建立通信连接;当确定所述目标接入子系统中的树状网络节点结构中的各节点均不存在可用资源时,则指定一个接入点作为所述树状网络节点结构中的新的节点,并选择所述新的节点作为所述待接入客户端对应的接入节点;a selection unit, configured to select a corresponding access node for the client to be accessed according to the following steps: selecting a target access subsystem to be accessed by the client to be accessed from the access system, where the access system includes at least one access subsystem; when it is determined that the tree-like network node structure in the target access subsystem includes a node with available resources, select the client to be accessed from the current tree-like network node structure The terminal selects a corresponding access node, the tree-like network node structure includes at least one layer, each node in the tree-like network node structure is an access point included in the target access subsystem, and the network node Each node in the structure establishes a communication connection through a tree-like structure; when it is determined that each node in the tree-like network node structure in the target access subsystem does not have available resources, an access point is designated as the tree a new node in the network node structure, and select the new node as the access node corresponding to the client to be accessed;
控制单元,用于向所述客户端发送接入控制指令,以控制所述客户端接入所述客户端对应的接入节点,并存储所述客户端标识与接入节点标识的对应关系。A control unit, configured to send an access control instruction to the client to control the client to access the access node corresponding to the client, and store the correspondence between the client identifier and the access node identifier.
第三方面,本申请实施例提供了一种数据转发方法,应用于上述接入控制方法中建立的树状网络节点结构,包括:In a third aspect, an embodiment of the present application provides a data forwarding method, which is applied to the tree-like network node structure established in the above access control method, including:
所述树状网络节点结构中的根节点接收数据转发请求,所述数据转发请求中包括待转发数据和目的客户端标识;The root node in the tree-like network node structure receives a data forwarding request, and the data forwarding request includes the data to be forwarded and a destination client identifier;
获取客户端标识与接入点标识的对应关系,并从所述客户端标识与接入节点标识的对应关系中查找所述目的客户端标识对应的接入节点标识;acquiring the correspondence between the client identifier and the access point identifier, and searching for the access node identifier corresponding to the target client identifier from the correspondence between the client identifier and the access node identifier;
当确定所述目的客户端标识对应的接入节点标识对应的节点为根节点时,则将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的端目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端;When it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node, the data to be forwarded is sent to the node corresponding to the node identifier accessed by the destination client, and the destination client The node corresponding to the node identifier accessed by the destination client sends the to-be-forwarded data to the client corresponding to the destination client identifier;
当确定所述目的客户端标识对应的接入节点标识对应的节点为子节点时,则将所述待转发数据转发至所述目的客户端接入的节点标识对应的节点连接的第一根节点,由所述第一根节点将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端。When it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is a child node, the data to be forwarded is forwarded to the first root node connected to the node identifier corresponding to the node identifier accessed by the destination client , the first root node sends the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and the node corresponding to the node identifier accessed by the destination client sends the data to be forwarded It is sent to the client corresponding to the destination client identifier.
第四方面,本申请实施例提供了一种数据转发装置,应用于上述接入控制方法中建立的树状网络节点结构的根节点,包括:In a fourth aspect, an embodiment of the present application provides a data forwarding device, which is applied to the root node of the tree-like network node structure established in the above access control method, including:
接收单元,用于接收数据转发请求,所述数据转发请求中包括待转发数据和目的客户端标识;a receiving unit, configured to receive a data forwarding request, where the data forwarding request includes the data to be forwarded and a destination client identifier;
获取单元,用于获取客户端标识与接入点标识的对应关系,并从所述客户端标识与接入节点标识的对应关系中查找所述目的客户端标识对应的接入节点标识;an acquiring unit, configured to acquire the correspondence between the client identifier and the access point identifier, and search for the access node identifier corresponding to the destination client identifier from the correspondence between the client identifier and the access node identifier;
第一发送单元,用于当确定所述目的客户端标识对应的接入节点标识对应的节点为根节点时,则将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的端目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端;The first sending unit is configured to send the data to be forwarded to the node corresponding to the node identifier accessed by the destination client when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node. A node, where the node corresponding to the node identifier accessed by the destination client sends the to-be-forwarded data to the client corresponding to the destination client identifier;
第二发送单元,用于当确定所述目的客户端标识对应的接入节点标识对应的节点为子节点时,则将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点连接的第一根节点,由所述第一根节点将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端。The second sending unit is configured to send the data to be forwarded to the node corresponding to the node identifier accessed by the destination client when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is a child node. The first root node connected to the node, the first root node sends the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and the node identifier corresponding to the destination client access node The node sends the data to be forwarded to the client corresponding to the destination client identifier.
第五方面,本申请实施例提供了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现本申请所述的接入控制方法或者数据转发方法。In a fifth aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the program when the processor executes the program. The access control method or the data forwarding method described in this application.
第六方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本申请所述的接入控制方法或者数据转发方法中的步骤。In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the steps in the access control method or the data forwarding method described in the present application.
本申请实施例的有益效果如下:The beneficial effects of the embodiments of the present application are as follows:
本申请实施例中,接收控制端接收客户端发送的携带有待接入客户端标识的接入请求后,通过以下方式为待接入客户端选择对应的接入节点:从接入系统中选择待接入客户端待接入的目标接入子系统,接入系统中包括至少一个接入子系统,当确定目标接入子系统中的树状网络节点结构中存在可用资源的节点时,从当前的树状网络节点结构中为待接入客户端选择对应的接入节点,其中,树状网络节点结构至少包括一层,树状网络节点结构中的各节点时目标接入子系统中包含的接入点,树状网络节点结构中的各节点通过 树状结构建立通信连接,当确定目标接入系统中的树状网络节点结构中的各节点均不存在可用资源时,则指定一个接入点作为树状网络节点结构中的新的节点,并选择该新的节点作为待接入客户端对应的接入节点,进而,向待接入客户端发送接入控制指令,以控制待接入客户端接入为其选择的接入节点,并存储待接入客户端标识与接入节点标识的对应关系,相比于现有技术,在多人实时通信场景中,接入系统包含的接入子系统不受地理位置的限制,在接入子系统中,动态选择接入点建立树状网络节点结构,当当前树状网络节点结构中的各节点均不存在可用资源时,增加新的接入点作为当前树状网络节点结构中的新的节点,保证足够的可接入节点供客户端接入,并且,树状网络节点结构提供了满足需求的服务能力,使得多人通话质量不受物理距离和通话成员数量的限制,提高了通信效率和用户体验。In this embodiment of the present application, after receiving the access request sent by the client and carrying the identifier of the client to be accessed, the receiving control terminal selects a corresponding access node for the client to be accessed in the following manner: selecting the access node from the access system The target access subsystem to be accessed by the access client, the access system includes at least one access subsystem, when it is determined that there is a node with available resources in the tree-like network node structure in the target access subsystem, from the current In the tree-like network node structure, the corresponding access node is selected for the client to be accessed, wherein the tree-like network node structure includes at least one layer, and each node in the tree-like network node structure includes the target access subsystem Access point, each node in the tree-like network node structure establishes a communication connection through the tree-like structure. When it is determined that each node in the tree-like network node structure in the target access system does not have available resources, an access point is designated. point as a new node in the tree-like network node structure, and select the new node as the access node corresponding to the client to be accessed, and then send an access control instruction to the client to be accessed to control the access to be accessed. The client accesses the access node selected for it, and stores the correspondence between the identifier of the client to be accessed and the identifier of the access node. Compared with the prior art, in the multi-person real-time communication scenario, the access system includes the access node. The access subsystem is not limited by geographical location. In the access subsystem, the access point is dynamically selected to establish a tree-like network node structure. When each node in the current tree-like network node structure has no available resources, a new one is added. As a new node in the current tree-like network node structure, the access point ensures enough accessible nodes for clients to access, and the tree-like network node structure provides service capabilities that meet the needs, so that the quality of multi-person calls is not good. Limited by physical distance and the number of call members, communication efficiency and user experience are improved.
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present application will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description, claims, and drawings.
附图说明Description of drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the attached image:
图1为本申请实施例提供的接入控制系统的结构示意图;FIG. 1 is a schematic structural diagram of an access control system provided by an embodiment of the present application;
图2为本申请实施例提供的接入控制方法的实施流程示意图;FIG. 2 is a schematic diagram of an implementation flow of an access control method provided by an embodiment of the present application;
图3为本申请实施例提供的接入控制装置的结构示意图;3 is a schematic structural diagram of an access control apparatus provided by an embodiment of the present application;
图4为本申请实施例提供的数据转发方法的实施流程示意图;FIG. 4 is a schematic flowchart of the implementation of the data forwarding method provided by the embodiment of the present application;
图5为本申请实施例提供的数据转发装置的结构示意图;5 is a schematic structural diagram of a data forwarding apparatus provided by an embodiment of the present application;
图6为本申请实施例提供的电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
为了解决现有的多人实时通信场景中,客户端接入接入点与数据转发的方式使得通话质量受到物理距离和通话成员数量限制的问题,本申请实施例提供了一种接入控制与数据转发方法、装置、电子设备及存储介质。In order to solve the problem that in the existing multi-person real-time communication scenario, the way that the client accesses the access point and data forwarding makes the call quality limited by the physical distance and the number of call members, the embodiment of the present application provides an access control and Data forwarding method, device, electronic device and storage medium.
以下结合说明书附图对本申请的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本申请,并不用于限定本申请,并且在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The preferred embodiments of the present application will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not intended to limit the present application. The embodiments in and features in the embodiments can be combined with each other.
如图1所示,其为本申请实施例提供的接入控制系统的结构示意图,可以包括接入控制端和接入系统,接入系统包括至少一个接入子系统,图1中以使用3个接入子系统为例进行说明,接入系统中包含的每一个接入子系统可以为一个独立的机房,每一个接入子系统的地理位置可以位于地球上不同的国家,也可以位于相同国家的不同地区,本申请实施例对此不作限定。每一个接入子系统包含多个接入点,所述接入点可以为服务器,用于转发数据,如多人音视频会议时客户端之间的通信数据,所述客户端之间的通信数据可以但不限于包括音频数据、视频数据等数据。本申请实施例中,接入控制端可以为质量探测系统,所述指令探测系统可以在服务器上实施,当质量探测系统接收到客户端发送的接入请求时,质量探测系统可以探测客户端到接入子系统的接入点之间的网络质量,为客户端选择一个最优的接入子系统。质量探测系统根据请求接入客户端的数量,指示每一接入子系统创建接入网络,每一接入子系统中的接入网络结构为树状网络节点结构,所述网络节点结构中的各节点通过树状结构建立双向通信连接,树状网络节点结构中每新加入一个节点是在当前已有的树状网络节点结构中的各节点接入的客户端的数量达到上线(即各节点均无可用资源)时加入的,每一接入子系统中的树状网络节点结构中的根节点与其他各接入子系统中的树状网络节点结构中的根节点之间建立双向通信连接,以使各接入子系统之间可以通过各自的根节点传输数据。As shown in FIG. 1 , which is a schematic structural diagram of an access control system provided by an embodiment of the present application, which may include an access control terminal and an access system, and the access system includes at least one access subsystem. In FIG. 1 , use 3 Each access subsystem included in the access system can be an independent computer room, and the geographic location of each access subsystem can be located in different countries on the earth, or can be located in the same Different regions of a country are not limited in this embodiment of the present application. Each access subsystem includes multiple access points, and the access points can be servers for forwarding data, such as communication data between clients during a multi-person audio and video conference. The data may include, but is not limited to, audio data, video data, and the like. In this embodiment of the present application, the access control terminal may be a quality detection system, and the instruction detection system may be implemented on a server. When the quality detection system receives an access request sent by the client, the quality detection system may detect that the client has The network quality between the access points of the access subsystem selects an optimal access subsystem for the client. The quality detection system instructs each access subsystem to create an access network according to the number of requesting access clients, and the access network structure in each access subsystem is a tree-like network node structure. The nodes establish a two-way communication connection through the tree structure. Each new node added to the tree network node structure means that the number of clients connected to each node in the existing tree network node structure reaches the online level (that is, each node has no available resources), a two-way communication connection is established between the root node in the tree-like network node structure in each access subsystem and the root node in the tree-like network node structure in other access subsystems, to Data can be transmitted between each access subsystem through their respective root nodes.
其中,服务器可以是独立的物理服务器,也可以是提供云服务器、云数 据库、云存储等基础云计算服务的云服务器。客户端可以但不限于为:智能手机、平板电脑、笔记本电脑、台式计算机等,本申请实施例对此不作限定。The server may be an independent physical server, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, and cloud storage. The client can be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, etc., which is not limited in this embodiment of the present application.
如图2所示,其为本申请实施例提供的接入控制方法的实施流程示意图,该接入控制方法可以应用于上述接入控制端中,本申请实施例中,接入控制端以质量控制系统为例进行说明,具体可以包括以下步骤:As shown in FIG. 2, it is a schematic diagram of the implementation flow of the access control method provided by the embodiment of the present application. The access control method can be applied to the above-mentioned access control terminal. In the embodiment of the present application, the access control terminal uses the quality The control system is used as an example to illustrate, which may include the following steps:
S11、接收客户端发送的接入请求,所述接入请求中携带有待接入客户端标识。S11. Receive an access request sent by a client, where the access request carries an identifier of the client to be accessed.
具体实施时,质量控制系统接收客户端发送的接入请求,所述接入请求中携带有待接入客户端标识,待接入客户端包括发送该接入请求的客户端,记为源客户端,待接入客户端还可以包括所述源客户端请求进行通信的目的客户端。如果待接入客户端还包括目的客户端,质量控制系统从本地存储的客户端标识与接入节点标识的对应关系中查询目的客户端标识对应的接入节点标识,如果查询到目的客户端标识对应的接入节点标识,则说明目的客户端已经接入目标接入节点,如果未查询到目的客户端标识对应的接入节点,则无论待接入客户端为源客户端还是目的客户端,均按照步骤S12~S14为待接入客户端选择对应的接入节点:During specific implementation, the quality control system receives an access request sent by a client, where the access request carries the identifier of the client to be accessed, and the client to be accessed includes the client that sent the access request, which is recorded as the source client , the client to be accessed may also include the destination client that the source client requests for communication. If the client to be accessed also includes the destination client, the quality control system queries the access node identifier corresponding to the destination client identifier from the locally stored correspondence between the client identifier and the access node identifier. The corresponding access node identifier indicates that the destination client has accessed the target access node. If the access node corresponding to the destination client identifier is not queried, no matter whether the client to be accessed is the source client or the destination client, Select the corresponding access node for the client to be accessed according to steps S12 to S14:
S12、从接入系统中选择待接入客户端待接入的目标接入子系统,所述接入系统包括至少一个接入子系统。S12. Select a target access subsystem to be accessed by the client to be accessed from the access system, where the access system includes at least one access subsystem.
具体实施时,质量控制系统从接入系统中选择待接入客户端待接入的目标接入子系统,所述接入系统包括至少一个接入子系统。During specific implementation, the quality control system selects a target access subsystem to be accessed by the client to be accessed from the access system, and the access system includes at least one access subsystem.
具体地,质量控制系统存储有接入系统中各接入子系统包含的接入点(即服务器)标识和IP(Internet Protocol,互联网协议)地址信息,质量控制系统向待接入客户端返回各接入子系统中指定接入点标识和IP地址信息,客户端根据各接入子系统中指定接入点标识和IP地址信息分别向各接入子系统中指定接入点发送探测包,得到对应的探测结果,并将各探测结果发送至质量控制系统,质量控制系统根据探测结果为待接入客户端选择一个待接入的目标接入子系统,其中,探测结果中包括待接入客户端向指定接入点发送探测包 的时延、丢包率等信息,目标接入子系统为质量控制系统根据发送探测包的时延、丢包率确定的待接入客户端和指定接入点之间的网络质量最优的接入点所属的接入子系统,其中,各接入子系统中的指定接入点可以根据需要预先配置,本申请实施例对此不作限定。Specifically, the quality control system stores the access point (that is, the server) identifier and IP (Internet Protocol, Internet Protocol) address information contained in each access subsystem in the access system, and the quality control system returns each access point to the client to be accessed. The access point identifier and IP address information are specified in the access subsystem, and the client sends a detection packet to the designated access point in each access subsystem according to the access point identifier and IP address information specified in each access subsystem, and obtains corresponding detection results, and send each detection result to the quality control system, and the quality control system selects a target access subsystem to be accessed for the client to be accessed according to the detection result, wherein the detection result includes the client to be accessed. The terminal sends information such as the delay and packet loss rate of the probe packet to the designated access point. The target access subsystem is the client to be accessed and the designated access client determined by the quality control system according to the delay and packet loss rate of the probe packet sent. The access subsystem to which the access point with the best network quality between the points belongs, wherein the designated access point in each access subsystem may be pre-configured as required, which is not limited in this embodiment of the present application.
S13、当确定所述目标接入子系统中的树状网络节点结构中包括存在可用资源的节点时,从所述当前的树状网络节点结构中为所述待接入客户端选择对应的接入节点。S13. When it is determined that the tree-like network node structure in the target access subsystem includes nodes with available resources, select a corresponding access point for the client to be accessed from the current tree-like network node structure. into the node.
具体实施时,质量探测系统当确定所述目标接入子系统中的树状网络节点结构中包括存在可用资源的节点时,从所述当前的树状网络节点结构中为所述待接入客户端选择对应的接入节点,所述树状网络节点结构至少包括一层,所述树状网络节点结构中的各节点为所述目标接入子系统中包含的接入点,所述网络节点结构中的各节点通过树状结构建立双向通信连接。During specific implementation, when it is determined that the tree-like network node structure in the target access subsystem includes nodes with available resources, the quality detection system selects the client to be accessed from the current tree-like network node structure The terminal selects a corresponding access node, the tree-like network node structure includes at least one layer, each node in the tree-like network node structure is an access point included in the target access subsystem, and the network node Each node in the structure establishes a bidirectional communication connection through the tree structure.
具体地,当确定当前的树状网络节点结构的最高层级节点存在可用资源时,则选择最高层级节点作为待接入客户端对应的接入节点,最高层级节点为根节点,其他层级节点为根节点的子节点;当确定最高层级节点不存在可用资源时,则按照层级由高到低的顺序从根节点的子节点中选择一个存在可用资源的节点作为待接入客户端对应的接入节点。Specifically, when it is determined that the highest level node of the current tree network node structure has available resources, the highest level node is selected as the access node corresponding to the client to be accessed, the highest level node is the root node, and other level nodes are the root The child node of the node; when it is determined that the highest-level node does not have available resources, select a node with available resources from the child nodes of the root node in the order from high to low as the access node corresponding to the client to be accessed. .
本申请实施例中,目标接入子系统中的树状网络节点结构是根据客户端接入数量逐个节点建立起来的。初始时,当确定目标接入子系统中还未建立树状网络结构时,指定一个接入点作为树状网络结构的根节点,根节点即为树状网络结构的最高层级节点,当根节点接入的客户端的数量等于第一预设阈值时,指定一个接入点作为根节点的下一层级的第一个子节点,直至该子节点接入的客户端的数量等于第二预设阈值时,指定一个接入点作为该层级的第二个子节点,依次类推,直至当前层级包含的子节点的数量等于设定值、且根节点和当前层级的子节点上接入的客户端均达到可接入上限时,再指定一个接入点作为当前层级的下一层级的子节点,直至建立的树状网络节点结构的层级的数量等于第三预设阈值时,不再继续建立下一层级的子节点。其 中,第一预设阈值、第二预设阈值、第三预设阈值可以根据实际情况自行设定,第一预设阈值可以和第二预设阈值设置相同的值,例如,可以设置第一预设阈值、第二预设阈值均为10,设置第三预设阈值为3,本申请实施例对此不作限定。In the embodiment of the present application, the tree-like network node structure in the target access subsystem is established node by node according to the number of client accesses. Initially, when it is determined that the tree-like network structure has not been established in the target access subsystem, an access point is designated as the root node of the tree-like network structure, and the root node is the highest level node of the tree-like network structure. When the number of accessed clients is equal to the first preset threshold, specify an access point as the first child node of the next level of the root node, until the number of clients accessed by the child node is equal to the second preset threshold , designate an access point as the second child node of the level, and so on, until the number of child nodes contained in the current level is equal to the set value, and the clients connected to the root node and the child nodes of the current level are all available. When the upper limit is accessed, another access point is designated as the child node of the next level of the current level, and when the number of levels of the tree-like network node structure established is equal to the third preset threshold, the establishment of the next level is not continued. child node. The first preset threshold, the second preset threshold, and the third preset threshold can be set according to the actual situation, and the first preset threshold can be set to the same value as the second preset threshold. For example, the first preset threshold can be set to the same value as the second preset threshold. The preset threshold and the second preset threshold are both 10, and the third preset threshold is set to 3, which is not limited in this embodiment of the present application.
具体实施时,当确定目标接入子系统中的树状网络结构的根节点当前接入的客户端的数量小于第一预设阈值时,确定根节点存在可用资源,则选择根节点作为待接入客户端对应的接入节点。当确定根节点当前接入的客户端的数量等于第一预设阈值时,确定根节点不存在可用资源,则按照层级由高到低的顺序从根节点的子节点中选择一个接入的客户端的数量小于第二预设阈值的节点作为待接入客户端对应的接入节点。目标接入子系统以图1中的接入子系统1为例,假设接入子系统1中当前树状网络结构已建立二层,每一节点连接10个子节点,即N=10,可以将最高层级记为第0层级,则第0层级包括根节点1,将最高层级的下一层级记为第1层级,则第1层级包括10个子节点:1_1~1_10,假设第一预设阈值和第二预设阈值均为10,如果根节点1有退出的客户端,即根节点1上接入的客户端的数量小于10个,则选择根节点1作为待接入客户端对应的接入节点,如果根节点1上接入的客户端的数量为10个,则从第1层级的节点1_1~1_10中选择一个接入的客户端的数量小于10的节点作为待接入客户端对应的接入节点。During specific implementation, when it is determined that the number of clients currently accessed by the root node of the tree-like network structure in the target access subsystem is less than the first preset threshold, it is determined that the root node has available resources, and the root node is selected as the to-be-connected The access node corresponding to the client. When it is determined that the number of clients currently accessed by the root node is equal to the first preset threshold, and it is determined that there are no available resources at the root node, select a client that is accessed from the child nodes of the root node in descending order of hierarchy. Nodes whose number is less than the second preset threshold are used as access nodes corresponding to the client to be accessed. The target access subsystem takes the access subsystem 1 in Figure 1 as an example. Assuming that the current tree-like network structure in the access subsystem 1 has been established with two layers, each node is connected to 10 sub-nodes, that is, N=10. The highest level is recorded as the 0th level, then the 0th level includes the root node 1, and the next level of the highest level is recorded as the 1st level, then the 1st level includes 10 child nodes: 1_1~1_10, assuming the first preset threshold and The second preset thresholds are all 10. If root node 1 has exited clients, that is, the number of clients connected to root node 1 is less than 10, root node 1 is selected as the access node corresponding to the client to be accessed. , if the number of clients connected to root node 1 is 10, select a node whose number of connected clients is less than 10 from the nodes 1_1 to 1_10 of the first level as the access node corresponding to the client to be accessed .
S14、当确定所述目标接入子系统中的树状网络节点结构中的各节点均不存在可用资源时,则指定一个接入点作为所述树状网络节点结构中的新的节点,并选择所述新的节点作为所述待接入客户端对应的接入节点。S14. When it is determined that each node in the tree-like network node structure in the target access subsystem does not have available resources, designate an access point as a new node in the tree-like network node structure, and The new node is selected as the access node corresponding to the client to be accessed.
具体实施时,质量探测系统当确定目标接入子系统中的当前树状网络节点结构中仅包含根节点,且根节点不存在可用资源时,则指定一个接入点作为根节点的下一层级的子节点;当确定当前树状网络节点结构中包含根节点和子节点,当前层级的子节点的数量小于当前层级对应的设定上限值、且根节点和各子节点中均不存在可用资源时,则指定一个接入点作为当前层级的子节点;当确定当前层级的子节点的数量等于当前层级对应的设定上限值、 且所述根节点和各子节点中均不存在可用资源时,则指定一个接入点作为所述当前层级的子节点的下一层级的子节点。During specific implementation, when it is determined that the current tree-like network node structure in the target access subsystem contains only the root node, and the root node has no available resources, the quality detection system designates an access point as the next level of the root node. When it is determined that the root node and child nodes are included in the current tree-like network node structure, the number of child nodes of the current level is less than the set upper limit value corresponding to the current level, and there are no available resources in the root node and each child node. When it is determined that an access point is used as a child node of the current level; when it is determined that the number of child nodes of the current level is equal to the set upper limit value corresponding to the current level, and there are no available resources in the root node and each child node is specified, an access point is designated as the child node of the next level of the child node of the current level.
具体地,质量探测系统当确定目标接入子系统中的当前树状网络结构中仅包含根节点,且根节点当前接入的客户端的数量等于第一预设阈值时,确定根节点不存在可用资源,则指定一个新的接入点作为根节点的下一层级的子节点,例如,图1的接入子系统1中根节点1的下一层级的第一个子节点1_1。Specifically, when it is determined that the current tree-like network structure in the target access subsystem only includes the root node, and the number of clients currently accessed by the root node is equal to the first preset threshold, the quality detection system determines that the root node does not exist resource, a new access point is designated as a child node of the next level of the root node, for example, the first child node 1_1 of the next level of the root node 1 in the access subsystem 1 of FIG. 1 .
质量探测系统预先设定每一层级可以连接的子节点的数量的上限值,可以根据每一节点可连接的子节点的个数统计每一层级最多可以连接的子节点的总数量并存储,例如,设置1个节点可连接的子节点的数量的上限值为N个,则第0层级(即最高层级)的下一层级即第1层级可以连接的子节点的数量的上限值为N个,由于第1层级包含N个子节点,每一子节点可以连接的下一层级的子节点的数量均为N个,则下一层级即第2层级可连接的子节点的数量的上限值为N×N=N 2个。质量探测系统当确定目标接入子系统中的当前树状网络节点结构中包含根节点和子节点,且当前层级的子节点的数量小于当前层级对应的设定上限值、且根节点当前接入的客户端的数量等于第一预设阈值,各子节点当前接入的客户端的数量均等于第二预设阈值时,则指定一个新的接入点作为当前层级的子节点。例如,仍以第一预设阈值和第二预设阈值均设置为10为例进行说明,假设图1中接入子系统1当前包含两个层级,第1层级的对应的子节点的数量的设定上限值为10,根节点1当前接入客户端的数量为10个,当前层级的子节点包含:1_1和1_2,子节点1_1和1_2当前接入的客户端的数量均为10个,也就是说根节点1和子节点1_1和1_2均无可用资源,且第1层级的子节点的数量为2,小于设定上限值10,则指定一个新的接入点作为第1层级的子节点:1_3。 The quality detection system presets the upper limit of the number of sub-nodes that can be connected at each level, and can count and store the total number of sub-nodes that can be connected at most at each level according to the number of sub-nodes that can be connected to each node. For example, if the upper limit of the number of child nodes that can be connected to a node is set to N, the upper limit of the number of child nodes that can be connected to the next level of the 0th level (ie the highest level), that is, the first level is N, since the first level contains N child nodes, the number of child nodes of the next level that can be connected to each child node is N, then the next level is the upper limit of the number of child nodes that can be connected to the second level The value is N×N=N 2 . When the quality detection system determines that the current tree-like network node structure in the target access subsystem includes a root node and child nodes, and the number of child nodes of the current level is less than the set upper limit value corresponding to the current level, and the root node is currently connected When the number of clients connected to the node is equal to the first preset threshold, and the number of clients currently accessed by each child node is equal to the second preset threshold, a new access point is designated as a child node of the current level. For example, the first preset threshold and the second preset threshold are both set to 10 as an example for description. Suppose that the access subsystem 1 in FIG. 1 currently includes two levels, and the number of corresponding child nodes of the first level is equal to The upper limit is set to 10, the number of clients currently connected to root node 1 is 10, the sub-nodes of the current level include: 1_1 and 1_2, and the number of clients currently connected to sub-nodes 1_1 and 1_2 are both 10. That is to say, root node 1 and child nodes 1_1 and 1_2 have no available resources, and the number of child nodes of the first level is 2, which is less than the set upper limit of 10, then a new access point is designated as the child node of the first level : 1_3.
质量探测系统当确定当前层级的子节点的数量等于当前层级对应的设定上限值、且根节点当前接入的客户端的数量等于第一预设阈值,各子节点当前接入的客户端的数量均等于第二预设阈值时,则指定一个新的接入点作为 当前层级的子节点的下一层级的子节点。仍延续上例,当根节点1当前接入客户端的数量为10个,当前层级的子节点包含10个:1_1~1_10,子节点1_1~1_10当前接入的客户端的数量均为10个,也就是说根节点1和子节点1_1~1_10均无可用资源,且第1层级的子节点的数量达到设定上限值10,则指定一个新的接入点作为第2层级的子节点:1_1_1。When the quality detection system determines that the number of child nodes at the current level is equal to the set upper limit value corresponding to the current level, and the number of clients currently accessed by the root node is equal to the first preset threshold, the number of clients currently accessed by each child node is When both are equal to the second preset threshold, a new access point is designated as the child node of the next level of the child node of the current level. Continuing the above example, when the root node 1 currently has 10 clients connected to it, the current level of child nodes includes 10: 1_1 to 1_10, and the number of clients currently connected to child nodes 1_1 to 1_10 is 10. That is to say, the root node 1 and the child nodes 1_1 to 1_10 have no available resources, and the number of the child nodes of the first level reaches the set upper limit of 10, then a new access point is designated as the child node of the second level: 1_1_1.
进一步地,本申请实施例中考虑到当树状网络节点结构的层数逐渐增加,连接子节点的客户端之间的链路路径因为中转节点(即中转服务器)的数量增加而会导致服务器处理延迟的增加,可能会影响对应用户的体验,因此,对树状网络节点结构的层级的数量进行一个上限限制,当接入子系统中当前树状网络节点结构的层数达到预先设置的上限值,且当前每一节点接入的客户端已满时,如果又为新的客户端分配了该接入子系统,那么可以在该接入子系统中重新指定一个接入点作为新的根节点,也就是说,同一接入子系统中可以设置多个树状网络节点结构,这样,使得同一接入子系统内具有一定的横向扩展能力。Further, in the embodiment of the present application, it is considered that when the number of layers of the tree-like network node structure increases gradually, the link paths between the clients connecting the sub-nodes will cause the server to process the link paths due to the increase in the number of transit nodes (ie, transit servers). The increase of the delay may affect the experience of the corresponding user. Therefore, an upper limit is imposed on the number of layers of the tree-like network node structure. When the number of layers of the current tree-like network node structure in the access subsystem reaches the preset upper limit value, and when the clients currently connected to each node are full, if the access subsystem is assigned to a new client, an access point can be re-designated in the access subsystem as the new root Node, that is to say, multiple tree-like network node structures can be set in the same access subsystem, so that the same access subsystem has a certain horizontal expansion capability.
具体地,质量探测系统当确定树状网络节点结构的层级的数量等于第三预设阈值、且最低层级的子节点的数量等于最低层级对应的设定上限值时,则指定一个接入点作为新的根节点,以建立新的树状网络节点结构。其中,第三预设阈值可以根据需要自行设定,例如可以设置为3,本申请实施例对此不作限定。Specifically, when it is determined that the number of levels of the tree-like network node structure is equal to the third preset threshold, and the number of child nodes of the lowest level is equal to the set upper limit value corresponding to the lowest level, the quality detection system specifies an access point As a new root node to establish a new tree-like network node structure. Wherein, the third preset threshold may be set by itself as required, for example, may be set to 3, which is not limited in this embodiment of the present application.
需要说明的是,本申请实施例中,当在一个接入子系统中指定一个根节点时,质量探测系统指示新建立的根节点与接入系统中其它已建立根节点的接入子系统中的根节点建立双向通信连接。例如,图1中,假设接入子系统1是最先建立根节点的接入子系统,接入子系统2是第二个建立根节点的接入子系统,接入子系统3是最后建立根节点的接入子系统,则可以根据根节点加入的先后顺序对不同接入子系统中的树状网络节点结构进行记录,可以将接入子系统1中的根节点1记为LEVEL0,将接入子系统2中的根节点2记为LEVEL1,将接入子系统3中的根节点3记为LEVEL2,其中,LEVEL0、 LEVEL1、LEVEL2分别表示根节点1、根节点2和根节点3加入的先后顺序,当质量探测系统指定接入子系统2的根节点2之后,指示根节点2与根节点1建立通信连接,当质量探测系统指定接入系统3的根节点3之后,指示根节点3与根节点2、根节点1分别建立通信连接,依次类推,当质量探测系统指定第M个接入子系统的根节点M之后,指示根节点M与前M-1个接入子系统的根节点分别建立通信连接,如果一个接入子系统中包含多个根节点,可以在根节点之间建立通信连接。It should be noted that, in this embodiment of the present application, when a root node is specified in an access subsystem, the quality detection system indicates that the newly established root node is in the access subsystem of other established root nodes in the access system. The root node establishes a two-way communication connection. For example, in Figure 1, it is assumed that access subsystem 1 is the first access subsystem to establish a root node, access subsystem 2 is the second access subsystem to establish a root node, and access subsystem 3 is the last to establish a root node. The access subsystem of the root node can record the tree-like network node structure in different access subsystems according to the order in which the root node is added. The root node 1 in the access subsystem 1 can be recorded as LEVEL0, and the The root node 2 in the access subsystem 2 is denoted as LEVEL1, and the root node 3 in the access subsystem 3 is denoted as LEVEL2, wherein LEVEL0, LEVEL1, and LEVEL2 represent that the root node 1, the root node 2, and the root node 3 join After the quality detection system designates the root node 2 of the access subsystem 2, it instructs the root node 2 to establish a communication connection with the root node 1; after the quality detection system designates the root node 3 of the access system 3, it instructs the root node 2 to establish a communication connection with the root node 1. 3. Establish communication connections with root node 2 and root node 1 respectively, and so on. After the quality detection system designates the root node M of the Mth access subsystem, it indicates the root node M and the first M-1 access subsystems. The root nodes establish communication connections respectively. If an access subsystem includes multiple root nodes, communication connections can be established between the root nodes.
进而,当不同接入子系统中的各根节点建立通信连接之后,不同接入系统中的各根节点之间可以通过发送心跳包保持通信的连续性。Furthermore, after each root node in different access subsystems establishes a communication connection, each root node in different access systems can maintain communication continuity by sending heartbeat packets.
进一步地,为了方便管理,当多人音视频会议结束时,各根节点可以按照如下方式退出网络:Further, in order to facilitate management, when the multi-person audio and video conference ends, each root node can exit the network as follows:
当确定接入系统建立了树状网络节点结构的接入子系统中的根节点需要退出当前网络时,控制各个根节点按照与建立顺序相反的顺序逐个退出当前网络。When it is determined that the root node in the access subsystem in which the access system has established the tree-like network node structure needs to exit the current network, each root node is controlled to exit the current network one by one in the reverse order of establishment.
S15、向所述待接入客户端发送接入控制指令,以控制所述待接入客户端接入所述接入节点,并存储所述待接入客户端标识与接入节点标识的对应关系。S15. Send an access control instruction to the to-be-accessed client to control the to-be-accessed client to access the access node, and store the correspondence between the to-be-accessed client identifier and the access node identifier relation.
具体实施时,质量探测系统向待接入客户端发送接入控制指令,所述接入控制指令中包含待接入节点标识和IP地址信息,待接入客户端接收到质量探测系统发送的接入控制指令后,根据待接入节点标识和IP地址接入质量探测系统为其选择的接入节点,并向质量探测系统返回接入成功响应消息,质量探测系统存储该客户端标识与接入节点标识的对应关系。During specific implementation, the quality detection system sends an access control instruction to the client to be accessed, and the access control instruction includes the identifier of the node to be accessed and IP address information, and the client to access receives the access sent by the quality detection system. After entering the control instruction, access the access node selected by the quality detection system according to the identity and IP address of the node to be accessed, and return an access success response message to the quality detection system, and the quality detection system stores the client identity and the access node. Correspondence of node IDs.
本申请实施例中,由于各节点之间进行双向通信连接,且每个节点都可以接入客户端,即每个客户端都有上麦的能力,因此,本申请不仅适用于直播模式,也适合多人同时上麦的会议或群聊模式,适用范围更加广泛。In the embodiment of the present application, since two-way communication connection is performed between nodes, and each node can access the client, that is, each client has the ability to connect to the microphone, therefore, the present application is not only applicable to the live broadcast mode, but also It is suitable for conference or group chat mode where many people are on the microphone at the same time, and the scope of application is wider.
在具体实施过程中,可以根据本申请实施例提供的上述接入控制方法,采用树状与网状相结合的形式组织全球不同地区机房的接入点,具有强大的 横向和纵向扩展能力,其中,横向扩展具有全球扩展能力,例如,在一个欧洲、亚洲和美洲的用户之间进行多人音视频会议的场景下,可以在欧洲、亚洲和美洲各选择一个机房内的接入点作为根节点,各洲之间通过各自选择的根节点建立通信连接,各洲内部可以在各自选择的机房内通过建立树状网络节点结构进行纵向扩展,纵向扩展的上限只取决于机房内接入点(即服务器)的数量,在会议过程中,可以根据客户端在线数量动态地增加或删除接入点,并且,本申请实施例中对每个节点可接入的客户端的数量以及每个节点可连接的下一级子节点的数量做了限制,当达到上限时,则扩展新的接入点,使得单个接入点不会成为扩展的瓶颈。In the specific implementation process, according to the above-mentioned access control method provided by the embodiment of the present application, the access points of the computer rooms in different regions of the world can be organized in the form of a combination of tree and mesh, which has strong horizontal and vertical expansion capabilities. , horizontal expansion has global expansion capability. For example, in the scenario of a multi-person audio and video conference between users in Europe, Asia, and America, you can select an access point in a computer room in Europe, Asia, and America as the root node. , each continent establishes a communication connection through the root node selected by each continent, and each continent can expand vertically by establishing a tree-like network node structure in the computer room selected by each continent. The upper limit of vertical expansion only depends on the access point in the computer room (ie During the conference, access points can be dynamically added or deleted according to the number of online clients, and in the embodiment of the present application, the number of clients that can be accessed by each node and the number of clients that can be connected to each node The number of sub-nodes at the next level is limited. When the upper limit is reached, new access points will be expanded, so that a single access point will not become a bottleneck for expansion.
本申请实施例提供的接入控制方法中,接收控制端接收客户端发送的携带有待接入客户端标识的接入请求后,通过以下方式为待接入客户端选择对应的接入节点:从接入系统中选择待接入客户端待接入的目标接入子系统,接入系统中包括至少一个接入子系统,当确定目标接入子系统中的树状网络节点结构中存在可用资源的节点时,从当前的树状网络节点结构中为待接入客户端选择对应的接入节点,其中,树状网络节点结构至少包括一层,树状网络节点结构中的各节点时目标接入子系统中包含的接入点,树状网络节点结构中的各节点通过树状结构建立通信连接,当确定目标接入系统中的树状网络节点结构中的各节点均不存在可用资源时,则指定一个接入点作为树状网络节点结构中的新的节点,并选择该新的节点作为待接入客户端对应的接入节点,进而,向待接入客户端发送接入控制指令,以控制待接入客户端接入为其选择的接入节点,并存储待接入客户端标识与接入节点标识的对应关系,相比于现有技术,在多人实时通信场景中,接入系统包含的接入子系统不受地理位置的限制,在接入子系统中,动态选择接入点建立树状网络节点结构,当当前树状网络节点结构中的各节点均不存在可用资源时,增加新的接入点作为当前树状网络节点结构中的新的节点,保证足够的可接入节点供客户端接入,并且,树状网络节点结构提供了满足需求的服务能力,使得多人通话质量不受物理距离和通话成员数量的限制,提高了通信效率和用户体 验。In the access control method provided by the embodiment of the present application, after receiving the access request sent by the client and carrying the identifier of the client to be accessed, the receiving control terminal selects the corresponding access node for the client to be accessed in the following manner: In the access system, the target access subsystem to be accessed by the client to be accessed is selected, and the access system includes at least one access subsystem. When it is determined that there are available resources in the tree-like network node structure in the target access subsystem When the node is connected, select the corresponding access node for the client to be accessed from the current tree-like network node structure, wherein the tree-like network node structure includes at least one layer, and each node in the tree-like network node structure is targeted to connect Access points included in the sub-system, each node in the tree-like network node structure establishes a communication connection through the tree-like structure, when it is determined that each node in the tree-like network node structure in the target access system does not have available resources , then designate an access point as a new node in the tree-like network node structure, and select the new node as the access node corresponding to the client to be accessed, and then send an access control instruction to the client to be accessed , to control the access node to be accessed by the client to be accessed, and store the corresponding relationship between the identifier of the client to be accessed and the identifier of the access node. Compared with the prior art, in the multi-person real-time communication scenario, The access subsystem included in the access system is not limited by geographical location. In the access subsystem, the access point is dynamically selected to establish a tree-like network node structure. When none of the nodes in the current tree-like network node structure are available When adding resources, a new access point is added as a new node in the current tree-like network node structure to ensure enough accessible nodes for client access, and the tree-like network node structure provides service capabilities that meet the needs. The quality of multi-person calls is not limited by physical distance and the number of call members, which improves communication efficiency and user experience.
基于同一发明构思,本申请实施例还提供了一种接入控制装置,由于上述接入控制装置解决问题的原理与接入控制方法相似,因此上述装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, an embodiment of the present application also provides an access control apparatus. Since the above-mentioned access control apparatus solves the problem in a similar manner to the access control method, the implementation of the above-mentioned apparatus can refer to the implementation of the method, and the repetitions are repeated. No longer.
如图3所示,其为本申请实施例提供的接入控制装置的结构示意图,可以包括:As shown in FIG. 3 , which is a schematic structural diagram of an access control apparatus provided by an embodiment of the present application, which may include:
接收单元21,用于接收客户端发送的接入请求,所述接入请求中携带有待接入客户端标识;A receiving unit 21, configured to receive an access request sent by a client, where the access request carries an identifier of the client to be accessed;
选择单元22,用于按照以下步骤为所述待接入客户端选择对应的接入节点:从接入系统中选择待接入客户端待接入的目标接入子系统,所述接入系统包括至少一个接入子系统;当确定所述目标接入子系统中的树状网络节点结构中包括存在可用资源的节点时,从所述当前的树状网络节点结构中为所述待接入客户端选择对应的接入节点,所述树状网络节点结构至少包括一层,所述树状网络节点结构中的各节点为所述目标接入子系统中包含的接入点,所述网络节点结构中的各节点通过树状结构建立通信连接;当确定所述目标接入子系统中的树状网络节点结构中的各节点均不存在可用资源时,则指定一个接入点作为所述树状网络节点结构中的新的节点,并选择所述新的节点作为所述待接入客户端对应的接入节点;The selection unit 22 is configured to select a corresponding access node for the client to be accessed according to the following steps: selecting a target access subsystem to be accessed by the client to be accessed from the access system, the access system At least one access subsystem is included; when it is determined that the tree-like network node structure in the target access subsystem includes nodes with available resources, the to-be-accessed node is selected from the current tree-like network node structure The client selects a corresponding access node, the tree-like network node structure includes at least one layer, each node in the tree-like network node structure is an access point included in the target access subsystem, and the network Each node in the node structure establishes a communication connection through a tree structure; when it is determined that each node in the tree network node structure in the target access subsystem does not have available resources, an access point is designated as the a new node in the tree-like network node structure, and selecting the new node as the access node corresponding to the client to be accessed;
控制单元23,用于向所述客户端发送接入控制指令,以控制所述客户端接入所述客户端对应的接入节点,并存储所述客户端标识与接入节点标识的对应关系。A control unit 23, configured to send an access control instruction to the client to control the client to access the access node corresponding to the client, and store the correspondence between the client identifier and the access node identifier .
较佳地,所述选择单元22,具体用于当确定所述树状网络节点结构的最高层级节点存在可用资源时,则选择所述最高层级节点作为所述待接入客户端对应的接入节点,所述最高层级节点为根节点,其他层级节点为所述根节点的子节点;当确定所述最高层级节点不存在可用资源时,则按照层级由高到低的顺序从所述根节点的子节点中选择一个存在可用资源的节点作为所述待接入客户端对应的接入节点。Preferably, the selection unit 22 is specifically configured to select the highest-level node as the access corresponding to the client to be accessed when it is determined that the highest-level node of the tree-like network node structure has available resources. node, the highest-level node is the root node, and other hierarchical nodes are child nodes of the root node; when it is determined that the highest-level node does not have available resources, the order from high to low levels is from the root node. A node with available resources is selected from among the child nodes of the node as the access node corresponding to the client to be accessed.
可选地,所述装置,还包括:Optionally, the device further includes:
指定单元,用于在为所述待接入客户端选择对应的接入节点之前,当确定所述目标接入子系统中还未建立所述树状网络结构时,指定一个接入点作为所述树状网络结构的根节点;以及a designating unit, configured to designate an access point as the access point when it is determined that the tree-like network structure has not been established in the target access subsystem before selecting the corresponding access node for the to-be-accessed client the root node of the tree-like network structure; and
所述选择单元22,具体用于当确定所述树状网络节点结构中仅包含根节点,且所述根节点不存在可用资源时,则指定一个接入点作为所述根节点的下一层级的子节点;当确定所述树状网络节点结构中包含根节点和子节点,当前层级的子节点的数量小于所述当前层级对应的设定上限值、且所述根节点和各子节点中均不存在可用资源时,则指定一个接入点作为当前层级的子节点;当确定当前层级的子节点的数量等于所述当前层级对应的设定上限值、且所述根节点和各子节点中均不存在可用资源时,则指定一个接入点作为所述当前层级的子节点的下一层级的子节点。The selection unit 22 is specifically configured to designate an access point as the next level of the root node when it is determined that the tree-like network node structure only includes the root node and the root node does not have available resources child nodes; when it is determined that the tree network node structure includes a root node and child nodes, the number of child nodes of the current level is less than the set upper limit value corresponding to the current level, and the root node and each child node are in the When there are no available resources, an access point is designated as a child node of the current level; when it is determined that the number of child nodes of the current level is equal to the set upper limit value corresponding to the current level, and the root node and each child node are When there is no available resource in the nodes, an access point is designated as the child node of the next level of the child node of the current level.
较佳地,所述选择单元22,具体用于通过以下方式确定所述根节点不存在可用资源:当确定所述根节点当前接入的客户端的数量等于第一预设阈值时,确定所述根节点不存在可用资源;通过以下方式确定任一子节点不存在可用资源:当确定所述任一子节点当前接入的客户端的数量等于第二预设阈值时,确定所述任一子不存在可用资源。Preferably, the selection unit 22 is specifically configured to determine that the root node does not have available resources in the following manner: when it is determined that the number of clients currently accessed by the root node is equal to a first preset threshold, determine the The root node does not have available resources; determine that any child node has no available resources in the following manner: when it is determined that the number of clients currently accessed by any child node is equal to the second preset threshold, determine that any child node does not have available resources. Available resources exist.
可选地,所述指定单元,还用于当确定所述树状网络节点结构的层级的数量等于第三预设阈值、且最低层级的子节点的数量等于所述最低层级对应的设定上限值时,则指定一个接入点作为新的根节点,以建立新的树状网络节点结构。Optionally, the specifying unit is further configured to determine that the number of levels of the tree-like network node structure is equal to a third preset threshold, and the number of child nodes of the lowest level is equal to the setting corresponding to the lowest level. When the limit is exceeded, an access point is designated as a new root node to establish a new tree-like network node structure.
较佳地,所述树状网络节点结构中的每一节点之间进行双向通信连接;所述接入系统建立了树状网络节点结构的接入子系统之间通过各自的根节点建立双向通信连接。Preferably, two-way communication connection is performed between each node in the tree-like network node structure; two-way communication is established between the access subsystems in the tree-like network node structure established by the access system through their respective root nodes. connect.
可选地,所述控制单元23,还用于当确定所述接入系统建立了树状网络节点结构的接入子系统中的根节点需要退出当前网络时,控制各个根节点按照与建立顺序相反的顺序逐个退出当前网络。Optionally, the control unit 23 is further configured to, when it is determined that the root node in the access subsystem in which the access system has established a tree-like network node structure needs to exit the current network, control each root node to follow the establishment sequence. The reverse order exits the current network one by one.
如图4所示,其为本申请实施例提供的数据转发方法的实施流程示意图,应用于本申请实施例提供的上述接入控制方法中建立的树状网络节点结构,所述数据转发方法,可以包括以下步骤:As shown in FIG. 4 , which is a schematic flowchart of the implementation of the data forwarding method provided by the embodiment of the present application, which is applied to the tree-like network node structure established in the above-mentioned access control method provided by the embodiment of the present application. The data forwarding method, The following steps can be included:
S31、树状网络节点结构中的根节点接收数据转发请求,所述数据转发请求中包括待转发数据和目的客户端标识。S31. The root node in the tree-like network node structure receives a data forwarding request, where the data forwarding request includes the data to be forwarded and a destination client identifier.
具体实施时,接入控制系统中的任一接入子系统中的树状网络节点结构的根节点接收数据转发请求,所述数据转发请求为接入该根节点的客户端发送的,或者为接入该根节点的任一子节点的客户端发送至所述任一子节点后转发至该根节点的。During specific implementation, the root node of the tree-like network node structure in any access subsystem in the access control system receives a data forwarding request, where the data forwarding request is sent by a client accessing the root node, or is The client that accesses any child node of the root node sends the message to any child node and forwards it to the root node.
S32、获取客户端标识与接入点标识的对应关系,并从所述客户端标识与接入节点标识的对应关系中查找所述目的客户端标识对应的接入节点标识。S32: Acquire the correspondence between the client identifier and the access point identifier, and search for the access node identifier corresponding to the target client identifier from the correspondence between the client identifier and the access node identifier.
具体实施时,所述根节点从接入控制端(质量探测系统)中获取客户端标识与接入节点标识的对应关系,从客户端标识与接入节点标识的对应关系中查找目的客户端标识对应的接入节点标识,也就是目的客户端接入的节点标识。During specific implementation, the root node obtains the correspondence between the client identifier and the access node identifier from the access control terminal (quality detection system), and searches for the destination client identifier from the correspondence between the client identifier and the access node identifier. The corresponding access node identifier, that is, the node identifier accessed by the destination client.
S33、当确定所述目的客户端标识对应的接入节点标识对应的节点为根节点时,则将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的端目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端。S33. When it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node, send the to-be-forwarded data to the node corresponding to the node identifier accessed by the destination client, and the The node corresponding to the node identifier accessed by the destination client sends the to-be-forwarded data to the client corresponding to the destination client identifier.
具体实施时,如果目的客户端接入的节点标识对应的节点为根节点时,则由接收到数据转发请求的根节点将待转发数据发送至目的客户端接入的根节点,由客户端接入的根节点将待转发数据直接转发至该目的客户端。其中,如果目的客户端接入的根节点为接收到数据转发请求的根节点,则由接收到数据转发请求的根节点直接将待转发数据发送至目的客户端。During specific implementation, if the node corresponding to the node identifier accessed by the destination client is the root node, the root node that receives the data forwarding request sends the data to be forwarded to the root node accessed by the destination client, and the client receives the data to be forwarded. The incoming root node directly forwards the data to be forwarded to the destination client. Wherein, if the root node accessed by the destination client is the root node that receives the data forwarding request, the root node that receives the data forwarding request directly sends the data to be forwarded to the destination client.
S34、当确定所述目的客户端标识对应的接入节点标识对应的节点为子节点时,则将所述待转发数据转发至所述目的客户端接入的节点标识对应的节点连接的第一根节点,由所述第一根节点将所述待转发数据发送至所述目的 客户端接入的节点标识对应的节点,由所述目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端。S34. When it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is a child node, forward the to-be-forwarded data to the first node connected to the node identifier corresponding to the node identifier accessed by the destination client. The root node, the first root node sends the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and the node corresponding to the node identifier accessed by the destination client sends the data to be forwarded. The forwarding data is sent to the client corresponding to the destination client identifier.
具体实施时,如果目的客户端接入的节点标识对应的节点为子节点时,则由接收到数据转发请求的根节点将待转发数据发送至目的客户端接入的子节点连接的根节点,记为第一根节点,由第一根节点将待转发数据转发至目的客户端接入的子节点,再由目的客户端接入的子节点将待转发数据发送至目的客户端。During specific implementation, if the node corresponding to the node identifier accessed by the destination client is a child node, the root node that receives the data forwarding request sends the data to be forwarded to the root node connected to the child node accessed by the destination client. Denoted as the first root node, the first root node forwards the data to be forwarded to the child node accessed by the destination client, and then the child node accessed by the destination client sends the data to be forwarded to the destination client.
由上述数据转发流程可知,为了避免在数据转发过程中形成闭环,不同接入子系统中的根节点只会将待转发数据发送至该根节点所连接的下级子节点,不会直接发送给其它根节点的下级子节点,而要通过连接的根节点进行转发。As can be seen from the above data forwarding process, in order to avoid the formation of a closed loop during the data forwarding process, the root nodes in different access subsystems will only send the data to be forwarded to the lower-level child nodes connected to the root node, and will not directly send it to other nodes. The subordinate child nodes of the root node are forwarded through the connected root node.
以图1为例,假设发起数据转发请求的客户端接入的节点为接入子系统1中树状网络节点结构中的子节点1_1_1,目的客户端接入的节点为接入子系统3中树状网络节点结构中的子节点3_1_1,数据转发路径可以如下:客户端向其接入的子节点1_1_1发起数据转发请求,子节点1_1_1将数据转发请求转发至其连接的上一级子节点1_1,子节点1_1将数据转发请求发送中其连接的根节点1,根节点1从数据转发请求中提取待转发数据,将待转发数据转发至接入子系统3中的根节点3,根节点3将待转发数据发送至其下一级子节点3_1,子节点3_1将待转发数据发送至其下一级子节点3_1_1,由子节点3_1_1将待转发数据发送至目的客户端。Taking FIG. 1 as an example, it is assumed that the node accessed by the client that initiates the data forwarding request is the child node 1_1_1 in the tree-like network node structure in the access subsystem 1, and the node accessed by the destination client is the access subsystem 3. For the child node 3_1_1 in the tree-like network node structure, the data forwarding path may be as follows: the client initiates a data forwarding request to the child node 1_1_1 to which it is connected, and the child node 1_1_1 forwards the data forwarding request to the upper-level child node 1_1 to which it is connected , the child node 1_1 sends the data forwarding request to the connected root node 1, the root node 1 extracts the data to be forwarded from the data forwarding request, and forwards the to-be-forwarded data to the root node 3 in the access subsystem 3, and the root node 3 The data to be forwarded is sent to its next-level child node 3_1, the child node 3_1 sends the to-be-forwarded data to its next-level child node 3_1_1, and the child node 3_1_1 sends the to-be-forwarded data to the destination client.
需要说明的是,跨接入子系统的根节点之间虽然在逻辑上是可以直接发送数据的,但在底层也可以经过第三个甚至更多接入子系统的根节点进行中转,可以通过设置路由策略设置转发的具体路径。上例中,在将待转发数据由接入子系统1中根节点1发送至接入系统3中根节点3的过程中,还可以由根节点1将待转发数据发送至根节点2后,再由根节点2将待转发数据发送至根节点3。It should be noted that although the root nodes of the cross-access subsystem can logically send data directly, they can also be transferred at the bottom layer through the third or more root nodes of the access subsystem. Set the routing policy to set the specific path for forwarding. In the above example, in the process of sending the data to be forwarded from the root node 1 in the access subsystem 1 to the root node 3 in the access system 3, the root node 1 can also send the data to be forwarded to the root node 2, and then the root node 1 sends the data to be forwarded to the root node 2. The root node 2 sends the data to be forwarded to the root node 3.
基于同一发明构思,本申请实施例还提供了一种数据转发装置,由于上 述数据转发装置解决问题的原理与数据转发方法相似,因此上述装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, an embodiment of the present application also provides a data forwarding device. Since the principle of solving the problem of the above-mentioned data forwarding device is similar to that of the data forwarding method, the implementation of the above-mentioned device can refer to the implementation of the method, and the repetition will not be repeated. .
如图5所示,其为本申请实施例提供的数据转发装置的结构示意图,所述数据转发装置应用于上述接入控制方法中建立的树状网络节点结构的根节点,可以包括:As shown in FIG. 5 , which is a schematic structural diagram of a data forwarding apparatus provided by an embodiment of the present application, the data forwarding apparatus is applied to the root node of the tree-like network node structure established in the above access control method, and may include:
接收单元41,用于接收数据转发请求,所述数据转发请求中包括待转发数据和目的客户端标识;a receiving unit 41, configured to receive a data forwarding request, where the data forwarding request includes the data to be forwarded and a destination client identifier;
获取单元42,用于获取客户端标识与接入点标识的对应关系,并从所述客户端标识与接入节点标识的对应关系中查找所述目的客户端标识对应的接入节点标识;an obtaining unit 42, configured to obtain the correspondence between the client identifier and the access point identifier, and search for the access node identifier corresponding to the destination client identifier from the correspondence between the client identifier and the access node identifier;
第一发送单元43,用于当确定所述目的客户端标识对应的接入节点标识对应的节点为根节点时,则将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的端目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端;The first sending unit 43 is configured to, when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node, send the data to be forwarded to the node identifier corresponding to the destination client access. the node, the node corresponding to the node identifier accessed by the destination client sends the data to be forwarded to the client corresponding to the destination client identifier;
第二发送单元44,用于当确定所述目的客户端标识对应的接入节点标识对应的节点为子节点时,则将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点连接的第一根节点,由所述第一根节点将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端。The second sending unit 44 is configured to, when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is a child node, send the to-be-forwarded data to the node identifier corresponding to the destination client access. The first root node connected to the node, the first root node sends the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and the node identifier accessed by the destination client corresponds to The node sends the data to be forwarded to the client corresponding to the destination client identifier.
较佳地,所述数据转发请求为接入所述根节点的客户端发送的,或者为接入所述根节点的任一子节点的客户端发送至所述任一子节点后转发至所述根节点的。Preferably, the data forwarding request is sent by a client accessing the root node, or sent by a client accessing any sub-node of the root node to any sub-node and then forwarded to any sub-node. of the root node.
基于同一技术构思,本申请实施例还提供了一种电子设备500,参照图6所示,电子设备500用于实施上述方法实施例记载的接入控制方法,该实施例的电子设备500可以包括:存储器501、处理器502以及存储在所述存储器中并可在所述处理器上运行的计算机程序,例如接入控制程序。所述处理器 执行所述计算机程序时实现上述各个接入控制方法或者数据转发方法实施例中的步骤,例如图2所示的步骤S11。或者,所述处理器执行所述计算机程序时实现上述各装置实施例中各模块/单元的功能,例如21。Based on the same technical concept, an embodiment of the present application further provides an electronic device 500. Referring to FIG. 6 , the electronic device 500 is configured to implement the access control method described in the foregoing method embodiments. The electronic device 500 in this embodiment may include : a memory 501, a processor 502, and a computer program stored in the memory and executable on the processor, such as an access control program. When the processor executes the computer program, the steps in each of the foregoing embodiments of the access control method or the data forwarding method are implemented, for example, step S11 shown in FIG. 2 . Alternatively, when the processor executes the computer program, the functions of the modules/units in the foregoing device embodiments are implemented, for example, 21.
本申请实施例中不限定上述存储器501、处理器502之间的具体连接介质。本申请实施例在图6中以存储器501、处理器502之间通过总线503连接,总线503在图6中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线503可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The specific connection medium between the above-mentioned memory 501 and the processor 502 is not limited in this embodiment of the present application. In the embodiment of the present application, the memory 501 and the processor 502 are connected by a bus 503 in FIG. 6 , and the bus 503 is represented by a thick line in FIG. 6 . be limited. The bus 503 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 6, but it does not mean that there is only one bus or one type of bus.
存储器501可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);存储器501也可以是非易失性存储器(non-volatile memory),例如只读存储器,快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)、或者存储器501是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器501可以是上述存储器的组合。The memory 501 may be a volatile memory (volatile memory), such as random-access memory (RAM); the memory 501 may also be a non-volatile memory (non-volatile memory), such as read-only memory, flash memory A flash memory, hard disk drive (HDD) or solid-state drive (SSD), or memory 501 is a device that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by Any other medium accessed by the computer, but not limited to this. The memory 501 may be a combination of the above-mentioned memories.
处理器502,用于实现如图2所示的一种接入控制方法,包括:The processor 502 is configured to implement an access control method as shown in FIG. 2, including:
所述处理器502,用于调用所述存储器501中存储的计算机程序执行如图2中所示的步骤S11、接收客户端发送的接入请求,所述接入请求中携带有待接入客户端标识,步骤S12、从接入系统中选择待接入客户端待接入的目标接入子系统,所述接入系统包括至少一个接入子系统,步骤S13、当确定所述目标接入子系统中的树状网络节点结构中包括存在可用资源的节点时,从所述当前的树状网络节点结构中为所述待接入客户端选择对应的接入节点,步骤S14、当确定所述目标接入子系统中的树状网络节点结构中的各节点均不存在可用资源时,则指定一个接入点作为所述树状网络节点结构中的新的节点,并选择所述新的节点作为所述待接入客户端对应的接入节点,和步骤S15、向所述待接入客户端发送接入控制指令,以控制所述待接入客户端接入所述接 入节点,并存储所述待接入客户端标识与接入节点标识的对应关系。The processor 502 is configured to call the computer program stored in the memory 501 to perform step S11 as shown in FIG. 2 , and receive an access request sent by the client, where the access request carries the client to be accessed In step S12, the target access subsystem to be accessed by the client to be accessed is selected from the access system, the access system includes at least one access subsystem, and step S13, when the target access subsystem is determined When the tree-like network node structure in the system includes a node with available resources, select a corresponding access node for the client to be accessed from the current tree-like network node structure, step S14, when it is determined that the When each node in the tree-like network node structure in the target access subsystem has no available resources, designate an access point as a new node in the tree-like network node structure, and select the new node As the access node corresponding to the client to be accessed, and step S15, sending an access control instruction to the client to be accessed to control the client to access the access node, and The corresponding relationship between the identifier of the client to be accessed and the identifier of the access node is stored.
或者,处理器502,用于实现如图4所示的一种数据转发方法,包括:Alternatively, the processor 502 is configured to implement a data forwarding method as shown in FIG. 4 , including:
所述处理器502,用于调用所述存储器501中存储的计算机程序执行如图4中所示的步骤S31、树状网络节点结构中的根节点接收数据转发请求,所述数据转发请求中包括待转发数据和目的客户端标识,步骤S32、获取客户端标识与接入点标识的对应关系,并从所述客户端标识与接入节点标识的对应关系中查找所述目的客户端标识对应的接入节点标识,步骤S33、当确定所述目的客户端标识对应的接入节点标识对应的节点为根节点时,则将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的端目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端,和步骤S34、当确定所述目的客户端标识对应的接入节点标识对应的节点为子节点时,则将所述待转发数据转发至所述目的客户端接入的节点标识对应的节点连接的第一根节点,由所述第一根节点将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端。The processor 502 is configured to invoke the computer program stored in the memory 501 to execute step S31 as shown in FIG. 4 , the root node in the tree-like network node structure receives a data forwarding request, and the data forwarding request includes: The data to be forwarded and the destination client identifier, step S32, obtain the corresponding relationship between the client identifier and the access point identifier, and search for the destination client identifier corresponding to the corresponding relationship between the client identifier and the access node identifier. The access node identifier, step S33, when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node, then the data to be forwarded is sent to the node identifier corresponding to the destination client access. The node corresponding to the node identifier accessed by the destination client sends the data to be forwarded to the client corresponding to the destination client identifier, and in step S34, when determining the destination client identifier When the node corresponding to the corresponding access node identifier is a child node, the data to be forwarded is forwarded to the first root node connected to the node corresponding to the node identifier accessed by the destination client, and the first root node is connected by the first root node. Send the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and send the data to be forwarded to the destination client identifier by the node corresponding to the node identifier accessed by the destination client the corresponding client.
本申请实施例还提供了一种计算机可读存储介质,存储为执行上述处理器所需执行的计算机可执行指令,其包含用于执行上述处理器所需执行的程序。Embodiments of the present application further provide a computer-readable storage medium, which stores computer-executable instructions to be executed by the above-mentioned processor, and includes a program to be executed by the above-mentioned processor.
在一些可能的实施方式中,本申请提供的接入控制方法的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在电子设备上运行时,所述程序代码用于使所述电子设备执行本说明书上述描述的根据本申请各种示例性实施方式的接入控制方法中的步骤,例如,所述电子设备可以执行如图2中所示的步骤S11、接收客户端发送的接入请求,所述接入请求中携带有待接入客户端标识,步骤S12、从接入系统中选择待接入客户端待接入的目标接入子系统,所述接入系统包括至少一个接入子系统,步骤S13、当确定所述目标接入子系统中的树状网络节点结构中包括存在可用资源的节 点时,从所述当前的树状网络节点结构中为所述待接入客户端选择对应的接入节点,步骤S14、当确定所述目标接入子系统中的树状网络节点结构中的各节点均不存在可用资源时,则指定一个接入点作为所述树状网络节点结构中的新的节点,并选择所述新的节点作为所述待接入客户端对应的接入节点,和步骤S15、向所述待接入客户端发送接入控制指令,以控制所述待接入客户端接入所述接入节点,并存储所述待接入客户端标识与接入节点标识的对应关系。In some possible implementations, various aspects of the access control method provided by the present application can also be implemented in the form of a program product, which includes program codes, and when the program product runs on an electronic device, the program The code is used to cause the electronic device to execute the steps in the access control method according to various exemplary embodiments of the present application described above in this specification. For example, the electronic device may execute steps S11, Receive an access request sent by the client, where the access request carries the identifier of the client to be accessed, step S12, select a target access subsystem to be accessed by the client to be accessed from the access system, and the access The access system includes at least one access subsystem, and in step S13, when it is determined that the tree-like network node structure in the target access subsystem includes nodes with available resources, from the current tree-like network node structure as The to-be-accessed client selects a corresponding access node, and in step S14, when it is determined that each node in the tree-like network node structure in the target access subsystem does not have available resources, specify an access point as a new node in the tree-like network node structure, and select the new node as the access node corresponding to the client to be accessed, and step S15: send access to the client to be accessed A control instruction is used to control the client to be accessed to access the access node, and to store the corresponding relationship between the identifier of the client to be accessed and the identifier of the access node.
在一些可能的实施方式中,本申请提供的数据转发方法的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在电子设备上运行时,所述程序代码用于使所述电子设备执行本说明书上述描述的根据本申请各种示例性实施方式的数据转发方法中的步骤,例如,所述电子设备可以执行如图4中所示的步骤S31、树状网络节点结构中的根节点接收数据转发请求,所述数据转发请求中包括待转发数据和目的客户端标识,步骤S32、获取客户端标识与接入点标识的对应关系,并从所述客户端标识与接入节点标识的对应关系中查找所述目的客户端标识对应的接入节点标识,步骤S33、当确定所述目的客户端标识对应的接入节点标识对应的节点为根节点时,则将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的端目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端,和步骤S34、当确定所述目的客户端标识对应的接入节点标识对应的节点为子节点时,则将所述待转发数据转发至所述目的客户端接入的节点标识对应的节点连接的第一根节点,由所述第一根节点将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端。In some possible implementations, various aspects of the data forwarding method provided by this application can also be implemented in the form of a program product, which includes program code, and when the program product runs on an electronic device, the program code For causing the electronic device to perform the steps in the data forwarding method according to various exemplary embodiments of the present application described above in this specification, for example, the electronic device may perform step S31 as shown in FIG. The root node in the network node structure receives the data forwarding request, and the data forwarding request includes the data to be forwarded and the destination client identifier. Step S32: Obtain the correspondence between the client identifier and the access point identifier, and send the request from the client Searching for the access node identifier corresponding to the target client identifier in the corresponding relationship between the identifier and the access node identifier, step S33, when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node, then Send the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and send the data to be forwarded to the destination client by the node corresponding to the node identifier accessed by the destination client and step S34, when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is a child node, then forward the data to be forwarded to the destination client access point. The first root node to which the node corresponding to the node identifier is connected, the first root node sends the to-be-forwarded data to the node corresponding to the node identifier accessed by the destination client, and the node identified by the destination client accesses the node. The node corresponding to the node identifier sends the data to be forwarded to the client corresponding to the destination client identifier.
本领域内的技术人员应明白,本申请的实施例可提供为方法、装置、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个 其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。It should be understood by those skilled in the art that the embodiments of the present application may be provided as a method, an apparatus, or a computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(装置)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (apparatus), and computer program products according to embodiments of the present application. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to the processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device produce Means for implementing the functions specified in a flow or flow of a flowchart and/or a block or blocks of a block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory result in an article of manufacture comprising instruction means, the instructions The apparatus implements the functions specified in the flow or flow of the flowcharts and/or the block or blocks of the block diagrams.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process such that The instructions provide steps for implementing the functions specified in the flow or blocks of the flowcharts and/or the block or blocks of the block diagrams.
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。While the preferred embodiments of the present application have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be construed to include the preferred embodiment and all changes and modifications that fall within the scope of this application.

Claims (13)

  1. 一种接入控制方法,其特征在于,包括:An access control method, comprising:
    接收客户端发送的接入请求,所述接入请求中携带有待接入客户端标识;receiving an access request sent by a client, where the access request carries an identifier of the client to be accessed;
    按照以下步骤为所述待接入客户端选择对应的接入节点:Select the corresponding access node for the client to be accessed according to the following steps:
    从接入系统中选择待接入客户端待接入的目标接入子系统,所述接入系统包括至少一个接入子系统;Selecting a target access subsystem to be accessed by the client to be accessed from an access system, where the access system includes at least one access subsystem;
    当确定所述目标接入子系统中的树状网络节点结构中包括存在可用资源的节点时,从所述当前的树状网络节点结构中为所述待接入客户端选择对应的接入节点,所述树状网络节点结构至少包括一层,所述树状网络节点结构中的各节点为所述目标接入子系统中包含的接入点,所述网络节点结构中的各节点通过树状结构建立通信连接;When it is determined that the tree-like network node structure in the target access subsystem includes nodes with available resources, select a corresponding access node for the client to be accessed from the current tree-like network node structure , the tree-like network node structure includes at least one layer, each node in the tree-like network node structure is an access point included in the target access subsystem, and each node in the network node structure passes through the tree The like structure establishes a communication connection;
    当确定所述目标接入子系统中的树状网络节点结构中的各节点均不存在可用资源时,则指定一个接入点作为所述树状网络节点结构中的新的节点,并选择所述新的节点作为所述待接入客户端对应的接入节点;When it is determined that each node in the tree-like network node structure in the target access subsystem does not have available resources, designate an access point as a new node in the tree-like network node structure, and select the The new node is used as the access node corresponding to the client to be accessed;
    向所述待接入客户端发送接入控制指令,以控制所述待接入客户端接入所述接入节点,并存储所述待接入客户端标识与接入节点标识的对应关系。An access control instruction is sent to the to-be-accessed client to control the to-be-accessed client to access the access node, and the corresponding relationship between the to-be-accessed client identifier and the access node identifier is stored.
  2. 如权利要求1所述的方法,其特征在于,当确定所述目标接入子系统中的树状网络节点结构中包括存在可用资源的节点时,从所述当前的树状网络节点结构中为所述待接入客户端选择对应的接入节点,具体包括:The method according to claim 1, wherein when it is determined that the tree-like network node structure in the target access subsystem includes nodes with available resources, the current tree-like network node structure is: The to-be-accessed client selects a corresponding access node, which specifically includes:
    当确定所述树状网络节点结构的最高层级节点存在可用资源时,则选择所述最高层级节点作为所述待接入客户端对应的接入节点,所述最高层级节点为根节点,其他层级节点为所述根节点的子节点;When it is determined that the highest level node of the tree-like network node structure has available resources, the highest level node is selected as the access node corresponding to the client to be accessed, the highest level node is the root node, and other levels The node is a child node of the root node;
    当确定所述最高层级节点不存在可用资源时,则按照层级由高到低的顺序从所述根节点的子节点中选择一个存在可用资源的节点作为所述待接入客户端对应的接入节点。When it is determined that the highest-level node does not have available resources, select a node with available resources from the child nodes of the root node in descending order of hierarchy as the access corresponding to the to-be-accessed client node.
  3. 如权利要求1所述的方法,其特征在于,在为所述待接入客户端选择 对应的接入节点之前,还包括:The method of claim 1, wherein before selecting the corresponding access node for the client to be accessed, the method further comprises:
    当确定所述目标接入子系统中还未建立所述树状网络结构时,指定一个接入点作为所述树状网络结构的根节点;以及When it is determined that the tree-like network structure has not been established in the target access subsystem, an access point is designated as the root node of the tree-like network structure; and
    当确定所述目标接入子系统中的树状网络节点结构中的各节点均不存在可用资源时,则指定一个接入点作为所述树状网络节点结构中的新的节点,具体包括:When it is determined that each node in the tree-like network node structure in the target access subsystem does not have available resources, an access point is designated as a new node in the tree-like network node structure, specifically including:
    当确定所述树状网络节点结构中仅包含根节点,且所述根节点不存在可用资源时,则指定一个接入点作为所述根节点的下一层级的子节点;When it is determined that only the root node is included in the tree-like network node structure, and the root node has no available resources, an access point is designated as a child node of the next level of the root node;
    当确定所述树状网络节点结构中包含根节点和子节点,当前层级的子节点的数量小于所述当前层级对应的设定上限值、且所述根节点和各子节点中均不存在可用资源时,则指定一个接入点作为当前层级的子节点;When it is determined that the tree-like network node structure includes a root node and child nodes, the number of child nodes of the current level is less than the set upper limit value corresponding to the current level, and neither the root node nor each child node is available. resource, specify an access point as a child node of the current level;
    当确定当前层级的子节点的数量等于所述当前层级对应的设定上限值、且所述根节点和各子节点中均不存在可用资源时,则指定一个接入点作为所述当前层级的子节点的下一层级的子节点。When it is determined that the number of child nodes of the current level is equal to the set upper limit value corresponding to the current level, and there are no available resources in the root node and each child node, an access point is designated as the current level The child node of the next level of the child node.
  4. 如权利要求3所述的方法,其特征在于,The method of claim 3, wherein
    通过以下方式确定所述根节点不存在可用资源:Determine that the root node does not have available resources by:
    当确定所述根节点当前接入的客户端的数量等于第一预设阈值时,确定所述根节点不存在可用资源;When it is determined that the number of clients currently accessed by the root node is equal to the first preset threshold, it is determined that the root node does not have available resources;
    通过以下方式确定任一子节点不存在可用资源:Determine that no resources are available for any of the child nodes by:
    当确定所述任一子节点当前接入的客户端的数量等于第二预设阈值时,确定所述任一子不存在可用资源。When it is determined that the number of clients currently accessed by the any sub-node is equal to the second preset threshold, it is determined that there is no available resource in the any sub-node.
  5. 如权利要求3所述的方法,其特征在于,还包括:The method of claim 3, further comprising:
    当确定所述树状网络节点结构的层级的数量等于第三预设阈值、且最低层级的子节点的数量等于所述最低层级对应的设定上限值时,则指定一个接入点作为新的根节点,以建立新的树状网络节点结构。When it is determined that the number of levels of the tree-like network node structure is equal to the third preset threshold, and the number of child nodes of the lowest level is equal to the set upper limit value corresponding to the lowest level, an access point is designated as the new , to establish a new tree-like network node structure.
  6. 如权利要求5所述的方法,其特征在于,所述树状网络节点结构中的每一节点之间进行双向通信连接;所述接入系统建立了树状网络节点结构的 接入子系统之间通过各自的根节点建立双向通信连接。The method according to claim 5, characterized in that a bidirectional communication connection is performed between each node in the tree-like network node structure; and the access system establishes one of the access subsystems of the tree-like network node structure. A two-way communication connection is established between them through their respective root nodes.
  7. 如权利要求6所述的方法,其特征在于,还包括:The method of claim 6, further comprising:
    当确定所述接入系统建立了树状网络节点结构的接入子系统中的根节点需要退出当前网络时,控制各个根节点按照与建立顺序相反的顺序逐个退出当前网络。When it is determined that the root node in the access subsystem in which the access system has established a tree-like network node structure needs to exit the current network, each root node is controlled to exit the current network one by one in the reverse order of establishment.
  8. 一种接入控制装置,其特征在于,包括:An access control device, comprising:
    接收单元,用于接收客户端发送的接入请求,所述接入请求中携带有待接入客户端标识;a receiving unit, configured to receive an access request sent by a client, where the access request carries an identifier of the client to be accessed;
    选择单元,用于按照以下步骤为所述待接入客户端选择对应的接入节点:从接入系统中选择待接入客户端待接入的目标接入子系统,所述接入系统包括至少一个接入子系统;当确定所述目标接入子系统中的树状网络节点结构中包括存在可用资源的节点时,从所述当前的树状网络节点结构中为所述待接入客户端选择对应的接入节点,所述树状网络节点结构至少包括一层,所述树状网络节点结构中的各节点为所述目标接入子系统中包含的接入点,所述网络节点结构中的各节点通过树状结构建立通信连接;当确定所述目标接入子系统中的树状网络节点结构中的各节点均不存在可用资源时,则指定一个接入点作为所述树状网络节点结构中的新的节点,并选择所述新的节点作为所述待接入客户端对应的接入节点;a selection unit, configured to select a corresponding access node for the client to be accessed according to the following steps: selecting a target access subsystem to be accessed by the client to be accessed from the access system, where the access system includes at least one access subsystem; when it is determined that the tree-like network node structure in the target access subsystem includes a node with available resources, select the client to be accessed from the current tree-like network node structure The terminal selects a corresponding access node, the tree-like network node structure includes at least one layer, each node in the tree-like network node structure is an access point included in the target access subsystem, and the network node Each node in the structure establishes a communication connection through a tree-like structure; when it is determined that each node in the tree-like network node structure in the target access subsystem does not have available resources, an access point is designated as the tree a new node in the network node structure, and select the new node as the access node corresponding to the client to be accessed;
    控制单元,用于向所述客户端发送接入控制指令,以控制所述客户端接入所述客户端对应的接入节点,并存储所述客户端标识与接入节点标识的对应关系。A control unit, configured to send an access control instruction to the client to control the client to access the access node corresponding to the client, and store the correspondence between the client identifier and the access node identifier.
  9. 一种数据转发方法,其特征在于,应用于权利要求1~7任一项所述的接入控制方法中建立的树状网络节点结构,包括:A data forwarding method, characterized in that it is applied to the tree-like network node structure established in the access control method according to any one of claims 1 to 7, comprising:
    所述树状网络节点结构中的根节点接收数据转发请求,所述数据转发请求中包括待转发数据和目的客户端标识;The root node in the tree-like network node structure receives a data forwarding request, and the data forwarding request includes the data to be forwarded and a destination client identifier;
    获取客户端标识与接入点标识的对应关系,并从所述客户端标识与接入节点标识的对应关系中查找所述目的客户端标识对应的接入节点标识;acquiring the correspondence between the client identifier and the access point identifier, and searching for the access node identifier corresponding to the target client identifier from the correspondence between the client identifier and the access node identifier;
    当确定所述目的客户端标识对应的接入节点标识对应的节点为根节点时,则将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的端目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端;When it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node, the data to be forwarded is sent to the node corresponding to the node identifier accessed by the destination client, and the destination client The node corresponding to the node identifier accessed by the destination client sends the to-be-forwarded data to the client corresponding to the destination client identifier;
    当确定所述目的客户端标识对应的接入节点标识对应的节点为子节点时,则将所述待转发数据转发至所述目的客户端接入的节点标识对应的节点连接的第一根节点,由所述第一根节点将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端。When it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is a child node, the data to be forwarded is forwarded to the first root node connected to the node identifier corresponding to the node identifier accessed by the destination client , the first root node sends the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and the node corresponding to the node identifier accessed by the destination client sends the data to be forwarded It is sent to the client corresponding to the destination client identifier.
  10. 如权利要求9所述的方法,其特征在于,所述数据转发请求为接入所述根节点的客户端发送的,或者为接入所述根节点的任一子节点的客户端发送至所述任一子节点后转发至所述根节点的。The method according to claim 9, wherein the data forwarding request is sent by a client accessing the root node, or sent by a client accessing any child node of the root node to the After any child node is forwarded to the root node.
  11. 一种数据转发装置,其特征在于,应用于权利要求1~7任一项所述的接入控制方法中建立的树状网络节点结构的根节点,包括:A data forwarding device, characterized in that it is applied to the root node of the tree-like network node structure established in the access control method according to any one of claims 1 to 7, comprising:
    接收单元,用于接收数据转发请求,所述数据转发请求中包括待转发数据和目的客户端标识;a receiving unit, configured to receive a data forwarding request, where the data forwarding request includes the data to be forwarded and a destination client identifier;
    获取单元,用于获取客户端标识与接入点标识的对应关系,并从所述客户端标识与接入节点标识的对应关系中查找所述目的客户端标识对应的接入节点标识;an acquiring unit, configured to acquire the correspondence between the client identifier and the access point identifier, and search for the access node identifier corresponding to the destination client identifier from the correspondence between the client identifier and the access node identifier;
    第一发送单元,用于当确定所述目的客户端标识对应的接入节点标识对应的节点为根节点时,则将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的端目的客户端接入的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端;The first sending unit is configured to send the data to be forwarded to the node corresponding to the node identifier accessed by the destination client when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is the root node. A node, where the node corresponding to the node identifier accessed by the destination client sends the to-be-forwarded data to the client corresponding to the destination client identifier;
    第二发送单元,用于当确定所述目的客户端标识对应的接入节点标识对应的节点为子节点时,则将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点连接的第一根节点,由所述第一根节点将所述待转发数据发送至所述目的客户端接入的节点标识对应的节点,由所述目的客户端接入 的节点标识对应的节点将所述待转发数据发送至所述目的客户端标识对应的客户端。The second sending unit is configured to send the data to be forwarded to the node corresponding to the node identifier accessed by the destination client when it is determined that the node corresponding to the access node identifier corresponding to the destination client identifier is a child node. The first root node connected to the node, the first root node sends the data to be forwarded to the node corresponding to the node identifier accessed by the destination client, and the node identifier corresponding to the destination client access node The node sends the data to be forwarded to the client corresponding to the destination client identifier.
  12. 一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1~7任一项所述的接入控制方法或者权利要求9~10任一项所述的数据转发方法。An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, when the processor executes the program, the program according to claims 1 to 7 is implemented The access control method described in any one or the data forwarding method described in any one of claims 9-10.
  13. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1~7任一项所述的接入控制方法或者权利要求9~10任一项所述的数据转发方法。A computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the access control method according to any one of claims 1 to 7 or any one of claims 9 to 10 is implemented. The data forwarding method described in one item.
PCT/CN2022/076230 2021-03-09 2022-02-14 Access control method and apparatus, data forwarding method and apparatus, and electronic device and storage medium WO2022188596A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110255660.4A CN113055457B (en) 2021-03-09 2021-03-09 Access control and data forwarding method and device, electronic equipment and storage medium
CN202110255660.4 2021-03-09

Publications (1)

Publication Number Publication Date
WO2022188596A1 true WO2022188596A1 (en) 2022-09-15

Family

ID=76510869

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/076230 WO2022188596A1 (en) 2021-03-09 2022-02-14 Access control method and apparatus, data forwarding method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN113055457B (en)
WO (1) WO2022188596A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055457B (en) * 2021-03-09 2024-01-09 百果园技术(新加坡)有限公司 Access control and data forwarding method and device, electronic equipment and storage medium
CN114727338B (en) * 2022-06-09 2022-09-13 杭州纵横通信股份有限公司 Link establishment method for wireless communication system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102283A (en) * 2007-08-17 2008-01-09 杭州华三通信技术有限公司 A method and device for optimizing unknown unicast forward at wireless access point
CN103813288A (en) * 2012-11-06 2014-05-21 中兴通讯股份有限公司 Method, system, and network element for achieving network as a service (NaaS) based on mobile network
CN110620896A (en) * 2019-08-28 2019-12-27 视联动力信息技术股份有限公司 Conference establishing method, system and device
CN113055457A (en) * 2021-03-09 2021-06-29 百果园技术(新加坡)有限公司 Access control and data forwarding method and device, electronic equipment and storage medium

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100425024C (en) * 2004-07-06 2008-10-08 北京航空航天大学 Automatic discovering method for IPV6 internet network topology
CN101114928B (en) * 2006-07-24 2011-04-20 华为技术有限公司 System and method for implementing load balancing
CN101119252B (en) * 2006-08-01 2010-05-19 华为技术有限公司 Access network system, access device, ARP proxy and IP bridging connection forwarding method
US7903615B2 (en) * 2006-10-10 2011-03-08 Qualcomm Incorporated Space division multiple access channelization in wireless communication systems
CN100461740C (en) * 2007-06-05 2009-02-11 华为技术有限公司 Customer end node network topological structure method and stream media distributing system
CN101389128B (en) * 2007-09-10 2012-02-29 中兴通讯股份有限公司 Method for network access of customer terminal through radio relay
US8537720B2 (en) * 2010-03-26 2013-09-17 Cisco Technology, Inc. Aggregating data traffic from access domains
US20130091212A1 (en) * 2011-10-08 2013-04-11 Broadcom Corporation Social network device communication resource allocation
EP2959453A4 (en) * 2013-02-25 2016-07-13 Margot Stubbs A control system
CN103974310B (en) * 2014-05-08 2017-06-06 江苏中科羿链通信技术有限公司 The tree topology construction method of radio communication multihop network equipment, device and system
CN104540185B (en) * 2014-12-15 2019-02-05 上海华为技术有限公司 A kind of method, access gateway and access control equipment accessing network
EP3355522B1 (en) * 2017-01-26 2019-04-03 Deutsche Telekom AG Access aggregation system and bonding client
CN110166268B (en) * 2018-02-13 2021-04-06 电信科学技术研究院有限公司 Communication method and device of wireless backhaul network
CN208400296U (en) * 2018-05-24 2019-01-18 榆林学院 A kind of aquarium WIFI control device
CN109495889B (en) * 2018-12-20 2022-01-04 中山大学新华学院 Heterogeneous mobile network access control method based on mutual trust mechanism

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102283A (en) * 2007-08-17 2008-01-09 杭州华三通信技术有限公司 A method and device for optimizing unknown unicast forward at wireless access point
CN103813288A (en) * 2012-11-06 2014-05-21 中兴通讯股份有限公司 Method, system, and network element for achieving network as a service (NaaS) based on mobile network
CN110620896A (en) * 2019-08-28 2019-12-27 视联动力信息技术股份有限公司 Conference establishing method, system and device
CN113055457A (en) * 2021-03-09 2021-06-29 百果园技术(新加坡)有限公司 Access control and data forwarding method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113055457B (en) 2024-01-09
CN113055457A (en) 2021-06-29

Similar Documents

Publication Publication Date Title
WO2022188596A1 (en) Access control method and apparatus, data forwarding method and apparatus, and electronic device and storage medium
US9838333B2 (en) Software-defined information centric network (ICN)
US8756296B2 (en) Method, device and system for distributing file data
US7552233B2 (en) System and method for information object routing in computer networks
US8612621B2 (en) Method for constructing network topology, and streaming delivery system
WO2008034353A1 (en) A method, system and device for establishing a peer to peer connection in a p2p network
US9407687B2 (en) Method, apparatus, and network system for acquiring content
WO2011113289A1 (en) Service routing method and service network
WO2009155802A1 (en) Method, system, service selection entity and service management entity for selecting service provision entity
CN104509073A (en) Discovering ip multicast group memberships in software defined networks
WO2010105505A1 (en) Method, user node and server for requesting position information of resource on network
WO2006131037A1 (en) A system and method for achieving the data communication
WO2010127618A1 (en) System and method for implementing streaming media content service
US20220131935A1 (en) Service Unit Switching Method, System, and Device
WO2023155617A1 (en) Live streaming origin-pull method and apparatus
US20140019549A1 (en) Control System for Conferencing Applications in Named-Data Networks
WO2009127132A1 (en) A message distributing method, device and system
WO2011069387A1 (en) Network node, method for data query and method for index update thereof
CN103401953B (en) A kind of based on double-deck voice communication node addressing method end to end
WO2014161460A1 (en) Session method, network node, server, system and computer storage medium
CN112398902A (en) High availability load balancing method, system and computer readable storage medium
CN106357539A (en) Data acquisition method and equipment
CN104065914A (en) Wireless terminal video conference system, realizing method and device
WO2013091343A1 (en) Content acquisition method, device and network system
CN111866438B (en) User experience driven transcoding and multicast routing method and device for multi-party video conference

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22766122

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22766122

Country of ref document: EP

Kind code of ref document: A1