WO2023071235A1 - Resource verification method, apparatus, and device, and storage medium - Google Patents

Resource verification method, apparatus, and device, and storage medium Download PDF

Info

Publication number
WO2023071235A1
WO2023071235A1 PCT/CN2022/100033 CN2022100033W WO2023071235A1 WO 2023071235 A1 WO2023071235 A1 WO 2023071235A1 CN 2022100033 W CN2022100033 W CN 2022100033W WO 2023071235 A1 WO2023071235 A1 WO 2023071235A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
target
edge node
check value
abnormal
Prior art date
Application number
PCT/CN2022/100033
Other languages
French (fr)
Chinese (zh)
Inventor
崔红磊
申小静
张�林
Original Assignee
上海哔哩哔哩科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海哔哩哔哩科技有限公司 filed Critical 上海哔哩哔哩科技有限公司
Publication of WO2023071235A1 publication Critical patent/WO2023071235A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Automation & Control Theory (AREA)
  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

A resource verification method, apparatus, and device, and a storage medium, the method comprising: determining multiple edge nodes storing the same target resource and using said nodes as target edge nodes (S101); respectively acquiring verification information of the target resource stored in each target edge node (S102); identifying abnormal verification information by means of comparing the verification information of each target edge node (S103); and determining the target resource stored in the target edge node corresponding to the abnormal verification information as an abnormal resource (S104). Therefore, in the described method, it can be verified whether the resources in an edge node are abnormal or not.

Description

