[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113872857B - Cross-machine-room data forwarding method, equipment and computer program product - Google Patents

Cross-machine-room data forwarding method, equipment and computer program product Download PDF

Info

Publication number
CN113872857B
CN113872857B CN202111029419.6A CN202111029419A CN113872857B CN 113872857 B CN113872857 B CN 113872857B CN 202111029419 A CN202111029419 A CN 202111029419A CN 113872857 B CN113872857 B CN 113872857B
Authority
CN
China
Prior art keywords
edge node
forwarding
path
computer room
cross
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202111029419.6A
Other languages
Chinese (zh)
Other versions
CN113872857A (en
Inventor
张智超
何宇
单华琦
王雷
董乔
马保宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Culture Technology Co Ltd
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 China Mobile Communications Group Co Ltd, MIGU Culture Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202111029419.6A priority Critical patent/CN113872857B/en
Publication of CN113872857A publication Critical patent/CN113872857A/en
Application granted granted Critical
Publication of CN113872857B publication Critical patent/CN113872857B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/44Distributed routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing
    • 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/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种跨机房数据转发方法、设备及产品,通过利用跨机房边缘节点构建区块链网络,因此可利用底层区块链账本记录整个操作流程,保证全局转发路径信息的一致性;通过区块链网络中的智能合约所提供共识验证功能,使得在跨机房路由策略变动时,需要邻接边缘节点对变动前后的跨机房转发路径进行共识验证,即使当前的路由策略变动是因恶意或宕机节点等的错误节点配置所导致,也能通过共识评估这一流程及时识别;最终只有通过共识验证的跨机房路径变动才可生效,避免了跨机房数据转发流程因人工或其他方式配置的错误节点对机房造成负面影响,从而在保证跨机房数据转发方式的一致性的前提下,大大提高了转发路径的可靠性。

Figure 202111029419

The invention discloses a cross-computer room data forwarding method, equipment and products. By using cross-computer room edge nodes to construct a block chain network, the underlying block chain account book can be used to record the entire operation process to ensure the consistency of global forwarding path information; Through the consensus verification function provided by the smart contract in the blockchain network, when the cross-computer room routing strategy changes, it is necessary for the adjacent edge nodes to perform consensus verification on the cross-computer room forwarding path before and after the change, even if the current routing strategy change is due to malicious or The wrong node configuration caused by the downtime node can also be identified in time through the consensus evaluation process; in the end, only the cross-computer room path changes that pass the consensus verification can take effect, avoiding the manual or other configuration of the cross-computer room data forwarding process The wrong node has a negative impact on the computer room, thus greatly improving the reliability of the forwarding path on the premise of ensuring the consistency of data forwarding methods across computer rooms.

Figure 202111029419

Description

跨机房数据转发方法、设备及计算机程序产品Method, device and computer program product for forwarding data across computer rooms

技术领域Technical Field

本发明涉及视频直播技术领域,尤其涉及跨机房数据转发方法、设备及计算机程序产品。The present invention relates to the field of video live broadcast technology, and in particular to a method, device and computer program product for forwarding data across computer rooms.

背景技术Background Art

随着视频直播技术的快速发展,视频会议、视频直播等形式的即时通信方式在人们的工作和生活中随处可见。作为视频会议、直播领域的标准技术栈,网页即时通信(WebRTC,Web Real-Time Communication)目前逐渐被广泛认可。同时,基于SFU(SelectiveForwarding Unit)这一WebRTC的通信架构方式,WebRTC系统能够快速拓展至多节点级联的连接模式,在同一域(机房)内,通过节点转发和路由计算的形式,实现最优转发。With the rapid development of live video technology, video conferencing, live video and other forms of instant communication can be seen everywhere in people's work and life. As a standard technology stack in the field of video conferencing and live broadcasting, WebRTC (Web Real-Time Communication) is gradually being widely recognized. At the same time, based on the SFU (Selective Forwarding Unit) communication architecture of WebRTC, the WebRTC system can quickly expand to a multi-node cascade connection mode, and achieve optimal forwarding in the same domain (computer room) through node forwarding and routing calculation.

但是,在跨机房数据转发的场景下,需要建立额外的系统串联起整个数据流链路,能够在事故发生时准确查询转发链路及对应机房节点,辅助运维人员快速定位错误问题,因此,跨机房的转发策略存储需要在全局范围内保证策略的一致性。由于目前业界还没有针对WebRTC跨机房音视频流转发策略存储问题的公认解决方案,转发路径的一致性一般由技术人员配置来保证,当技术人员错配时,容易使错误流量涌入同一机房内,可能会造成机房负载过高而瘫痪。上述情况反映出现有基于人工的维持跨机房数据转发一致性的方式的可靠性不佳的技术问题。However, in the scenario of cross-computer room data forwarding, it is necessary to establish an additional system to connect the entire data flow link in series, so as to accurately query the forwarding link and the corresponding computer room node when an accident occurs, and assist the operation and maintenance personnel to quickly locate the error problem. Therefore, the forwarding policy storage across computer rooms needs to ensure the consistency of the policy on a global scale. Since there is currently no recognized solution to the problem of WebRTC cross-computer room audio and video stream forwarding policy storage in the industry, the consistency of the forwarding path is generally ensured by the configuration of technical personnel. When the technical personnel are mismatched, it is easy for erroneous traffic to flow into the same computer room, which may cause the computer room to be overloaded and paralyzed. The above situation reflects the technical problem of poor reliability of the existing manual method of maintaining the consistency of cross-computer room data forwarding.

发明内容Summary of the invention

本发明的主要目的在于提出一种跨机房数据转发方法、设备及计算机程序产品,旨在解决现有基于人工的维持跨机房数据转发一致性的方式的可靠性不佳的技术问题。The main purpose of the present invention is to propose a method, device and computer program product for data forwarding across computer rooms, aiming to solve the technical problem of poor reliability of the existing manual method for maintaining consistency of data forwarding across computer rooms.

为实现上述目的,本发明提供一种跨机房数据转发方法,所述跨机房数据转发方法包括:To achieve the above object, the present invention provides a method for forwarding data across computer rooms, the method comprising:

从部署于不同机房的边缘节点所构成的区块链网络中监测跨机房的路由策略变动信息,其中,所述区块链网络中已部署路径转发相关的智能合约;Monitoring cross-computer room routing policy change information from a blockchain network composed of edge nodes deployed in different computer rooms, wherein the blockchain network has deployed path forwarding related smart contracts;

确定所述路由策略变动信息对应在所述区块链网络中的目的边缘节点,并根据所述智能合约将所述路由策略变动信息广播至所述区块链网络中的所述目的边缘节点的邻接边缘节点;Determine that the routing policy change information corresponds to a destination edge node in the blockchain network, and broadcast the routing policy change information to adjacent edge nodes of the destination edge node in the blockchain network according to the smart contract;

根据所述邻接边缘节点和所述智能合约对所述路由策略变动信息进行共识验证,以在所述路由策略变动信息通过共识验证时确定路由策略变动后的目标转发路径;Performing consensus verification on the routing policy change information according to the adjacent edge nodes and the smart contract, so as to determine a target forwarding path after the routing policy change when the routing policy change information passes the consensus verification;

将所述目标转发路径同步至所述区块链网络中构成所述目标转发路径的路径边缘节点,以供所述路径边缘节点按照所述目标转发路径进行数据转发。The target forwarding path is synchronized to the path edge nodes constituting the target forwarding path in the blockchain network, so that the path edge nodes can forward data according to the target forwarding path.

可选地,所述路由策略变动信息包括路由新增信息,Optionally, the routing policy change information includes routing new information.

所述确定所述路由策略变动信息对应在所述区块链网络中的目的边缘节点,并根据所述智能合约将所述路由策略变动信息广播至所述区块链网络中的所述目的边缘节点的邻接边缘节点的步骤包括:The step of determining that the routing policy change information corresponds to a destination edge node in the blockchain network, and broadcasting the routing policy change information to adjacent edge nodes of the destination edge node in the blockchain network according to the smart contract includes:

从所述路由新增信息中确定出所述区块链网络中的新增目的边缘节点以及与所述新增目的边缘节点对应的源边缘节点,并基于所述新增目的边缘节点和所述源边缘节点生成所述新增目的边缘节点的存储对象,以将所述存储对象存储于所述智能合约;Determine a newly added destination edge node in the blockchain network and a source edge node corresponding to the newly added destination edge node from the newly added routing information, and generate a storage object of the newly added destination edge node based on the newly added destination edge node and the source edge node, so as to store the storage object in the smart contract;

从所述区块链网络中确定出与所述新增目的边缘节点相邻的第一邻接边缘节点,将所述新增目的边缘节点广播至所述第一邻接边缘节点。Determine a first adjacent edge node adjacent to the newly added destination edge node from the blockchain network, and broadcast the newly added destination edge node to the first adjacent edge node.

可选地,所述根据所述邻接边缘节点和所述智能合约对所述路由策略变动信息进行共识验证,以在所述路由策略变动信息通过共识验证时确定路由策略变动后的目标转发路径的步骤包括:Optionally, the step of performing consensus verification on the routing policy change information according to the adjacent edge node and the smart contract to determine a target forwarding path after the routing policy change when the routing policy change information passes the consensus verification includes:

获取所述第一邻接边缘节点对所述新增目的边缘节点进行的连通性测试的测试结果,并结合所述测试结果和所述智能合约中的新增共识算法得到所述新增目的边缘节点对应的质量评估均值;Obtain a test result of a connectivity test performed by the first adjacent edge node on the newly added destination edge node, and obtain a quality assessment mean corresponding to the newly added destination edge node by combining the test result and the newly added consensus algorithm in the smart contract;

判断所述质量评估均值是否不小于预设评分阈值;Determine whether the quality assessment mean is not less than a preset scoring threshold;

若是,则生成由所述新增目的边缘节点和所述第一邻接边缘节点组成的新增转发路径,将所述新增转发路径存储于所述区块链网络;If yes, generating a new forwarding path consisting of the newly added destination edge node and the first adjacent edge node, and storing the newly added forwarding path in the blockchain network;

基于所述新增转发路径和所述区块链网络中的初始转发路径,按照预设第一路径拼接原则生成所述目标转发路径。Based on the newly added forwarding path and the initial forwarding path in the blockchain network, the target forwarding path is generated according to a preset first path splicing principle.

可选地,所述路由策略变动信息包括路由更新信息,Optionally, the routing policy change information includes routing update information.

所述确定所述路由策略变动信息对应在所述区块链网络中的目的边缘节点,并根据所述智能合约将所述路由策略变动信息广播至所述区块链网络中的所述目的边缘节点的邻接边缘节点的步骤包括:The step of determining that the routing policy change information corresponds to a destination edge node in the blockchain network, and broadcasting the routing policy change information to adjacent edge nodes of the destination edge node in the blockchain network according to the smart contract includes:

从所述路由更新信息中确定出所述区块链网络中部署于同一机房的历史目的边缘节点和候选目的边缘节点;Determine, from the routing update information, a historical destination edge node and a candidate destination edge node deployed in the same computer room in the blockchain network;

确定所述区块链网络中与所述候选目的边缘节点相邻的第二邻接边缘节点,将所述历史目的边缘节点和候选目的边缘节点广播至所述第二邻接边缘节点。Determine a second adjacent edge node in the blockchain network that is adjacent to the candidate destination edge node, and broadcast the historical destination edge node and the candidate destination edge node to the second adjacent edge node.

可选地,所述根据所述邻接边缘节点和所述智能合约对所述路由策略变动信息进行共识验证,以在所述路由策略变动信息通过共识验证时确定路由策略变动后的目标转发路径的步骤包括:Optionally, the step of performing consensus verification on the routing policy change information according to the adjacent edge node and the smart contract to determine a target forwarding path after the routing policy change when the routing policy change information passes the consensus verification includes:

获取所述第二邻接边缘节点对所述历史目的边缘节点进行链路质量评估所得到的历史链路评估指数,以及对所述候选目的边缘节点进行链路质量评估所得到的候选链路评估指数;Acquire a historical link evaluation index obtained by the second adjacent edge node performing link quality evaluation on the historical destination edge node, and a candidate link evaluation index obtained by performing link quality evaluation on the candidate destination edge node;

结合所述历史链路评估指数、所述候选链路评估指数和所述智能合约中的更新共识算法,判断所述候选目的边缘节点是否有效;Determine whether the candidate destination edge node is valid by combining the historical link evaluation index, the candidate link evaluation index and the updated consensus algorithm in the smart contract;

若是,则生成由所述候选目的边缘节点和所述第二邻接边缘节点组成的更新转发路径,将所述更新转发路径存储于所述区块链网络;If yes, generating an updated forwarding path consisting of the candidate destination edge node and the second adjacent edge node, and storing the updated forwarding path in the blockchain network;

基于所述更新转发路径和所述区块链网络中的初始转发路径,按照预设第二路径拼接原则生成所述目标转发路径。Based on the updated forwarding path and the initial forwarding path in the blockchain network, the target forwarding path is generated according to a preset second path splicing principle.

可选地,所述从部署于不同机房的边缘节点所构成的区块链网络中监测跨机房的路由策略变动信息的步骤之前,还包括:Optionally, before the step of monitoring the cross-computer room routing policy change information from the blockchain network formed by the edge nodes deployed in different computer rooms, the step further includes:

获取所述区块链网络中各机房的机房内转发路径信息,并将所述机房内转发路径信息以哈希方式存储于所述区块链网络。Obtain the intra-computer room forwarding path information of each computer room in the blockchain network, and store the intra-computer room forwarding path information in the blockchain network in a hashed manner.

可选地,所述获取机房内转发路径信息,并将所述机房内转发路径信息以哈希方式存储于所述区块链网络的步骤之后,还包括:Optionally, after the step of obtaining the forwarding path information in the computer room and storing the forwarding path information in the computer room in a hashed manner in the blockchain network, the method further includes:

在检测到所述区块链网络中发生错误路由数据转发时,从所述区块链网络的各机房中获取每一机房内部的实际数据转发信息;When it is detected that wrong routing data forwarding occurs in the blockchain network, actual data forwarding information inside each computer room of the blockchain network is obtained from each computer room of the blockchain network;

将所述实际数据转发信息与所述机房内转发路径信息进行对比并得到比对结果,以基于所述比对结果排查错误转发原因。The actual data forwarding information is compared with the forwarding path information in the computer room to obtain a comparison result, so as to troubleshoot the cause of the erroneous forwarding based on the comparison result.

可选地,所述从部署于不同机房的边缘节点所构成的区块链网络中监测跨机房的路由策略变动信息的步骤之前,还包括:Optionally, before the step of monitoring the cross-computer room routing policy change information from the blockchain network formed by the edge nodes deployed in different computer rooms, the step further includes:

确定部署于不同机房的边缘节点,根据所述边缘节点构建区块链网络,部署转发路径相关的智能合约;Determine the edge nodes deployed in different computer rooms, build a blockchain network based on the edge nodes, and deploy smart contracts related to the forwarding path;

获取初始配置信息,根据所述初始配置信息建立所述边缘节点之间的物理邻接关系,并基于所述物理邻接关系确定所述区块链网络的初始转发路径。Initial configuration information is obtained, a physical adjacency relationship between the edge nodes is established according to the initial configuration information, and an initial forwarding path of the blockchain network is determined based on the physical adjacency relationship.

此外,为实现上述目的,本发明还提供一种跨机房数据转发系统,所述跨机房数据转发系统包括:In addition, to achieve the above-mentioned purpose, the present invention also provides a cross-computer room data forwarding system, the cross-computer room data forwarding system comprising:

路由策略变动模块,用于从部署于不同机房的边缘节点所构成的区块链网络中监测跨机房的路由策略变动信息,其中,所述区块链网络中已部署路径转发相关的智能合约;A routing policy change module, used to monitor the routing policy change information across computer rooms from a blockchain network composed of edge nodes deployed in different computer rooms, wherein the blockchain network has deployed smart contracts related to path forwarding;

邻接节点广播模块,用于确定所述路由策略变动信息对应在所述区块链网络中的目的边缘节点,并根据所述智能合约将所述路由策略变动信息广播至所述区块链网络中的所述目的边缘节点的邻接边缘节点;An adjacent node broadcast module, used to determine that the routing policy change information corresponds to a destination edge node in the blockchain network, and broadcast the routing policy change information to adjacent edge nodes of the destination edge node in the blockchain network according to the smart contract;

变动共识验证模块,用于根据所述邻接边缘节点和所述智能合约对所述路由策略变动信息进行共识验证,以在所述路由策略变动信息通过共识验证时确定路由策略变动后的目标转发路径;A change consensus verification module, used to perform consensus verification on the routing policy change information according to the adjacent edge nodes and the smart contract, so as to determine the target forwarding path after the routing policy change when the routing policy change information passes the consensus verification;

目标路径同步模块,用于将所述目标转发路径同步至所述区块链网络中构成所述目标转发路径的路径边缘节点,以供所述路径边缘节点按照所述目标转发路径进行数据转发。The target path synchronization module is used to synchronize the target forwarding path to the path edge nodes constituting the target forwarding path in the blockchain network, so that the path edge nodes can forward data according to the target forwarding path.

此外,为实现上述目的,本发明还提供一种跨机房数据转发设备,所述跨机房数据转发设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的跨机房数据转发程序,所述跨机房数据转发程序被所述处理器执行时实现如上所述的跨机房数据转发方法的步骤。In addition, to achieve the above-mentioned purpose, the present invention also provides a cross-computer room data forwarding device, which includes: a memory, a processor, and a cross-computer room data forwarding program stored on the memory and executable on the processor, and when the cross-computer room data forwarding program is executed by the processor, the steps of the cross-computer room data forwarding method as described above are implemented.

此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有跨机房数据转发程序,所述跨机房数据转发程序被处理器执行时实现如上所述的跨机房数据转发方法的步骤。In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium, on which a cross-computer room data forwarding program is stored, and when the cross-computer room data forwarding program is executed by a processor, the steps of the cross-computer room data forwarding method as described above are implemented.

此外,为实现上述目的,本发明还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述的跨机房数据转发方法的步骤。In addition, to achieve the above-mentioned purpose, the present invention also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for forwarding data across computer rooms are implemented.

本发明通过利用跨机房的边缘节点构建区块链网络并部署与路径转发相关的智能合约,使得可利用底层区块链账本记录整个操作流程,保证全局转发路径信息的一致性;通过利用智能合约技术提供的针对跨机房转发路径进行共识验证功能,在路由策略变动时,需要相关的邻接边缘节点对变动前后的跨机房转发路径进行共识验证,使得即使当前的路由策略变动是因恶意或宕机节点等的错误节点配置所导致,也能够通过共识评估这一流程及时识别出来;最终只有通过共识验证的跨机房的路径变动才可生效,避免了跨机房数据转发流程因由人工或是其他方式配置的错误节点对机房造成的负面影响,大大提高了跨机房数据转发的可靠性,也即是在保证跨机房数据转发方式的一致性的前提下,大大提高了转发路径的可靠性,从而解决了现有基于人工的维持跨机房数据转发一致性的方式的可靠性不佳的技术问题。The present invention uses edge nodes across computer rooms to build a blockchain network and deploys smart contracts related to path forwarding, so that the entire operation process can be recorded using the underlying blockchain account book to ensure the consistency of global forwarding path information; by using the consensus verification function for the cross-computer room forwarding path provided by the smart contract technology, when the routing strategy changes, the relevant adjacent edge nodes are required to perform consensus verification on the cross-computer room forwarding path before and after the change, so that even if the current routing strategy change is caused by an erroneous node configuration such as a malicious or downtime node, it can be timely identified through the consensus evaluation process; ultimately, only the cross-computer room path change that passes the consensus verification can take effect, avoiding the negative impact on the computer room caused by the erroneous nodes configured manually or in other ways in the cross-computer room data forwarding process, greatly improving the reliability of cross-computer room data forwarding, that is, on the premise of ensuring the consistency of the cross-computer room data forwarding method, the reliability of the forwarding path is greatly improved, thereby solving the technical problem of poor reliability of the existing manual method for maintaining the consistency of cross-computer room data forwarding.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图;FIG1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;

图2为本发明跨机房数据转发方法第一实施例的流程示意图;FIG2 is a schematic diagram of a flow chart of a first embodiment of a method for forwarding data across computer rooms according to the present invention;

图3为本发明跨机房数据转发方法第二实施例中一具体实施例的音视频流跨机房路由智能合约的功能模块划分示意图;3 is a schematic diagram of the functional module division of an audio and video stream cross-machine room routing smart contract in a specific embodiment of the second embodiment of the cross-machine room data forwarding method of the present invention;

图4为本发明跨机房数据转发方法第二实施例中一具体实施例的跨机房路由智能合约的路径新增及更新操作示意图;4 is a schematic diagram of path addition and update operations of a cross-computer room routing smart contract in a specific embodiment of the second embodiment of the cross-computer room data forwarding method of the present invention;

图5为本发明跨机房数据转发方法第二实施例中一具体实施例的合约调用逻辑流程示意图;5 is a schematic diagram of a contract call logic flow of a specific embodiment of the second embodiment of the cross-machine room data forwarding method of the present invention;

图6为本发明跨机房数据转发方法第三实施例中一具体实施例的多机房边缘节点的区块链网络构建及路由智能合约部署示意图;6 is a schematic diagram of blockchain network construction and routing smart contract deployment of multiple computer room edge nodes in a specific embodiment of the third embodiment of the cross-computer room data forwarding method of the present invention;

图7为本发明跨机房数据转发方法第三实施例中一具体实施例的跨机房物理节点数据流转发示意图;7 is a schematic diagram of data flow forwarding across physical nodes in computer rooms in a specific embodiment of the third embodiment of the method for forwarding data across computer rooms of the present invention;

图8为本发明跨机房数据转发方法第三实施例中另一具体实施例的整体流程示意图;8 is a schematic diagram of the overall flow of another specific embodiment of the third embodiment of the method for forwarding data across computer rooms of the present invention;

图9为本发明跨机房数据转发系统的功能模块示意图。FIG. 9 is a schematic diagram of the functional modules of the inter-computer room data forwarding system of the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings.

具体实施方式DETAILED DESCRIPTION

应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。本发明涉及以下技术:It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. The present invention relates to the following technologies:

内容分发网络(CDN,Content Delivery Network)技术。数字内容服务提供商通过部署靠近用户侧的边缘节点,并将作品内容按照规则分发至对应节点,在用户请求内容时,CDN通过全局负载均衡技术将来自不同地区的请求转发至离用户最近的边缘节点,旨在为用户提供低延迟的服务。Content Delivery Network (CDN) technology. Digital content service providers deploy edge nodes close to users and distribute content to corresponding nodes according to rules. When users request content, CDN forwards requests from different regions to the edge nodes closest to users through global load balancing technology, aiming to provide users with low-latency services.

WebRTC,是浏览器进行实时语音对话或视频对话的API标准,目前已有多个开源项目支持企业级会议、直播系统的搭建,并且逐渐成为音视频直播领域较为常用的技术。WebRTC is an API standard for browsers to conduct real-time voice or video conversations. Currently, there are multiple open source projects that support the construction of enterprise-level conferences and live broadcast systems, and it has gradually become a more commonly used technology in the field of audio and video live broadcasting.

目前,WebRTC系统中SFU的架构是当前主流选择,通过建立音视频流的生产消费数据流,实现多节点、跨机房的数据流转发,增加了组网的灵活性。WebRTC节点级联是当前大型视频会议系统的标准解决方案,节点之间建立音视频流的转发,实现用户侧端到端数据流转发的透明性,用户无需感知中间的转发规则,系统通过路由计算自动为选择用户创建同一机房内或跨地域机房的转发链路。基于SFU这一WebRTC的通信架构方式,WebRTC系统能够快速拓展至多节点级联的连接模式,在同一域(机房)内,通过节点转发和路由计算的形式,实现最优转发。但是,在跨机房数据转发的场景下,需要建立额外的系统串联起整个数据流链路,能够在事故发生时准确查询转发链路及对应机房节点,辅助运维人员快速定位错误问题,因此,跨机房的转发策略存储需要在全局范围内保证策略的一致性。由于目前业界还没有针对WebRTC跨机房音视频流转发策略存储问题的公认解决方案,转发路径的一致性一般由技术人员配置来保证,当技术人员错配时,容易使错误流量涌入同一机房内,可能会造成机房负载过高而瘫痪。上述情况反映出现有基于人工的维持跨机房数据转发一致性的方式的可靠性不佳的技术问题。At present, the SFU architecture in the WebRTC system is the current mainstream choice. By establishing the production and consumption data flow of audio and video streams, multi-node and cross-computer room data flow forwarding is realized, which increases the flexibility of networking. WebRTC node cascading is the standard solution for current large-scale video conferencing systems. The forwarding of audio and video streams is established between nodes to achieve the transparency of end-to-end data flow forwarding on the user side. Users do not need to perceive the intermediate forwarding rules. The system automatically creates forwarding links in the same computer room or across regional computer rooms for selected users through routing calculation. Based on the SFU communication architecture of WebRTC, the WebRTC system can quickly expand to a multi-node cascade connection mode, and achieve optimal forwarding in the same domain (computer room) through node forwarding and routing calculation. However, in the scenario of cross-computer room data forwarding, it is necessary to establish an additional system to connect the entire data flow link in series, so that the forwarding link and the corresponding computer room node can be accurately queried when an accident occurs, and the operation and maintenance personnel can quickly locate the error problem. Therefore, the forwarding policy storage across computer rooms needs to ensure the consistency of the policy in a global scope. Since there is no recognized solution to the problem of WebRTC cross-machine room audio and video stream forwarding strategy storage in the industry, the consistency of the forwarding path is generally ensured by the configuration of technical personnel. When the technical personnel are mismatched, it is easy for the wrong traffic to flow into the same machine room, which may cause the machine room to be overloaded and paralyzed. The above situation reflects the technical problem of poor reliability of the existing manual method of maintaining the consistency of cross-machine room data forwarding.

为解决上述问题,本发明提供一种跨机房数据转发方法,即通过利用跨机房的边缘节点构建区块链网络并部署与路径转发相关的智能合约,使得可利用底层区块链账本记录整个操作流程,保证全局转发路径信息的一致性;通过利用智能合约技术提供的针对跨机房转发路径进行共识验证功能,在路由策略变动时,需要相关的邻接边缘节点对变动前后的跨机房转发路径进行共识验证,使得即使当前的路由策略变动是因恶意或宕机节点等的错误节点配置所导致,也能够通过共识评估这一流程及时识别出来;最终只有通过共识验证的跨机房的路径变动才可生效,避免了跨机房数据转发流程因由人工或是其他方式配置的错误节点对机房造成的负面影响,大大提高了跨机房数据转发的可靠性,也即是在保证跨机房数据转发方式的一致性的前提下,大大提高了转发路径的可靠性,从而解决了现有基于人工的维持跨机房数据转发一致性的方式的可靠性不佳的技术问题。In order to solve the above problems, the present invention provides a cross-computer room data forwarding method, that is, by using the edge nodes across computer rooms to build a blockchain network and deploying smart contracts related to path forwarding, the underlying blockchain account book can be used to record the entire operation process to ensure the consistency of the global forwarding path information; by using the consensus verification function for the cross-computer room forwarding path provided by the smart contract technology, when the routing strategy changes, the relevant adjacent edge nodes are required to perform consensus verification on the cross-computer room forwarding path before and after the change, so that even if the current routing strategy change is caused by an erroneous node configuration such as a malicious or downtime node, it can be timely identified through the consensus evaluation process; finally, only the cross-computer room path change that passes the consensus verification can take effect, avoiding the negative impact of the cross-computer room data forwarding process on the computer room caused by the erroneous nodes configured manually or in other ways, greatly improving the reliability of the cross-computer room data forwarding, that is, on the premise of ensuring the consistency of the cross-computer room data forwarding method, the reliability of the forwarding path is greatly improved, thereby solving the technical problem of poor reliability of the existing manual method of maintaining the consistency of cross-computer room data forwarding.

如图1所示,图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图。As shown in FIG. 1 , FIG. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

如图1所示,该跨机房数据转发系统可以包括:处理器1001,例如CPU,用户接口1003,网络接口1004,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in Figure 1, the cross-computer room data forwarding system may include: a processor 1001, such as a CPU, a user interface 1003, a network interface 1004, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

本领域技术人员可以理解,图1中示出的设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art will appreciate that the device structure shown in FIG. 1 does not constitute a limitation on the device, and may include more or fewer components than shown, or a combination of certain components, or a different arrangement of components.

如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及跨机房数据转发程序。As shown in FIG. 1 , the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an inter-computer room data forwarding program.

在图1所示的设备中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(程序员端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的跨机房数据转发程序,并执行下述跨机房数据转发方法中的操作。In the device shown in Figure 1, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client (programmer side) and communicate data with the client; and the processor 1001 can be used to call the cross-computer room data forwarding program stored in the memory 1005, and perform the operations in the following cross-computer room data forwarding method.

基于上述硬件结构,提出本发明跨机房数据转发方法实施例。Based on the above hardware structure, an embodiment of the method for forwarding data across computer rooms of the present invention is proposed.

参照图2,图2为本发明跨机房数据转发方法第一实施例的流程示意图。所述跨机房数据转发方法包括;Referring to Figure 2, Figure 2 is a flow chart of a first embodiment of a method for forwarding data across computer rooms of the present invention. The method for forwarding data across computer rooms includes:

步骤S10,从部署于不同机房的边缘节点所构成的区块链网络中监测跨机房的路由策略变动信息,其中,所述区块链网络中已部署路径转发相关的智能合约;Step S10, monitoring the cross-computer room routing policy change information from the blockchain network composed of edge nodes deployed in different computer rooms, wherein the blockchain network has deployed a smart contract related to path forwarding;

在本实施例中,本发明应用于基于CDN技术以及SFU架构的跨机房数据转发系统(以下简称系统)。区块链网络由部署在不同机房的多个边缘节点所构成,区块链网络会将每一边缘节点的相关信息进行存储。智能合约与区块链网络中的路径转发相关。In this embodiment, the present invention is applied to a cross-computer room data forwarding system (hereinafter referred to as the system) based on CDN technology and SFU architecture. The blockchain network is composed of multiple edge nodes deployed in different computer rooms, and the blockchain network stores the relevant information of each edge node. Smart contracts are related to path forwarding in the blockchain network.

由于在区块链网络构建之初,会默认设置跨机房边缘节点之间的初始转发路径,因此当系统通过主动检测或是接收到外部指令捕获到不同于初始转发路径的节点或是路径时,就会将其视为路由策略变动,并获取相应的信息以作为上述路由策略变动信息。Since the initial forwarding path between edge nodes across computer rooms is set by default at the beginning of the blockchain network construction, when the system captures a node or path different from the initial forwarding path through active detection or receiving external instructions, it will be regarded as a routing policy change and the corresponding information will be obtained as the above-mentioned routing policy change information.

路由策略变动可能会存在两种情况,第一种情况是系统查询转发路径时探测到新加入且物理可达的边缘节点,将其作为新增边缘节点;第二种情况是系统在执行内部路由算法时发现初始转发路径中的原有边缘节点可能不是最优边缘节点时,将区块链网络中未处于初始转发路径的其他边缘节点作为候选边缘节点。There may be two situations when the routing strategy changes. The first situation is that when the system queries the forwarding path, it detects a newly added and physically reachable edge node and treats it as a newly added edge node. The second situation is that when the system executes the internal routing algorithm, it finds that the original edge node in the initial forwarding path may not be the optimal edge node, and uses other edge nodes in the blockchain network that are not in the initial forwarding path as candidate edge nodes.

具体地,系统通过各机房中的边缘节点进行区块链网络的构建,将上述智能合约部署于该区块链网络中,并在智能合约中生成每一边缘节点的存储对象,以存储每一边缘节点的相关信息,具体可包括该边缘节点的起点机房信息、下一跳邻居机房信息等。在系统中的各机房内部开始执行私有域内的数据流转发选路策略的过程中,若是同一机房内部的边缘节点进行切换时,则捕获此时的路由策略变动信息。Specifically, the system constructs a blockchain network through edge nodes in each computer room, deploys the above-mentioned smart contract in the blockchain network, and generates a storage object for each edge node in the smart contract to store relevant information of each edge node, which may include the starting computer room information of the edge node, the next-hop neighbor computer room information, etc. When each computer room in the system starts to execute the data flow forwarding routing strategy within the private domain, if the edge node in the same computer room switches, the routing strategy change information at this time is captured.

步骤S20,确定所述路由策略变动信息对应在所述区块链网络中的目的边缘节点,并根据所述智能合约将所述路由策略变动信息广播至所述区块链网络中的所述目的边缘节点的邻接边缘节点;Step S20, determining that the routing policy change information corresponds to a destination edge node in the blockchain network, and broadcasting the routing policy change information to adjacent edge nodes of the destination edge node in the blockchain network according to the smart contract;

在本实施例中,目的边缘节点为数据流入目的机房的节点,可能是上述第一种情况中的新增边缘节点,或是第二种情况中的候选边缘节点。邻接边缘节点指的是区块链网络中与目的边缘节点存在物理邻接关系的边缘节点。In this embodiment, the destination edge node is the node where data flows into the destination computer room, which may be the newly added edge node in the first case or the candidate edge node in the second case. The adjacent edge node refers to the edge node in the blockchain network that has a physical adjacent relationship with the destination edge node.

具体地,由于发生路由策略变动时,无论是新增路由策略还是更改路由策略,系统都无法直接获取到新增的路由策略是否具有可行性,或是更改后的路由策略是否优于更改前的路由策略,因此需要相关的邻接边缘节点的协助。系统根据路由策略变动信息确定此时发生变动的新增边缘节点或是候选边缘节点,并在区块链网络中确定出与新增边缘节点或是候选边缘节点存在物理链接关系的邻接边缘节点(具体个数由实际情况所确定),然后将路由策略变动信息广播至每个邻接边缘节点。Specifically, when a routing policy changes, whether it is a new routing policy or a changed routing policy, the system cannot directly obtain whether the new routing policy is feasible or whether the changed routing policy is better than the routing policy before the change, so the assistance of the relevant adjacent edge nodes is required. The system determines the new edge nodes or candidate edge nodes that have changed at this time based on the routing policy change information, and determines the adjacent edge nodes that have a physical link relationship with the new edge nodes or candidate edge nodes in the blockchain network (the specific number is determined by the actual situation), and then broadcasts the routing policy change information to each adjacent edge node.

步骤S30,根据所述邻接边缘节点和所述智能合约对所述路由策略变动信息进行共识验证,以在所述路由策略变动信息通过共识验证时确定路由策略变动后的目标转发路径;Step S30, performing consensus verification on the routing policy change information according to the adjacent edge node and the smart contract, so as to determine a target forwarding path after the routing policy change when the routing policy change information passes the consensus verification;

步骤S40,将所述目标转发路径同步至所述区块链网络中构成所述目标转发路径的路径边缘节点,以供所述路径边缘节点按照所述目标转发路径进行数据转发。Step S40, synchronizing the target forwarding path to the path edge nodes constituting the target forwarding path in the blockchain network, so that the path edge nodes forward data according to the target forwarding path.

在本实施例中,系统通过在发现策略变动时让相关的邻接边缘节点对其进行共识验证,例如至少针对链路通信质量这一方面进行考察,从而能够在考察策略变动对链路通信质量所带来的影响,尤其是能够捕捉到人为或是其他方式所造成的错配转发策略。链路通信质量具体可通过一种或多种性能指标来体现,例如连通性、带宽、延迟、抖动等。In this embodiment, the system allows the relevant adjacent edge nodes to conduct consensus verification when a policy change is discovered, for example, at least the link communication quality is examined, so that the impact of the policy change on the link communication quality can be examined, especially the mismatch forwarding strategy caused by human or other means can be captured. The link communication quality can be specifically reflected by one or more performance indicators, such as connectivity, bandwidth, delay, jitter, etc.

具体地,系统中的邻接边缘节点在接收到广播后,对路由策略变动信息对应的链路通信质量进行验证,得到验证结果,并将验证结果上报到智能合约,智能合约将验证结果作为预设共识算式的输入,以基于共识算式判断此路由策略变动是否能够生效,或是邻接边缘节点还未完成对目的边缘节点的验证,但此时已触发超时,则智能合约直接进行共识计算,以判断此路由策略变动是否能够生效。若是能够生效,系统则基于此路由策略变动信息确定出变动后的目标转发路径;若是不能生效,则放弃当前变动。另外,在确定目标转发路径的过程中,除了需考察链路通信质量外,还可考虑距离最近、路径最新以及负载均衡等原则。Specifically, after receiving the broadcast, the adjacent edge nodes in the system verify the link communication quality corresponding to the routing policy change information, obtain the verification result, and report the verification result to the smart contract. The smart contract uses the verification result as the input of the preset consensus formula to determine whether the routing policy change can take effect based on the consensus formula. If the adjacent edge node has not completed the verification of the destination edge node, but the timeout has been triggered at this time, the smart contract directly performs consensus calculation to determine whether the routing policy change can take effect. If it can take effect, the system determines the target forwarding path after the change based on the routing policy change information; if it cannot take effect, the current change is abandoned. In addition, in the process of determining the target forwarding path, in addition to examining the link communication quality, the principles of shortest distance, latest path and load balancing can also be considered.

系统在确定目标转发路径后,将此目标转发路径的路由策略部署于各个路径边缘节点,部署后若是区块链网络需要执行数据流的跨机房转发任务时,即可按照此更新后的路由策略,沿着目标转发路径对音视频数据流进行转发。After determining the target forwarding path, the system deploys the routing strategy of this target forwarding path to each path edge node. After deployment, if the blockchain network needs to perform the task of forwarding data streams across computer rooms, it can forward the audio and video data streams along the target forwarding path according to this updated routing strategy.

本实施例提供一种跨机房数据转发方法,通过利用跨机房的边缘节点构建区块链网络并部署与路径转发相关的智能合约,使得可利用底层区块链账本记录整个操作流程,保证全局转发路径信息的一致性;通过利用智能合约技术提供的针对跨机房转发路径进行共识验证功能,在路由策略变动时,需要相关的邻接边缘节点对变动前后的跨机房转发路径进行共识验证,使得即使当前的路由策略变动是因恶意或宕机节点等的错误节点配置所导致,也能够通过共识评估这一流程及时识别出来;最终只有通过共识验证的跨机房的路径变动才可生效,避免了跨机房数据转发流程因由人工或是其他方式配置的错误节点对机房造成的负面影响,大大提高了跨机房数据转发的可靠性,也即是在保证跨机房数据转发方式的一致性的前提下,大大提高了转发路径的可靠性,从而解决了现有基于人工的维持跨机房数据转发一致性的方式的可靠性不佳的技术问题。The present embodiment provides a cross-computer room data forwarding method, which uses edge nodes across computer rooms to build a blockchain network and deploy smart contracts related to path forwarding, so that the entire operation process can be recorded using the underlying blockchain account book to ensure the consistency of global forwarding path information; by using the consensus verification function for the cross-computer room forwarding path provided by the smart contract technology, when the routing policy changes, the relevant adjacent edge nodes are required to perform consensus verification on the cross-computer room forwarding path before and after the change, so that even if the current routing policy change is caused by an erroneous node configuration such as a malicious or downtime node, it can be timely identified through the consensus evaluation process; finally, only the cross-computer room path change that passes the consensus verification can take effect, avoiding the negative impact of the cross-computer room data forwarding process on the computer room caused by the erroneous nodes configured manually or in other ways, greatly improving the reliability of cross-computer room data forwarding, that is, on the premise of ensuring the consistency of the cross-computer room data forwarding method, the reliability of the forwarding path is greatly improved, thereby solving the technical problem of poor reliability of the existing manual method of maintaining the consistency of cross-computer room data forwarding.

进一步地,基于上述图2所示的第一实施例,提出本发明跨机房数据转发方法的第二实施例。在本实施例中,所述路由策略变动信息包括路由新增信息,步骤S20包括:Further, based on the first embodiment shown in FIG2 , a second embodiment of the cross-computer room data forwarding method of the present invention is proposed. In this embodiment, the routing policy change information includes routing new information, and step S20 includes:

步骤S211,从所述路由新增信息中确定出所述区块链网络中的新增目的边缘节点以及与所述新增目的边缘节点对应的源边缘节点,并基于所述新增目的边缘节点和所述源边缘节点生成所述新增目的边缘节点的存储对象,以将所述存储对象存储于所述智能合约;Step S211, determining a newly added destination edge node in the blockchain network and a source edge node corresponding to the newly added destination edge node from the newly added routing information, and generating a storage object of the newly added destination edge node based on the newly added destination edge node and the source edge node, so as to store the storage object in the smart contract;

步骤S212,从所述区块链网络中确定出与所述新增目的边缘节点相邻的第一邻接边缘节点,将所述新增目的边缘节点广播至所述第一邻接边缘节点。Step S212: determine a first adjacent edge node adjacent to the newly added destination edge node from the blockchain network, and broadcast the newly added destination edge node to the first adjacent edge node.

在本实施例中,主要对上述第一种情况进行说明,新增目的边缘节点即对应上述第一种情况。当智能合约收到一个全新的转发路由路径节点(即上述新增目的边缘节点)时,会根据获取到的路由新增信息在合约中生成对应的存储对象,作为一具体实施方式,该存储对象可简记做R,R中至少包含源机房信息和目的机房信息。In this embodiment, the first case is mainly described, and the newly added destination edge node corresponds to the first case. When the smart contract receives a new forwarding routing path node (i.e., the newly added destination edge node), a corresponding storage object will be generated in the contract according to the acquired routing information. As a specific implementation method, the storage object can be abbreviated as R, which contains at least the source computer room information and the destination computer room information.

源机房信息:代表转发路径的起点机房,及数据流流出的源机房中的边缘节点,用于跨机房数据的流出,以键值对方式存储:Source computer room information: represents the starting computer room of the forwarding path and the edge node in the source computer room where the data flow flows out. It is used for the outflow of data across computer rooms and is stored in the form of key-value pairs:

poss:nodespos s :node s ;

其中,poss代表源机房名称,nodes为源机房中的边缘节点的名称,具体实施过程中可以IP信息替换;Among them, pos s represents the name of the source computer room, and node s is the name of the edge node in the source computer room. In the specific implementation process, it can be replaced by IP information;

目的机房信息:代表路径的目的地(下一跳邻居)机房信息,及数据流入目的机房中的边缘节点,用于接收数据流,以键值对方式存储:Destination room information: represents the destination (next-hop neighbor) room information of the path, and the edge node where the data flows into the destination room, which is used to receive the data stream and is stored in key-value pairs:

posd:nodedpos d :node d ;

其中,posd代表目的机房名称,noded为目的机房中的边缘节点名称,具体实施过程中也可以IP信息替换。Among them, pos d represents the name of the destination computer room, node d is the name of the edge node in the destination computer room, and IP information can also be replaced during the specific implementation process.

另外R中除了可包含上述的源机房信息和目的机房信息外,还可添加拓展字段。该推展字段用于后续对存储对象功能的拓展。In addition to the above-mentioned source computer room information and destination computer room information, R may also include an extension field, which is used to expand the storage object function in the future.

系统在智能合约中为新增目的边缘节点生成相应的存储对象后,从区块链网络中确定出与新增目的边缘节点相邻的若干邻接边缘节点,作为上述第一邻接边缘节点,然后将新增目的边缘节点的相关信息广播至每一第一邻接边缘节点。After the system generates a corresponding storage object for the newly added destination edge node in the smart contract, it determines several adjacent edge nodes adjacent to the newly added destination edge node from the blockchain network as the above-mentioned first adjacent edge nodes, and then broadcasts the relevant information of the newly added destination edge node to each first adjacent edge node.

进一步地,步骤S30包括:Further, step S30 includes:

步骤S311,获取所述第一邻接边缘节点对所述新增目的边缘节点进行的连通性测试的测试结果,并结合所述测试结果和所述智能合约中的新增共识算法得到所述新增目的边缘节点对应的质量评估均值;Step S311, obtaining a test result of a connectivity test performed by the first adjacent edge node on the newly added destination edge node, and combining the test result and the newly added consensus algorithm in the smart contract to obtain a quality assessment mean corresponding to the newly added destination edge node;

步骤S312,判断所述质量评估均值是否不小于预设评分阈值;Step S312, determining whether the quality assessment mean is not less than a preset scoring threshold;

步骤S313,若是,则生成由所述新增目的边缘节点和所述第一邻接边缘节点组成的新增转发路径,将所述新增转发路径存储于所述区块链网络;Step S313: If yes, generate a new forwarding path consisting of the newly added destination edge node and the first adjacent edge node, and store the newly added forwarding path in the blockchain network;

步骤S314,基于所述新增转发路径和所述区块链网络中的初始转发路径,按照预设第一路径拼接原则生成所述目标转发路径。Step S314: Based on the newly added forwarding path and the initial forwarding path in the blockchain network, the target forwarding path is generated according to a preset first path splicing principle.

在本实施例中,以第一邻接边缘节点的个数为多个来进行说明。每一邻接边缘节点验证自身与该新增目的边缘节点之间的连通性,并将连通性验证结果(也即上述测试结果)上报给智能合约。智能合约将此测试结果作为新增共识算法的输入以进行相应计算,得到新增目的边缘节点的质量评估均值。In this embodiment, the number of the first adjacent edge nodes is multiple for illustration. Each adjacent edge node verifies the connectivity between itself and the newly added destination edge node, and reports the connectivity verification result (i.e., the above test result) to the smart contract. The smart contract uses this test result as the input of the newly added consensus algorithm to perform corresponding calculations and obtain the quality assessment mean of the newly added destination edge node.

作为一具体实施方式,新增共识算法的算式如下:As a specific implementation method, the formula of the newly added consensus algorithm is as follows:

Figure BDA0003243888100000121
Figure BDA0003243888100000121

其中,j代表新增目的机房对应转发节点,m是与目的机房的邻接机房中的所有边缘节点个数,scorei->j是第i个节点对新增路径对应目的机房边缘节点j的链路评估指数(也即上述测试结果),S是链路质量评估的均值。Among them, j represents the forwarding node corresponding to the newly added destination computer room, m is the number of all edge nodes in the computer room adjacent to the destination computer room, score i->j is the link evaluation index of the i-th node for the edge node j of the destination computer room corresponding to the newly added path (that is, the above test result), and S is the mean value of the link quality evaluation.

当S≥Tconf(即上述预设评分阈值,可根据实际需求灵活配置)时,新增路径通过,将对象R所包含的路径记录存储在智能合约中;当S<Tconf时,新增路由未通过本次共识,存储对象R被拒绝。When S≥T conf (that is, the preset scoring threshold mentioned above, which can be flexibly configured according to actual needs), the newly added path is passed, and the path record contained in the object R is stored in the smart contract; when S<T conf , the newly added route fails to pass this consensus, and the storage object R is rejected.

在新增目的边缘节点通过本次共识时,系统结合所有通过共识的机房存储对象R,使用广度或深度遍历搜索方法进行路径拼接,转化为实际的数据流路径,而具体所采用的第一路径拼接原则可包括以下原则中的一项或多项:When the newly added destination edge node passes this consensus, the system combines all the data center storage objects R that have passed the consensus, uses the breadth or depth traversal search method to perform path splicing, and converts it into an actual data flow path. The specific first path splicing principle adopted may include one or more of the following principles:

距离最近原则:当源机房与目的机房有多条路径可达时,选取转发节点数最少的路径;Shortest distance principle: When there are multiple paths between the source computer room and the destination computer room, the path with the least number of forwarding nodes is selected;

路径最新原则。当路径节点数相同时,选择最近更新的路径;The latest path principle: When the number of path nodes is the same, the most recently updated path is selected;

负载均衡原则。当路径节点数相同,且路径更新时间相近时,选择合适的随机算式任选其一,以达到数据流负载均衡的目的。Load balancing principle: When the number of path nodes is the same and the path update time is similar, select an appropriate random formula to achieve the purpose of data flow load balancing.

本实施例通过基于智能合约的转发路径新增和共识方法,在路由策略变动时,需进行邻居机房边缘节点的共识评估,只有通过合约共识后的路径变动才能生效,也即是通过路由合约的路径共识算式,防止误配路由或低链路质量路径降低转发效率,合约的共识执行规则不会被少部分恶意或宕机节点影响。另外,通过设置路径拼接原则,达到通过路径最短,防止路径成环的目的。This embodiment uses a new forwarding path and consensus method based on smart contracts. When the routing strategy changes, a consensus evaluation of the edge nodes in the neighboring computer room is required. Only the path change after the contract consensus can take effect, that is, through the path consensus formula of the routing contract, it prevents mismatched routing or low link quality paths from reducing forwarding efficiency, and the consensus execution rules of the contract will not be affected by a small number of malicious or downtime nodes. In addition, by setting the path splicing principle, the purpose of the shortest path and preventing the path from forming a loop is achieved.

进一步地,所述路由策略变动信息包括路由更新信息,步骤S20包括:Further, the routing policy change information includes routing update information, and step S20 includes:

步骤S221,从所述路由更新信息中确定出所述区块链网络中部署于同一机房的历史目的边缘节点和候选目的边缘节点;Step S221, determining the historical destination edge nodes and candidate destination edge nodes deployed in the same computer room in the blockchain network from the routing update information;

步骤S222,确定所述区块链网络中与所述候选目的边缘节点相邻的第二邻接边缘节点,将所述历史目的边缘节点和候选目的边缘节点广播至所述第二邻接边缘节点。Step S222, determine a second adjacent edge node adjacent to the candidate destination edge node in the blockchain network, and broadcast the historical destination edge node and the candidate destination edge node to the second adjacent edge node.

在本实施例中,主要对上述第二种情况进行说明,候选目的边缘节点即对应上述第二种情况。In this embodiment, the second case is mainly described, and the candidate destination edge node corresponds to the second case.

系统接收要变更的路径信息,包括更新前的历史源机房和历史源边缘节点,以及更新后的候选目的机房和候选目的边缘节点。智能合约收到更新信息后,会通知区块链网络中更新前后新旧目的机房中的边缘节点相邻的节点(即第二邻接边缘节点)进行路径验证。The system receives the path information to be changed, including the historical source computer room and historical source edge nodes before the update, and the candidate destination computer room and candidate destination edge nodes after the update. After receiving the update information, the smart contract will notify the nodes adjacent to the edge nodes in the new and old destination computer rooms before and after the update in the blockchain network (i.e., the second adjacent edge nodes) to perform path verification.

进一步地,步骤S30包括:Further, step S30 includes:

步骤S321,获取所述第二邻接边缘节点对所述历史目的边缘节点进行链路质量评估所得到的历史链路评估指数,以及对所述候选目的边缘节点进行链路质量评估所得到的候选链路评估指数;Step S321, obtaining a historical link evaluation index obtained by the second adjacent edge node performing link quality evaluation on the historical destination edge node, and a candidate link evaluation index obtained by performing link quality evaluation on the candidate destination edge node;

步骤S322,结合所述历史链路评估指数、所述候选链路评估指数和所述智能合约中的更新共识算法,判断所述候选目的边缘节点是否有效;Step S322, combining the historical link evaluation index, the candidate link evaluation index and the update consensus algorithm in the smart contract, determining whether the candidate destination edge node is valid;

步骤S323,若是,则生成由所述候选目的边缘节点和所述第二邻接边缘节点组成的更新转发路径,将所述更新转发路径存储于所述区块链网络;Step S323: If yes, generate an updated forwarding path consisting of the candidate destination edge node and the second adjacent edge node, and store the updated forwarding path in the blockchain network;

步骤S324,基于所述更新转发路径和所述区块链网络中的初始转发路径,按照预设第二路径拼接原则生成所述目标转发路径。Step S324: Based on the updated forwarding path and the initial forwarding path in the blockchain network, the target forwarding path is generated according to a preset second path splicing principle.

在本实施例中,第二邻接边缘节点对历史目的边缘节点和候选目的边缘节点进行链路质量评估的具体实施方式可以是计算评估指数,例如将评估指数记做score,可划分为[0,100]的分值区间,与链路质量呈正相关,评判依据包括验证节点与目的边缘节点之间的连通性、带宽、延迟、抖动等性能指标。In this embodiment, the specific implementation method of the second adjacent edge node performing link quality evaluation on the historical destination edge node and the candidate destination edge node can be to calculate an evaluation index. For example, the evaluation index is recorded as score, which can be divided into a score interval of [0, 100] and is positively correlated with the link quality. The evaluation basis includes performance indicators such as connectivity, bandwidth, delay, and jitter between the verification node and the destination edge node.

智能合约将历史链路评估指数和候选链路评估指数作为新增共识算法的输入以进行相应计算,得到候选目的边缘节点的质量评估均值。The smart contract uses the historical link evaluation index and the candidate link evaluation index as input to the newly added consensus algorithm to perform corresponding calculations and obtain the quality evaluation mean of the candidate destination edge nodes.

作为一具体实施方式,将上述评估指数作为如下共识算式的输入,更新共识算法的算式如下:As a specific implementation method, the above evaluation index is used as the input of the following consensus formula, and the formula for updating the consensus algorithm is as follows:

Figure BDA0003243888100000131
Figure BDA0003243888100000131

jnew=argmaxS(j;i∈[1,m]);j new =argmaxS(j;i∈[1,m]);

其中,

Figure BDA0003243888100000132
代表目的机房的历史转发节点集合,j是所有属于历史集合的节点,m是与目的机房邻接机房的所有边缘节点个数,scorei->j是第i个节点对更新路径对应目的机房边缘节点j的链路评估指数,S(j)是第j个节点获得的链路质量评估均值,jnew即为本次共识后对应的目的机房转发节点,选取方式是在所有m个邻居节点的评估下,获得评估值最高的目的机房转发节点,当候选更新节点jcandidate=jnew时,更新路径通过共识,智能合约将最新的转发节点记录,并将移除的旧节点放入
Figure BDA0003243888100000141
作为备选转发路径。in,
Figure BDA0003243888100000132
represents the historical forwarding node set of the destination computer room, j is all the nodes belonging to the historical set, m is the number of all edge nodes in the computer room adjacent to the destination computer room, score i->j is the link evaluation index of the i-th node for the destination computer room edge node j corresponding to the update path, S(j) is the mean link quality evaluation obtained by the j-th node, j new is the destination computer room forwarding node corresponding to this consensus, and the selection method is to obtain the destination computer room forwarding node with the highest evaluation value under the evaluation of all m neighboring nodes. When the candidate update node j candidate = j new , the update path passes the consensus, and the smart contract records the latest forwarding node and puts the removed old node into
Figure BDA0003243888100000141
As an alternative forwarding path.

在候选目的边缘节点通过本次共识时,系统结合所有通过共识的机房存储对象R,使用广度或深度遍历搜索方法进行路径拼接,转化为实际的数据流路径,而具体所采用的第二路径拼接原则可包括以下原则中的一项或多项:When the candidate destination edge node passes this consensus, the system combines all the data center storage objects R that have passed the consensus, uses the breadth or depth traversal search method to perform path splicing, and converts it into an actual data flow path. The specific second path splicing principle adopted may include one or more of the following principles:

距离最近原则:当源机房与目的机房有多条路径可达时,选取转发节点数最少的路径;Shortest distance principle: When there are multiple paths between the source computer room and the destination computer room, the path with the least number of forwarding nodes is selected;

路径最新原则。当路径节点数相同时,选择最近更新的路径;The latest path principle: When the number of path nodes is the same, the most recently updated path is selected;

负载均衡原则。当路径节点数相同,且路径更新时间相近时,选择合适的随机算式任选其一,以达到数据流负载均衡的目的。Load balancing principle: When the number of path nodes is the same and the path update time is similar, select an appropriate random formula to achieve the purpose of data flow load balancing.

上述第一路径拼接原则与第二路径拼接原则可以相同也可以不同,具体可根据实际需求灵活配置。The first path splicing principle and the second path splicing principle may be the same or different, and may be flexibly configured according to actual needs.

本实施例通过基于智能合约的转发路径更新和共识方法,在路由策略变动时,需进行邻居机房边缘节点的共识评估,只有通过合约共识后的路径变动才能生效,也即是通过路由合约的路径共识算式,防止误配路由或低链路质量路径降低转发效率,合约的共识执行规则不会被少部分恶意或宕机节点影响。另外,通过设置路径拼接原则,达到通过路径最短,防止路径成环的目的。This embodiment uses a forwarding path update and consensus method based on smart contracts. When the routing strategy changes, a consensus evaluation of the edge nodes in the neighboring computer room is required. Only the path change after the contract consensus can take effect, that is, through the path consensus formula of the routing contract, it prevents mismatched routing or low link quality paths from reducing forwarding efficiency, and the consensus execution rules of the contract will not be affected by a small number of malicious or downtime nodes. In addition, by setting the path splicing principle, the purpose of the shortest path and preventing the path from forming a loop is achieved.

作为一具体实施例,如图3-5所示。As a specific embodiment, it is shown in Figure 3-5.

图3为音视频流跨机房路由智能合约的功能模块划分示意图。Figure 3 is a schematic diagram of the functional module division of the audio and video stream cross-computer room routing smart contract.

路径通告模块,对应上述第一种情况,主要负责全新转发路由的接收、存储及广播功能;The path announcement module, corresponding to the first case above, is mainly responsible for receiving, storing and broadcasting new forwarding routes;

路径更新模块,对应上述第二种情况,主要负责更新转发路由的接收及广播功能;The path update module, corresponding to the second case above, is mainly responsible for the reception and broadcasting functions of updating the forwarding route;

路径验证模块,接收所有对目的机房边缘节点的链路通信质量验证,具体验证方式参考上述说明;The path verification module receives all link communication quality verifications for the edge nodes in the destination computer room. For specific verification methods, please refer to the above description;

路径共识模块,通过共识算式,决定新的路由策略是否生效。当所有相关节点均已评估新旧链路,或触发超时时钟时触发共识计算。包括新路径共识及路径更新共识;The path consensus module determines whether the new routing strategy is effective through the consensus formula. The consensus calculation is triggered when all relevant nodes have evaluated the new and old links, or when the timeout clock is triggered. It includes new path consensus and path update consensus;

转发路径存储及查询模块,提供端到端路径的存储及查询功能。结合所有通过共识的机房存储对象R,使用广度或深度遍历搜索方法进行路径拼接,转化为实际的数据流路径,并展示给调用者。The forwarding path storage and query module provides end-to-end path storage and query functions. It combines all the computer room storage objects R that have passed the consensus, uses the breadth or depth traversal search method to perform path splicing, converts it into an actual data flow path, and displays it to the caller.

图4为跨机房路由智能合约的路径新增及更新操作示意图。Figure 4 is a schematic diagram of the path addition and update operations of the cross-computer room routing smart contract.

假设有4个机房{1,2,3,4},分别有机房边缘转发节点{A}、{B、C}、{D、E}和{F}。初始连接状态为:{机房4:F}<->{机房1:A}<->{机房2:C}<->{机房3:E};Assume that there are 4 computer rooms {1, 2, 3, 4}, with computer room edge forwarding nodes {A}, {B, C}, {D, E} and {F} respectively. The initial connection state is: {computer room 4: F} <-> {computer room 1: A} <-> {computer room 2: C} <-> {computer room 3: E};

当机房2执行内部路由算法,C节点不再是最优边缘节点时,将调用合约的更新操作,将B节点作为候选节点,即B=jcandidate,并触发路由更新共识操作。与B节点相邻的有{机房1:A}与{机房3:D,E},因此{A,D,E}将评估与B、C之间的链路质量,通过路径共识模块的路径更新共识算式,评估此次更新是否有效,当jnew=B时,路由更新获得通过,链路转发状态变化为:{机房4:F}<->{机房1:A}<->{机房2:B}<->{机房3:E};When computer room 2 executes the internal routing algorithm and node C is no longer the optimal edge node, the contract update operation will be called, node B will be used as a candidate node, that is, B = j candidate , and the routing update consensus operation will be triggered. Adjacent to node B are {computer room 1: A} and {computer room 3: D, E}, so {A, D, E} will evaluate the link quality between B and C, and evaluate whether the update is valid through the path update consensus formula of the path consensus module. When j new = B, the routing update is passed, and the link forwarding state changes to: {computer room 4: F} <-> {computer room 1: A} <-> {computer room 2: B} <-> {computer room 3: E};

同时,智能合约将C加入机房2的历史边缘转发节点集合

Figure BDA0003243888100000151
当公开的新节点是错误配置或与B的实际综合链路质量低时,会得出jnew≠B,即拒绝更新,维持原转发策略。At the same time, the smart contract adds C to the historical edge forwarding node set of computer room 2
Figure BDA0003243888100000151
When the new node disclosed is misconfigured or the actual integrated link quality with B is low, it will be concluded that j new ≠ B, that is, the update is rejected and the original forwarding strategy is maintained.

当机房4查询合约路径转发路径时,探测到{机房3:E}在目的机房存储R中,并且物理可达,因此调用新增路径操作,即触发路由新增共识操作,然后合约生成路径存储对象R=[源={机房4:F},目的={机房3:E},拓展字段={新路径探测,新增路径}],目的机房{机房3:E}的邻居节点集合{B,C}执行新路径共识算式。当满足新增阈值要求Tconf时,建立新增转发路径{机房4:F}->{机房3:E}。同理,当{机房3:E}探测到F可达时,将触发新增路径{机房3:E}->{机房4:F}时,形成新的双向链路,否则,数据流只由单向路径F->E进行转发。当双向链路建立后,形成了环形路径:{机房4:F}<->{机房1:A}<->{机房2:B}<->{机房3:E}<->{机房4:F};When computer room 4 queries the contract path forwarding path, it detects that {computer room 3: E} is in the destination computer room storage R and is physically reachable, so it calls the new path operation, that is, triggers the routing new consensus operation, and then the contract generates the path storage object R = [source = {computer room 4: F}, destination = {computer room 3: E}, extension field = {new path detection, new path}], and the neighbor node set {B, C} of the destination computer room {computer room 3: E} executes the new path consensus formula. When the new threshold requirement T conf is met, a new forwarding path {computer room 4: F}->{computer room 3: E} is established. Similarly, when {computer room 3: E} detects that F is reachable, it will trigger the new path {computer room 3: E}->{computer room 4: F}, forming a new bidirectional link, otherwise, the data flow is only forwarded by the unidirectional path F->E. When the bidirectional link is established, a ring path is formed: {machine room 4: F}<->{machine room 1: A}<->{machine room 2: B}<->{machine room 3: E}<->{machine room 4: F};

上述转发路径存储及查询模块在查询机房1到机房3的路径转发时,有A->B->E和A->F->E两条路径,由于A->F->E是最新更新,因此根据路径最新原则返回路径{机房1:A}<->{机房2:B}<->{机房3:E},避免了环路,对应边缘转发节点按照此路径与邻近机房建立新的音视频流连接进行数据转发。When the forwarding path storage and query module queries the path forwarding from computer room 1 to computer room 3, there are two paths, A->B->E and A->F->E. Since A->F->E is the latest update, the path {computer room 1: A}<->{computer room 2: B}<->{computer room 3: E} is returned according to the path latest principle, avoiding loops. The corresponding edge forwarding node establishes a new audio and video stream connection with the adjacent computer room according to this path for data forwarding.

另外,如图5所示,图5为合约调用逻辑流程示意图。In addition, as shown in FIG5 , FIG5 is a schematic diagram of the contract call logic flow.

系统在进行边缘转发节点跨机房路由计算时,若触发路径重建(相当于捕获到路由策略变动),则进一步判断该变动是否对应新增路径。若该变动对应新增路径,则进一步通过相应的邻接边缘节点对其进行连通性测试,再进入共识计算流程;若该变动不对应新增路径,而是对应路径更新,则进一步通过相应的邻接边缘节点进行新旧路径的质量评测,并判断是否接受当前的路径更新,若不接受,则依然维持原有的转发路径,若接受,则进入共识计算流程。When the system performs cross-computer room routing calculations on edge forwarding nodes, if path reconstruction is triggered (equivalent to capturing routing policy changes), it will further determine whether the change corresponds to a newly added path. If the change corresponds to a newly added path, it will further perform a connectivity test on it through the corresponding adjacent edge nodes, and then enter the consensus calculation process; if the change does not correspond to a newly added path, but corresponds to a path update, it will further perform a quality assessment of the new and old paths through the corresponding adjacent edge nodes, and determine whether to accept the current path update. If not, the original forwarding path will still be maintained. If accepted, the consensus calculation process will be entered.

系统基于智能合约判断当前的新增路径或是更新路径是否通过共识,若通过共识,则根据当前的策略变动建立新的转发路径;若未通过共识,则放弃转发路径变化,维持原有转发路径不变。上述全流程可利用底层区块链账本进行记录。Based on the smart contract, the system determines whether the current new or updated path has passed the consensus. If it has passed the consensus, a new forwarding path will be established according to the current policy changes; if it has not passed the consensus, the forwarding path change will be abandoned and the original forwarding path will remain unchanged. The above whole process can be recorded using the underlying blockchain account book.

本实施例通过调用智能合约,合约主要完成转发路径通告、更新、验证及共识四项功能,同时利用底层区块链账本,记录整个操作的全流程,保证全局转发路径信息的一致性,最终将最新的路由信息同步至所有路径上的边缘节点,指导其建立新的转发路径。This embodiment calls the smart contract, which mainly completes the four functions of forwarding path notification, update, verification and consensus. At the same time, it uses the underlying blockchain account book to record the entire process of the entire operation, ensure the consistency of the global forwarding path information, and finally synchronize the latest routing information to the edge nodes on all paths to guide them to establish a new forwarding path.

进一步地,基于上述图2所示的第一实施例,提出本发明跨机房数据转发方法的第三实施例。在本实施例中,步骤S10之前,还包括:Further, based on the first embodiment shown in FIG. 2 , a third embodiment of the method for forwarding data across computer rooms of the present invention is proposed. In this embodiment, before step S10, the method further includes:

步骤A1,获取所述区块链网络中各机房的机房内转发路径信息,并将所述机房内转发路径信息以哈希方式存储于所述区块链网络。Step A1, obtaining the intra-computer room forwarding path information of each computer room in the blockchain network, and storing the intra-computer room forwarding path information in the blockchain network in a hashed manner.

在本实施例中,如图6所示,图6为多机房边缘节点的区块链网络构建及路由智能合约部署示意图。图1示出了表示边缘节点构成的区块链网络,及部署在区块链上的路由共识合约。区块链网络主要完成机房内转发路径记录、跨机房转发路径记录和错误转发路径存证三大功能,以下先对前两功能进行说明:In this embodiment, as shown in FIG6 , FIG6 is a schematic diagram of the construction of a blockchain network of edge nodes in multiple computer rooms and the deployment of a routing smart contract. FIG1 shows a blockchain network composed of edge nodes and a routing consensus contract deployed on the blockchain. The blockchain network mainly completes three functions: recording forwarding paths within the computer room, recording forwarding paths across computer rooms, and recording evidence of incorrect forwarding paths. The first two functions are described below:

机房内转发路径的记录。为了保护单机房内的转发路径安全,机房内转发路径记录以哈希方式存储,具体算式如下:Records of forwarding paths within the computer room. In order to protect the security of the forwarding paths within a single computer room, the forwarding path records within the computer room are stored in a hash format. The specific formula is as follows:

Record=Hash(p);Record = Hash(p);

其中,record为上链记录,p为机房内的转发路径信息,Hash()为哈希函数,用于隐藏原始数据。例如,在同一机房内,p转发路径以链式记录,假设由机房内边缘节点A转发至边缘节点B,p=A->m1->m2->B,包含m1与m2两个内部转发节点。Among them, record is the chain record, p is the forwarding path information in the computer room, and Hash() is a hash function used to hide the original data. For example, in the same computer room, the p forwarding path is recorded in a chain. Assuming that it is forwarded from edge node A in the computer room to edge node B, p = A->m1->m2->B, including two internal forwarding nodes m1 and m2.

跨机房转发路径的记录。主要记录路由智能合约在跨机房路由通告、共识和更新的整个操作流程,并可按时间段抽样检测并将实际转发路径记录上链,为后续问题排查提供可靠的数据存证。Records of cross-machine room forwarding paths. Mainly records the entire operation process of routing smart contracts in cross-machine room routing notifications, consensus, and updates. It can also perform sampling tests by time period and record the actual forwarding path on the chain, providing reliable data evidence for subsequent problem investigation.

进一步地,步骤A1之后,还包括:Furthermore, after step A1, the method further includes:

步骤A2,在检测到所述区块链网络中发生错误路由数据转发时,从所述区块链网络的各机房中获取每一机房内部的实际数据转发信息;Step A2, when it is detected that wrong routing data forwarding occurs in the blockchain network, actual data forwarding information inside each computer room is obtained from each computer room of the blockchain network;

步骤A3,将所述实际数据转发信息与所述机房内转发路径信息进行对比并得到比对结果,以基于所述比对结果排查错误转发原因。Step A3, comparing the actual data forwarding information with the forwarding path information in the computer room and obtaining a comparison result, so as to troubleshoot the cause of the erroneous forwarding based on the comparison result.

在本实施例中,对区块链网络所实现的错误转发路径存证这一功能进行说明。当发生错误路由音视频流转发时,每个机房内部将相关的实际转发信息明文上链,同时与机房内转发路径的哈希存储进行比对,保证上链信息的正确性。确保运维人员在排查错误时,能够获得真实的端到端整个链路的路由策略路径及实际的转发路径,用于快速定位未按合约共识出的路径进行转发的节点,分析未按选路策略进行转发的原因,并进行进一步的问题排查。In this embodiment, the function of storing evidence of the wrong forwarding path implemented by the blockchain network is explained. When the wrong routing of the audio and video stream forwarding occurs, each computer room will upload the relevant actual forwarding information to the chain in plain text, and compare it with the hash storage of the forwarding path in the computer room to ensure the correctness of the information on the chain. Ensure that when troubleshooting errors, the operation and maintenance personnel can obtain the real end-to-end routing strategy path and the actual forwarding path of the entire link, which is used to quickly locate the nodes that are not forwarded according to the path agreed upon by the contract, analyze the reasons for not forwarding according to the routing strategy, and conduct further troubleshooting.

而对于错误的判定,一般地,在实际WebRTC机房搭建时,要尽量保证跨机房边缘节点的连通性。当连通性无法保证时,通过智能合约进行共识验证得出的路由更新,会出现部分节点对目的机房候选节点不可达、链路质量低等特殊情况,此时虽然合约路径发生了更新,但原节点仍会被合约记录进历史边缘转发节点集合

Figure BDA0003243888100000171
作为备选,此时拒绝更新转发路径的节点可维持原始历史转发路径,并将此情况按照图6所示区块链哈希存储规则进行实际跨机房路径转发信息的上链存证。当出现转发路径出现不属于
Figure BDA0003243888100000172
的节点等情况时,即视为出现了路径转发策略的错误,区块链存储的转发信息用于运维人员后续对相关问题的分析。As for the judgment of errors, generally speaking, when setting up the actual WebRTC computer room, we should try to ensure the connectivity of the edge nodes across computer rooms. When connectivity cannot be guaranteed, the route update obtained through consensus verification by smart contracts may result in some nodes being unreachable to the candidate nodes in the destination computer room, low link quality, and other special situations. At this time, although the contract path has been updated, the original node will still be recorded in the historical edge forwarding node set by the contract.
Figure BDA0003243888100000171
As an alternative, the node that refuses to update the forwarding path can maintain the original historical forwarding path and store the actual cross-computer room path forwarding information on the chain according to the blockchain hash storage rules shown in Figure 6.
Figure BDA0003243888100000172
When there is a situation such as a node being blocked, it is considered that an error in the path forwarding strategy has occurred. The forwarding information stored in the blockchain is used by the operation and maintenance personnel to analyze related issues later.

本实施例通过在排查转发错误时,验证链上哈希存储的方式匹配路由信息,特别在跨不同部门或厂商的机房时,既可以保证机房的错误路由转发不可抵赖,也可防止内部路由的隐私泄露。This embodiment verifies the matching of routing information by hash storage on the chain when troubleshooting forwarding errors, especially in computer rooms across different departments or manufacturers. This can ensure that the forwarding of erroneous routing in the computer room is non-repudiable and prevent the privacy leakage of internal routing.

进一步地,步骤S10之前,还包括:Furthermore, before step S10, the method further includes:

步骤S01,确定部署于不同机房的边缘节点,根据所述边缘节点构建区块链网络,部署转发路径相关的智能合约;Step S01, determining edge nodes deployed in different computer rooms, building a blockchain network based on the edge nodes, and deploying smart contracts related to the forwarding path;

步骤S02,获取初始配置信息,根据所述初始配置信息建立所述边缘节点之间的物理邻接关系,并基于所述物理邻接关系确定所述区块链网络的初始转发路径。Step S02: obtain initial configuration information, establish a physical adjacency relationship between the edge nodes according to the initial configuration information, and determine an initial forwarding path of the blockchain network based on the physical adjacency relationship.

在本实施例中,如图7所示,图7为跨机房物理节点数据流转发示意图。图2示出了i)初始配置信息建立邻居机房的物理邻接关系,ii)部署运行阶段动态调整的物理转发链路信息。与图6的区块链网络不同,图7为音视频流转发的物理链路,主要包括单一机房内的内部路由节点和对应的转发链路,以及机房边缘节点和跨机房数据的转发链路。In this embodiment, as shown in FIG7 , FIG7 is a schematic diagram of data flow forwarding across physical nodes in computer rooms. FIG2 shows i) initial configuration information to establish physical adjacency between neighboring computer rooms, and ii) physical forwarding link information dynamically adjusted during the deployment operation phase. Unlike the blockchain network of FIG6 , FIG7 is a physical link for forwarding audio and video streams, which mainly includes internal routing nodes and corresponding forwarding links within a single computer room, as well as computer room edge nodes and forwarding links for data across computer rooms.

