[go: up one dir, main page]

CN114501080A - Service content updating method and device, storage medium and electronic equipment - Google Patents

Service content updating method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114501080A
CN114501080A CN202210128816.7A CN202210128816A CN114501080A CN 114501080 A CN114501080 A CN 114501080A CN 202210128816 A CN202210128816 A CN 202210128816A CN 114501080 A CN114501080 A CN 114501080A
Authority
CN
China
Prior art keywords
service content
content
service
distribution node
identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210128816.7A
Other languages
Chinese (zh)
Inventor
盛骥斌
曹问
曾迅迅
唐文滔
曹望
李兴平
刘维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan MgtvCom Interactive Entertainment Media Co Ltd
Original Assignee
Hunan MgtvCom Interactive Entertainment Media Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan MgtvCom Interactive Entertainment Media Co Ltd filed Critical Hunan MgtvCom Interactive Entertainment Media Co Ltd
Priority to CN202210128816.7A priority Critical patent/CN114501080A/en
Publication of CN114501080A publication Critical patent/CN114501080A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26291Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for providing content or additional data updates, e.g. updating software modules, stored at the client
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23113Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving housekeeping operations for stored content, e.g. prioritizing content for deletion because of storage space restrictions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/232Content retrieval operation locally within server, e.g. reading video streams from disk arrays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a service content updating method and device, a storage medium and electronic equipment, wherein the method comprises the following steps: detecting the operation state of a content distribution node in the operation process of the content distribution node; under the condition that the running state of the content distribution node is detected to meet the content updating condition, a content updating request is sent to the central server; receiving service content description information fed back by the central server in response to the content updating request; the service content description information comprises a priority score of each service content identification; determining a target service content identifier according to the priority score of each service content identifier; and downloading the service content corresponding to the target service content identification so as to update the service content resource in the content distribution node. And updating the service content resources in the content distribution node according to the priority level number, so that the content distribution node can provide the required service content for the client, and the utilization rate of the network resources of the content distribution node is improved.

Description

服务内容更新方法及装置、存储介质及电子设备Service content update method and device, storage medium and electronic device

技术领域technical field

本发明涉及数据处理技术领域,特别涉及一种服务内容更新方法及装置、存储介质及电子设备。The present invention relates to the technical field of data processing, and in particular, to a service content update method and device, a storage medium and an electronic device.

背景技术Background technique

随着通讯网络的迅速发展,资源共享的实现愈加便捷迅速,如在内容分发网络中,客户端的视频资源等服务内容获取可以在相应的中心服务器中获取,还可以在其他的内容分发节点中获取,即:在客户端向服务器获取视频资源时,服务器根据该客户端的IP地址,确定向该客户端进行资源共享的内容分发节点。为了提高资源共享的效率,通常需要对内容分发节点中的服务内容资源进行更新。With the rapid development of communication networks, the realization of resource sharing has become more convenient and faster. For example, in the content distribution network, the client's video resources and other service content can be obtained in the corresponding central server, and can also be obtained in other content distribution nodes. , that is, when the client obtains video resources from the server, the server determines the content distribution node that shares resources with the client according to the IP address of the client. In order to improve the efficiency of resource sharing, it is usually necessary to update the service content resources in the content distribution node.

现有技术中,通常由中心服务器统一计算出节点需要服务的内容,然后强制节点更新内容来提供服务,这种方式只关注全局的服务内容需求,无法针对每一内容分发节点的具体服务内容需求,容易导致部分节点的网络资源利用率低。In the prior art, the central server usually calculates the content that the node needs to serve, and then forces the node to update the content to provide the service. This method only focuses on the global service content requirements, and cannot target the specific service content requirements of each content distribution node. , which may easily lead to low utilization of network resources of some nodes.

发明内容SUMMARY OF THE INVENTION

本发明所要解决的技术问题是提供一种服务内容更新方法,能够提高网络资源利用率。The technical problem to be solved by the present invention is to provide a service content update method, which can improve the utilization rate of network resources.

本发明还提供了一种服务内容更新装置,用以保证上述方法在实际中的实现及应用。The present invention also provides a service content update device to ensure the actual realization and application of the above method.

一种服务内容更新方法,包括:A service content update method, comprising:

在预设的内容分发节点运行过程中,检测所述内容分发节点的运行状态;During the running process of the preset content distribution node, detecting the running state of the content distribution node;

在检测出所述内容分发节点的运行状态满足预设的内容更新条件的情况下,向预设的中心服务器发送内容更新请求;Sending a content update request to a preset central server when it is detected that the running state of the content distribution node satisfies a preset content update condition;

接收所述中心服务器响应所述内容更新请求所反馈的服务内容描述信息;所述服务内容描述信息包括多个服务内容标识以及每一所述服务内容标识的优先级分数;每一所述服务内容标识的优先级分数基于所述服务内容标识的访问次数以及访问失败次数计算得到,所述访问失败次数为预设的客户端请求访问所述服务内容标识对应的服务内容的失败次数;Receive the service content description information fed back by the central server in response to the content update request; the service content description information includes a plurality of service content identifiers and a priority score of each of the service content identifiers; each of the service content The priority score of the identifier is calculated based on the number of visits of the service content identifier and the number of access failures, and the number of access failures is the preset number of failures of the client requesting to access the service content corresponding to the service content identifier;

根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识;According to the priority score of each service content identifier in the service content description information, determine the target service content identifier in each of the service content identifiers;

下载所述目标服务内容标识对应的服务内容,以更新所述内容分发节点中的服务内容资源。The service content corresponding to the target service content identifier is downloaded to update the service content resource in the content distribution node.

上述的方法,可选的,所述运行状态包括带宽贡献率和磁盘负载参数,检测出所述内容分发节点的运行状态满足预设的内容更新条件的过程,包括:In the above method, optionally, the operating state includes a bandwidth contribution rate and a disk load parameter, and the process of detecting that the operating state of the content distribution node satisfies a preset content update condition includes:

若所述内容分发节点的带宽贡献率小于预设的贡献率阈值,或者所述磁盘负载参数大于预设的磁盘负载阈值,则确定所述内容分发节点的运行状态满足预设的内容更新条件,所述内容分发节点的带宽贡献率指的是所述内容分发节点提供的带宽占所述内容分发节点的理论带宽上限的比例,所述磁盘负载参数表征所述内容分发节点的磁盘繁忙程度。If the bandwidth contribution rate of the content distribution node is less than the preset contribution rate threshold, or the disk load parameter is greater than the preset disk load threshold, it is determined that the running state of the content distribution node satisfies the preset content update condition, The bandwidth contribution rate of the content distribution node refers to the proportion of the bandwidth provided by the content distribution node to the upper limit of the theoretical bandwidth of the content distribution node, and the disk load parameter represents the busyness of the disk of the content distribution node.

上述的方法,可选的,所述检测出所述内容分发节点的运行状态满足预设的内容更新条件之后,还包括:In the above method, optionally, after detecting that the running state of the content distribution node satisfies a preset content update condition, the method further includes:

检测所述内容分发节点中的磁盘容量是否小于预设的容量阈值;Detecting whether the disk capacity in the content distribution node is less than a preset capacity threshold;

在所述磁盘容量小于所述容量阈值的情况下,根据所述内容分发节点中存储的每个服务内容在预设的服务时长内的访问量,在各个所述服务内容中选取出待淘汰服务内容;When the disk capacity is less than the capacity threshold, select a service to be eliminated from each of the service contents according to the number of visits of each service content stored in the content distribution node within a preset service duration content;