一种资源校验方法、装置、设备及存储介质Resource verification method, device, equipment and storage medium
本申请要求于2021年10月28日提交中国国家知识产权局、申请号为202111262867.0、发明名称为“一种资源校验方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the State Intellectual Property Office of China on October 28, 2021, with the application number 202111262867.0, and the title of the invention is "a resource verification method, device, equipment and storage medium", all of which The contents are incorporated by reference in this application.
技术领域technical field
本申请实施例涉及网络技术领域,特别是涉及一种资源校验方法、装置、设备及存储介质。The embodiments of the present application relate to the field of network technologies, and in particular, to a resource verification method, device, device, and storage medium.
背景技术Background technique
在一些网络中,例如CDN(Content Delivery Network,内容分发网络),或者PCDN(P2P CDN,P2P:Peer-to-Peer,或者Point to Point,点对点,CDN:Content Delivery Network,内容分发网络)等等,通常包括云中心和计算节点。靠近用户侧的计算节点可以称为边缘节点,边缘节点可以理解为在靠近用户的网络边缘侧构建的业务平台,其可以提供存储、计算、网络等各种资源。In some networks, such as CDN (Content Delivery Network, content distribution network), or PCDN (P2P CDN, P2P: Peer-to-Peer, or Point to Point, point-to-point, CDN: Content Delivery Network, content distribution network) and so on , usually including cloud centers and computing nodes. The computing nodes close to the user side can be called edge nodes. The edge node can be understood as a service platform built on the edge side of the network close to the user, which can provide various resources such as storage, computing, and network.
边缘节点中通常存储有各种资源,例如视频、音频、图片、文字等等,但由于各种因素的影响,例如恶意攻击、硬件损坏等,可能会导致边缘节点中存储的资源异常。目前,需要提供一种校验边缘节点中的资源是否异常的方案。Edge nodes usually store various resources, such as video, audio, pictures, text, etc., but due to various factors, such as malicious attacks, hardware damage, etc., the resources stored in edge nodes may be abnormal. At present, it is necessary to provide a solution for checking whether resources in edge nodes are abnormal.
发明内容Contents of the invention
本申请实施例的目的在于提供一种资源校验方法、装置、设备及存储介质,以校验边缘节点中的资源是否异常。The purpose of the embodiment of the present application is to provide a resource verification method, device, device and storage medium, so as to verify whether the resource in the edge node is abnormal.
为达到上述目的,本申请实施例提供了一种资源校验方法,应用于电子设备,包括:In order to achieve the above purpose, the embodiment of the present application provides a resource verification method applied to electronic equipment, including:
确定存储有同一目标资源的多个边缘节点,作为目标边缘节点;Determining multiple edge nodes storing the same target resource as target edge nodes;
分别获取每个目标边缘节点所存储目标资源的校验信息;Obtain the verification information of the target resources stored in each target edge node respectively;
通过对比每个目标边缘节点的所述校验信息,识别异常校验信息;identifying abnormal verification information by comparing the verification information of each target edge node;
将所述异常校验信息对应的目标边缘节点中存储的目标资源确定为 异常资源。Determining the target resource stored in the target edge node corresponding to the abnormal check information as an abnormal resource.
为达到上述目的,本申请实施例还提供了一种资源校验装置,应用于电子设备,包括:In order to achieve the above purpose, the embodiment of the present application also provides a resource verification device, which is applied to electronic equipment, including:
第一确定模块,用于确定存储有同一目标资源的多个边缘节点,作为目标边缘节点;The first determining module is configured to determine multiple edge nodes storing the same target resource as target edge nodes;
获取模块,用于分别获取每个目标边缘节点所存储目标资源的校验信息;An acquisition module, configured to acquire verification information of target resources stored in each target edge node;
识别模块,用于通过对比每个目标边缘节点的所述校验信息,识别异常校验信息;An identification module, configured to identify abnormal verification information by comparing the verification information of each target edge node;
第二确定模块,用于将所述异常校验信息对应的目标边缘节点中存储的目标资源确定为异常资源。The second determining module is configured to determine the target resource stored in the target edge node corresponding to the abnormality verification information as an abnormal resource.
为达到上述目的,本申请实施例还提供了一种电子设备,包括处理器和存储器,其中:To achieve the above purpose, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein:
存储器,用于存放计算机程序;memory for storing computer programs;
处理器,用于执行存储器上所存放的程序时,实现上述任意一种资源校验方法。The processor is used to implement any one of the above resource verification methods when executing the program stored in the memory.
为达到上述目的,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一种资源校验方法。In order to achieve the above purpose, the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any one of the above-mentioned resource checks can be realized. method.
应用本申请所示实施例,确定存储有同一目标资源的多个边缘节点,作为目标边缘节点;分别获取每个目标边缘节点所存储目标资源的校验信息;通过对比每个目标边缘节点的校验信息,识别异常校验信息;将异常校验信息对应的目标边缘节点中存储的目标资源确定为异常资源。可见,本申请所示实施例能够校验边缘节点中的资源是否异常。Apply the embodiment shown in this application to determine multiple edge nodes that store the same target resource as the target edge node; respectively obtain the verification information of the target resource stored in each target edge node; compare the verification information of each target edge node Verify information, identify abnormal verification information; determine the target resource stored in the target edge node corresponding to the abnormal verification information as an abnormal resource. It can be seen that the embodiment shown in this application can check whether the resource in the edge node is abnormal.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本申请实施例提供的一种资源校验方法的流程示意图;FIG. 1 is a schematic flow diagram of a resource verification method provided in an embodiment of the present application;
图2a为本申请实施例提供的一种应用于客户端的资源校验方法的流程示意图;FIG. 2a is a schematic flowchart of a resource verification method applied to a client provided in an embodiment of the present application;
图2b为本申请实施例提供的一种资源校验方法交互信令示意图;FIG. 2b is a schematic diagram of interactive signaling of a resource verification method provided by an embodiment of the present application;
图3a为本申请实施例提供的一种应用于第一边缘节点的资源校验方法的流程示意图;FIG. 3a is a schematic flowchart of a resource verification method applied to a first edge node provided by an embodiment of the present application;
图3b为本申请实施例提供的另一种资源校验方法交互信令示意图;FIG. 3b is a schematic diagram of interactive signaling of another resource verification method provided by the embodiment of the present application;
图4为本申请实施例提供的一种资源校验装置的结构示意图;FIG. 4 is a schematic structural diagram of a resource verification device provided in an embodiment of the present application;
图5为本申请实施例提供的一种电子设备的结构示意图。FIG. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员基于本申请所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art based on this application belong to the scope of protection of this application.
为了达到上述目的,本申请实施例提供了一种资源校验方法、装置、设备及存储介质。该方法及装置可以应用于各种电子设备,例如后续内容中提到的客户端或者边缘节点。客户端可以为手机、平板电脑、PC(Personal Computer,个人计算机)等硬件设备,或者也可以为应用软件,客户端的具体类型不做限定。网络中(例如CDN或者PCDN)通常包括多个边缘节点,为了区分描述,将应用本申请实施例提供的方法及装置的边缘节点(执行主体)称为第一边缘节点,第一边缘节点可以为网络中任意边缘节点。In order to achieve the above object, the embodiments of the present application provide a resource verification method, device, device and storage medium. The method and apparatus can be applied to various electronic devices, such as clients or edge nodes mentioned in the following content. The client can be a hardware device such as a mobile phone, a tablet computer, or a PC (Personal Computer, personal computer), or it can also be an application software, and the specific type of the client is not limited. A network (such as CDN or PCDN) usually includes multiple edge nodes. In order to distinguish the description, the edge node (executor) that applies the method and device provided by the embodiment of the present application is called the first edge node. The first edge node can be Any edge node in the network.
边缘节点可以理解为:在靠近用户的网络边缘侧构建的业务平台,其可以提供存储、计算、网络等资源。将部分关键业务应用下沉到接入网络边缘,可以减少网络传输和多级转发带来的带宽和时延损耗。边缘节点的位置介于用户和云中心之间,相比于传统的云中心,边缘节点更接近用户(数据源)。边缘节点相比于云中心,具有小型化、分布式和更贴近用户的特性,海量的数据无需再上传至云中心进行处理,实现在网络边缘侧对数据的处理,可以减少请求响应时间、提升电池续航能力、减少网络带宽、并且提高数据的安全性和私密性。An edge node can be understood as a service platform built on the edge of the network close to users, which can provide storage, computing, network and other resources. Sinking some key business applications to the edge of the access network can reduce the bandwidth and delay loss caused by network transmission and multi-level forwarding. The position of the edge node is between the user and the cloud center. Compared with the traditional cloud center, the edge node is closer to the user (data source). Compared with the cloud center, the edge node has the characteristics of miniaturization, distribution, and closer to the user. Massive data does not need to be uploaded to the cloud center for processing, and the processing of data at the edge of the network can reduce request response time and improve battery life, reduce network bandwidth, and improve data security and privacy.
下面首先对该资源校验方法进行详细介绍。以下方法实施例中的各个步骤按照合乎逻辑的顺序执行即可,步骤标号或者对各步骤进行介绍的先后顺序,并不对各步骤的执行顺序构成限定。The method for verifying the resource will first be described in detail below. The steps in the following method embodiments may be executed in a logical order, and the step numbers or the order in which the steps are introduced do not limit the execution order of the steps.
图1为本申请实施例提供的一种资源校验方法的流程示意图,包括:Fig. 1 is a schematic flow diagram of a resource verification method provided in the embodiment of the present application, including:
S101:确定存储有同一目标资源的多个边缘节点,作为目标边缘节点。S101: Determine multiple edge nodes storing the same target resource as target edge nodes.
为了方便描述,本申请实施例中将需要校验的资源称为目标资源,该目标资源可以为视频、音频、图片、文字等等,目标资源的具体类型不做限定。网络中(例如CDN或者PCDN)通常包括多个边缘节点,为了区分描述,S101中将确定出的存储有同一目标资源的边缘节点称为目标边缘节点。For the convenience of description, in the embodiment of the present application, the resources that need to be verified are called target resources. The target resources can be video, audio, pictures, text, etc., and the specific types of target resources are not limited. A network (for example, CDN or PCDN) usually includes multiple edge nodes. In order to differentiate descriptions, the determined edge node storing the same target resource in S101 is called a target edge node.
举例来说,这里所说的同一目标资源可以理解为具有同一资源标识的资源,该资源标识可以为资源ID(Identity Document,标识号),或者如果该资源为电影,则资源标识可以为电影名称,如果该资源为电视剧,则资源标识可以为电视剧名称,等等,资源标识的具体类型不做限定。以目标资源为电影X为例来说,假设边缘节点A0、A1和A2存储了该部电影的一部分,边缘节点A3、A4和A5存储了该部电影的整体资源,这种情况下,也可以认为边缘节点A0、A1、A2、A3、A4和A5都存储有同一目标资源即电影X。For example, the same target resource mentioned here can be understood as a resource with the same resource identifier, and the resource identifier can be a resource ID (Identity Document, identification number), or if the resource is a movie, the resource identifier can be a movie name , if the resource is a TV series, the resource identifier may be the name of the TV series, etc., and the specific type of the resource identifier is not limited. Taking the target resource as movie X as an example, assuming that edge nodes A0, A1 and A2 store a part of the movie, and edge nodes A3, A4 and A5 store the entire resource of the movie, in this case, you can also It is considered that the edge nodes A0, A1, A2, A3, A4 and A5 all store the same target resource, namely movie X.
本申请的一种实施方式中,本方案的执行主体为客户端,S101可以包括:向服务器发送资源标识;根据服务器的反馈结果,确定存储有所述资源标识对应的目标资源的多个边缘节点,作为目标边缘节点。In one implementation of the present application, the executive subject of this solution is the client, and S101 may include: sending the resource identifier to the server; and determining multiple edge nodes that store the target resource corresponding to the resource identifier according to the feedback result from the server , as the target edge node.
本实施方式中,由客户端发起资源校验。例如,客户端可以在需要播放某一资源的情况下,发起资源校验,这种情况可以称为播放驱动校验。后续再对播放驱动校验的情况进行详细说明。或者,客户端也可以在其他情况下发起资源校验,发起资源校验的具体时机不做限定。In this embodiment, the resource verification is initiated by the client. For example, the client may initiate a resource verification when a certain resource needs to be played, and this situation may be called playback driver verification. The situation of playback driver verification will be described in detail later. Alternatively, the client may also initiate resource verification in other situations, and the specific timing for initiating resource verification is not limited.
服务器中可以存储有资源标识与边缘节点之间的对应关系,例如,服务器中存储了电影X与边缘节点A0、A1、A2、A3、A4和A5之间的对应关系,这表示边缘节点A0、A1、A2、A3、A4和A5都存储了电影X。客户端向服务器发送“电影X”的资源标识,服务器将边缘节点A0、A1、A2、A3、A4和A5的节点标识反馈给客户端,客户端将边缘节点A0、A1、A2、A3、A4和A5确定为目标边缘节点。The correspondence between resource identifiers and edge nodes may be stored in the server. For example, the correspondence between movie X and edge nodes A0, A1, A2, A3, A4, and A5 is stored in the server, which means that edge nodes A0, A1, A2, A3, A4 and A5 all store movie X. The client sends the resource identifier of "Movie X" to the server, the server feeds back the node identifiers of edge nodes A0, A1, A2, A3, A4 and A5 to the client, and the client sends the edge nodes A0, A1, A2, A3, A4 and A5 are determined as target edge nodes.
一种实施方式中,客户端可以根据服务器的反馈结果,确定网关类型满足预设类型条件、并且存储有所述资源标识对应的目标资源的多个边缘节点,作为目标边缘节点。In one embodiment, the client may determine, according to the feedback result from the server, a plurality of edge nodes whose gateway type satisfies the preset type condition and stores the target resource corresponding to the resource identifier as the target edge node.
举例来说,一些网关类型的网络中,客户端较容易与边缘节点建立连接,而另一些网关类型的网络中,客户端较难与边缘节点建立连接,建立连接(以下简称建连)的难易程度与客户端和边缘节点两端的网关类型都有关。以NAT(Network Address Translation,网络地址转换)类型为例来说,如果一端为对称型,另一端为与非公网类型,则建连程度难度较大。For example, in some gateway-type networks, it is easier for clients to establish connections with edge nodes, while in other gateway-type networks, it is more difficult for clients to establish connections with edge nodes. The degree of ease is related to the type of gateways at both ends of the client and the edge node. Taking the NAT (Network Address Translation) type as an example, if one end is symmetric and the other end is connected to a non-public network, it will be more difficult to establish a connection.
例如,如果客户端的网关类型为端口限制型,则与其建连的边缘节点的网关类型按照由易到难排序可以为:公网,全锥型,IP(Internet Protocol,网际互连协议)限制型,端口限制型。上述预设类型条件可以为按照此排序设定的优先级选择条件,例如,如果存在公网型的边缘节点,则优先选择公网型的边缘节点,如果不存在,再选择全锥型,以此类推。For example, if the gateway type of the client is port-restricted, the gateway types of the edge nodes that establish a connection with it can be ranked from easy to difficult: public network, full cone, and IP (Internet Protocol, Internet Interconnection Protocol) restricted , port-restricted type. The above preset type condition can be a priority selection condition set according to this order. For example, if there is an edge node of the public network type, the edge node of the public network type is preferred, and if it does not exist, the full cone type is selected, so that And so on.
应用本实施方式,优先选择容易建连的网关类型的边缘节点,可以减少建连过程耗费的资源,提高建连成功率。By applying this embodiment, preferentially selecting edge nodes of the gateway type that are easy to establish a connection can reduce the resources consumed in the connection establishment process and improve the success rate of the connection establishment.
客户端确定出目标边缘节点后,分别与每个目标边缘节点建立连接。举例来说,这里的建立连接可以为打洞建连,例如可以采用TCP(Transmission Control Protocol,传输控制协议)打洞技术,或者也可以采用UDP(User Datagram Protocol,用户数据报协议)打洞技术,具体的打洞建连过程不做限定。After the client determines the target edge node, it establishes a connection with each target edge node respectively. For example, the establishment of a connection here can be a hole punching connection, for example, TCP (Transmission Control Protocol, Transmission Control Protocol) hole punching technology can be used, or UDP (User Datagram Protocol, User Datagram Protocol) hole punching technology can also be used , the specific process of hole punching and connection establishment is not limited.
本申请的另一种实施方式中,本方案的执行主体为第一边缘节点,S101可以包括:向服务器发送资源标识;根据服务器的反馈结果,确定存储有所述资源标识对应的目标资源的多个边缘节点,作为目标边缘节点。In another embodiment of the present application, the executive subject of this solution is the first edge node, and S101 may include: sending the resource identifier to the server; edge nodes as target edge nodes.
本实施方式中,由第一边缘节点发起资源校验。例如,第一边缘节点可以在上行带宽低峰时轮询校验自身拥有的每份资源。或者,第一边缘节点也可以在其他情况下发起资源校验,发起资源校验的具体时机不做限定。In this embodiment, the resource check is initiated by the first edge node. For example, the first edge node may poll and check each resource it owns when the uplink bandwidth is low. Alternatively, the first edge node may also initiate resource verification in other situations, and the specific timing for initiating resource verification is not limited.
一种实施方式中,第一边缘节点可以在自身上行带宽满足预设低峰条件的情况下,向服务器发送所述第一边缘节点中存储的目标资源的资源标识。例如,该预设低峰条件可以为满足相应的时段要求,例如深夜12点至3点时段等等,具体的时段可以根据实际情况设定。或者,该预设低峰 条件也可以为上行带宽大于预设阈值,具体的低峰条件不做限定。In one implementation manner, the first edge node may send the resource identifier of the target resource stored in the first edge node to the server when its own uplink bandwidth meets a preset low-peak condition. For example, the preset low-peak condition can meet the corresponding time period requirements, such as the time period from 12 o'clock to 3 o'clock in the middle of the night, etc., and the specific time period can be set according to the actual situation. Alternatively, the preset low-peak condition may also be that the uplink bandwidth is greater than a preset threshold, and the specific low-peak condition is not limited.
服务器中可以存储有资源标识与边缘节点之间的对应关系,例如,服务器中存储了电影X与边缘节点A0、A1、A2、A3、A4和A5之间的对应关系,这表示边缘节点A0、A1、A2、A3、A4和A5都存储了电影X。假设第一边缘节点为边缘节点A1,边缘节点A1向服务器发送“电影X”的资源标识,服务器可以将边缘节点A0、A1、A2、A3、A4和A5的节点标识反馈给边缘节点A1,或者将边缘节点A0、A2、A3、A4和A5的节点标识反馈给边缘节点A1,边缘节点A1将边缘节点A0、A2、A3、A4和A5确定为目标边缘节点。The correspondence between resource identifiers and edge nodes may be stored in the server. For example, the correspondence between movie X and edge nodes A0, A1, A2, A3, A4, and A5 is stored in the server, which means that edge nodes A0, A1, A2, A3, A4 and A5 all store movie X. Suppose the first edge node is edge node A1, and edge node A1 sends the resource identifier of "Movie X" to the server, and the server can feed back the node identifiers of edge nodes A0, A1, A2, A3, A4, and A5 to edge node A1, or The node identifiers of the edge nodes A0, A2, A3, A4 and A5 are fed back to the edge node A1, and the edge node A1 determines the edge nodes A0, A2, A3, A4 and A5 as target edge nodes.
一种实施方式中,第一边缘节点可以根据服务器的反馈结果,确定网关类型满足预设类型条件、并且存储有所述资源标识对应的目标资源的多个边缘节点,作为目标边缘节点。In one embodiment, the first edge node may determine, according to the feedback result of the server, a plurality of edge nodes whose gateway type satisfies the preset type condition and stores the target resource corresponding to the resource identifier as the target edge node.
举例来说,一些网关类型的网络中,客户端较容易与边缘节点建立连接,而另一些网关类型的网络中,客户端较难与边缘节点建立连接,建立连接(以下简称建连)的难易程度与客户端和边缘节点两端的网关类型都有关。以NAT类型为例来说,如果一端为对称型,另一端为与非公网类型,则建连程度难度较大。For example, in some gateway-type networks, it is easier for clients to establish connections with edge nodes, while in other gateway-type networks, it is more difficult for clients to establish connections with edge nodes. The degree of ease is related to the type of gateways at both ends of the client and the edge node. Taking the NAT type as an example, if one end is symmetric and the other end is connected to a non-public network, it will be more difficult to establish a connection.
例如,如果客户端的网关类型为端口限制型,则与其建连的边缘节点的网关类型按照由易到难排序可以为:公网,全锥型,IP限制型,端口限制型。上述预设类型条件可以为按照此排序设定的优先级选择条件,例如,如果存在公网型的边缘节点,则优先选择公网型的边缘节点,如果不存在,再选择全锥型,以此类推。For example, if the gateway type of the client is port-restricted, then the gateway types of the edge nodes to establish a connection with it can be ranked from easy to difficult: public network, full cone, IP-restricted, and port-restricted. The above preset type condition can be a priority selection condition set according to this order. For example, if there is an edge node of the public network type, the edge node of the public network type is preferred, and if it does not exist, the full cone type is selected, so that And so on.
应用本实施方式,优先选择容易建连的网关类型的边缘节点,可以减少建连过程耗费的资源,提高建连成功率。By applying this embodiment, preferentially selecting edge nodes of the gateway type that are easy to establish a connection can reduce the resources consumed in the connection establishment process and improve the success rate of the connection establishment.
第一边缘节点定出目标边缘节点后,分别与每个目标边缘节点建立连接。举例来说,这里的建立连接可以为打洞建连,例如可以采用TCP打洞技术,或者也可以采用UDP打洞技术,具体的打洞建连过程不做限定。After determining the target edge node, the first edge node establishes a connection with each target edge node respectively. For example, the establishment of the connection here may be hole punching, for example, the TCP hole punching technology may be used, or the UDP hole punching technology may be used, and the specific hole punching connection establishment process is not limited.
S102:分别获取每个目标边缘节点所存储目标资源的校验信息。S102: Obtain verification information of target resources stored in each target edge node respectively.
下面介绍客户端播放驱动校验的实施方式,客户端可以在接收到针对目标资源的播放指令后,向服务器发送所述目标资源的资源标识。这种实施方式中,S102可以包括:客户端分别向每个目标边缘节点发送针对所述 目标资源的订阅请求;分别接收所述每个目标边缘节点发送的目标资源及其校验信息。The following describes an implementation manner of client playback driver verification. After receiving a playback instruction for a target resource, the client may send the resource identifier of the target resource to the server. In this embodiment, S102 may include: the client sends a subscription request for the target resource to each target edge node; respectively receives the target resource and its verification information sent by each target edge node.
仍以电影X为例来说,假设用户需要在客户端播放电影X,用户向客户端发送播放电影X的播放指令,客户端向服务器发送“电影X”的资源标识,服务器将边缘节点A0、A1、A2、A3、A4和A5的节点标识反馈给客户端,客户端将边缘节点A0、A1、A2、A3、A4和A5确定为目标边缘节点。客户端分别向边缘节点A0、A1、A2、A3、A4和A5发送针对“电影X”的订阅请求。边缘节点A0、A1、A2、A3、A4和A5基于该订阅请求向客户端发送“电影X”的资源和“电影X”的校验信息。Still taking movie X as an example, assuming that the user needs to play movie X on the client, the user sends a play instruction to play movie X to the client, the client sends the resource identifier of "movie X" to the server, and the server sends edge nodes A0, The node identifiers of A1, A2, A3, A4, and A5 are fed back to the client, and the client determines the edge nodes A0, A1, A2, A3, A4, and A5 as target edge nodes. The client sends subscription requests for "Movie X" to edge nodes A0, A1, A2, A3, A4, and A5 respectively. The edge nodes A0, A1, A2, A3, A4, and A5 send the resource of "movie X" and the verification information of "movie X" to the client based on the subscription request.
客户端可以在播放电影X之前,先基于该校验信息对“电影X”的资源进行校验,资源通过校验后再播放电影X,这样,可以减少资源异常导致的播放异常的情况。或者,客户端也可以在其他情况下进行资源校验,资源校验的具体时机不做限定。Before playing movie X, the client can first verify the resource of "movie X" based on the verification information, and then play movie X after the resource passes the verification. In this way, the abnormal playback caused by abnormal resources can be reduced. Alternatively, the client may also perform resource verification in other situations, and the specific timing of resource verification is not limited.
本申请的一种实施方式中,目标资源包括多个资源区块。举例来说,可以将资源切分成大小等分的区块(最后一块例外),例如每个等分的资源区块可以为1M或者2M等等,资源区块的具体大小不做限定。或者,也可以按照预设的切分规则将资源切分成大小不同的区块,具体的切分规则不做限定。In an implementation manner of the present application, the target resource includes multiple resource blocks. For example, the resource can be divided into equal-sized blocks (except the last block), for example, each equal-sized resource block can be 1M or 2M, etc., and the specific size of the resource block is not limited. Alternatively, the resource can also be divided into blocks of different sizes according to a preset division rule, and the specific division rule is not limited.
这样,如果多个边缘节点存储同一份资源,则这些边缘节点存储的该份资源的同一区块标识对应的各资源区块的大小是一致的,该份资源对应的总块数也是一致的,但这些边缘节点存储的该资源的块数可以不一致。举例来说,区块标识可以为目标资源包括的各资源区块的序号,例如,假设目标资源包括10个资源区块,则区块标识可以为0~9。具体的区块标识不做限定。In this way, if multiple edge nodes store the same resource, the size of each resource block corresponding to the same block identifier of the resource stored by these edge nodes is consistent, and the total number of blocks corresponding to the resource is also consistent. However, the number of blocks of the resource stored by these edge nodes may be inconsistent. For example, the block identifier may be the sequence number of each resource block included in the target resource. For example, assuming that the target resource includes 10 resource blocks, the block identifier may be 0-9. The specific block identifier is not limited.
这种实施方式中,客户端每次向边缘节点发送的订阅请求可以是针对单个资源区块的,这样,客户端向边缘节点发送的订阅请求中可以包括目标资源的资源标识和目标资源区块的区块标识。目标资源区块即为本次订阅请求针对的资源区块。一些情况下,客户端可以将单个资源区块分为几个区段分别向这些目标边缘节点发送订阅请求,以请求下载相应的区段。In this embodiment, each subscription request sent by the client to the edge node can be for a single resource block. In this way, the subscription request sent by the client to the edge node can include the resource identifier of the target resource and the target resource block block ID. The target resource block is the resource block targeted by this subscription request. In some cases, the client may divide a single resource block into several segments and send subscription requests to these target edge nodes respectively, so as to request to download the corresponding segments.
这种实施方式中,边缘节点反馈的校验信息可以包括:目标资源区块的第一校验值和目标资源的第二校验值,所述第二校验值为根据目标边缘 节点所存储目标资源包括的每个资源区块的第一校验值计算得到的。In this embodiment, the verification information fed back by the edge node may include: a first verification value of the target resource block and a second verification value of the target resource, and the second verification value is based on the information stored in the target edge node. It is obtained by calculating the first check value of each resource block included in the target resource.
本实施方式中,第一校验值为单个资源区块的校验值,第二校验值可以为目标边缘节点所存储的目标资源包括的每个资源区块的第一校验值叠加得到的。举例来说,第一校验值可以为利用摘要算法、或者校验算法、或者加密算法计算得到的。例如,第一校验值可以为利用MD(Message-Digest,信息摘要)5算法计算得到的单个资源区块的MD5值,第二校验值可以为多个资源区块的MD5值叠加得到的总MD5值。In this embodiment, the first check value is the check value of a single resource block, and the second check value can be obtained by superimposing the first check value of each resource block included in the target resource stored in the target edge node of. For example, the first check value may be calculated by using a digest algorithm, or a check algorithm, or an encryption algorithm. For example, the first check value may be the MD5 value of a single resource block calculated using the MD (Message-Digest, Information Digest)5 algorithm, and the second check value may be obtained by superimposing the MD5 values of multiple resource blocks Total MD5 value.
延续上述例子,假设边缘节点A0、A1和A2存储了电影X的一部分,边缘节点A3、A4和A5存储了电影X的整体资源,也认为边缘节点A0、A1、A2、A3、A4和A5都存储有同一目标资源即电影X。也就是说,一些情况下,即便边缘节点存储同一目标资源,但各边缘节点存储该目标资源的资源区块可以是不同的。这种情况下,边缘节点A0、A1和A2的第二校验值可以为电影X的部分资源区块(其各自存储的部分资源区块)的MD5值叠加得到的总MD5值,边缘节点A3、A4和A5的第二校验值为电影X的全部资源区块的MD5值叠加得到的总MD5值。Continuing the above example, assuming that edge nodes A0, A1, and A2 store a part of movie X, and edge nodes A3, A4, and A5 store the overall resources of movie X, it is also considered that edge nodes A0, A1, A2, A3, A4, and A5 are all The same target resource, movie X, is stored. That is to say, in some cases, even if the edge nodes store the same target resource, the resource blocks in which the target resource is stored by each edge node may be different. In this case, the second check value of edge nodes A0, A1, and A2 can be the total MD5 value obtained by superimposing the MD5 values of some resource blocks of movie X (part of the resource blocks stored in them), and edge node A3 The second check value of , A4 and A5 is the total MD5 value obtained by superimposing the MD5 values of all resource blocks of the movie X.
延续上述第一边缘节点作为执行主体的实施方式,这种实施方式中,如果目标资源包括多个资源区块;S102可以包括:分别向每个目标边缘节点发送所述目标资源的资源标识;分别接收所述每个目标边缘节点发送的目标资源的第二校验值和所述目标资源包括的各资源区块的区块标识,所述第二校验值为根据目标边缘节点所存储目标资源包括的每个资源区块的第一校验值计算得到的。Continuing the above-mentioned implementation of the first edge node as the execution subject, in this implementation, if the target resource includes multiple resource blocks; S102 may include: sending the resource identifier of the target resource to each target edge node respectively; Receive the second check value of the target resource sent by each target edge node and the block identification of each resource block included in the target resource, the second check value is based on the target resource stored in the target edge node It is obtained by calculating the first check value of each resource block included.
上述内容中已经介绍过资源区块、第一校验值和第二校验值,这里不再赘述。The resource block, the first check value, and the second check value have already been introduced in the above content, and will not be repeated here.
S103:通过对比每个目标边缘节点的校验信息,识别异常校验信息。S103: Identify abnormal verification information by comparing the verification information of each target edge node.
一般来说,各个目标边缘节点的校验信息中,大部分校验信息是一致的,小部分校验信息不一致,可以将该小部分不一致的校验信息识别为异常校验信息。Generally speaking, among the verification information of each target edge node, most of the verification information is consistent, and a small part of the verification information is inconsistent, and the small part of the inconsistent verification information can be identified as abnormal verification information.
延续上述客户端作为执行主体的一种实施方式,校验信息包括:目标资源区块的第一校验值和目标资源的第二校验值;这种实施方式中,S103可以包括:通过对比每个目标边缘节点发送的所述第一校验值和所述第二校验值,识别异常的第一校验值和/或第二校验值。Continuing the above-mentioned implementation of the client as the execution subject, the check information includes: the first check value of the target resource block and the second check value of the target resource; in this implementation, S103 may include: by comparing The first check value and the second check value sent by each target edge node identify an abnormal first check value and/or second check value.
一种实施方式中,校验信息还可以包括:所述目标资源包括的各资源区块的区块标识;这种实施方式中,S103可以包括:通过对比每个目标边缘节点发送的第一校验值,识别异常的第一校验值;确定所发送的各资源区块的区块标识相同的目标边缘节点,作为候选边缘节点;通过对比每个候选边缘节点发送的第二校验值,识别异常的第二校验值。In an implementation manner, the verification information may also include: block identifiers of resource blocks included in the target resource; in this implementation manner, S103 may include: comparing the first verification information sent by each target edge node check value, identifying the abnormal first check value; determine the target edge node with the same block identifier of each resource block sent as the candidate edge node; by comparing the second check value sent by each candidate edge node, A second check value that identifies anomalies.
延续上述例子,一些情况下,即便边缘节点存储同一目标资源,但各边缘节点存储该目标资源的资源区块可以是不同的。这种情况下,如果目标边缘节点存储目标资源的资源区块不同,则目标边缘节点的第二校验值不同,这种不同是正常的不同,不是由于资源异常导致的不同。Continuing the above example, in some cases, even if the edge nodes store the same target resource, the resource blocks in which each edge node stores the target resource may be different. In this case, if the resource block where the target edge node stores the target resource is different, the second check value of the target edge node is different, and this difference is a normal difference, not a difference caused by an abnormal resource.
本实施方式中,从第一校验值和第二校验值两方面进行校验,关于第二校验值,只针对存储相同资源区块的目标边缘节点(候选边缘节点)进行校验。以校验值为MD5值为例来说,本实施方式中,可以先对比单个资源区块(目标资源区块)的MD5值(第一校验值),再针对存储相同资源区块的目标边缘节点(候选边缘节点),对比其总MD5值(第二校验值)。或者以两个目标边缘节点为例来说,可以先对比这两个目标边缘节点的目标资源区块的MD5值;如果这两个目标边缘节点存储相同的资源区块,则再对比这两个目标边缘节点的总MD5值,如果这两个目标边缘节点存储不同的资源区块,则不再对比这两个目标边缘节点的总MD5值。In this embodiment, verification is performed from both aspects of the first check value and the second check value, and the second check value is only checked for the target edge node (candidate edge node) storing the same resource block. Taking the MD5 value of the check value as an example, in this embodiment, the MD5 value (first check value) of a single resource block (target resource block) can be compared first, and then the target for storing the same resource block Edge nodes (candidate edge nodes) are compared with their total MD5 values (second check value). Or take two target edge nodes as an example, you can first compare the MD5 values of the target resource blocks of the two target edge nodes; if the two target edge nodes store the same resource block, then compare the two The total MD5 value of the target edge node. If the two target edge nodes store different resource blocks, the total MD5 value of the two target edge nodes is no longer compared.
本实施方式提供的两方面的校验更合理,校验准确率更高。The verification of the two aspects provided by this embodiment is more reasonable, and the verification accuracy is higher.
延续上述第一边缘节点作为执行主体的实施方式,目标资源包括多个资源区块;S102包括:分别向每个目标边缘节点发送所述目标资源的资源标识;分别接收所述每个目标边缘节点发送的目标资源的第二校验值和所述目标资源包括的各资源区块的区块标识;这种实施方式中,S103可以包括:确定所发送的各资源区块的区块标识相同的目标边缘节点,作为候选边缘节点;通过对比每个候选边缘节点发送的第二校验值,识别异常的第二校验值。Continuing the above-mentioned embodiment where the first edge node is the execution subject, the target resource includes a plurality of resource blocks; S102 includes: sending the resource identifier of the target resource to each target edge node respectively; receiving each target edge node respectively The second check value of the sent target resource and the block ID of each resource block included in the target resource; in this embodiment, S103 may include: determining that the block ID of each resource block sent is the same The target edge node is used as a candidate edge node; by comparing the second check value sent by each candidate edge node, an abnormal second check value is identified.
延续上述例子,一些情况下,即便边缘节点存储同一目标资源,但各边缘节点存储该目标资源的资源区块可以是不同的。这种情况下,如果目标边缘节点存储目标资源的资源区块不同,则目标边缘节点的第二校验值不同,这种不同是正常的不同,不是由于资源异常导致的不同。Continuing the above example, in some cases, even if the edge nodes store the same target resource, the resource blocks in which each edge node stores the target resource may be different. In this case, if the resource block where the target edge node stores the target resource is different, the second check value of the target edge node is different, and this difference is a normal difference, not a difference caused by an abnormal resource.
本实施方式中,关于第二校验值,只针对存储相同资源区块的目标边 缘节点(候选边缘节点)进行校验。以校验值为MD5值为例来说,本实施方式中,针对存储相同资源区块的目标边缘节点(候选边缘节点),对比其总MD5值(第二校验值)。或者以两个目标边缘节点为例来说,如果这两个目标边缘节点存储相同的资源区块,则对比这两个目标边缘节点的总MD5值,如果这两个目标边缘节点存储不同的资源区块,则不再对比这两个目标边缘节点的总MD5值。In this embodiment, regarding the second check value, check is only performed on the target edge nodes (candidate edge nodes) that store the same resource block. Taking the check value as an MD5 value as an example, in this embodiment, the total MD5 value (second check value) of the target edge node (candidate edge node) storing the same resource block is compared. Or take two target edge nodes as an example, if the two target edge nodes store the same resource block, compare the total MD5 value of the two target edge nodes, if the two target edge nodes store different resources block, the total MD5 value of the two target edge nodes is no longer compared.
本实施方式提供的校验方式更合理,校验准确率更高。The verification method provided by this embodiment is more reasonable, and the verification accuracy is higher.
S104:将异常校验信息对应的目标边缘节点中存储的目标资源确定为异常资源。S104: Determine the target resource stored in the target edge node corresponding to the abnormality verification information as an abnormal resource.
一种实施方式中,S104之后,可以向所述异常校验信息对应的目标边缘节点发送删除指令,所述删除指令用于指示所述异常校验信息对应的目标边缘节点删除所述异常资源。In an implementation manner, after S104, a deletion instruction may be sent to the target edge node corresponding to the abnormality verification information, where the deletion instruction is used to instruct the target edge node corresponding to the abnormality verification information to delete the abnormal resource.
假设边缘节点A0、A1、A2、A3、A4和A5都存储了电影X的整体资源,且A1、A2、A3、A4和A5发送的电影X的校验信息一致,A0发送的电影X的校验信息不一致,则可以将A0中存储的电影X确定为异常资源。执行主体(客户端或者第一边缘节点)可以将A0发送删除指令,A0基于该删除指令将自身存储的电影X的资源删除。Assume that edge nodes A0, A1, A2, A3, A4 and A5 all store the overall resources of movie X, and the verification information of movie X sent by A1, A2, A3, A4 and A5 is consistent, and the verification information of movie X sent by A0 If the verification information is inconsistent, the movie X stored in A0 can be determined as an abnormal resource. The execution subject (the client or the first edge node) may send a deletion instruction to A0, and A0 deletes the resources of the movie X stored by itself based on the deletion instruction.
应用本申请所示实施例,确定存储有同一目标资源的多个边缘节点,作为目标边缘节点;分别获取每个目标边缘节点所存储目标资源的校验信息;通过对比每个目标边缘节点的校验信息,识别异常校验信息;将异常校验信息对应的目标边缘节点中存储的目标资源确定为异常资源。可见,本申请所示实施例能够校验边缘节点中的资源是否异常。Apply the embodiment shown in this application to determine multiple edge nodes that store the same target resource as the target edge node; respectively obtain the verification information of the target resource stored in each target edge node; compare the verification information of each target edge node Verify information, identify abnormal verification information; determine the target resource stored in the target edge node corresponding to the abnormal verification information as an abnormal resource. It can be seen that the embodiment shown in this application can check whether the resource in the edge node is abnormal.
图2a为本申请实施例提供的一种应用于客户端的资源校验方法的流程示意图,包括:Fig. 2a is a schematic flowchart of a resource verification method applied to a client provided in an embodiment of the present application, including:
S201:在接收到针对目标资源的播放指令后,向服务器发送目标资源的资源标识。S201: After receiving the play instruction for the target resource, send the resource identifier of the target resource to the server.
为了方便描述,本申请实施例中将需要校验的资源称为目标资源,该目标资源可以为视频、音频、图片、文字等等,目标资源的具体类型不做限定。资源标识可以为资源ID,或者如果该资源为电影,则资源标识可以为电影名称,如果该资源为电视剧,则资源标识可以为电视剧名称,等等,资源标识的具体类型不做限定。For the convenience of description, in the embodiment of the present application, the resources that need to be verified are called target resources. The target resources can be video, audio, pictures, text, etc., and the specific types of target resources are not limited. The resource identifier may be a resource ID, or if the resource is a movie, the resource identifier may be a movie name, if the resource is a TV drama, the resource identifier may be a TV drama name, etc. The specific type of resource identifier is not limited.
图2a所示实施例中,客户端在需要播放某一资源的情况下,发起资源校验,这种情况可以称为播放驱动校验。In the embodiment shown in FIG. 2 a , the client initiates a resource check when it needs to play a certain resource, and this situation may be called play-driven check.
S202:根据服务器的反馈结果,确定网关类型满足预设类型条件、并且存储有该资源标识对应的目标资源的多个边缘节点,作为目标边缘节点。S202: According to the feedback result of the server, determine a plurality of edge nodes whose gateway type satisfies the preset type condition and stores the target resource corresponding to the resource identifier as the target edge node.
网络中(例如CDN或者PCDN)通常包括多个边缘节点,为了区分描述,S202中将确定出的存储有该目标资源的边缘节点称为目标边缘节点。A network (for example, CDN or PCDN) usually includes multiple edge nodes. In order to differentiate descriptions, the determined edge node storing the target resource in S202 is called a target edge node.
举例来说,一些网关类型的网络中,客户端较容易与边缘节点建立连接,而另一些网关类型的网络中,客户端较难与边缘节点建立连接,建立连接(以下简称建连)的难易程度与客户端和边缘节点两端的网关类型都有关。以NAT类型为例来说,如果一端为对称型,另一端为与非公网类型,则建连程度难度较大。For example, in some gateway-type networks, it is easier for clients to establish connections with edge nodes, while in other gateway-type networks, it is more difficult for clients to establish connections with edge nodes. The degree of ease is related to the type of gateways at both ends of the client and the edge node. Taking the NAT type as an example, if one end is symmetric and the other end is connected to a non-public network, it will be more difficult to establish a connection.
例如,如果客户端的网关类型为端口限制型,则与其建连的边缘节点的网关类型按照由易到难排序可以为:公网,全锥型,IP限制型,端口限制型。上述预设类型条件可以为按照此排序设定的优先级选择条件,例如,如果存在公网型的边缘节点,则优先选择公网型的边缘节点,如果不存在,再选择全锥型,以此类推。For example, if the gateway type of the client is port-restricted, then the gateway types of the edge nodes to establish a connection with it can be ranked from easy to difficult: public network, full cone, IP-restricted, and port-restricted. The above preset type condition can be a priority selection condition set according to this order. For example, if there is an edge node of the public network type, the edge node of the public network type is preferred, and if it does not exist, the full cone type is selected, so that And so on.
应用本实施方式,优先选择容易建连的网关类型的边缘节点,可以减少建连过程耗费的资源,提高建连成功率。By applying this embodiment, preferentially selecting edge nodes of the gateway type that are easy to establish a connection can reduce the resources consumed in the connection establishment process and improve the success rate of the connection establishment.
服务器中可以存储有资源标识与边缘节点之间的对应关系,例如,服务器中存储了电影X与边缘节点A0、A1、A2、A3、A4和A5之间的对应关系,这表示边缘节点A0、A1、A2、A3、A4和A5都存储了电影X。客户端向服务器发送“电影X”的资源标识,服务器将边缘节点A0、A1、A2、A3、A4和A5的节点标识反馈给客户端,客户端将边缘节点A0、A1、A2、A3、A4和A5中网关类型满足预设类型条件的边缘节点确定为目标边缘节点。The correspondence between resource identifiers and edge nodes may be stored in the server. For example, the correspondence between movie X and edge nodes A0, A1, A2, A3, A4, and A5 is stored in the server, which means that edge nodes A0, A1, A2, A3, A4 and A5 all store movie X. The client sends the resource identifier of "Movie X" to the server, the server feeds back the node identifiers of edge nodes A0, A1, A2, A3, A4 and A5 to the client, and the client sends the edge nodes A0, A1, A2, A3, A4 The edge node whose gateway type meets the preset type condition in A5 and A5 is determined as the target edge node.
S203:分别与每个目标边缘节点建立连接。S203: Establish a connection with each target edge node respectively.
举例来说,这里的建立连接可以为打洞建连,例如可以采用TCP打洞技术,或者也可以采用UDP打洞技术,具体的打洞建连过程不做限定。For example, the establishment of the connection here may be hole punching, for example, the TCP hole punching technology may be used, or the UDP hole punching technology may be used, and the specific hole punching connection establishment process is not limited.
S204:分别向每个目标边缘节点发送针对目标资源的订阅请求。订阅 请求中包括目标资源的资源标识和目标资源区块的区块标识。S204: Send a subscription request for the target resource to each target edge node respectively. The subscription request includes the resource identifier of the target resource and the block identifier of the target resource block.
图2a所示实施例中,目标资源可以包括多个资源区块。举例来说,可以将资源切分成大小等分的区块(最后一块例外),例如每个等分的资源区块可以为1M或者2M等等,资源区块的具体大小不做限定。或者,也可以按照预设的切分规则将资源切分成大小不同的区块,具体的切分规则不做限定。In the embodiment shown in Fig. 2a, the target resource may include multiple resource blocks. For example, the resource can be divided into equal-sized blocks (except the last block), for example, each equal-sized resource block can be 1M or 2M, etc., and the specific size of the resource block is not limited. Alternatively, the resource can also be divided into blocks of different sizes according to a preset division rule, and the specific division rule is not limited.
这样,如果多个边缘节点存储同一份资源,则这些边缘节点存储的该份资源的同一区块标识对应的各资源区块的大小是一致的,该份资源对应的总块数也是一致的,但这些边缘节点存储的该资源的块数可以不一致。举例来说,区块标识可以为目标资源包括的各资源区块的序号,例如,假设目标资源包括10个资源区块,则区块标识可以为0~9。具体的区块标识不做限定。In this way, if multiple edge nodes store the same resource, the size of each resource block corresponding to the same block identifier of the resource stored by these edge nodes is consistent, and the total number of blocks corresponding to the resource is also consistent. However, the number of blocks of the resource stored by these edge nodes may be inconsistent. For example, the block identifier may be the sequence number of each resource block included in the target resource. For example, assuming that the target resource includes 10 resource blocks, the block identifier may be 0-9. The specific block identifier is not limited.
这种实施例中,客户端每次向边缘节点发送的订阅请求可以是针对单个资源区块的,这样,客户端向边缘节点发送的订阅请求中可以包括目标资源的资源标识和目标资源区块的区块标识。目标资源区块即为本次订阅请求针对的资源区块。一些情况下,客户端可以将单个资源区块分为几个区段分别向这些目标边缘节点发送订阅请求,以请求下载相应的区段。In this embodiment, each subscription request sent by the client to the edge node can be for a single resource block, so that the subscription request sent by the client to the edge node can include the resource identifier of the target resource and the target resource block block ID. The target resource block is the resource block targeted by this subscription request. In some cases, the client may divide a single resource block into several segments and send subscription requests to these target edge nodes respectively, so as to request to download the corresponding segments.
S205:分别接收每个目标边缘节点发送的目标资源及其校验信息。校验信息包括:目标资源包括的各资源区块的区块标识、目标资源区块的第一校验值和目标资源的第二校验值,所述第二校验值为根据目标边缘节点所存储目标资源包括的每个资源区块的第一校验值计算得到的。S205: Respectively receive the target resource and its verification information sent by each target edge node. The check information includes: the block identifier of each resource block included in the target resource, the first check value of the target resource block, and the second check value of the target resource, the second check value is based on the target edge node It is obtained by calculating the first check value of each resource block included in the stored target resource.
图2a所示实施例中,第一校验值为单个资源区块的校验值,第二校验值可以为目标边缘节点所存储的目标资源包括的每个资源区块的第一校验值叠加得到的。举例来说,第一校验值可以为利用摘要算法、或者校验算法、或者加密算法计算得到的。例如,第一校验值可以为利用MD5算法计算得到的单个资源区块的MD5值,这样,第二校验值可以为多个资源区块的MD5值叠加得到的总MD5值。In the embodiment shown in Figure 2a, the first check value is the check value of a single resource block, and the second check value may be the first check value of each resource block included in the target resource stored by the target edge node. values are superimposed. For example, the first check value may be calculated by using a digest algorithm, or a check algorithm, or an encryption algorithm. For example, the first check value may be the MD5 value of a single resource block calculated by using the MD5 algorithm, so the second check value may be the total MD5 value obtained by superimposing the MD5 values of multiple resource blocks.
延续上述例子,假设边缘节点A0、A1和A2存储了电影X的一部分,边缘节点A3、A4和A5存储了电影X的整体资源,也认为边缘节点A0、A1、A2、A3、A4和A5都存储有同一目标资源即电影X。也就是说,一些情况下,即便边缘节点存储同一目标资源,但各边缘节点存储该目标资 源的资源区块可以是不同的。这种情况下,边缘节点A0、A1和A2的第二校验值可以为电影X的部分资源区块(其各自存储的部分资源区块)的MD5值叠加得到的总MD5值,边缘节点A3、A4和A5的第二校验值为电影X的全部资源区块的MD5值叠加得到的总MD5值。Continuing the above example, assuming that edge nodes A0, A1, and A2 store a part of movie X, and edge nodes A3, A4, and A5 store the overall resources of movie X, it is also considered that edge nodes A0, A1, A2, A3, A4, and A5 are all The same target resource, movie X, is stored. That is to say, in some cases, even if the edge nodes store the same target resource, the resource blocks in which each edge node stores the target resource may be different. In this case, the second check value of edge nodes A0, A1, and A2 can be the total MD5 value obtained by superimposing the MD5 values of some resource blocks of movie X (part of the resource blocks stored in them), and edge node A3 The second check value of , A4 and A5 is the total MD5 value obtained by superimposing the MD5 values of all resource blocks of the movie X.
S206:通过对比每个目标边缘节点发送的第一校验值,识别异常的第一校验值。S206: Identify an abnormal first check value by comparing the first check value sent by each target edge node.
一般来说,各个目标边缘节点的第一校验值中,大部分第一校验值是一致的,小部分第一校验值不一致,可以将该小部分不一致的第一校验值识别为异常的第一校验值。Generally speaking, among the first check values of each target edge node, most of the first check values are consistent, and a small part of the first check values are inconsistent, and the small part of the inconsistent first check values can be identified as The exception's first checksum.
S207:确定所发送的各资源区块的区块标识相同的目标边缘节点,作为候选边缘节点。S207: Determine the target edge node whose block identifier is the same as the resource block sent as the candidate edge node.
S208:通过对比每个候选边缘节点发送的第二校验值,识别异常的第二校验值。S208: Identify an abnormal second check value by comparing the second check value sent by each candidate edge node.
延续上述例子,一些情况下,即便边缘节点存储同一目标资源,但各边缘节点存储该目标资源的资源区块可以是不同的。这种情况下,如果目标边缘节点存储目标资源的资源区块不同,则目标边缘节点的第二校验值不同,这种不同是正常的不同,不是由于资源异常导致的不同。Continuing the above example, in some cases, even if the edge nodes store the same target resource, the resource blocks in which each edge node stores the target resource may be different. In this case, if the resource block where the target edge node stores the target resource is different, the second check value of the target edge node is different, and this difference is a normal difference, not a difference caused by an abnormal resource.
本实施例中,从第一校验值和第二校验值两方面进行校验,关于第二校验值,只针对存储相同资源区块的目标边缘节点(候选边缘节点)进行校验。以校验值为MD5值为例来说,本实施例中,可以先对比单个资源区块(目标资源区块)的MD5值(第一校验值),再针对存储相同资源区块的目标边缘节点(候选边缘节点),对比其总MD5值(第二校验值)。或者以两个目标边缘节点为例来说,可以先对比这两个目标边缘节点的目标资源区块的MD5值;如果这两个目标边缘节点存储相同的资源区块,则再对比这两个目标边缘节点的总MD5值,如果这两个目标边缘节点存储不同的资源区块,则不再对比这两个目标边缘节点的总MD5值。In this embodiment, verification is performed from both aspects of the first check value and the second check value, and the second check value is only checked for the target edge node (candidate edge node) storing the same resource block. Taking the MD5 value of the check value as an example, in this embodiment, the MD5 value (first check value) of a single resource block (target resource block) can be compared first, and then the target for storing the same resource block Edge nodes (candidate edge nodes) are compared with their total MD5 values (second check value). Or take two target edge nodes as an example, you can first compare the MD5 values of the target resource blocks of the two target edge nodes; if the two target edge nodes store the same resource block, then compare the two The total MD5 value of the target edge node. If the two target edge nodes store different resource blocks, the total MD5 value of the two target edge nodes is no longer compared.
本实施例提供的两方面的校验更合理,校验准确率更高。The verification of the two aspects provided by this embodiment is more reasonable, and the verification accuracy is higher.
一般来说,各个候选边缘节点的第二校验值中,大部分第二校验值是一致的,小部分第二校验值不一致,可以将该小部分不一致的第二校验值识别为异常的第二校验值。Generally speaking, among the second check values of each candidate edge node, most of the second check values are consistent, and a small part of the second check values are inconsistent, and the small part of the inconsistent second check values can be identified as The exception's second checksum.
S209:将异常的第一校验值对应的目标边缘节点、以及异常的第二校 验值对应的目标边缘节点中存储的目标资源确定为异常资源。S209: Determine the target resource stored in the target edge node corresponding to the abnormal first check value and the target edge node corresponding to the abnormal second check value as abnormal resources.
一种实施方式中,S209之后,客户端可以向异常的第一校验值对应的目标边缘节点、以及异常的第二校验值对应的目标边缘节点发送删除指令,所述删除指令用于指示这些目标边缘节点删除所述异常资源。In one implementation, after S209, the client may send a delete instruction to the target edge node corresponding to the abnormal first check value and the target edge node corresponding to the abnormal second check value, the delete command is used to indicate These target edge nodes delete the abnormal resources.
举例来说,如果某个目标边缘节点的第一校验值异常,则可以指示该目标边缘节点删除该第一校验值对应的单个资源区块,或者也可以指示该目标边缘节点删除其存储的整个目标资源。For example, if the first check value of a certain target edge node is abnormal, the target edge node may be instructed to delete the single resource block corresponding to the first check value, or the target edge node may be instructed to delete its stored of the entire target resource.
一种实施方式中,S209之后,客户端可以播放未被确定为异常资源的目标资源。仍以电影X为例来说,本实施例中,客户端可以在播放电影X之前,先基于该校验信息对“电影X”的资源进行校验,资源通过校验后才播放电影X,这样,可以减少资源异常导致的播放异常的情况。In one implementation manner, after S209, the client may play target resources that are not determined to be abnormal resources. Still taking movie X as an example, in this embodiment, before playing movie X, the client can first verify the resource of "movie X" based on the verification information, and then play movie X after the resource passes the verification. In this way, the situation of playing abnormality caused by resource abnormality can be reduced.
图2a所示实施例中,服务器、客户端、边缘节点之间的信令交互示意情况可以如图2b所示:客户端向服务器发送资源标识,服务器返回存储有该资源标识对应的目标资源的边缘节点,假设返回的是边缘节点B1和B2的信息,并且客户端将边缘节点B1和B2确定为目标边缘节点,客户端向边缘节点B1和B2发送订阅请求,边缘节点B1和B2向客户端反馈目标资源的校验信息。客户端侧执行的方法步骤已详细介绍过,这里不再赘述。In the embodiment shown in Figure 2a, the signaling interaction between the server, the client, and the edge node can be shown in Figure 2b: the client sends a resource identifier to the server, and the server returns a resource that stores the target resource corresponding to the resource identifier. Edge nodes, assuming that the returned information is edge nodes B1 and B2, and the client determines edge nodes B1 and B2 as target edge nodes, the client sends subscription requests to edge nodes B1 and B2, and edge nodes B1 and B2 send subscription requests to the client Feedback the verification information of the target resource. The steps of the method performed on the client side have been introduced in detail, and will not be repeated here.
应用图2a所示实施例,第一方面,能够校验边缘节点中的资源是否异常。第二方面,提供了一种客户端播放驱动校验的方式,客户端仅播放通过校验的资源,这样,可以减少资源异常导致的播放异常的情况。第三方面,这种客户端播放驱动校验的方式,提供了一种轻量级校验大规模边缘节点存储资源的方案。Applying the embodiment shown in FIG. 2a, in the first aspect, it is possible to check whether the resource in the edge node is abnormal. In the second aspect, a way for the client to play driver verification is provided. The client only plays the resources that pass the verification. In this way, the situation of abnormal playback caused by abnormal resources can be reduced. In the third aspect, this method of client playback driver verification provides a lightweight verification solution for large-scale edge node storage resources.
图3a为本申请实施例提供的一种应用于第一边缘节点的资源校验方法的流程示意图,包括:Fig. 3a is a schematic flowchart of a resource verification method applied to a first edge node provided by an embodiment of the present application, including:
S301:在第一边缘节点的上行带宽满足预设低峰条件的情况下,向服务器发送第一边缘节点中存储的目标资源的资源标识。S301: When the uplink bandwidth of the first edge node satisfies a preset low-peak condition, send the resource identifier of the target resource stored in the first edge node to the server.
图3a所示实施例中,由第一边缘节点发起资源校验,第一边缘节点可以为网络中任意边缘节点。例如,第一边缘节点可以在上行带宽低峰时轮询校验自身拥有的每份资源。对每份资源的校验情况类似,本实施例以一次校验为例进行说明。In the embodiment shown in Fig. 3a, the resource check is initiated by the first edge node, which may be any edge node in the network. For example, the first edge node may poll and check each resource it owns when the uplink bandwidth is low. The verification of each resource is similar, and this embodiment takes one verification as an example for illustration.
为了方便描述,将需要校验的资源称为目标资源,该目标资源可以为视频、音频、图片、文字等等,目标资源的具体类型不做限定。资源标识可以为资源ID,或者如果该资源为电影,则资源标识可以为电影名称,如果该资源为电视剧,则资源标识可以为电视剧名称,等等,资源标识的具体类型不做限定。For the convenience of description, the resource that needs to be verified is called a target resource. The target resource can be video, audio, picture, text, etc., and the specific type of the target resource is not limited. The resource identifier may be a resource ID, or if the resource is a movie, the resource identifier may be a movie name, if the resource is a TV drama, the resource identifier may be a TV drama name, etc. The specific type of resource identifier is not limited.
S302:根据服务器的反馈结果,确定网关类型满足预设类型条件、并且存储有该资源标识对应的目标资源的多个边缘节点,作为目标边缘节点。S302: According to the feedback result of the server, determine a plurality of edge nodes whose gateway type satisfies the preset type condition and stores the target resource corresponding to the resource identifier as the target edge node.
举例来说,一些网关类型的网络中,客户端较容易与边缘节点建立连接,而另一些网关类型的网络中,客户端较难与边缘节点建立连接,建立连接(以下简称建连)的难易程度与客户端和边缘节点两端的网关类型都有关。以NAT类型为例来说,如果一端为对称型,另一端为与非公网类型,则建连程度难度较大。For example, in some gateway-type networks, it is easier for clients to establish connections with edge nodes, while in other gateway-type networks, it is more difficult for clients to establish connections with edge nodes. The degree of ease is related to the type of gateways at both ends of the client and the edge node. Taking the NAT type as an example, if one end is symmetric and the other end is connected to a non-public network, it will be more difficult to establish a connection.
例如,如果客户端的网关类型为端口限制型,则与其建连的边缘节点的网关类型按照由易到难排序可以为:公网,全锥型,IP限制型,端口限制型。上述预设类型条件可以为按照此排序设定的优先级选择条件,例如,如果存在公网型的边缘节点,则优先选择公网型的边缘节点,如果不存在,再选择全锥型,以此类推。For example, if the gateway type of the client is port-restricted, then the gateway types of the edge nodes to establish a connection with it can be ranked from easy to difficult: public network, full cone, IP-restricted, and port-restricted. The above preset type condition can be a priority selection condition set according to this order. For example, if there is an edge node of the public network type, the edge node of the public network type is preferred, and if it does not exist, the full cone type is selected, so that And so on.
应用本实施方式,优先选择容易建连的网关类型的边缘节点,可以减少建连过程耗费的资源,提高建连成功率。By applying this embodiment, preferentially selecting edge nodes of the gateway type that are easy to establish a connection can reduce the resources consumed in the connection establishment process and improve the success rate of the connection establishment.
服务器中可以存储有资源标识与边缘节点之间的对应关系,例如,服务器中存储了电影X与边缘节点A0、A1、A2、A3、A4和A5之间的对应关系,这表示边缘节点A0、A1、A2、A3、A4和A5都存储了电影X。假设第一边缘节点为边缘节点A1,边缘节点A1向服务器发送“电影X”的资源标识,服务器可以将边缘节点A0、A1、A2、A3、A4和A5的节点标识反馈给边缘节点A1,或者将边缘节点A0、A2、A3、A4和A5的节点标识反馈给边缘节点A1,边缘节点A1将边缘节点A0、A1、A2、A3、A4和A5中网关类型满足预设类型条件的边缘节点确定为目标边缘节点。The correspondence between resource identifiers and edge nodes may be stored in the server. For example, the correspondence between movie X and edge nodes A0, A1, A2, A3, A4, and A5 is stored in the server, which means that edge nodes A0, A1, A2, A3, A4, and A5 all store movie X. Suppose the first edge node is edge node A1, and edge node A1 sends the resource identifier of "Movie X" to the server, and the server can feed back the node identifiers of edge nodes A0, A1, A2, A3, A4, and A5 to edge node A1, or Feedback the node identifications of edge nodes A0, A2, A3, A4, and A5 to edge node A1, and edge node A1 determines the edge nodes whose gateway types meet the preset type conditions in edge nodes A0, A1, A2, A3, A4, and A5 is the target edge node.
S303:分别与每个目标边缘节点建立连接。S303: Establish a connection with each target edge node respectively.
第一边缘节点定出目标边缘节点后,分别与每个目标边缘节点建立连接。举例来说,这里的建立连接可以为打洞建连,例如可以采用TCP打洞 技术,或者也可以采用UDP打洞技术,具体的打洞建连过程不做限定。After determining the target edge node, the first edge node establishes a connection with each target edge node respectively. For example, the establishment of the connection here can be hole punching, for example, TCP hole punching technology can be used, or UDP hole punching technology can also be used, and the specific hole punching connection establishment process is not limited.
S304:分别向每个目标边缘节点发送目标资源的资源标识。S304: Send the resource identifier of the target resource to each target edge node respectively.
S305:分别接收每个目标边缘节点发送的目标资源的第二校验值和目标资源包括的各资源区块的区块标识,所述第二校验值为根据目标边缘节点所存储目标资源包括的每个资源区块的第一校验值计算得到的。S305: Respectively receive the second check value of the target resource sent by each target edge node and the block identification of each resource block included in the target resource, the second check value is based on the target resource stored in the target edge node. The first check value of each resource block is calculated.
图3a所示实施例中,目标资源可以包括多个资源区块。举例来说,可以将资源切分成大小等分的区块(最后一块例外),例如每个等分的资源区块可以为1M或者2M等等,资源区块的具体大小不做限定。或者,也可以按照预设的切分规则将资源切分成大小不同的区块,具体的切分规则不做限定。In the embodiment shown in Fig. 3a, the target resource may include multiple resource blocks. For example, the resource can be divided into equal-sized blocks (except the last block), for example, each equal-sized resource block can be 1M or 2M, etc., and the specific size of the resource block is not limited. Alternatively, the resource can also be divided into blocks of different sizes according to a preset division rule, and the specific division rule is not limited.
这样,如果多个边缘节点存储同一份资源,则这些边缘节点存储的该份资源的同一区块标识对应的各资源区块的大小是一致的,该份资源对应的总块数也是一致的,但这些边缘节点存储的该资源的块数可以不一致。举例来说,区块标识可以为目标资源包括的各资源区块的序号,例如,假设目标资源包括10个资源区块,则区块标识可以为0~9。具体的区块标识不做限定。In this way, if multiple edge nodes store the same resource, the size of each resource block corresponding to the same block identifier of the resource stored by these edge nodes is consistent, and the total number of blocks corresponding to the resource is also consistent. However, the number of blocks of the resource stored by these edge nodes may be inconsistent. For example, the block identifier may be the sequence number of each resource block included in the target resource. For example, assuming that the target resource includes 10 resource blocks, the block identifier may be 0-9. The specific block identifier is not limited.
这种实施例中,第一校验值为单个资源区块的校验值,第二校验值可以为目标边缘节点所存储的目标资源包括的每个资源区块的第一校验值叠加得到的。举例来说,第一校验值可以为利用摘要算法、或者校验算法、或者加密算法计算得到的。例如,第一校验值可以为利用MD(Message-Digest,信息摘要)5算法计算得到的单个资源区块的MD5值,这样,第二校验值可以为多个资源区块的MD5值叠加得到的总MD5值。In this embodiment, the first check value is the check value of a single resource block, and the second check value can be the first check value of each resource block included in the target resource stored in the target edge node. owned. For example, the first check value may be calculated by using a digest algorithm, or a check algorithm, or an encryption algorithm. For example, the first check value can be the MD5 value of a single resource block calculated by using the MD (Message-Digest, Information Digest)5 algorithm, so that the second check value can be the superposition of the MD5 values of multiple resource blocks The resulting total MD5 value.
延续上述例子,假设边缘节点A0、A1和A2存储了电影X的一部分,边缘节点A3、A4和A5存储了电影X的整体资源,也认为边缘节点A0、A1、A2、A3、A4和A5都存储有同一目标资源即电影X。也就是说,一些情况下,即便边缘节点存储同一目标资源,但各边缘节点存储该目标资源的资源区块可以是不同的。这种情况下,边缘节点A0、A1和A2的第二校验值可以为电影X的部分资源区块(其各自存储的部分资源区块)的MD5值叠加得到的总MD5值,边缘节点A3、A4和A5的第二校验值为电影X的全部资源区块的MD5值叠加得到的总MD5值。Continuing the above example, assuming that edge nodes A0, A1, and A2 store a part of movie X, and edge nodes A3, A4, and A5 store the overall resources of movie X, it is also considered that edge nodes A0, A1, A2, A3, A4, and A5 are all The same target resource, movie X, is stored. That is to say, in some cases, even if the edge nodes store the same target resource, the resource blocks in which the target resource is stored by each edge node may be different. In this case, the second check value of edge nodes A0, A1, and A2 can be the total MD5 value obtained by superimposing the MD5 values of some resource blocks of movie X (part of the resource blocks stored in them), and edge node A3 The second check value of , A4 and A5 is the total MD5 value obtained by superimposing the MD5 values of all resource blocks of the movie X.
S306:确定所发送的各资源区块的区块标识相同的目标边缘节点,作 为候选边缘节点。S306: Determine the target edge node whose block ID of each resource block sent is the same as the candidate edge node.
S307:通过对比每个候选边缘节点发送的第二校验值,识别异常的第二校验值。S307: Identify an abnormal second check value by comparing the second check value sent by each candidate edge node.
延续上述例子,一些情况下,即便边缘节点存储同一目标资源,但各边缘节点存储该目标资源的资源区块可以是不同的。这种情况下,如果目标边缘节点存储目标资源的资源区块不同,则目标边缘节点的第二校验值不同,这种不同是正常的不同,不是由于资源异常导致的不同。Continuing the above example, in some cases, even if the edge nodes store the same target resource, the resource blocks in which each edge node stores the target resource may be different. In this case, if the resource block where the target edge node stores the target resource is different, the second check value of the target edge node is different, and this difference is a normal difference, not a difference caused by an abnormal resource.
本实施例中,关于第二校验值,只针对存储相同资源区块的目标边缘节点(候选边缘节点)进行校验。以校验值为MD5值为例来说,本实施例中,针对存储相同资源区块的目标边缘节点(候选边缘节点),对比其总MD5值(第二校验值)。或者以两个目标边缘节点为例来说,如果这两个目标边缘节点存储相同的资源区块,则对比这两个目标边缘节点的总MD5值,如果这两个目标边缘节点存储不同的资源区块,则不再对比这两个目标边缘节点的总MD5值。In this embodiment, with regard to the second check value, the check is only performed on the target edge nodes (candidate edge nodes) that store the same resource block. Taking the check value as an MD5 value as an example, in this embodiment, compare the total MD5 value (second check value) of the target edge nodes (candidate edge nodes) storing the same resource block. Or take two target edge nodes as an example, if the two target edge nodes store the same resource block, compare the total MD5 value of the two target edge nodes, if the two target edge nodes store different resources block, the total MD5 value of the two target edge nodes is no longer compared.
本实施例提供的校验方式更合理,校验准确率更高。The verification method provided in this embodiment is more reasonable, and the verification accuracy is higher.
一般来说,各个候选边缘节点的第二校验值中,大部分第二校验值是一致的,小部分第二校验值不一致,可以将该小部分不一致的第二校验值识别为异常的第二校验值。Generally speaking, among the second check values of each candidate edge node, most of the second check values are consistent, and a small part of the second check values are inconsistent, and the small part of the inconsistent second check values can be identified as The exception's second checksum.
S308:将异常的第二校验值对应的目标边缘节点中存储的目标资源确定为异常资源。S308: Determine the target resource stored in the target edge node corresponding to the abnormal second check value as an abnormal resource.
一种实施方式中,S308之后,第一边缘节点可以向所述异常校验信息对应的目标边缘节点发送删除指令,所述删除指令用于指示所述异常校验信息对应的目标边缘节点删除所述异常资源。In one embodiment, after S308, the first edge node may send a deletion instruction to the target edge node corresponding to the abnormality verification information, and the deletion instruction is used to instruct the target edge node corresponding to the abnormality verification information to delete the Describe the exception resource.
图3a所示实施例中,服务器与边缘节点之间的信令交互示意情况可以如图3b所示:第一边缘节点A1轮询校验自身存储的资源,第一边缘节点A1向服务器发送资源标识,服务器返回存储有该资源标识对应的目标资源的边缘节点。假设返回的是边缘节点B1和B2的信息,并且第一边缘节点A1将边缘节点B1和B2确定为目标边缘节点,第一边缘节点A1向边缘节点B1和B2发送该资源标识,边缘节点B1和B2向第一边缘节点A1反馈目标资源的校验信息。第一边缘节点A1侧执行的方法步骤已详细介绍过,这里不再赘述。In the embodiment shown in Figure 3a, the signaling interaction between the server and the edge node can be shown in Figure 3b: the first edge node A1 polls and verifies the resources stored by itself, and the first edge node A1 sends the resource to the server ID, the server returns the edge node that stores the target resource corresponding to the resource ID. Assuming that the returned information is the edge nodes B1 and B2, and the first edge node A1 determines the edge nodes B1 and B2 as target edge nodes, the first edge node A1 sends the resource identifier to the edge nodes B1 and B2, and the edge nodes B1 and B2 B2 feeds back the verification information of the target resource to the first edge node A1. The method steps performed on the side of the first edge node A1 have been introduced in detail, and will not be repeated here.
应用图3a所示实施例,第一方面,能够校验边缘节点中的资源是否异常。第二方面,提供了一种边缘节点低峰轮询校验的方式,提供了一种轻量级校验大规模边缘节点存储资源的方案。Applying the embodiment shown in FIG. 3a, in the first aspect, it is possible to check whether the resource in the edge node is abnormal. In the second aspect, it provides an edge node low-peak polling verification method, and provides a lightweight verification solution for large-scale edge node storage resources.
与上述方法实施例相对应,本申请实施例还提供了一种资源校验装置,应用于电子设备,如图4所示,包括:Corresponding to the above method embodiment, the embodiment of the present application also provides a resource verification device, which is applied to electronic equipment, as shown in FIG. 4 , including:
第一确定模块401,用于确定存储有同一目标资源的多个边缘节点,作为目标边缘节点;The first determining module 401 is configured to determine multiple edge nodes storing the same target resource as target edge nodes;
获取模块402,用于分别获取每个目标边缘节点所存储目标资源的校验信息;An acquisition module 402, configured to respectively acquire verification information of target resources stored in each target edge node;
识别模块403,用于通过对比每个目标边缘节点的所述校验信息,识别异常校验信息;An identification module 403, configured to identify abnormal verification information by comparing the verification information of each target edge node;
第二确定模块404,用于将所述异常校验信息对应的目标边缘节点中存储的目标资源确定为异常资源。The second determining module 404 is configured to determine the target resource stored in the target edge node corresponding to the abnormality check information as an abnormal resource.
一种实施方式中,所述电子设备为客户端;确定模块401可以包括:第一发送子模块和第一确定子模块(图中未示出),其中,In one embodiment, the electronic device is a client; the determining module 401 may include: a first sending submodule and a first determining submodule (not shown in the figure), wherein,
第一发送子模块,用于向服务器发送资源标识;The first sending submodule is configured to send the resource identifier to the server;
第一确定子模块,用于根据服务器的反馈结果,确定存储有所述资源标识对应的目标资源的多个边缘节点,作为目标边缘节点。The first determining submodule is configured to determine, according to a feedback result from the server, a plurality of edge nodes that store the target resource corresponding to the resource identifier as target edge nodes.
一种实施方式中,第一发送子模块,具体用于:在接收到针对目标资源的播放指令后,向服务器发送所述目标资源的资源标识;In one embodiment, the first sending submodule is specifically configured to: send the resource identifier of the target resource to the server after receiving the play instruction for the target resource;
获取模块402,具体用于:分别向每个目标边缘节点发送针对所述目标资源的订阅请求;分别接收所述每个目标边缘节点发送的目标资源及其校验信息。The obtaining module 402 is specifically configured to: respectively send a subscription request for the target resource to each target edge node; and respectively receive the target resource and its verification information sent by each target edge node.
一种实施方式中,所述电子设备为客户端;所述目标资源包括多个资源区块,所述订阅请求中包括目标资源的资源标识和目标资源区块的区块标识;In one embodiment, the electronic device is a client; the target resource includes multiple resource blocks, and the subscription request includes a resource identifier of the target resource and a block identifier of the target resource block;
所述校验信息包括:目标资源区块的第一校验值和目标资源的第二校验值,所述第二校验值为根据目标边缘节点所存储目标资源包括的每个资源区块的第一校验值计算得到的;The verification information includes: a first verification value of the target resource block and a second verification value of the target resource, and the second verification value is based on each resource block included in the target resource stored in the target edge node Calculated from the first check value of ;
识别模块403,具体用于:通过对比每个目标边缘节点发送的所述第一校验值和所述第二校验值,识别异常的第一校验值和/或第二校验值。The identifying module 403 is specifically configured to: identify an abnormal first check value and/or second check value by comparing the first check value and the second check value sent by each target edge node.
一种实施方式中,所述校验信息还包括:所述目标资源包括的各资源区块的区块标识;识别模块403,具体用于:In one embodiment, the verification information further includes: the block identification of each resource block included in the target resource; the identification module 403 is specifically used for:
通过对比每个目标边缘节点发送的第一校验值,识别异常的第一校验值;identifying an abnormal first check value by comparing the first check value sent by each target edge node;
确定所发送的各资源区块的区块标识相同的目标边缘节点,作为候选边缘节点;Determine the target edge node with the same block identifier of each resource block sent as the candidate edge node;
通过对比每个候选边缘节点发送的第二校验值,识别异常的第二校验值。An abnormal second check value is identified by comparing the second check value sent by each candidate edge node.
一种实施方式中,第一确定子模块,具体用于:根据服务器的反馈结果,确定网关类型满足预设类型条件、并且存储有所述资源标识对应的目标资源的多个边缘节点,作为目标边缘节点;In one embodiment, the first determining submodule is specifically configured to: determine, according to the feedback result of the server, a plurality of edge nodes whose gateway type satisfies the preset type condition and stores the target resource corresponding to the resource identifier as the target edge node;
所述装置还包括:连接模块(图中未示出),用于分别向每个目标边缘节点发送订阅请求之前,分别与每个目标边缘节点建立连接。The device further includes: a connection module (not shown in the figure), configured to respectively establish a connection with each target edge node before sending a subscription request to each target edge node.
一种实施方式中,所述电子设备为第一边缘节点;第一确定模块401,包括:第二发送子模块和第二确定子模块(图中未示出),其中,In one embodiment, the electronic device is a first edge node; the first determining module 401 includes: a second sending submodule and a second determining submodule (not shown in the figure), wherein,
第二发送子模块,用于向服务器发送资源标识;The second sending submodule is used to send the resource identifier to the server;
第二确定子模块,用于根据服务器的反馈结果,确定存储有所述资源标识对应的目标资源的多个边缘节点,作为目标边缘节点。The second determining submodule is configured to determine, according to the feedback result of the server, a plurality of edge nodes storing the target resource corresponding to the resource identifier as the target edge node.
一种实施方式中,第二发送子模块,具体用于:在所述第一边缘节点的上行带宽满足预设低峰条件的情况下,向服务器发送所述第一边缘节点中存储的目标资源的资源标识。In one embodiment, the second sending submodule is specifically configured to: send the target resource stored in the first edge node to the server when the uplink bandwidth of the first edge node satisfies a preset low-peak condition The resource ID for .
一种实施方式中,所述目标资源包括多个资源区块;获取模块402具体用于:分别向每个目标边缘节点发送所述目标资源的资源标识;分别接收所述每个目标边缘节点发送的目标资源的第二校验值和所述目标资源包括的各资源区块的区块标识,所述第二校验值为根据目标边缘节点所存储目标资源包括的每个资源区块的第一校验值计算得到的;In one embodiment, the target resource includes a plurality of resource blocks; the obtaining module 402 is specifically configured to: respectively send the resource identifier of the target resource to each target edge node; The second check value of the target resource and the block identifier of each resource block included in the target resource, the second check value is based on the second check value of each resource block included in the target resource stored in the target edge node A check value is calculated;
识别模块403具体用于:通过对比每个候选边缘节点发送的第二校验值,识别异常的第二校验值。The identifying module 403 is specifically configured to: identify an abnormal second check value by comparing the second check value sent by each candidate edge node.
一种实施方式中,所述装置还包括:删除模块(图中未示出),用于向所述异常校验信息对应的目标边缘节点发送删除指令,所述删除指令用于指示所述异常校验信息对应的目标边缘节点删除所述异常资源。In one embodiment, the device further includes: a deletion module (not shown in the figure), configured to send a deletion instruction to the target edge node corresponding to the abnormality check information, the deletion instruction is used to indicate that the abnormality The target edge node corresponding to the verification information deletes the abnormal resource.
应用图2a所示实施例,第一方面,能够校验边缘节点中的资源是否异常。第二方面,提供了一种客户端播放驱动校验的方式,客户端仅播放通过校验的资源,这样,可以减少资源异常导致的播放异常的情况。第三方面,这种客户端播放驱动校验的方式,提供了一种轻量级校验大规模边缘节点存储资源的方案。第四方面,提供了一种边缘节点低峰轮询校验的方式,提供了一种轻量级校验大规模边缘节点存储资源的方案。Applying the embodiment shown in FIG. 2a, in the first aspect, it is possible to check whether the resource in the edge node is abnormal. In the second aspect, a way for the client to play driver verification is provided. The client only plays the resources that pass the verification. In this way, the situation of abnormal playback caused by abnormal resources can be reduced. In the third aspect, this method of client playback driver verification provides a lightweight verification solution for large-scale edge node storage resources. In the fourth aspect, it provides a low-peak polling verification method for edge nodes, and provides a lightweight verification solution for large-scale storage resources of edge nodes.
本申请实施例还提供了一种电子设备,如图5所示,包括处理器501和存储器502。存储器502用于存放计算机程序。处理器501用于执行存储器502上所存放的程序时,实现上述任意一种资源校验方法。The embodiment of the present application also provides an electronic device, as shown in FIG. 5 , including a processor 501 and a memory 502 . The memory 502 is used to store computer programs. When the processor 501 is used to execute the program stored in the memory 502, any one of the above-mentioned resource checking methods can be implemented.
上述电子设备提到的存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The memory mentioned in the above-mentioned electronic device may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far away from the aforementioned processor.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above-mentioned processor can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一种资源校验方法。In yet another embodiment provided by the present application, a computer-readable storage medium is also provided, and a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the above-mentioned resource calibration test method.
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任意一种资源校验方法。In yet another embodiment provided by the present application, a computer program product including instructions is also provided, which, when run on a computer, causes the computer to execute any one of the resource verification methods in the above embodiments.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存 储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。In the above embodiments, all or part of them may be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server, or data center by wired (eg, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a Solid State Disk (SSD)).
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例、设备实施例、计算机可读存储介质实施例、以及计算机程序产品实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for apparatus embodiments, device embodiments, computer-readable storage medium embodiments, and computer program product embodiments, since they are basically similar to method embodiments, the description is relatively simple. For related information, refer to method embodiments Part of the description is sufficient.
以上所述仅为本申请的较佳实施例,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application are included within the protection scope of this application.