单一机房内的内部路由,主要用于音视频流在同一机房内的选路,包括边缘转发节点和内部转发节点,即图2中机房A、B、C各自域内的转发链路。当有数据流产生时,内部转发节点之间将建立数据链路,用于转发机房内部的音视频数据流;边缘转发节点主要完成两项功能:Internal routing within a single computer room is mainly used for routing audio and video streams within the same computer room, including edge forwarding nodes and internal forwarding nodes, i.e., the forwarding links within the domains of computer rooms A, B, and C in Figure 2. When data streams are generated, data links will be established between internal forwarding nodes to forward audio and video data streams within the computer room; edge forwarding nodes mainly perform two functions:

一、机房内数据流转发至邻居机房。通过与其他机房边缘节点的连接,将本机房内的数据流转发至其他机房。1. Forwarding the data flow in the computer room to the neighboring computer room. Through the connection with the edge nodes of other computer rooms, the data flow in this computer room is forwarded to other computer rooms.

邻居机房数据流转发至本机房。接收邻居机房边缘节点的数据内容,并通过本机房私有域内的路由算式,将数据流转发至下一跳机房,或直接将数据转发并呈现在内部节点连接的WebRTC客户端。一般在具体实施过程中,单机房内的转发路径并不向外暴露,达到方便管理、保护数据流内部转发隐私的目的。The data stream of the neighboring computer room is forwarded to this computer room. The data content of the edge node of the neighboring computer room is received, and the data stream is forwarded to the next-hop computer room through the routing formula in the private domain of this computer room, or the data is directly forwarded and presented to the WebRTC client connected to the internal node. Generally, in the specific implementation process, the forwarding path within a single computer room is not exposed to the outside, so as to facilitate management and protect the privacy of internal forwarding of data streams.