对所述待淘汰服务内容进行删除。Delete the service content to be eliminated.

上述的方法,可选的,所述根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识,包括:In the above method, optionally, determining a target service content identifier in each of the service content identifiers according to the priority score of each service content identifier in the service content description information, including:

在所述服务内容描述信息中的各个所述服务内容标识中确定出备选服务内容标识,所述备选服务内容标识指的是与所述内容分发节点当前存储的服务内容所对应的服务内容标识不一致的标识;An alternative service content identifier is determined from each of the service content identifiers in the service content description information, where the alternative service content identifier refers to the service content corresponding to the service content currently stored by the content distribution node Identification of inconsistent identification;

按每个所述备选服务内容标识的优先级分数由大至小的顺序,在各个所述备选服务内容标识中选取出预设数量的目标服务内容标识。According to the priority score of each candidate service content identifier in descending order, a preset number of target service content identifiers are selected from each of the candidate service content identifiers.

上述的方法,可选的,所述更新所述内容分发节点中的服务内容资源之后,还包括:The above method, optionally, after the updating of the service content resources in the content distribution node, further includes:

向所述中心服务器发送所述内容分发节点中的服务内容资源的资源信息;所述资源信息包括所述内容分发节点中的各个服务内容的服务内容标识;使得所述中心服务器在接收到客户端查询与所述资源信息相匹配的服务内容时,向所述客户端发送所述内容分发节点的节点信息;Send the resource information of the service content resources in the content distribution node to the central server; the resource information includes the service content identifiers of each service content in the content distribution node; so that the central server receives the client When querying the service content matching the resource information, send the node information of the content distribution node to the client;

当接收到客户端根据中心服务器提供的节点信息发送的服务内容查询请求时,确定所述服务内容查询请求对应的服务内容;When receiving a service content query request sent by the client according to the node information provided by the central server, determine the service content corresponding to the service content query request;

将所述服务内容查询请求对应的服务内容发往所述客户端。The service content corresponding to the service content query request is sent to the client.

一种服务内容更新装置,包括:A service content update device, comprising:

检测单元,用于在预设的内容分发节点运行过程中,检测所述内容分发节点的运行状态;a detection unit, configured to detect the running state of the content distribution node during a preset running process of the content distribution node;

发送单元,用于在检测出所述内容分发节点的运行状态满足预设的内容更新条件的情况下,向预设的中心服务器发送内容更新请求;a sending unit, configured to send a content update request to a preset central server when it is detected that the running state of the content distribution node satisfies a preset content update condition;

接收单元,用于接收所述中心服务器响应所述内容更新请求所反馈的服务内容描述信息;所述服务内容描述信息包括多个服务内容标识以及每一所述服务内容标识的优先级分数;每一所述服务内容标识的优先级分数基于所述服务内容标识的访问次数以及访问失败次数计算得到,所述访问失败次数为预设的客户端请求访问所述服务内容标识对应的服务内容的失败次数;a receiving unit, configured to receive the service content description information fed back by the central server in response to the content update request; the service content description information includes a plurality of service content identifiers and a priority score of each of the service content identifiers; each The priority score of the service content identifier is calculated based on the number of accesses of the service content identifier and the number of access failures, where the number of access failures is a preset failure of the client to request access to the service content corresponding to the service content identifier frequency;

确定单元,用于根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识;a determining unit, configured to determine a target service content identifier in each of the service content identifiers according to the priority score of each service content identifier in the service content description information;

更新单元,用于下载所述目标服务内容标识对应的服务内容,以更新所述内容分发节点中的服务内容资源。An update unit, configured to download the service content corresponding to the target service content identifier, so as to update the service content resource in the content distribution node.

上述的装置,可选的,所述确定单元,包括:The above-mentioned device, optionally, the determining unit includes:

确定子单元,用于在所述服务内容描述信息中的各个所述服务内容标识中确定出备选服务内容标识,所述备选服务内容标识指的是与所述内容分发节点当前存储的服务内容所对应的服务内容标识不一致的标识;A determination subunit, configured to determine an alternative service content identifier in each of the service content identifiers in the service content description information, where the alternative service content identifier refers to the service currently stored with the content distribution node The identification of the service content corresponding to the content is inconsistent;

选取子单元,用于按每个所述备选服务内容标识的优先级分数由大至小的顺序,在各个所述备选服务内容标识中选取出预设数量的目标服务内容标识。A selection subunit, configured to select a preset number of target service content identifiers from each of the candidate service content identifiers in descending order of the priority score of each of the candidate service content identifiers.

上述的装置,可选的,还包括:The above-mentioned device, optionally, also includes:

第一执行单元,用于向所述中心服务器发送所述内容分发节点中的服务内容资源的资源信息;所述资源信息包括所述内容分发节点中的各个服务内容的服务内容标识;使得所述中心服务器在接收到客户端查询与所述资源信息相匹配的服务内容时,向所述客户端发送所述内容分发节点的节点信息;a first execution unit, configured to send resource information of service content resources in the content distribution node to the central server; the resource information includes service content identifiers of each service content in the content distribution node; The central server sends the node information of the content distribution node to the client when receiving the query from the client for service content that matches the resource information;

第二执行单元,用于当接收到客户端根据中心服务器提供的节点信息发送的服务内容查询请求时,确定所述服务内容查询请求对应的服务内容;The second execution unit is configured to, when receiving a service content query request sent by the client according to the node information provided by the central server, determine the service content corresponding to the service content query request;

第三执行单元,用于将所述服务内容查询请求对应的服务内容发往所述客户端。The third execution unit is configured to send the service content corresponding to the service content query request to the client.

一种存储介质,所述存储介质包括存储指令,其中,在所述指令运行时控制所述存储介质所在的设备执行如上述的服务内容更新方法。A storage medium, the storage medium comprising a storage instruction, wherein when the instruction is executed, a device where the storage medium is located is controlled to execute the above-mentioned method for updating service content.

一种电子设备,包括存储器,以及一个或者一个以上的指令,其中一个或一个以上指令存储于存储器中,且经配置以由一个或者一个以上处理器执行如上述的服务内容更新方法。An electronic device includes a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to perform, by one or more processors, the service content update method as described above.

基于上述本发明实施提供的一种服务内容更新方法及装置、存储介质及电子设备,该方法包括:在预设的内容分发节点运行过程中,检测所述内容分发节点的运行状态;在检测出所述内容分发节点的运行状态满足预设的内容更新条件的情况下,向预设的中心服务器发送内容更新请求;接收所述中心服务器响应所述内容更新请求所反馈的服务内容描述信息;所述服务内容描述信息包括多个服务内容标识以及每一所述服务内容标识的优先级分数;每一所述服务内容标识的优先级分数基于所述服务内容标识的访问次数以及访问失败次数计算得到,所述访问失败次数为预设的客户端请求访问所述服务内容标识对应的服务内容的失败次数;根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识;下载所述目标服务内容标识对应的服务内容,以更新所述内容分发节点中的服务内容资源。应用本发明实施例提供的方法,可以根据优先级分数对内容分发节点中的服务内容资源进行更新,使得内容分发节点能够为客户端提供其所需的服务内容,提高内容分发节点网络资源的利用率。A service content update method and device, storage medium and electronic device are provided based on the above-mentioned implementation of the present invention, the method includes: during the preset operation process of the content distribution node, detecting the running state of the content distribution node; When the running state of the content distribution node satisfies preset content update conditions, send a content update request to a preset central server; receive service content description information fed back by the central server in response to the content update request; The service content description information includes a plurality of service content identifiers and a priority score of each service content identifier; the priority score of each service content identifier is calculated based on the number of visits and the number of access failures of the service content identifier , the number of access failures is the preset number of failures of the client requesting to access the service content corresponding to the service content identifier; according to the priority score of each service content identifier in the service content description information, in each of the The target service content identifier is determined in the service content identifier; the service content corresponding to the target service content identifier is downloaded to update the service content resource in the content distribution node. By applying the method provided by the embodiment of the present invention, the service content resources in the content distribution node can be updated according to the priority score, so that the content distribution node can provide the client with the required service content, and the utilization of the network resources of the content distribution node is improved. Rate.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying 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 It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without creative work.