Claims (13)

  1. 一种资源校验方法,其特征在于,应用于电子设备,包括:A resource verification method, characterized in that it is applied to electronic equipment, including:
    确定存储有同一目标资源的多个边缘节点,作为目标边缘节点;Determining multiple edge nodes storing the same target resource as target edge nodes;
    分别获取每个目标边缘节点所存储目标资源的校验信息;Obtain the verification information of the target resources stored in each target edge node respectively;
    通过对比每个目标边缘节点的所述校验信息,识别异常校验信息;identifying abnormal verification information by comparing the verification information of each target edge node;
    将所述异常校验信息对应的目标边缘节点中存储的目标资源确定为异常资源。The target resource stored in the target edge node corresponding to the abnormal check information is determined as an abnormal resource.
  2. 根据权利要求1所述的方法,其特征在于,所述电子设备为客户端;The method according to claim 1, wherein the electronic device is a client;
    所述确定存储有同一目标资源的多个边缘节点,作为目标边缘节点,包括:The determining multiple edge nodes storing the same target resource as the target edge node includes:
    向服务器发送资源标识;Send the resource identifier to the server;
    根据服务器的反馈结果,确定存储有所述资源标识对应的目标资源的多个边缘节点,作为目标边缘节点。According to the feedback result of the server, a plurality of edge nodes storing the target resources corresponding to the resource identifiers are determined as target edge nodes.
  3. 根据权利要求2所述的方法,其特征在于,所述向服务器发送资源标识,包括:The method according to claim 2, wherein the sending the resource identifier to the server comprises:
    在接收到针对目标资源的播放指令后,向服务器发送所述目标资源的资源标识;After receiving the play instruction for the target resource, sending the resource identifier of the target resource to the server;
    所述分别获取每个目标边缘节点所存储目标资源的校验信息,包括:The respectively obtaining the verification information of the target resources stored in each target edge node includes:
    分别向每个目标边缘节点发送针对所述目标资源的订阅请求;sending a subscription request for the target resource to each target edge node;
    分别接收所述每个目标边缘节点发送的目标资源及其校验信息。Respectively receive the target resource and its verification information sent by each target edge node.
  4. 根据权利要求3所述的方法,其特征在于,所述目标资源包括多个资源区块,所述订阅请求中包括目标资源的资源标识和目标资源区块的区块标识;The method according to claim 3, wherein the target resource includes a plurality of resource blocks, and the subscription request includes a resource identifier of the target resource and a block identifier of the target resource block;
    所述校验信息包括:目标资源区块的第一校验值和目标资源的第二校验值,所述第二校验值为根据目标边缘节点所存储目标资源包括的每个资源区块的第一校验值计算得到的;The verification information includes: a first verification value of the target resource block and a second verification value of the target resource, and the second verification value is based on each resource block included in the target resource stored in the target edge node Calculated from the first check value of ;
    所述通过对比每个目标边缘节点的所述校验信息,识别异常校验信息,包括:The identifying abnormal verification information by comparing the verification information of each target edge node includes:
    通过对比每个目标边缘节点发送的所述第一校验值和所述第二校验值,识别异常的第一校验值和/或第二校验值。An abnormal first check value and/or second check value is identified by comparing the first check value and the second check value sent by each target edge node.
  5. 根据权利要求4所述的方法,其特征在于,所述校验信息还包括:所述目标资源包括的各资源区块的区块标识;The method according to claim 4, wherein the verification information further includes: block identifiers of resource blocks included in the target resource;
    所述通过对比每个目标边缘节点发送的所述第一校验值和所述第二校验值,识别异常的第一校验值和/或第二校验值,包括:The identifying an abnormal first check value and/or second check value by comparing the first check value and the second check value sent by each target edge node includes:
    通过对比每个目标边缘节点发送的第一校验值,识别异常的第一校验值;identifying an abnormal first check value by comparing the first check value sent by each target edge node;
    确定所发送的各资源区块的区块标识相同的目标边缘节点,作为候选边缘节点;Determine the target edge node with the same block identifier of each resource block sent as the candidate edge node;
    通过对比每个候选边缘节点发送的第二校验值,识别异常的第二校验值。An abnormal second check value is identified by comparing the second check value sent by each candidate edge node.
  6. 根据权利要求2所述的方法,其特征在于,所述根据服务器的反馈结果,确定存储有所述资源标识对应的目标资源的多个边缘节点,作为目标边缘节点,包括:The method according to claim 2, wherein, according to the feedback result of the server, determining a plurality of edge nodes storing the target resource corresponding to the resource identifier, as the target edge node, includes:
    根据服务器的反馈结果,确定网关类型满足预设类型条件、并且存储有所述资源标识对应的目标资源的多个边缘节点,作为目标边缘节点;According to the feedback result of the server, it is determined that the gateway type satisfies the preset type condition and stores a plurality of edge nodes corresponding to the resource identifier as the target edge node;
    所述分别向每个目标边缘节点发送订阅请求之前,还包括:Before sending the subscription request to each target edge node, it also includes:
    分别与每个目标边缘节点建立连接。Establish connections with each target edge node separately.
  7. 根据权利要求1所述的方法,其特征在于,所述电子设备为第一边缘节点;The method according to claim 1, wherein the electronic device is a first edge node;
    所述确定存储有同一目标资源的多个边缘节点,作为目标边缘节点,包括:The determining multiple edge nodes storing the same target resource as the target edge node includes:
    向服务器发送资源标识;Send the resource identifier to the server;
    根据服务器的反馈结果,确定存储有所述资源标识对应的目标资源的多个边缘节点,作为目标边缘节点。According to the feedback result of the server, a plurality of edge nodes storing the target resources corresponding to the resource identifiers are determined as target edge nodes.
  8. 根据权利要求7所述的方法,其特征在于,所述向服务器发送资源标识,包括:The method according to claim 7, wherein the sending the resource identifier to the server comprises:
    在所述第一边缘节点的上行带宽满足预设低峰条件的情况下,向服务器发送所述第一边缘节点中存储的目标资源的资源标识。When the uplink bandwidth of the first edge node satisfies a preset low-peak condition, send the resource identifier of the target resource stored in the first edge node to the server.
  9. 根据权利要求8所述的方法,其特征在于,所述目标资源包括多个资源区块;The method according to claim 8, wherein the target resource comprises a plurality of resource blocks;
    所述分别获取每个目标边缘节点所存储目标资源的校验信息,包括:The respectively obtaining the verification information of the target resources stored in each target edge node includes:
    分别向每个目标边缘节点发送所述目标资源的资源标识;sending the resource identifier of the target resource to each target edge node respectively;
    分别接收所述每个目标边缘节点发送的目标资源的第二校验值和所述目标资源包括的各资源区块的区块标识,所述第二校验值为根据目标边缘节点所存储目标资源包括的每个资源区块的第一校验值计算得到的;Respectively receive the second check value of the target resource sent by each target edge node and the block identification of each resource block included in the target resource, the second check value is based on the target stored in the target edge node It is obtained by calculating the first check value of each resource block included in the resource;
    所述通过对比每个目标边缘节点的所述校验信息,识别异常校验信息,包括:The identifying abnormal verification information by comparing the verification information of each target edge node includes:
    确定所发送的各资源区块的区块标识相同的目标边缘节点,作为候选边缘节点;Determine the target edge node with the same block identifier of each resource block sent as the candidate edge node;
    通过对比每个候选边缘节点发送的第二校验值,识别异常的第二校验值。An abnormal second check value is identified by comparing the second check value sent by each candidate edge node.
  10. 根据权利要求1所述的方法,其特征在于,所述将所述异常校验信息对应的目标边缘节点中存储的目标资源确定为异常资源之后,还包括:The method according to claim 1, wherein after determining the target resource stored in the target edge node corresponding to the abnormal verification information as an abnormal resource, further comprising:
    向所述异常校验信息对应的目标边缘节点发送删除指令,所述删除指令用于指示所述异常校验信息对应的目标边缘节点删除所述异常资源。Sending a deletion instruction to the target edge node corresponding to the abnormality verification information, where the deletion instruction is used to instruct the target edge node corresponding to the abnormality verification information to delete the abnormal resource.
  11. 一种资源校验装置,其特征在于,应用于电子设备,包括:A resource verification device, characterized in that it is applied to electronic equipment, including:
    第一确定模块,用于确定存储有同一目标资源的多个边缘节点,作为目标边缘节点;The first determining module is configured to determine multiple edge nodes storing the same target resource as target edge nodes;
    获取模块,用于分别获取每个目标边缘节点所存储目标资源的校验信息;An acquisition module, configured to acquire verification information of target resources stored in each target edge node;
    识别模块,用于通过对比每个目标边缘节点的所述校验信息,识别异常校验信息;An identification module, configured to identify abnormal verification information by comparing the verification information of each target edge node;
    第二确定模块,用于将所述异常校验信息对应的目标边缘节点中存储的目标资源确定为异常资源。The second determining module is configured to determine the target resource stored in the target edge node corresponding to the abnormality verification information as an abnormal resource.
  12. 一种电子设备,其特征在于,包括处理器和存储器,其中:An electronic device, comprising a processor and a memory, wherein:
    存储器,用于存放计算机程序;memory for storing computer programs;
    处理器,用于执行存储器上所存放的程序时,实现权利要求1-10任一所述的方法步骤。The processor is configured to implement the method steps described in any one of claims 1-10 when executing the program stored in the memory.
  13. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-10任一所述的方法步骤。A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps described in any one of claims 1-10 are implemented.