二、跨机房的数据转发,主要由所有机房边缘节点之间的数据链路完成,由于单机房内的路由策略不对外暴露,因此,在跨机房转发时,边缘节点会将转发信息广播至其他邻居节点,并触发智能合约的路由共识及更新,最终确定选路策略。选路策略确定后,所有路径上的相关节点按照路由信息建立新的数据通路,即图2中虚线框内所示的跨机房音视频流的转发路径。Second, data forwarding across computer rooms is mainly completed by the data links between the edge nodes of all computer rooms. Since the routing strategy within a single computer room is not exposed to the outside, when forwarding across computer rooms, the edge node will broadcast the forwarding information to other neighboring nodes, trigger the routing consensus and update of the smart contract, and finally determine the routing strategy. After the routing strategy is determined, all relevant nodes on the path establish a new data path according to the routing information, that is, the forwarding path of the audio and video stream across computer rooms shown in the dotted box in Figure 2.

作为一具体实施例,如图8所示。图8为整体流程示意图。整体流程包括系统区块链网络及智能合约的准备阶段,以及运行阶段中跨机房转发路径的共识和更新等步骤。As a specific embodiment, it is shown in Figure 8. Figure 8 is a schematic diagram of the overall process. The overall process includes the preparation stage of the system blockchain network and smart contracts, as well as the consensus and update steps of the cross-computer room forwarding path in the operation stage.