图1为本发明提供的一种服务内容更新方法的方法流程图;Fig. 1 is a method flow chart of a service content updating method provided by the present invention;

图2为本发明提供的一种在各个服务内容标识中确定出目标服务内容标识图的过程的流程图;2 is a flowchart of a process for determining a target service content identification map in each service content identification provided by the present invention;

图3为本发明提供的又一种服务内容更新方法的方法流程图;Fig. 3 is a method flow chart of another service content updating method provided by the present invention;

图4为本发明提供的一种实施场景示例图;FIG. 4 is an exemplary diagram of an implementation scenario provided by the present invention;

图5为本发明提供的一种服务内容更新方法的流程示例图;FIG. 5 is an exemplary flowchart of a service content update method provided by the present invention;

图6为本发明提供的一种服务内容更新装置的结构示意图;6 is a schematic structural diagram of a service content updating apparatus provided by the present invention;

图7为本发明提供的一种电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device provided by the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

在本申请中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。In this application, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device comprising a list of elements includes not only those elements, but also no Other elements expressly listed, or which are also inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

本发明实施例提供了一种服务内容更新方法,该方法可以应用于电子设备,所述方法的方法流程图如图1所示,具体包括:An embodiment of the present invention provides a method for updating service content, and the method can be applied to an electronic device. The method flowchart of the method is shown in FIG. 1 , and specifically includes:

S101:在预设的内容分发节点运行过程中,检测所述内容分发节点的运行状态。S101: During a preset running process of the content distribution node, detect the running state of the content distribution node.

在本实施例中,内容分发节点可以为端对端内容分发网络PCDN的节点,例如,可以为各种型号的机顶盒、光猫等互联网设备。在一些实施例中,内容分发节点还可以为内容分发网络CDN(Content DeliveryNetwork)的节点。In this embodiment, the content distribution node may be a node of an end-to-end content distribution network PCDN, for example, may be various types of Internet devices such as set-top boxes and optical modems. In some embodiments, the content distribution node may also be a node of a content distribution network CDN (Content Delivery Network).

可选的,内容分发节点的运行状态可以包括带宽贡献率、磁盘负载参数和数据包重传率等其中一种或多种,磁盘负载参数具体可以为磁盘I/O参数。Optionally, the running state of the content distribution node may include one or more of a bandwidth contribution rate, a disk load parameter, and a data packet retransmission rate, and the disk load parameter may specifically be a disk I/O parameter.

S102:在检测出所述内容分发节点的运行状态满足预设的内容更新条件的情况下,向预设的中心服务器发送内容更新请求。S102: Send a content update request to a preset central server when it is detected that the running state of the content distribution node satisfies a preset content update condition.

在本实施例中,内容分发节点的运行状态可以包括带宽贡献率和磁盘负载参数,内容更新条件可以为运行状态中的带宽贡献率小于预设的贡献率阈值和/或磁盘负载参数大于预设的参数阈值等;内容分发节点的磁盘负载参数可以表征内容分发节点的磁盘繁忙程度;内容分发节点的带宽贡献率指的是内容分发节点提供的带宽占内容分发节点的理论带宽上限的比例,若宽带贡献率小于贡献率阈值,则说明内容分发节点的服务内容分布不合理,可以对该内容分发节点中的服务内容进行更新。In this embodiment, the running state of the content distribution node may include a bandwidth contribution rate and a disk load parameter, and the content update condition may be that the bandwidth contribution rate in the running state is less than a preset contribution rate threshold and/or the disk load parameter is greater than a preset value The parameter threshold of the content distribution node, etc.; the disk load parameter of the content distribution node can represent the disk busyness of the content distribution node; the bandwidth contribution rate of the content distribution node refers to the ratio of the bandwidth provided by the content distribution node to the theoretical upper limit of the content distribution node. If the broadband contribution rate is less than the contribution rate threshold, it means that the service content distribution of the content distribution node is unreasonable, and the service content in the content distribution node can be updated.

具体的,检测出内容分发节点的运行状态满足预设的内容更新条件的过程可以为:若所述内容分发节点的带宽贡献率小于预设的贡献率阈值,或者所述磁盘负载参数大于预设的磁盘负载阈值,则确定所述内容分发节点的运行状态满足预设的内容更新条件。Specifically, the process of detecting that the running state of the content distribution node satisfies the preset content update condition may be: if the bandwidth contribution rate of the content distribution node is less than a preset contribution rate threshold, or the disk load parameter is greater than a preset The disk load threshold is determined, then it is determined that the running state of the content distribution node satisfies the preset content update condition.

可选的,若所述内容分发节点的带宽贡献率不小于预设的贡献率阈值,且所述磁盘负载参数不大于预设的磁盘负载阈值,则确定所述内容分发节点的运行状态不满足预设的内容更新条件。Optionally, if the bandwidth contribution rate of the content distribution node is not less than a preset contribution rate threshold, and the disk load parameter is not greater than the preset disk load threshold, it is determined that the running status of the content distribution node does not meet the requirements. Preset content update conditions.

需要说明的是,宽带贡献率阈值和磁盘负载阈值可以随当前所处的时段的变化而变化,内容分发节点可以根据各个时段不同的业务需求,为不同时段设置不同的宽带贡献率阈值和磁盘负载阈值,能够提高内容分发节点的内容更新效率,节约内容分发节点的算力资源。It should be noted that the bandwidth contribution rate threshold and disk load threshold can change with the current time period, and the content distribution node can set different bandwidth contribution rate thresholds and disk load for different time periods according to different business needs of each time period. The threshold value can improve the content update efficiency of the content distribution node and save the computing resources of the content distribution node.

可选的,所述内容更新请求用于指示中心服务器Tracker反馈服务内容描述信息,中心服务器中记录不同节点和不同服务内容之间的对应关系。Optionally, the content update request is used to instruct the central server Tracker to feed back service content description information, and the central server records the correspondence between different nodes and different service contents.

S103:接收所述中心服务器响应所述内容更新请求所反馈的服务内容描述信息;所述服务内容描述信息包括多个服务内容标识以及每一所述服务内容标识的优先级分数;每一所述服务内容标识的优先级分数基于所述服务内容标识的访问次数以及访问失败次数计算得到,所述访问失败次数为预设的客户端请求访问所述服务内容标识对应的服务内容的失败次数。S103: Receive service content description information fed back by the central server in response to the content update request; the service content description information includes a plurality of service content identifiers and a priority score of each service content identifier; each of the service content identifiers The priority score of the service content identifier is calculated based on the number of visits of the service content identifier and the number of access failures, where the number of access failures is a preset number of failures of the client requesting to access the service content corresponding to the service content identifier.