PCT/CN2022/100033 2021-10-28 2022-06-21 Resource verification method, apparatus, and device, and storage medium WO2023071235A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111262867.0 2021-10-28
CN202111262867.0A CN114398659A (en) 2021-10-28 2021-10-28 Resource checking method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023071235A1 true WO2023071235A1 (en) 2023-05-04

Family

ID=81225264

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100033 WO2023071235A1 (en) 2021-10-28 2022-06-21 Resource verification method, apparatus, and device, and storage medium

Country Status (2)

Country Link
CN (1) CN114398659A (en)
WO (1) WO2023071235A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114398659A (en) * 2021-10-28 2022-04-26 上海哔哩哔哩科技有限公司 Resource checking method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108683668A (en) * 2018-05-18 2018-10-19 腾讯科技(深圳)有限公司 Resource checksum method, apparatus, storage medium and equipment in content distributing network
CN111314403A (en) * 2018-12-12 2020-06-19 阿里巴巴集团控股有限公司 Method and device for checking resource consistency
CN111555860A (en) * 2020-04-09 2020-08-18 中信梧桐港供应链管理有限公司 Block link point consensus method and device, electronic equipment and storage medium
WO2021093675A1 (en) * 2019-11-12 2021-05-20 北京金山云网络技术有限公司 Verification method for cdn return-to-source, verification server, and cdn cluster
CN114398659A (en) * 2021-10-28 2022-04-26 上海哔哩哔哩科技有限公司 Resource checking method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108683668A (en) * 2018-05-18 2018-10-19 腾讯科技(深圳)有限公司 Resource checksum method, apparatus, storage medium and equipment in content distributing network
CN111314403A (en) * 2018-12-12 2020-06-19 阿里巴巴集团控股有限公司 Method and device for checking resource consistency
WO2021093675A1 (en) * 2019-11-12 2021-05-20 北京金山云网络技术有限公司 Verification method for cdn return-to-source, verification server, and cdn cluster
CN111555860A (en) * 2020-04-09 2020-08-18 中信梧桐港供应链管理有限公司 Block link point consensus method and device, electronic equipment and storage medium
CN114398659A (en) * 2021-10-28 2022-04-26 上海哔哩哔哩科技有限公司 Resource checking method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114398659A (en) 2022-04-26