在准备阶段,系统首先根据跨机房边缘转发节点构建区块链网络,并部署转发路径相关的智能合约,然后根据初始配置信息,建立边缘节点于其邻居机房的物理邻接关系,并根据由初始配置信息确定的默认转发路径建立初始的转发链路,至此,准备阶段完成;In the preparation phase, the system first builds a blockchain network based on the cross-computer room edge forwarding nodes and deploys smart contracts related to the forwarding path. Then, based on the initial configuration information, the system establishes the physical adjacency between the edge node and its neighboring computer room, and establishes the initial forwarding link based on the default forwarding path determined by the initial configuration information. At this point, the preparation phase is completed.

在运行阶段,系统中的机房内部执行私有域内的数据流转发选路方法;当同一机房内部的边缘节点进行切换时,向邻居机房广播新的路径信息,触发合约路径新增和更新方法;智能合约根据源机房和目的机房。存储所有跨机房路径及相关边缘节点;在触发更新方式后,通告所有相关邻居节点对目的机房新旧节点进行路径验证;所有节点根据新旧路径信息,验证与邻居节点的链路质量,并将质量信息上报给智能合约;当所有路径的质量报告上报完毕,或触发超时时,智能合约根据所有新旧路径的质量信息,执行共识方法,以选出新的路径信息;最后,所有相关边缘节点接收新的路径信息(即上述目标转发路径),并根据新路径决策转发路由,并等待下一次路径新增或更新。During the operation phase, the data flow forwarding routing method in the private domain is executed inside the computer room in the system; when the edge node in the same computer room switches, the new path information is broadcast to the neighboring computer room, triggering the contract path addition and update method; the smart contract stores all cross-computer room paths and related edge nodes according to the source computer room and the destination computer room; after triggering the update method, all relevant neighbor nodes are notified to verify the path of the new and old nodes of the destination computer room; all nodes verify the link quality with the neighboring nodes according to the new and old path information, and report the quality information to the smart contract; when the quality reports of all paths are reported, or the timeout is triggered, the smart contract executes the consensus method according to the quality information of all new and old paths to select new path information; finally, all relevant edge nodes receive the new path information (that is, the above-mentioned target forwarding path), and forward the route according to the new path decision, and wait for the next path addition or update.