在本实施例中,服务内容描述信息可以是中心服务器生成的待扩散列表,服务内容描述信息中的服务内容标识为待扩散服务内容的标识,服务内容标识的访问次数指的是预设时间段内客户端请求该服务内容标识的服务内容的次数;服务内容可以为各个类型的资源,例如,可以为视频、音乐等。In this embodiment, the service content description information may be a list to be diffused generated by the central server, the service content identifier in the service content description information is the identifier of the service content to be diffused, and the number of visits of the service content identifier refers to a preset time period The number of times the internal client requests the service content identified by the service content; the service content can be various types of resources, for example, video, music, etc.

在一些实施例中,服务内容标识的优先级分数可以反应服务内容标识的优先扩散程度,服务内容标识的优先级分数越高,则服务内容标识的扩散优先级越高,优先级分数的计算方式如下:In some embodiments, the priority score of the service content identification may reflect the priority diffusion degree of the service content identification. The higher the priority score of the service content identification, the higher the diffusion priority of the service content identification. The calculation method of the priority score as follows:

P=c×M+QP=c×M+Q

其中,P为优先级分数;c为预先设置的折算比;M为访问失败次数;Q为预设时间段内的访问次数。Among them, P is the priority score; c is the preset conversion ratio; M is the number of access failures; Q is the number of accesses within the preset time period.

S104:根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识。S104: Determine a target service content identifier in each of the service content identifiers according to the priority score of each service content identifier in the service content description information.

在本实施例中,可以根据每个服务内容标识的优先级分数的大小在各个服务内容标识中确定出目标服务内容标识。In this embodiment, the target service content identifier may be determined from each service content identifier according to the size of the priority score of each service content identifier.

S105:下载所述目标服务内容标识对应的服务内容,以更新所述内容分发节点中的服务内容资源。S105: Download the service content corresponding to the target service content identifier to update the service content resource in the content distribution node.

在本实施例中,可以向中心服务器发送查询请求,以确定存储所述目标服务内容标识的服务内容的节点;向所述节点发送所述目标服务内容标识对应的下载请求,以从所述节点中下载所述目标服务内容标识对应的服务内容,将下载得到的服务内容存储到内容分发节点中的服务内容存储区域,以实现对内容分发节点的中的服务内容资源的更新。In this embodiment, a query request may be sent to the central server to determine the node storing the service content identified by the target service content; The service content corresponding to the target service content identifier is downloaded in the server, and the downloaded service content is stored in the service content storage area in the content distribution node, so as to realize the update of the service content resource in the content distribution node.

可选的,在更新内容分发节点中的服务内容资源后,可以重新返回执行S101,直至内容分发节点的运行状态不满足内容更新条件。Optionally, after the service content resource in the content distribution node is updated, S101 may be performed again until the running state of the content distribution node does not satisfy the content update condition.

应用本发明实施例提供的方法,可以根据优先级分数对内容分发节点中的服务内容资源进行更新,使得内容分发节点能够为客户端提供其所需的服务内容,提高内容分发节点网络资源的利用率。By applying the method provided by the embodiment of the present invention, the service content resources in the content distribution node can be updated according to the priority score, so that the content distribution node can provide the client with the required service content, and the utilization of the network resources of the content distribution node is improved. Rate.

在本发明提供的一实施例中,基于上述的实施过程,可选的,所述检测出所述内容分发节点的运行状态满足预设的内容更新条件之后,还包括:In an embodiment provided by the present invention, based on the foregoing implementation process, optionally, after detecting that the running state of the content distribution node satisfies a preset content update condition, the method further includes:

检测所述内容分发节点中的磁盘容量是否小于预设的容量阈值;Detecting whether the disk capacity in the content distribution node is less than a preset capacity threshold;

在所述磁盘容量小于所述容量阈值的情况下,根据所述内容分发节点中存储的每个服务内容在预设的服务时长内的访问量,在各个所述服务内容中选取出待淘汰服务内容;When the disk capacity is less than the capacity threshold, select a service to be eliminated from each of the service contents according to the number of visits of each service content stored in the content distribution node within a preset service duration content;

对所述待淘汰服务内容进行删除。Delete the service content to be eliminated.

在本实施例中,服务时长指的是服务内容在所述内容分发节点上线服务时长,例如,可以统计已上线服务超过一天的各个服务内容在过去一天的访问量,可以根据访问量由小到大的顺序选取预设淘汰数量的服务内容作为待淘汰服务内容,并对待淘汰服务内容进行删除。In this embodiment, the service duration refers to the online service duration of the service content on the content distribution node. For example, the number of visits of each service content that has been online for more than one day in the past day can be counted, and the number of visits can vary from small to The preset number of service contents to be eliminated is selected in a large order as the service contents to be eliminated, and the service contents to be eliminated are deleted.

在本发明提供的一实施例中,基于上述的实施过程,可选的,所述根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识,如图2所示,包括:In an embodiment provided by the present invention, based on the above implementation process, optionally, according to the priority score of each service content identifier in the service content description information, determine in each of the service content identifiers The target service content identification, as shown in Figure 2, includes:

S201:在所述服务内容描述信息中的各个所述服务内容标识中确定出备选服务内容标识,所述备选服务内容标识指的是与所述内容分发节点当前存储的服务内容所对应的服务内容标识不一致的标识。S201: Determine an alternative service content identifier in each of the service content identifiers in the service content description information, where the alternative service content identifier refers to a service content corresponding to the service content currently stored by the content distribution node Service Content ID inconsistent ID.

在本实施例中,可以将服务内容描述信息中的各个服务内容标识与内容分发节点当前存储的服务内容所对应的服务内容标识进行对比,以在服务内容描述信息中的各个服务内容标识中确定出备选服务内容标识。In this embodiment, each service content identifier in the service content description information may be compared with the service content identifier corresponding to the service content currently stored by the content distribution node, so as to determine in each service content identifier in the service content description information Select an alternative service content identifier.

S202:按每个所述备选服务内容标识的优先级分数由大至小的顺序,在各个所述备选服务内容标识中选取出预设数量的目标服务内容标识。S202: Select a preset number of target service content identifiers from each of the candidate service content identifiers in descending order of the priority scores of each of the candidate service content identifiers.

在本实施例中,可以在各个备选服务内容标识中选取出一个或多个目标服务内容标识。In this embodiment, one or more target service content identifiers may be selected from each candidate service content identifier.

在一些实施例中,在确定出备选服务内容标识后,可以将优先级分数大于预设的优先级分数阈值的备选服务内容标识确定为目标服务内容标识。In some embodiments, after the alternative service content identifiers are determined, the alternative service content identifiers whose priority scores are greater than the preset priority score threshold may be determined as the target service content identifiers.

参见图3,为本发明实施例提供的又一种服务内容更新方法的方法流程图,具体包括:Referring to FIG. 3, it is a method flowchart of another service content update method provided by an embodiment of the present invention, which specifically includes:

S301:在预设的内容分发节点运行过程中,检测所述内容分发节点的运行状态。S301: During a preset running process of the content distribution node, detect the running state of the content distribution node.

S302:在检测出所述内容分发节点的运行状态满足预设的内容更新条件的情况下,向预设的中心服务器发送内容更新请求。S302: Send a content update request to a preset central server when it is detected that the running state of the content distribution node satisfies a preset content update condition.