Similar Documents

Publication Publication Date Title
US10033804B2 (en) Delivery of content
US9838425B2 (en) Systems and methods for network access control
US10455005B2 (en) Detecting virtual private network usage
US10021179B1 (en) Local resource delivery network
US20230041041A1 (en) Systems and methods for remote management of appliances
US10904220B2 (en) Provisioning using a generic configuration
US20060239234A1 (en) Application programming interface for discovering endpoints in a serverless peer to peer network
US20070180079A1 (en) Method and system for peer-to-peer stream
US11546300B2 (en) Firewall system with application identifier based rules
US11711357B2 (en) Identity data object creation and management
US20220182419A1 (en) Methods and systems for stateful network security
WO2015090132A1 (en) Video distribution and media resource system interaction method and system
US11671279B2 (en) Determining a session key using session data
CN108289074B (en) User account login method and device
WO2023071235A1 (en) Resource verification method, apparatus, and device, and storage medium
WO2021098277A1 (en) Blockchain file access method and apparatus, computer device and storage medium
US20220012110A1 (en) Networking-related system call interception and modification
CN116158069A (en) Configurable access-based cache policy control
Meyn Browser to browser media streaming with HTML5
US20110161313A1 (en) Method and apparatus for automated end to end content tracking in peer to peer environments
WO2017096886A1 (en) Content pushing method, apparatus and system
CN113285920B (en) Service access method, device, equipment and storage medium
US20080301305A1 (en) Method and related system for building up a network connection between clients and servers through a stream fork by utilizing http protocol
US20110276669A1 (en) Method and System for Peer-to-Peer Stream
US20190191222A1 (en) Method and system of content distribution in the data transfer network with built-in mechanism of conditional access

Legal Events

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

Ref document number: 22885141

Country of ref document: EP

Kind code of ref document: A1