本实施例通过在WebRTC跨机房数据转发的场景下,基于智能合约提供跨域路径的通告、共识和更新功能,同时,边缘节点构成的区块链网络,存储转发路径的更新操作,保证跨机房路径历史可追溯,方便运维人员在出现问题时准确定位错误位置。This embodiment provides cross-domain path notification, consensus and update functions based on smart contracts in the scenario of WebRTC cross-computer room data forwarding. At the same time, the blockchain network composed of edge nodes stores the update operations of the forwarding path to ensure the traceability of the cross-computer room path history, which is convenient for operation and maintenance personnel to accurately locate the error location when problems occur.

如图9所示,本发明还提供一种跨机房数据转发系统,所述跨机房数据转发系统包括:As shown in FIG9 , the present invention further provides a cross-computer room data forwarding system, the cross-computer room data forwarding system comprising:

路由策略变动模块10,用于从部署于不同机房的边缘节点所构成的区块链网络中监测跨机房的路由策略变动信息,其中,所述区块链网络中已部署路径转发相关的智能合约;A routing strategy change module 10, used to monitor the routing strategy change information across computer rooms from a blockchain network composed of edge nodes deployed in different computer rooms, wherein the blockchain network has deployed a smart contract related to path forwarding;

邻接节点广播模块20,用于确定所述路由策略变动信息对应在所述区块链网络中的目的边缘节点,并根据所述智能合约将所述路由策略变动信息广播至所述区块链网络中的所述目的边缘节点的邻接边缘节点;An adjacent node broadcasting module 20, used to determine that the routing policy change information corresponds to a destination edge node in the blockchain network, and broadcast the routing policy change information to adjacent edge nodes of the destination edge node in the blockchain network according to the smart contract;