S303:接收所述中心服务器响应所述内容更新请求所反馈的服务内容描述信息;所述服务内容描述信息包括多个服务内容标识以及每一所述服务内容标识的优先级分数;每一所述服务内容标识的优先级分数基于所述服务内容标识的访问次数以及访问失败次数计算得到,所述访问失败次数为预设的客户端请求访问所述服务内容标识对应的服务内容的失败次数。S303: Receive service content description information fed back by the central server in response to the content update request; the service content description information includes a plurality of service content identifiers and a priority score of each service content identifier; each of the service content identifiers The priority score of the service content identifier is calculated based on the number of visits of the service content identifier and the number of access failures, where the number of access failures is a preset number of failures of the client requesting to access the service content corresponding to the service content identifier.

S304:根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识。S304: Determine a target service content identifier in each of the service content identifiers according to the priority score of each service content identifier in the service content description information.

S305:下载所述目标服务内容标识对应的服务内容,以更新所述内容分发节点中的服务内容资源。S305: Download the service content corresponding to the target service content identifier to update the service content resource in the content distribution node.

在本实施例中,S301-S305与图1实施例中的S101-S105的实施过程和原理一致,此处不再赘述。In this embodiment, the implementation process and principles of S301-S305 are the same as those of S101-S105 in the embodiment of FIG. 1 , and details are not repeated here.

S306:向所述中心服务器发送所述内容分发节点中的服务内容资源的资源信息;所述资源信息包括所述内容分发节点中的各个服务内容的服务内容标识;使得所述中心服务器在接收到客户端查询与所述资源信息相匹配的服务内容时,向所述客户端发送所述内容分发节点的节点信息。S306: Send the resource information of the service content resources in the content distribution node to the central server; the resource information includes the service content identifiers of each service content in the content distribution node; When the client queries the service content matching the resource information, the client sends the node information of the content distribution node to the client.

在本发明实例中,向资源信息发送到中心服务器后,中心服务器可以记录内容分发节点与资源信息中的各个服务内容标识之间的对应关系。In the example of the present invention, after the resource information is sent to the central server, the central server may record the correspondence between the content distribution node and each service content identifier in the resource information.

S307:当接收到客户端根据中心服务器提供的节点信息发送的服务内容查询请求时,确定所述服务内容查询请求对应的服务内容。S307: When receiving a service content query request sent by the client according to the node information provided by the central server, determine the service content corresponding to the service content query request.

在本发明实施例中,可以对服务内容查询请求进行解析,获取服务内容查询请求中包含的服务内容标识,以通过服务内容标识确定服务内容查询请求对应的服务内容。In the embodiment of the present invention, the service content query request may be parsed to obtain the service content identifier included in the service content query request, so as to determine the service content corresponding to the service content query request through the service content identifier.

S308:将所述服务内容查询请求对应的服务内容发往所述客户端。S308: Send the service content corresponding to the service content query request to the client.

应用本发明实施例提供的方法,能够快速的为客户端提供其所需的服务内容。By applying the method provided by the embodiment of the present invention, the client can quickly provide the service content required by the client.

参见图4,为本发明提供的一种实施环境的示例图,该实施环境可以包含中心服务器Tracker、至少一个PCDN节点以及至少一个客户端。PCDN节点与客户端节点都与Tracker相连。Referring to FIG. 4, it is an example diagram of an implementation environment provided by the present invention, and the implementation environment may include a central server Tracker, at least one PCDN node and at least one client. Both the PCDN node and the client node are connected to the Tracker.

其中,PCDN节点可以为各种不同型号的机顶盒,光猫等互联网设备,能提供少量的存储空间以及网络带宽服务。每个客户端可以从PCDN节点以及其他客户端来获取信息。Tracker服务保管不同PCDN节点和服务内容之间的对应关系,所有的PCDN节点都连接在Tracker上,所有节点需要拉取内容时需要向Tracker查找内容所在节点,然后向对应节点发起连接。Among them, PCDN nodes can provide a small amount of storage space and network bandwidth services for various types of set-top boxes, optical cats and other Internet devices. Each client can obtain information from PCDN nodes as well as other clients. The Tracker service maintains the correspondence between different PCDN nodes and service content. All PCDN nodes are connected to the Tracker. When all nodes need to pull content, they need to find the node where the content is located in the Tracker, and then initiate a connection to the corresponding node.

在本实施例中,Tracker需要增加失败miss次数以及访问热度hot统计功能,当有客户端需要请求某段数据,向Tracker查询却没有时,Tracker将记录该块内容的ID。PCDN节点时刻监控本机状态,当本机运行状态一切在正常运行范围(对外提供服务的带宽,磁盘IO状态,数据包重传率等)之内时将不做任何改变。当本机运行状态偏离正常运行范围,例如提供带宽过低,磁盘IO过高都将引发内容更新,内容更新包括从磁盘上淘汰访问量低的内容,向Tracker请求需要扩散的内容。In this embodiment, the tracker needs to increase the number of failed misses and access the hot statistics function. When a client needs to request a certain piece of data, but the tracker is not found, the tracker will record the ID of the content of the piece. The PCDN node monitors the state of the local machine at all times, and will not make any changes when the operating state of the local machine is within the normal operating range (bandwidth for external services, disk IO status, packet retransmission rate, etc.). When the running state of the local machine deviates from the normal operating range, for example, the bandwidth provided is too low, and the disk IO is too high, content updates will be triggered.

PCDN节点发现自身带宽贡献低于既定阈值,将启动本机内容更新过程,该过程主要包括更新与淘汰两个方面。The PCDN node finds that its own bandwidth contribution is lower than the predetermined threshold, and will start the local content update process, which mainly includes two aspects: update and elimination.

如图5所示,为本发明实施例提供的一种服务内容更新方法的流程示例图,具体可以向Tracker发送针对内容扩散列表的请求。Tracker接收到节点内容更新请求后从本地的记录中统计最近Miss的任务与访问频率最高的任务,按照配置将Miss次数折算成分数进行排序。As shown in FIG. 5 , it is an exemplary flowchart of a method for updating service content provided by an embodiment of the present invention. Specifically, a request for a content diffusion list may be sent to the Tracker. After the tracker receives the node content update request, it counts the tasks of the recent Miss and the tasks with the highest access frequency from the local records, and converts the number of Misses into fractions and sorts them according to the configuration.

例如,最近5分钟a片段数据被请求10次,miss10次,配置的折算比为10,则a片段数据的分数为10*10miss+10请求=110分。For example, if the data of segment a has been requested 10 times and missed 10 times in the last 5 minutes, and the configured conversion ratio is 10, the score of segment a data is 10*10miss+10 requests=110 points.

可以根据各个片段数据的分数对各个片段数据进行排序,依据分数由高到低的排序,选取出多个片段数据的服务内容标识组成扩散列表。Each segment data may be sorted according to the score of each segment data, and the service content identifiers of the plurality of segment data are selected according to the order of the scores from high to low to form a diffusion list.

PCDN节点获取到扩散列表后,依据自身资源情况,从列表中选取需要的数据片段进行下载。选取方式一般是首先剔除自身拥有的资源,优先下载与本机内容相关的片段,优先下载分数高的片段等。具体可以从Tracker获取其他存有该内容的节点处下载或者从CDN节点下载。After the PCDN node obtains the diffusion list, it selects the required data fragments from the list to download according to its own resources. The selection method is generally to first eliminate the resources owned by itself, give priority to downloading the clips related to the local content, and give priority to downloading the clips with high scores, etc. Specifically, it can be downloaded from other nodes that store the content from the Tracker or downloaded from the CDN node.