变动共识验证模块30,用于根据所述邻接边缘节点和所述智能合约对所述路由策略变动信息进行共识验证,以在所述路由策略变动信息通过共识验证时确定路由策略变动后的目标转发路径;A change consensus verification module 30, configured to perform consensus verification on the routing policy change information according to the adjacent edge nodes and the smart contract, so as to determine a target forwarding path after the routing policy change when the routing policy change information passes the consensus verification;

目标路径同步模块40,用于将所述目标转发路径同步至所述区块链网络中构成所述目标转发路径的路径边缘节点,以供所述路径边缘节点按照所述目标转发路径进行数据转发。The target path synchronization module 40 is used to synchronize the target forwarding path to the path edge nodes constituting the target forwarding path in the blockchain network, so that the path edge nodes can forward data according to the target forwarding path.

可选地,所述路由策略变动信息包括路由新增信息,Optionally, the routing policy change information includes routing new information.

所述邻接节点广播模块20包括:The adjacent node broadcast module 20 includes:

新增对象存储单元,用于从所述路由新增信息中确定出所述区块链网络中的新增目的边缘节点以及与所述新增目的边缘节点对应的源边缘节点,并基于所述新增目的边缘节点和所述源边缘节点生成所述新增目的边缘节点的存储对象,以将所述存储对象存储于所述智能合约;A newly added object storage unit, used to determine a newly added destination edge node in the blockchain network and a source edge node corresponding to the newly added destination edge node from the newly added routing information, and generate a storage object of the newly added destination edge node based on the newly added destination edge node and the source edge node, so as to store the storage object in the smart contract;

第一节点广播单元,用于从所述区块链网络中确定出与所述新增目的边缘节点相邻的第一邻接边缘节点,将所述新增目的边缘节点广播至所述第一邻接边缘节点。The first node broadcast unit is used to determine a first adjacent edge node adjacent to the newly added destination edge node from the blockchain network, and broadcast the newly added destination edge node to the first adjacent edge node.

可选地,所述变动共识验证模块30包括:Optionally, the change consensus verification module 30 includes:

新增共识计算单元,用于获取所述第一邻接边缘节点对所述新增目的边缘节点进行的连通性测试的测试结果,并结合所述测试结果和所述智能合约中的新增共识算法得到所述新增目的边缘节点对应的质量评估均值;A new consensus calculation unit is added, which is used to obtain the test result of the connectivity test performed by the first adjacent edge node on the newly added destination edge node, and to obtain the quality assessment mean corresponding to the newly added destination edge node by combining the test result and the new consensus algorithm in the smart contract;

评分均值判断单元,用于判断所述质量评估均值是否不小于预设评分阈值;A scoring mean judgment unit, used to judge whether the quality assessment mean is not less than a preset scoring threshold;

新增路径生成单元,用于若是,则生成由所述新增目的边缘节点和所述第一邻接边缘节点组成的新增转发路径,将所述新增转发路径存储于所述区块链网络;a newly added path generation unit, configured to generate a newly added forwarding path consisting of the newly added destination edge node and the first adjacent edge node, and store the newly added forwarding path in the blockchain network;

第一路径拼接单元,用于基于所述新增转发路径和所述区块链网络中的初始转发路径,按照预设第一路径拼接原则生成所述目标转发路径。The first path splicing unit is used to generate the target forwarding path according to a preset first path splicing principle based on the newly added forwarding path and the initial forwarding path in the blockchain network.

可选地,所述路由策略变动信息包括路由更新信息,Optionally, the routing policy change information includes routing update information.

所述邻接节点广播模块20包括:The adjacent node broadcast module 20 includes:

候选节点确定单元,用于从所述路由更新信息中确定出所述区块链网络中部署于同一机房的历史目的边缘节点和候选目的边缘节点;A candidate node determination unit, configured to determine, from the routing update information, a historical destination edge node and a candidate destination edge node deployed in the same computer room in the blockchain network;

第二节点广播单元,用于确定所述区块链网络中与所述候选目的边缘节点相邻的第二邻接边缘节点,将所述历史目的边缘节点和候选目的边缘节点广播至所述第二邻接边缘节点。The second node broadcasting unit is used to determine a second adjacent edge node adjacent to the candidate destination edge node in the blockchain network, and broadcast the historical destination edge node and the candidate destination edge node to the second adjacent edge node.

可选地,所述变动共识验证模块30包括:Optionally, the change consensus verification module 30 includes:

评估指数获取单元,用于获取所述第二邻接边缘节点对所述历史目的边缘节点进行链路质量评估所得到的历史链路评估指数,以及对所述候选目的边缘节点进行链路质量评估所得到的候选链路评估指数;An evaluation index acquisition unit, used to acquire a historical link evaluation index obtained by the second adjacent edge node performing link quality evaluation on the historical destination edge node, and a candidate link evaluation index obtained by performing link quality evaluation on the candidate destination edge node;

更新共识计算单元,用于结合所述历史链路评估指数、所述候选链路评估指数和所述智能合约中的更新共识算法,判断所述候选目的边缘节点是否有效;An update consensus calculation unit, used to determine whether the candidate destination edge node is valid by combining the historical link evaluation index, the candidate link evaluation index and the update consensus algorithm in the smart contract;

更新路径生成单元,用于若是,则生成由所述候选目的边缘节点和所述第二邻接边缘节点组成的更新转发路径,将所述更新转发路径存储于所述区块链网络;an update path generation unit, configured to generate an update forwarding path consisting of the candidate destination edge node and the second adjacent edge node, and store the update forwarding path in the blockchain network;

第二路径拼接单元,用于基于所述更新转发路径和所述区块链网络中的初始转发路径,按照预设第二路径拼接原则生成所述目标转发路径。The second path splicing unit is used to generate the target forwarding path according to a preset second path splicing principle based on the updated forwarding path and the initial forwarding path in the blockchain network.

可选地,所述跨机房数据转发系统还包括:Optionally, the inter-computer room data forwarding system further includes:

内部哈希存储模块,用于获取所述区块链网络中各机房的机房内转发路径信息,并将所述机房内转发路径信息以哈希方式存储于所述区块链网络。The internal hash storage module is used to obtain the intra-computer room forwarding path information of each computer room in the blockchain network, and store the intra-computer room forwarding path information in the blockchain network in a hash manner.

可选地,所述跨机房数据转发系统还包括:Optionally, the inter-computer room data forwarding system further includes:

错误转发检测模块,用于在检测到所述区块链网络中发生错误路由数据转发时,从所述区块链网络的各机房中获取每一机房内部的实际数据转发信息;An error forwarding detection module is used to obtain actual data forwarding information inside each computer room of the blockchain network from each computer room of the blockchain network when an error routing data forwarding occurs in the blockchain network;

转发信息比对模块,用于将所述实际数据转发信息与所述机房内转发路径信息进行对比并得到比对结果,以基于所述比对结果排查错误转发原因。The forwarding information comparison module is used to compare the actual data forwarding information with the forwarding path information in the computer room and obtain a comparison result, so as to troubleshoot the cause of the incorrect forwarding based on the comparison result.