下载完成后向Tracker通报自身资源以便提供资源共享服务。新内容下载后内容分发节点可以依据磁盘状况来淘汰旧内容,如果磁盘容量不足,则将从节点的内容中选取访问量低的资源进行删除,完成后上报Tracker。After the download is complete, the Tracker is notified of its own resources in order to provide resource sharing services. After the new content is downloaded, the content distribution node can eliminate the old content according to the status of the disk. If the disk capacity is insufficient, it will select the resources with low access from the content of the node to delete it, and report it to the Tracker after completion.

与图1所述的方法相对应,本发明实施例还提供了一种服务内容更新装置,用于对图1中方法的具体实现,本发明实施例提供的服务内容更新装置可以应用于电子设备中,其结构示意图如图6所示,具体包括:Corresponding to the method described in FIG. 1 , an embodiment of the present invention further provides a service content update apparatus, which is used for the specific implementation of the method in FIG. 1 . The service content update apparatus provided by the embodiment of the present invention can be applied to electronic equipment. , the schematic diagram of its structure is shown in Figure 6, which specifically includes:

检测单元601,用于在预设的内容分发节点运行过程中,检测所述内容分发节点的运行状态;A detection unit 601, configured to detect the running state of the content distribution node during a preset running process of the content distribution node;

发送单元602,用于在检测出所述内容分发节点的运行状态满足预设的内容更新条件的情况下,向预设的中心服务器发送内容更新请求;A sending unit 602, configured to send a content update request to a preset central server when it is detected that the running state of the content distribution node satisfies a preset content update condition;

接收单元603,用于接收所述中心服务器响应所述内容更新请求所反馈的服务内容描述信息;所述服务内容描述信息包括多个服务内容标识以及每一所述服务内容标识的优先级分数;每一所述服务内容标识的优先级分数基于所述服务内容标识的访问次数以及访问失败次数计算得到,所述访问失败次数为预设的客户端请求访问所述服务内容标识对应的服务内容的失败次数;A receiving unit 603, configured to receive the service content description information fed back by the central server in response to the content update request; the service content description information includes a plurality of service content identifiers and a priority score of each of the service content identifiers; The priority score of each service content identifier is calculated based on the number of visits of the service content identifier and the number of access failures, where the number of access failures is a preset number of times the client requests to access the service content corresponding to the service content identifier. number of failures;

确定单元604,用于根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识;A determining unit 604, configured to determine a target service content identifier in each of the service content identifiers according to the priority score of each service content identifier in the service content description information;

更新单元605,用于下载所述目标服务内容标识对应的服务内容,以更新所述内容分发节点中的服务内容资源。The updating unit 605 is configured to download the service content corresponding to the target service content identifier, so as to update the service content resource in the content distribution node.

在本发明提供的一实施例中,基于上述的方案,可选的,所述确定单元604,包括:In an embodiment provided by the present invention, based on the above solution, optionally, the determining unit 604 includes:

确定子单元,用于在所述服务内容描述信息中的各个所述服务内容标识中确定出备选服务内容标识,所述备选服务内容标识指的是与所述内容分发节点当前存储的服务内容所对应的服务内容标识不一致的标识;A determination subunit, configured to determine an alternative service content identifier in each of the service content identifiers in the service content description information, where the alternative service content identifier refers to the service currently stored with the content distribution node The identification of the service content corresponding to the content is inconsistent;

选取子单元,用于按每个所述备选服务内容标识的优先级分数由大至小的顺序,在各个所述备选服务内容标识中选取出预设数量的目标服务内容标识。A selection subunit, configured to select a preset number of target service content identifiers from each of the candidate service content identifiers in descending order of the priority score of each of the candidate service content identifiers.

在本发明提供的一实施例中,基于上述的方案,可选的,还包括:In an embodiment provided by the present invention, based on the above solution, optionally, it also includes:

第一执行单元,用于向所述中心服务器发送所述内容分发节点中的服务内容资源的资源信息;所述资源信息包括所述内容分发节点中的各个服务内容的服务内容标识;使得所述中心服务器在接收到客户端查询与所述资源信息相匹配的服务内容时,向所述客户端发送所述内容分发节点的节点信息;a first execution unit, configured to send resource information of service content resources in the content distribution node to the central server; the resource information includes service content identifiers of each service content in the content distribution node; The central server sends the node information of the content distribution node to the client when receiving the query from the client for service content that matches the resource information;

第二执行单元,用于当接收到客户端根据中心服务器提供的节点信息发送的服务内容查询请求时,确定所述服务内容查询请求对应的服务内容;The second execution unit is configured to, when receiving a service content query request sent by the client according to the node information provided by the central server, determine the service content corresponding to the service content query request;

第三执行单元,用于将所述服务内容查询请求对应的服务内容发往所述客户端。The third execution unit is configured to send the service content corresponding to the service content query request to the client.

上述本发明实施例公开的服务内容更新装置中的各个单元和模块具体的原理和执行过程,与上述本发明实施例公开的服务内容更新方法相同,可参见上述本发明实施例提供的服务内容更新方法中相应的部分,这里不再进行赘述。The specific principles and execution processes of each unit and module in the service content update apparatus disclosed in the above embodiments of the present invention are the same as the service content update methods disclosed in the above embodiments of the present invention. For details, please refer to the service content update provided by the above embodiments of the present invention. The corresponding part in the method will not be repeated here.

本发明实施例还提供了一种存储介质,所述存储介质包括存储的指令,其中,在所述指令运行时控制所述存储介质所在的设备执行上述服务内容更新方法。An embodiment of the present invention further provides a storage medium, where the storage medium includes stored instructions, wherein when the instructions are executed, a device on which the storage medium is located is controlled to execute the foregoing method for updating service content.

本发明实施例还提供了一种电子设备,其结构示意图如图7所示,具体包括存储器701,以及一个或者一个以上的指令702,其中一个或者一个以上指令702存储于存储器701中,且经配置以由一个或者一个以上处理器703执行所述一个或者一个以上指令702进行以下操作:An embodiment of the present invention further provides an electronic device, the schematic structural diagram of which is shown in FIG. 7 , and specifically includes a memory 701 and one or more instructions 702 , wherein one or more instructions 702 are stored in the memory 701 and are processed through the memory 701 . The one or more instructions 702 are configured to be executed by one or more processors 703 to:

在预设的内容分发节点运行过程中,检测所述内容分发节点的运行状态;During the running process of the preset content distribution node, detecting the running state of the content distribution node;

在检测出所述内容分发节点的运行状态满足预设的内容更新条件的情况下,向预设的中心服务器发送内容更新请求;Sending a content update request to a preset central server when it is detected that the running state of the content distribution node satisfies a preset content update condition;

接收所述中心服务器响应所述内容更新请求所反馈的服务内容描述信息;所述服务内容描述信息包括多个服务内容标识以及每一所述服务内容标识的优先级分数;每一所述服务内容标识的优先级分数基于所述服务内容标识的访问次数以及访问失败次数计算得到,所述访问失败次数为预设的客户端请求访问所述服务内容标识对应的服务内容的失败次数;Receive the service content description information fed back by the central server in response to the content update request; the service content description information includes a plurality of service content identifiers and a priority score of each of the service content identifiers; each of the service content The priority score of the identifier is calculated based on the number of visits of the service content identifier and the number of access failures, and the number of access failures is the preset number of failures of the client requesting to access the service content corresponding to the service content identifier;

根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识;According to the priority score of each service content identifier in the service content description information, determine the target service content identifier in each of the service content identifiers;

下载所述目标服务内容标识对应的服务内容,以更新所述内容分发节点中的服务内容资源。The service content corresponding to the target service content identifier is downloaded to update the service content resource in the content distribution node.

需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于装置类实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same and similar parts among the various embodiments, refer to each other Can. As for the apparatus type embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant part, please refer to the partial description of the method embodiment.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this document, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or that there is any such actual relationship or sequence between operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本发明时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, when describing the above device, the functions are divided into various units and described respectively. Of course, when implementing the present invention, the functions of each unit may be implemented in one or more software and/or hardware.

通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art. The computer software products can be stored in storage media, such as ROM/RAM, magnetic disks, etc. , CD, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.

以上对本发明所提供的一种服务内容更新方法进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A method for updating service content provided by the present invention has been described in detail above. Specific examples are used to illustrate the principles and implementations of the present invention. Its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. limit.

Claims (10)

1.一种服务内容更新方法,其特征在于,包括:1. a service content update method, is characterized in that, comprises: 在预设的内容分发节点运行过程中,检测所述内容分发节点的运行状态;During the running process of the preset content distribution node, detecting the running state of the content distribution node; 在检测出所述内容分发节点的运行状态满足预设的内容更新条件的情况下,向预设的中心服务器发送内容更新请求;Sending a content update request to a preset central server when it is detected that the running state of the content distribution node satisfies a preset content update condition; 接收所述中心服务器响应所述内容更新请求所反馈的服务内容描述信息;所述服务内容描述信息包括多个服务内容标识以及每一所述服务内容标识的优先级分数;每一所述服务内容标识的优先级分数基于所述服务内容标识的访问次数以及访问失败次数计算得到,所述访问失败次数为预设的客户端请求访问所述服务内容标识对应的服务内容的失败次数;Receive the service content description information fed back by the central server in response to the content update request; the service content description information includes a plurality of service content identifiers and a priority score of each of the service content identifiers; each of the service content The priority score of the identifier is calculated based on the number of visits of the service content identifier and the number of access failures, and the number of access failures is the preset number of failures of the client requesting to access the service content corresponding to the service content identifier; 根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识;According to the priority score of each service content identifier in the service content description information, determine the target service content identifier in each of the service content identifiers; 下载所述目标服务内容标识对应的服务内容,以更新所述内容分发节点中的服务内容资源。The service content corresponding to the target service content identifier is downloaded to update the service content resource in the content distribution node. 2.根据权利要求1所述的方法,其特征在于,所述运行状态包括带宽贡献率和磁盘负载参数,检测出所述内容分发节点的运行状态满足预设的内容更新条件的过程,包括:2. The method according to claim 1, wherein the operating state comprises a bandwidth contribution rate and a disk load parameter, and the process of detecting that the operating state of the content distribution node satisfies a preset content update condition comprises: 若所述内容分发节点的带宽贡献率小于预设的贡献率阈值,或者所述磁盘负载参数大于预设的磁盘负载阈值,则确定所述内容分发节点的运行状态满足预设的内容更新条件,所述内容分发节点的带宽贡献率指的是所述内容分发节点提供的带宽占所述内容分发节点的理论带宽上限的比例,所述磁盘负载参数表征所述内容分发节点的磁盘繁忙程度。If the bandwidth contribution rate of the content distribution node is less than the preset contribution rate threshold, or the disk load parameter is greater than the preset disk load threshold, it is determined that the running state of the content distribution node satisfies the preset content update condition, The bandwidth contribution rate of the content distribution node refers to the proportion of the bandwidth provided by the content distribution node to the upper limit of the theoretical bandwidth of the content distribution node, and the disk load parameter represents the busyness of the disk of the content distribution node. 3.根据权利要求1或2所述的方法,其特征在于,所述检测出所述内容分发节点的运行状态满足预设的内容更新条件之后,还包括:3. The method according to claim 1 or 2, wherein after detecting that the running state of the content distribution node satisfies a preset content update condition, the method further comprises: 检测所述内容分发节点中的磁盘容量是否小于预设的容量阈值;Detecting whether the disk capacity in the content distribution node is less than a preset capacity threshold; 在所述磁盘容量小于所述容量阈值的情况下,根据所述内容分发节点中存储的每个服务内容在预设的服务时长内的访问量,在各个所述服务内容中选取出待淘汰服务内容;When the disk capacity is less than the capacity threshold, select a service to be eliminated from each of the service contents according to the number of visits of each service content stored in the content distribution node within a preset service duration content; 对所述待淘汰服务内容进行删除。Delete the service content to be eliminated. 4.根据权利要求1所述的方法,其特征在于,所述根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识,包括:4. The method according to claim 1, wherein the target service content identifier is determined in each of the service content identifiers according to the priority score of each service content identifier in the service content description information ,include: 在所述服务内容描述信息中的各个所述服务内容标识中确定出备选服务内容标识,所述备选服务内容标识指的是与所述内容分发节点当前存储的服务内容所对应的服务内容标识不一致的标识;An alternative service content identifier is determined from each of the service content identifiers in the service content description information, where the alternative service content identifier refers to the service content corresponding to the service content currently stored by the content distribution node Identification of inconsistent identification; 按每个所述备选服务内容标识的优先级分数由大至小的顺序,在各个所述备选服务内容标识中选取出预设数量的目标服务内容标识。According to the priority score of each candidate service content identifier in descending order, a preset number of target service content identifiers are selected from each of the candidate service content identifiers. 5.根据权利要求1所述的方法,其特征在于,所述更新所述内容分发节点中的服务内容资源之后,还包括:5. The method according to claim 1, wherein after updating the service content resources in the content distribution node, the method further comprises: 向所述中心服务器发送所述内容分发节点中的服务内容资源的资源信息;所述资源信息包括所述内容分发节点中的各个服务内容的服务内容标识;使得所述中心服务器在接收到客户端查询与所述资源信息相匹配的服务内容时,向所述客户端发送所述内容分发节点的节点信息;Send the resource information of the service content resources in the content distribution node to the central server; the resource information includes the service content identifiers of each service content in the content distribution node; so that the central server receives the client When querying the service content matching the resource information, send the node information of the content distribution node to the client; 当接收到客户端根据所述中心服务器提供的节点信息发送的服务内容查询请求时,确定所述服务内容查询请求对应的服务内容;When receiving a service content query request sent by the client according to the node information provided by the central server, determine the service content corresponding to the service content query request; 将所述服务内容查询请求对应的服务内容发往所述客户端。The service content corresponding to the service content query request is sent to the client. 6.一种服务内容更新装置,其特征在于,包括:6. A device for updating service content, comprising: 检测单元,用于在预设的内容分发节点运行过程中,检测所述内容分发节点的运行状态;a detection unit, configured to detect the running state of the content distribution node during a preset running process of the content distribution node; 发送单元,用于在检测出所述内容分发节点的运行状态满足预设的内容更新条件的情况下,向预设的中心服务器发送内容更新请求;a sending unit, configured to send a content update request to a preset central server when it is detected that the running state of the content distribution node satisfies a preset content update condition; 接收单元,用于接收所述中心服务器响应所述内容更新请求所反馈的服务内容描述信息;所述服务内容描述信息包括多个服务内容标识以及每一所述服务内容标识的优先级分数;每一所述服务内容标识的优先级分数基于所述服务内容标识的访问次数以及访问失败次数计算得到,所述访问失败次数为预设的客户端请求访问所述服务内容标识对应的服务内容的失败次数;a receiving unit, configured to receive the service content description information fed back by the central server in response to the content update request; the service content description information includes a plurality of service content identifiers and a priority score of each of the service content identifiers; each The priority score of the service content identifier is calculated based on the number of accesses of the service content identifier and the number of access failures, where the number of access failures is a preset failure of the client to request access to the service content corresponding to the service content identifier frequency; 确定单元,用于根据所述服务内容描述信息中的每个服务内容标识的优先级分数,在各个所述服务内容标识中确定出目标服务内容标识;a determining unit, configured to determine a target service content identifier in each of the service content identifiers according to the priority score of each service content identifier in the service content description information; 更新单元,用于下载所述目标服务内容标识对应的服务内容,以更新所述内容分发节点中的服务内容资源。An update unit, configured to download the service content corresponding to the target service content identifier, so as to update the service content resource in the content distribution node. 7.根据权利要求6所述的装置,其特征在于,所述确定单元,包括:7. The apparatus according to claim 6, wherein the determining unit comprises: 确定子单元,用于在所述服务内容描述信息中的各个所述服务内容标识中确定出备选服务内容标识,所述备选服务内容标识指的是与所述内容分发节点当前存储的服务内容所对应的服务内容标识不一致的标识;A determination subunit, configured to determine an alternative service content identifier in each of the service content identifiers in the service content description information, where the alternative service content identifier refers to the service currently stored with the content distribution node The identification of the service content corresponding to the content is inconsistent; 选取子单元,用于按每个所述备选服务内容标识的优先级分数由大至小的顺序,在各个所述备选服务内容标识中选取出预设数量的目标服务内容标识。A selection subunit, configured to select a preset number of target service content identifiers from each of the candidate service content identifiers in descending order of the priority score of each of the candidate service content identifiers. 8.根据权利要求6所述的装置,其特征在于,还包括:8. The apparatus of claim 6, further comprising: 第一执行单元,用于向所述中心服务器发送所述内容分发节点中的服务内容资源的资源信息;所述资源信息包括所述内容分发节点中的各个服务内容的服务内容标识;使得所述中心服务器在接收到客户端查询与所述资源信息相匹配的服务内容时,向所述客户端发送所述内容分发节点的节点信息;a first execution unit, configured to send resource information of service content resources in the content distribution node to the central server; the resource information includes service content identifiers of each service content in the content distribution node; The central server sends the node information of the content distribution node to the client when receiving the query from the client for service content that matches the resource information; 第二执行单元,用于当接收到客户端根据中心服务器提供的节点信息发送的服务内容查询请求时,确定所述服务内容查询请求对应的服务内容;The second execution unit is configured to, when receiving a service content query request sent by the client according to the node information provided by the central server, determine the service content corresponding to the service content query request; 第三执行单元,用于将所述服务内容查询请求对应的服务内容发往所述客户端。The third execution unit is configured to send the service content corresponding to the service content query request to the client. 9.一种存储介质,其特征在于,所述存储介质包括存储指令,其中,在所述指令运行时控制所述存储介质所在的设备执行如权利要求1~5任意一项所述的服务内容更新方法。9 . A storage medium, characterized in that the storage medium comprises a storage instruction, wherein when the instruction is executed, a device where the storage medium is located is controlled to execute the service content according to any one of claims 1 to 5 Update method. 10.一种电子设备,其特征在于,包括存储器,以及一个或者一个以上的指令,其中一个或一个以上指令存储于存储器中,且经配置以由一个或者一个以上处理器执行如权利要求1~5任意一项所述的服务内容更新方法。10. An electronic device, comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors as claimed in claims 1- 5. The service content update method according to any one of the items.
CN202210128816.7A 2022-02-11 2022-02-11 Service content updating method and device, storage medium and electronic equipment Pending CN114501080A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210128816.7A CN114501080A (en) 2022-02-11 2022-02-11 Service content updating method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210128816.7A CN114501080A (en) 2022-02-11 2022-02-11 Service content updating method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114501080A true CN114501080A (en) 2022-05-13

Family

ID=81479895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210128816.7A Pending CN114501080A (en) 2022-02-11 2022-02-11 Service content updating method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114501080A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546711A (en) * 2010-12-20 2012-07-04 中国移动通信集团公司 Storage adjustment method, device and system for contents in streaming media system
CN102664892A (en) * 2012-04-23 2012-09-12 中兴通讯股份有限公司 Method and service nodes for automatic pulldown content dispatching
CN104967861A (en) * 2015-05-27 2015-10-07 上海美琦浦悦通讯科技有限公司 CDN video buffer system and method
US20210211493A1 (en) * 2020-01-03 2021-07-08 Wangsu Science & Technology Co., Ltd. Method for managing resource state information and system for downloading resource

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546711A (en) * 2010-12-20 2012-07-04 中国移动通信集团公司 Storage adjustment method, device and system for contents in streaming media system
CN102664892A (en) * 2012-04-23 2012-09-12 中兴通讯股份有限公司 Method and service nodes for automatic pulldown content dispatching
CN104967861A (en) * 2015-05-27 2015-10-07 上海美琦浦悦通讯科技有限公司 CDN video buffer system and method
US20210211493A1 (en) * 2020-01-03 2021-07-08 Wangsu Science & Technology Co., Ltd. Method for managing resource state information and system for downloading resource

Similar Documents

Publication Publication Date Title
CN111200657B (en) Method for managing resource state information and resource downloading system
US7373644B2 (en) Automated server replication
KR101072966B1 (en) Method, device and system for distributing file data
US20150237113A1 (en) Method and system for file transmission
CN110519183B (en) Node speed limiting method and device, electronic equipment and storage medium
US10313452B2 (en) Migrating a chat message service provided by a chat server to a new chat server
JP2005534087A (en) Replication and distribution of managed objects
CN102047242A (en) Content management
KR20130125844A (en) System and method of utilizing a framework for information routing in large-scale distributed systems using swarm intelligence
CN110830565B (en) Resource downloading method, device, system, electronic equipment and storage medium
CN105871975A (en) Method and device for selecting source server
US8930518B2 (en) Processing of write requests in application server clusters
CN112732756B (en) Data query method, device, equipment and storage medium
CN101471845A (en) Method for adjusting data block counterpart number and metadata server node
CN108427619B (en) Log management method and device, computing equipment and storage medium
CN115080272A (en) A business data processing method, electronic device and storage medium
CN108667744A (en) Flow control method and device
CN111556135A (en) Request scheduling method, system and device and electronic equipment
CN110213349A (en) A kind of HTTP dispatching method and device
CN113676514A (en) File source returning method and device
US8452879B1 (en) Allocation of connection persistence to mobile browsers
CN110581873B (en) Cross-cluster redirection method and monitoring server
CN114443267A (en) Resource acquisition method, system, device and storage medium
CN114501080A (en) Service content updating method and device, storage medium and electronic equipment
CN117290557A (en) Data loading method, related device, equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220513