可选地,所述跨机房数据转发系统还包括:Optionally, the inter-computer room data forwarding system further includes:

智能合约部署模块,用于确定部署于不同机房的边缘节点,根据所述边缘节点构建区块链网络,部署转发路径相关的智能合约;A smart contract deployment module is used to determine the edge nodes deployed in different computer rooms, build a blockchain network based on the edge nodes, and deploy smart contracts related to the forwarding path;

邻接关系建立模块,用于获取初始配置信息,根据所述初始配置信息建立所述边缘节点之间的物理邻接关系,并基于所述物理邻接关系确定所述区块链网络的初始转发路径。The adjacency relationship establishment module is used to obtain initial configuration information, establish physical adjacency relationships between the edge nodes according to the initial configuration information, and determine the initial forwarding path of the blockchain network based on the physical adjacency relationships.

本发明还提供一种跨机房数据转发设备。The invention also provides a cross-machine room data forwarding device.

所述跨机房数据转发设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的跨机房数据转发程序,其中所述跨机房数据转发程序被所述处理器执行时,实现如上所述的跨机房数据转发方法的步骤。The cross-computer room data forwarding device includes a processor, a memory, and a cross-computer room data forwarding program stored in the memory and executable on the processor, wherein when the cross-computer room data forwarding program is executed by the processor, the steps of the cross-computer room data forwarding method described above are implemented.

其中,所述跨机房数据转发程序被执行时所实现的方法可参照本发明跨机房数据转发方法的各个实施例,此处不再赘述。Among them, the method implemented when the cross-computer room data forwarding program is executed can refer to the various embodiments of the cross-computer room data forwarding method of the present invention, and will not be repeated here.

本发明还提供一种计算机可读存储介质。The present invention also provides a computer-readable storage medium.

本发明计算机可读存储介质上存储有跨机房数据转发程序,所述跨机房数据转发程序被处理器执行时实现如上所述的跨机房数据转发方法的步骤。The computer-readable storage medium of the present invention stores an inter-computer room data forwarding program, and when the inter-computer room data forwarding program is executed by a processor, the steps of the inter-computer room data forwarding method described above are implemented.

其中,所述跨机房数据转发程序被执行时所实现的方法可参照本发明跨机房数据转发方法各个实施例,此处不再赘述。Among them, the method implemented when the cross-computer room data forwarding program is executed can refer to the various embodiments of the cross-computer room data forwarding method of the present invention, and will not be repeated here.

本发明还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述的跨机房数据转发方法的步骤。The present invention also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the steps of the above-mentioned method for forwarding data across computer rooms are implemented.

其中,所述计算机程序被执行时所实现的方法可参照本发明跨机房数据转发方法各个实施例,此处不再赘述。Among them, the method implemented when the computer program is executed can refer to the various embodiments of the cross-computer room data forwarding method of the present invention, and will not be repeated here.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims (9)

1. A cross-machine room data forwarding method is characterized by comprising the following steps:
monitoring routing strategy change information crossing machine rooms from a block chain network formed by edge nodes deployed in different machine rooms, wherein a deployed path in the block chain network forwards a related intelligent contract;
determining that the routing strategy change information corresponds to a destination edge node in the block chain network, and broadcasting the routing strategy change information to an adjacent edge node of the destination edge node in the block chain network according to the intelligent contract;
performing consensus verification on the routing policy change information according to the adjacent edge node and the intelligent contract so as to determine a target forwarding path after the routing policy change when the routing policy change information passes the consensus verification;
synchronizing the target forwarding path to a path edge node forming the target forwarding path in the block chain network, so that the path edge node performs data forwarding according to the target forwarding path;
the routing policy change information includes routing addition information, and the step of determining that the routing policy change information corresponds to a destination edge node in the blockchain network and broadcasting the routing policy change information to an adjacent edge node of the destination edge node in the blockchain network according to the intelligent contract includes:
determining a newly-added destination edge node and a source edge node corresponding to the newly-added destination edge node in the block chain network from the route newly-added information, and generating a storage object of the newly-added destination edge node based on the newly-added destination edge node and the source edge node so as to store the storage object in the intelligent contract;
and determining a first adjacent edge node adjacent to the new destination edge node from the block chain network, and broadcasting the new destination edge node to the first adjacent edge node.
2. The cross-computer room data forwarding method according to claim 1, wherein the step of performing consensus verification on the routing policy change information according to the adjacent edge node and the intelligent contract to determine a target forwarding path after the routing policy change when the routing policy change information passes the consensus verification comprises:
obtaining a test result of the connectivity test of the first adjacent edge node on the newly-added target edge node, and obtaining a quality evaluation average value corresponding to the newly-added target edge node by combining the test result and a newly-added consensus algorithm in the intelligent contract;
judging whether the quality evaluation mean value is not less than a preset grading threshold value or not;
if so, generating a new forwarding path consisting of the new destination edge node and the first adjacent edge node, and storing the new forwarding path in the block chain network;
and generating the target forwarding path according to a preset first path splicing principle based on the newly-added forwarding path and the initial forwarding path in the block chain network.
3. The cross-machine room data forwarding method of claim 1, wherein the routing policy change information comprises routing update information,
the step of determining that the routing policy change information corresponds to a destination edge node in the blockchain network, and broadcasting the routing policy change information to an adjacent edge node of the destination edge node in the blockchain network according to the intelligent contract includes:
determining historical destination edge nodes and candidate destination edge nodes deployed in the same machine room in the blockchain network from the routing update information;
determining a second adjacent edge node adjacent to the candidate destination edge node in the blockchain network, and broadcasting the historical destination edge node and the candidate destination edge node to the second adjacent edge node.
4. The cross-computer room data forwarding method according to claim 3, wherein the step of performing consensus verification on the routing policy change information according to the adjacent edge node and the intelligent contract to determine a target forwarding path after the routing policy change when the routing policy change information passes the consensus verification comprises:
obtaining a historical link evaluation index obtained by the second adjacent edge node performing link quality evaluation on the historical target edge node, and obtaining a candidate link evaluation index obtained by performing link quality evaluation on the candidate target edge node;
judging whether the candidate target edge node is effective or not by combining the historical link evaluation index, the candidate link evaluation index and an updating consensus algorithm in the intelligent contract;
if so, generating an updated forwarding path consisting of the candidate destination edge node and the second adjacent edge node, and storing the updated forwarding path in the block chain network;
and generating the target forwarding path according to a preset second path splicing principle based on the updated forwarding path and the initial forwarding path in the block chain network.
5. The cross-room data forwarding method of claim 1, wherein before the step of monitoring the routing policy change information across rooms from the blockchain network formed by edge nodes deployed in different rooms, the method further comprises:
and acquiring the in-machine room forwarding path information of each machine room in the block chain network, and storing the in-machine room forwarding path information in the block chain network in a Hash mode.
6. The cross-room data forwarding method of claim 5, wherein after the step of obtaining the in-room forwarding path information of each room in the blockchain network and storing the in-room forwarding path information in the blockchain network in a hash manner, the method further comprises:
when the situation that error routing data forwarding occurs in the block chain network is detected, actual data forwarding information inside each machine room is obtained from each machine room of the block chain network;
and comparing the actual data forwarding information with the forwarding path information in the machine room to obtain a comparison result, and checking the error forwarding reason based on the comparison result.
7. The cross-room data forwarding method of any one of claims 1-6, wherein before the step of monitoring the routing policy change information across rooms from the blockchain network formed by edge nodes deployed in different rooms, the method further comprises:
determining edge nodes deployed in different machine rooms, constructing a block chain network according to the edge nodes, and deploying intelligent contracts related to forwarding paths;
acquiring initial configuration information, establishing a physical adjacency relation between the edge nodes according to the initial configuration information, and determining an initial forwarding path of the block chain network based on the physical adjacency relation.
8. A cross-machine-room data forwarding device is characterized by comprising: a memory, a processor and a cross-room data forwarding program stored on the memory and executable on the processor, the cross-room data forwarding program when executed by the processor implementing the steps of the cross-room data forwarding method according to any one of claims 1 to 7.
9. A computer-readable storage medium, on which a cross-room data forwarding program is stored, which when executed by a processor implements the steps of the cross-room data forwarding method according to any one of claims 1 to 7.
CN202111029419.6A 2021-09-02 2021-09-02 Cross-machine-room data forwarding method, equipment and computer program product Active CN113872857B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111029419.6A CN113872857B (en) 2021-09-02 2021-09-02 Cross-machine-room data forwarding method, equipment and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111029419.6A CN113872857B (en) 2021-09-02 2021-09-02 Cross-machine-room data forwarding method, equipment and computer program product

Publications (2)

Publication Number Publication Date
CN113872857A CN113872857A (en) 2021-12-31
CN113872857B true CN113872857B (en) 2023-04-07

Family

ID=78989482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111029419.6A Active CN113872857B (en) 2021-09-02 2021-09-02 Cross-machine-room data forwarding method, equipment and computer program product

Country Status (1)

Country Link
CN (1) CN113872857B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114827002B (en) * 2022-03-17 2023-04-07 西安电子科技大学 Multi-domain network security path calculation method, system, device, medium and terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112104617A (en) * 2020-08-27 2020-12-18 中国平安财产保险股份有限公司 Authority management method, device, equipment and storage medium of microservice
CN112788555A (en) * 2019-11-05 2021-05-11 中国移动通信集团浙江有限公司 Cross-operator telephone charge transfer settlement method, device and computing equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200186458A1 (en) * 2018-12-06 2020-06-11 T-Mobile Usa, Inc. Autonomous system route validation via blockchain
CN111385246B (en) * 2018-12-28 2021-09-21 华为技术有限公司 A security route identification method and device
CN110138596A (en) * 2019-04-13 2019-08-16 山东公链信息科技有限公司 A kind of block chain common recognition method based on handover network topology mode
CN110855565B (en) * 2019-11-22 2021-07-20 广州大学 A verifiable inter-domain routing verification method based on blockchain
CN113162889B (en) * 2020-01-22 2023-02-17 北京车和家信息技术有限公司 Authentication method and device for route updating information
CN111711567B (en) * 2020-06-12 2022-01-07 杭州溪塔科技有限公司 Block chain-based network message transmission method and device and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788555A (en) * 2019-11-05 2021-05-11 中国移动通信集团浙江有限公司 Cross-operator telephone charge transfer settlement method, device and computing equipment
CN112104617A (en) * 2020-08-27 2020-12-18 中国平安财产保险股份有限公司 Authority management method, device, equipment and storage medium of microservice

Also Published As

Publication number Publication date
CN113872857A (en) 2021-12-31

Similar Documents

Publication Publication Date Title
US10674486B2 (en) System, security and network management using self-organizing communication orbits in distributed networks
US11153148B2 (en) Resource state monitoring method, device and communication network
CN108270669B (en) Service recovery device, main controller, system and method of SDN network
JP4018638B2 (en) Method for providing topology awareness information in an IP network
EP2434688B1 (en) Method and system for analyzing alarm root cause
WO2022083540A1 (en) Method, apparatus, and system for determining fault recovery plan, and computer storage medium
CN102546427B (en) OSPF (Open Shortest Path First) protocol-based graceful restart (GR) method and router
US20150009808A1 (en) Fault-resilient broadcast, multicast, and unicast services
CN101547125B (en) A system and method for network anomaly location in an autonomous system
JP2011091464A (en) Apparatus and system for estimating network configuration
US20120300783A1 (en) Method and system for updating network topology in multi-protocol label switching system
CN110708245A (en) SDN data plane fault monitoring and recovery method under multi-controller architecture
WO2020119625A1 (en) Optical fiber cut-over method and apparatus, and sdn controller, system and storage medium
WO2021018309A1 (en) Method, device and system for determination of message transmission path, and computer storage medium
CN113872857B (en) Cross-machine-room data forwarding method, equipment and computer program product
US20140059154A1 (en) Leader Node Appointment
WO2020010906A1 (en) Method and device for operating system (os) batch installation, and network device
WO2011144111A2 (en) Synchronization detection method for link state database, and routing device
WO2017054471A1 (en) Method of electing designated router and device utilizing same
WO2016082368A1 (en) Data consistency maintaining method, device and ptn transmission apparatus
López et al. Kdet: Coordinated detection of forwarding faults in wireless community networks
JP5545285B2 (en) Network device, network system, multiple spanning tree protocol management method and program
CN116599876A (en) Method, system, computer and storage medium for testing consistency of network layer protocol
JP4906764B2 (en) Route loop detection apparatus, route loop detection method, and computer program
KR20040102029A (en) A method for providing topology awareness information within an ip network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant