Control method, device and storage medium of content server in content distribution network
By obtaining the real address availability information of the content server and generating control instructions, the problem of inaccurate status judgment of the content server in the prior art is solved, ensuring that the content server provides services in a reasonable state, and improving service stability.
Patent Information
- Application Number
- CN202210952397.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-08-09
AI Technical Summary
In the existing technology, when the content server detects the status through the intranet address, it cannot accurately determine the real address failure of the content server, which affects the stability of external services.
By obtaining the real address availability information of the content server, a control instruction is generated, which is used to set the online and offline status of the content server through the intranet address in the resource management device to ensure that it provides services in a reasonable state.
This avoids errors in judging the status of the content server, ensures the rationality of the online and offline operations of the content server, and improves the stability of external services.
Smart Images

Figure CN115277397B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet communication technology, and in particular to a control method, device and storage medium of a content server in a content distribution network. Background Art
[0002] In a content distribution network, there are several content nodes, each of which is composed of at least one content server.
[0003] In the related art, the content server in the content node is detected through the intranet address: when the content server can be detected through the intranet address, it indicates that the content server is in a normal state; when the content server cannot be detected through the intranet address, it indicates that the server is in an abnormal state. After obtaining the detection result, the content server is controlled based on the detection result, such as: performing an online operation on a content server that is detected as normal and currently offline; performing an offline operation on a content server that is detected as abnormal and currently online.
[0004] But in fact, the content server provides services to the outside world with its real address. Even if the content server is in a normal state through the intranet address detection based on the above technical solution, the real address of the content server may fail. Therefore, the judgment of the state of the content server is not accurate, which in turn affects the stability of the content server in providing services to the outside world. Summary of the invention
[0005] In view of this, one or more embodiments of the present disclosure provide a control method, device, and storage medium for a content server in a content distribution network, which can ensure the stability of the services provided by the content server to the outside world.
[0006] On one hand, the present disclosure provides a method for controlling a content server in a content distribution network, wherein the content distribution network includes a content node, wherein the content node includes one or more content servers, and the method is applied to a central control device, and the method includes: obtaining availability information of a real address of a target content server in the content node, wherein the real address is an address for providing services to the outside by the target content server; based on the availability information, generating a control instruction for the target content server, wherein the control instruction is used to represent an online operation or an offline operation performed on the target content server; and sending the control instruction to a resource management device, so that the resource management device sets the target content server to an online state or an offline state through an intranet address of the target content server.
[0007] On the other hand, the present disclosure further provides a method for controlling a content server in a content distribution network, the content distribution network comprising a content node, the content node comprising one or more content servers, the method being applied to a resource management device, the method comprising: receiving a control instruction for a target content server in the content node sent by a central control device, the control instruction being used to represent the execution of an online operation or an offline operation on the target content server, the control instruction being generated by the central control device based on availability information of a real address of the target content server, the real address being an address for providing services to the outside by the target content server; in a case where the control instruction represents the execution of an offline operation on the target content server, setting the target content server to an offline state through an intranet address of the target content server; and in a case where the control instruction represents the execution of an online operation on the target content server, setting the target content server to an online state through the intranet address of the target content server.
[0008] On the other hand, the present disclosure further provides a central control device, which is located in a content distribution network, and the content distribution network also includes content nodes, and the content nodes include one or more content servers. The central control device includes: an availability information acquisition unit, used to acquire availability information of a real address of a target content server in the content node, wherein the real address is an address at which the target content server provides services to the outside world; a control instruction generation unit, used to generate a control instruction for the target content server based on the availability information, wherein the control instruction is used to represent an online operation or an offline operation performed on the target content server; and a control instruction sending unit, used to send the control instruction to a resource management device, so that the resource management device sets the target content server to an online state or an offline state through the intranet address of the target content server.
[0009] On the other hand, the present disclosure further provides a resource management device, the resource management device is in a content distribution network, the content distribution network also includes a content node, the content node includes one or more content servers, the resource management device includes: a control instruction receiving unit, used to receive a control instruction sent by a central control device for a target content server in the content node, the control instruction is used to represent the execution of an online operation or an offline operation on the target content server, the control instruction is generated by the central control device based on the availability information of the real address of the target content server, the real address is the address of the target content server providing services to the outside; a content server control unit, used to set the target content server to an offline state through the intranet address of the target content server when the control instruction is used to represent the execution of an offline operation on the target content server; the content server control unit is also used to set the target content server to an online state through the intranet address of the target content server when the control instruction is used to represent the execution of an online operation on the target content server.
[0010] On the other hand, the present disclosure further provides a central control device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the control method of the content server in the content distribution network is implemented.
[0011] On the other hand, the present disclosure further provides a resource management device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the control method of the content server in the content distribution network is implemented.
[0012] On the other hand, the present disclosure further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the control method of the content server in the content distribution network is implemented.
[0013] According to the technical solution provided by one or more embodiments of the present disclosure, a central control device can obtain the availability information of the real address of a content server, thereby generating a control instruction for controlling the online and offline status of the content server, and calling a resource management device accordingly. The resource management device then adjusts the online and offline status of the content server through the intranet address of the content server based on the instruction of the control instruction.
[0014] When controlling the online and offline operations of a content server, the availability information of the real address of the content server is referred to, thereby avoiding incorrect judgment of the status of the content server when the real address of the content server fails, ensuring the rationality of the online and offline control operations of the content server, and placing the content server in a reasonable online and offline state, thereby ensuring the stability of the content server in providing services to the outside world. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The features and advantages of the present disclosure will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present disclosure in any way. In the accompanying drawings:
[0016] Figure 1 A schematic diagram of a content distribution network in the prior art is shown;
[0017] Figure 2 A schematic diagram of intranet detection in the prior art is shown;
[0018] Figure 3 A schematic diagram of a system architecture of an application of a control method for a content server in one embodiment of the present disclosure is shown;
[0019] Figure 4 An interactive schematic diagram of a method for controlling a content server in a content distribution network in one embodiment of the present disclosure is shown;
[0020] Figure 5 An interactive schematic diagram of a method for controlling a content server in a content distribution network in one embodiment of the present disclosure is shown;
[0021] Figure 6 An interactive schematic diagram of a method for controlling a content server in a content distribution network in one embodiment of the present disclosure is shown;
[0022] Figure 7 A schematic diagram of functional modules of a central control device in one embodiment of the present disclosure is shown;
[0023] Figure 8 A schematic diagram of functional modules of a resource management device in one embodiment of the present disclosure is shown;
[0024] Fig. 9 A schematic diagram of the structure of a central control device in one embodiment of the present disclosure is shown;
[0025] Fig.10 A schematic diagram of the structure of a resource management device in one embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0027] First, some concepts involved in this disclosure are briefly introduced:
[0028] Content Delivery Network (CDN)
[0029] The content distribution network is an intelligent virtual network built on the existing network. It relies on content nodes deployed in various places and uses the load balancing, content distribution, scheduling and other functional modules of the central platform to enable users to obtain the required content nearby, reduce network congestion, and improve user access response speed and hit rate.
[0030] Combined with reference Figure 1 The basic principle of content distribution network is to widely use various content nodes (i.e. Figure 1 content cache / proxy nodes in the network), distribute these content nodes to areas or networks where users are relatively concentrated, and Figure 1 When a client in a network accesses the network, the global server load balancing (GSLB) technology is used to direct the user's access to the nearest working content node, and the content node directly responds to the user's request.
[0031] Intranet detection
[0032] The core of the content distribution network is global load balancing. An important function of global load balancing is to determine whether the content node is operating normally. The usual practice is: global load balancing will periodically detect content nodes to determine the availability of content nodes. If the availability is 0%, then global load balancing will remove this content node from the schedule, thereby ensuring that the client will not access this content node.
[0033] In the related technology, global load balancing detects the availability of the virtual address (Virtual Internet Protocol, VIP) of the content node, and the availability of the virtual address of the content node is determined by performing intranet detection on the content servers in the content node. For example, if all content servers in the content node are detected as abnormal through intranet detection, the availability of the virtual address of the content node is 0%.
[0034] Combined with reference Figure 2 , explain the intranet detection:
[0035] like Figure 2 As shown in the figure, a content node is composed of multiple content servers, and the content node provides services to the outside world through a virtual address. Each content server has a real address (Real Internet Protocol, RIP), which can also be called an external network address or a public network address. The content server provides services to the outside world through the real address; it also has an internal network address, and the content server communicates with other content servers in the same content node through the internal network address.
[0036] When performing intranet detection, the intranet address of the content server in the content node is detected, so as to determine whether the content server in the content node is in a normal state. Specifically, the intranet address of the content server in the content node is detected by obtaining the status code of the detection file corresponding to the intranet address: when the detection file does not exist, the status code of the detection file is generally an abnormal status code, and there will be a detection result in which the abnormal status code obtained by the intranet detection is higher than a certain proportion, then according to the detection result, it is determined that the content server is in an abnormal state; when the detection file exists, the status code of the detection file is generally a normal status code, and there will be a detection result in which the abnormal status code obtained by the intranet detection is lower than a certain proportion, then according to the detection result, it is determined that the content server is in a normal state.
[0037] In addition, if a content server is determined to be in an abnormal state through intranet detection, the content server will be removed from the content node, so that the client's request will not be assigned to this abnormal content server.
[0038] However, if the content address of a content server is normal, but its real address is faulty, then according to relevant technologies, the content server will be considered to be in normal state based on intranet detection, and the client's request may be assigned to this content server. However, since the real address of this server is faulty, the content server cannot respond normally to the client's request through the real address.
[0039] In view of this, an embodiment of the present disclosure provides a method for controlling a content server in a content distribution network, which can be applied to Figure 3 In the system architecture of the content distribution network shown.
[0040] exist Figure 3 In the content distribution network, the content distribution network may include: content nodes; central control equipment; resource management equipment.
[0041] The content node is used for access by external clients. The content node includes at least one content server. When the content node is used to provide services to the client, the content node distributes the client's request to the content server therein, and the content server responds to the client's request through its real address.
[0042] The central control device is used to monitor the availability of the real address of the content server in the content node. It can be understood that the central control device can be part of the global load balancing, which integrates some functions of the global load balancing; the central control device can also be independent of the global load balancing and serve as a supplement to the global load balancing.
[0043] The resource management device is used to manage the online and offline status of the content server in the content node.
[0044] exist Figure 3 In the system architecture of the content distribution network shown, content servers in content nodes can communicate with each other through intranet addresses; content servers and central control devices can communicate with each other through real addresses; content servers and resource management devices can communicate with each other through real addresses; and central control devices and resource management devices can communicate with each other through real addresses.
[0045] See also Figure 4 A method for controlling a content server in a content distribution network provided by an embodiment of the present disclosure may be executed by a central control device and a resource management device in the content distribution network. The method may include the following steps.
[0046] S41: The central control device obtains availability information of a real address of a target content server in a content node, where the real address is an address at which the target content server provides services externally.
[0047] In this implementation, the central control device monitors the availability of the real address of the target content server, thereby acquiring the availability information of the real address of the target content server.
[0048] The real address is the address of the target content server providing services externally, and "external" can refer to the outside of the content distribution network. For example, the target content server communicates with clients outside the content distribution network based on its real address. In addition, the target content server can also use the real address when communicating with other devices in the content distribution network. For example, the target content server communicates with the central control device and resource management device in the content distribution network based on its real address.
[0049] In one embodiment, the availability information of the real address is obtained by aggregating the information obtained by the central control device from different information acquisition channels. The information acquisition channels may include: the target server regularly reports the availability information of the real address; the central control device regularly detects the real address of the target content server.
[0050] Specifically, the central control device receives first availability information of the real address reported by the target content server; the central control device detects the real address of the target content server and obtains second availability information; the central control device aggregates the first availability information and the second availability information to obtain the availability information of the real address of the target content server.
[0051] At this time, the central control device obtains the availability information of the real address through different information acquisition channels. On the one hand, by expanding the number of information acquisition channels, when some of the information acquisition channels fail, information can still be obtained through other information acquisition channels, thereby ensuring the effective acquisition of the availability information of the real address. On the other hand, by aggregating the information obtained from different information acquisition channels, the reliability of the final availability information of the real address can be increased. For example: the first availability information includes information set A, and the second availability information includes information set B. The central control device performs a union operation on information set A and information set B to aggregate the first availability information and the second availability information, thereby obtaining the availability information of the real address of the target content server.
[0052] In the above implementation, if the communication path between the target content server and the central control device is blocked, that is, the target content server has a reporting failure, the first availability information of the real address of the target content server can be reported to the central control device through forwarding by other content servers.
[0053] Specifically, the target content server first sends the first availability information to other content servers in the content node, and the other content servers then report the first availability information to the central control device.
[0054] In the above implementation, the central control device can detect the real address of the target content server and obtain the second availability information by collecting the status code of the first detection file corresponding to the real address in the target content server. The first detection file can be a file pre-stored in the target content server and can respond to the detection instruction. If the target content server receives the detection instruction sent by the central control device through the real address, the target content server will feedback the status code representing the normal network to the central control device in accordance with the response method specified by the first detection file. If the detection instruction sent by the central control device cannot be received by the target content server through the real address, after the detection times out, the central control device will obtain the status code representing the abnormal network. In this way, the central control device can determine whether the real address of the target content server can provide services normally to the outside by judging the type of the status code.
[0055] In the above implementation, the target content server can obtain the status code of the first detection file and report the status code of the first detection file as the first availability information. If the target content server is currently unable to provide services to the outside through the real address, the status code of the first detection file is a status code indicating that the network is abnormal; if the target content server can currently provide services to the outside through the real address, the status code of the first detection file is a status code indicating that the network is normal.
[0056] In the above implementation, the communication between content servers can be achieved through the intranet address, and the communication between the content server and the central control device can be achieved through the real address.
[0057] In one embodiment, the availability information includes at least one of the following: the load of the target content server; the packet loss of the target content server; the status code of the first detection file used to detect the real address in the target content server. For example, the first availability information includes: the load of the target content server; the packet loss of the target content server; the status code of the first detection file. For example, the second availability information includes: the status code of the first detection file.
[0058] In this implementation, the central control device may monitor the availability of the real addresses of multiple content servers in each content node in the content distribution network respectively, thereby obtaining the availability information of the real address of each content server.
[0059] S43: The central control device generates a control instruction for the target content server based on the availability information, where the control instruction is used to indicate that an online operation or an offline operation is performed on the target content server.
[0060] In this embodiment, after the central control device obtains the availability information of the real address of the target content server, it determines the availability of the target content server based on the availability information and generates a corresponding control instruction for the target content server to instruct the target content server to perform an online operation or an offline operation. The control instruction may carry: identification information of the target content server; instruction information for online and offline operations.
[0061] In one embodiment, the central control device pre-stores exclusion conditions and recovery conditions for availability judgment. After obtaining the availability information of the real address, the central control device compares the availability information with the exclusion conditions or recovery conditions in combination with the current online and offline status of the target content server, thereby generating corresponding control instructions to help the central control device make an accurate judgment on whether to generate a control instruction.
[0062] Specifically, when the target content server is online, if the availability information meets the exclusion conditions, the central control device generates a control instruction for representing an offline operation on the target content server; wherein the exclusion conditions include at least one of the following: the availability represented by the first availability information reported by the target content server is lower than a first threshold, the first availability information fails to be reported, and the availability represented by the second availability information detected by the central control device is lower than a second threshold.
[0063] Specifically, when the target content server is offline, if the availability information meets the recovery conditions, the central control device generates a control instruction for representing the online operation of the target content server; wherein the recovery conditions include at least one of the following: the availability represented by the first availability information is higher than the third threshold, the first availability information is reported successfully, and the availability represented by the second availability information is higher than the fourth threshold.
[0064] In the above implementation, the online state refers to the state of the content server being judged as normal under the intranet detection, and the offline state refers to the state of the content server being judged as abnormal under the intranet detection. Correspondingly, the online operation refers to adjusting the content server from the offline state to the online state, and the offline operation refers to adjusting the content server from the online state to the offline state.
[0065] In the above implementation, the conditions of the elimination conditions (or restoration conditions) may be in an "and" relationship or an "or" relationship. That is, satisfying the elimination conditions may refer to satisfying any one of the elimination conditions or all of the elimination conditions; the same is true for satisfying the restoration conditions.
[0066] For example, the exclusion conditions include: the first availability information fails to be reported, and the availability indicated by the second availability information detected by the central control device is lower than the second threshold. In the case where the first availability information fails to be reported, the second availability information is detected normally, and the target content server is currently online, based on one strategy, since the current availability information satisfies the condition of the first availability information failure in the exclusion condition, the central control device determines that it is necessary to perform an offline operation on the target content server; based on another strategy, since the current availability information only satisfies the condition of the first availability information failure in the exclusion condition, and does not satisfy the condition of the availability indicated by the second availability information lower than the second threshold in the exclusion condition, the central control device determines that it is not necessary to perform an offline operation on the target content server.
[0067] In the above implementation, when the availability information includes multiple information contents, such as: the first availability information includes: the load of the target content server; the packet loss situation of the target content server; the status code of the first detection file, the comparison between the availability represented by the availability information and the threshold value can be performed in any one of the following two ways:
[0068] (1) The central control device calculates the sub-availability represented by each information content in the availability information, and then performs weighted processing on each sub-availability to finally obtain the availability represented by the availability information, and then compares the availability represented by the availability information with the threshold.
[0069] For example: the sub-availability represented by the load of the target content server is the first availability, the sub-availability represented by the packet loss situation of the target content server is the second availability, and the sub-availability represented by the status code of the first detection file is the third availability. The availability represented by the availability information is calculated through the calculation formula (a*first availability+b*second availability+c*third availability), and then the availability represented by the availability information is compared with the threshold, where a, b, and c are all positive numbers, and a+b+c=1.
[0070] (2) The threshold includes sub-thresholds for each piece of information in the availability information. Each piece of information is compared with its corresponding sub-threshold, thereby completing the comparison between the availability represented by the availability information and the threshold.
[0071] For example: the load ratio of the target content server is compared with the first sub-threshold, the packet loss ratio of the target content server is compared with the second sub-threshold, and the abnormal status code ratio of the first detection file is compared with the third sub-threshold. When all of the above comparisons are greater than the corresponding sub-thresholds, or any one of the above comparisons is greater than the corresponding sub-threshold, it is considered that the availability represented by the availability information is lower than the threshold.
[0072] It is understandable that, for different operators, the rejection conditions or recovery conditions used by the central control device to perform judgment may be different; for different regions, the rejection conditions or recovery conditions used by the central control device to perform judgment may be different.
[0073] S45: The central control device sends the control instruction to the resource management device.
[0074] In this embodiment, since the resource management device is a device for managing content servers, after generating a control instruction, the central control device sends the control instruction to the resource management device, so that the resource management device sets the target content server to an online state or an offline state through the intranet address of the target content server.
[0075] In the above implementation, the communication between the central control device and the resource management device can be achieved through the real address.
[0076] S47: When the control instruction indicates that an offline operation is to be performed on the target content server, the resource management device sets the target content server to an offline state through the intranet address of the target content server.
[0077] In this embodiment, after receiving the control instruction sent by the central control device, if the control instruction is used to indicate that the target content server is to be offlined, the resource management device uses the existing intranet detection mechanism to set the target content server to an offline state through the intranet address of the target content server. At this time, since the state of the target content server is adjusted and the existing intranet detection mechanism is used, the implementation difficulty of the technical solution can be simplified.
[0078] In one embodiment, the resource management device uses the existing intranet detection mechanism to set the target content server to an offline state through the intranet address of the target content server, which means that the resource management device issues a file deletion command to cause the target content server to delete the second detection file used to detect the intranet address. Subsequently, the intranet detection of the target server will be in an abnormal state, thereby removing the target content server from the content node.
[0079] Specifically, the resource management device sends a file deletion command to the target content server; the target content server deletes the second detection file used to detect the intranet address based on the file deletion command. The file deletion command may carry: identification information of the target content server; identification information of the second detection file; and instruction information for file deletion.
[0080] In the above implementation, if the communication path between the resource management device and the target content server is blocked, that is, the resource management device fails to send the command, the file deletion command can be sent to the target content server through forwarding by other content servers.
[0081] Specifically, the resource management device first sends a file deletion command to other content servers in the content node, and the other content servers then forward the file deletion command to the target content server.
[0082] In the above implementation, the communication between content servers can be achieved through the intranet address, and the communication between the content server and the resource management device can be achieved through the real address.
[0083] S49: When the control instruction indicates that an online operation is to be performed on the target content server, the resource management device sets the target content server to an online state through the intranet address of the target content server.
[0084] In this embodiment, after receiving the control instruction sent by the central control device, if the control instruction is used to represent the execution of an online operation on the target content server, the resource management device uses the existing intranet detection mechanism to set the target content server to an online state through the intranet address of the target content server. At this time, since the state of the target content server is adjusted and the existing intranet detection mechanism is used, the implementation difficulty of the technical solution can be simplified.
[0085] In one embodiment, the resource management device uses the existing intranet detection mechanism to set the target content server to an online state through the intranet address of the target content server, which means that the resource management device issues a file creation command to enable the target content server to create a second detection file for detecting the intranet address. Subsequently, the intranet detection of the target server will be in a normal state, thereby restoring the target content server in the content node.
[0086] Specifically, the resource management device sends a file creation command to the target content server; the target content server creates a second detection file for detecting the intranet address based on the file creation command. The file creation command may carry: identification information of the target content server; identification information of the second detection file; and instruction information for performing file creation.
[0087] In the above implementation, if the communication path between the resource management device and the target content server is blocked, that is, the resource management device fails to send the command, the file creation command can be sent to the target content server through forwarding by other content servers.
[0088] Specifically, the resource management device first sends the file creation command to other content servers in the content node, and the other content servers then forward the file creation command to the target content server.
[0089] In the above implementation, the communication between content servers can be achieved through the intranet address, and the communication between the content server and the resource management device can be achieved through the real address.
[0090] It should be understood that in the above implementation, two different detection files are involved: a first detection file and a second detection file. Among them, the first detection file is a file newly introduced in the present disclosure for detecting a real address, and the second detection file is a file used for detecting an intranet address in the prior art. In the above implementation, after the availability of the real address is obtained based on the first detection file in the target content server, the online and offline status of the target content server is controlled by creating or deleting the second detection file in the target content server.
[0091] As can be seen from the above, according to the technical solution provided by one or more embodiments of the present disclosure, the central control device can obtain the availability information of the real address of the content server, thereby generating a control instruction for controlling the online and offline status of the content server, and calling the resource management device accordingly. The resource management device then adjusts the online and offline status of the content server through the intranet address of the content server based on the instructions of the control instruction.
[0092] When controlling the online and offline operations of a content server, the availability information of the real address of the content server is referred to, thereby avoiding incorrect judgment of the status of the content server when the real address of the content server fails, ensuring the rationality of the online and offline control operations of the content server, and placing the content server in a reasonable online and offline state, thereby ensuring the stability of the content server in providing services to the outside world.
[0093] In some implementations, considering the above process of automatically controlling the target content server, there may be execution failures. In order to ensure that the control instructions generated by the central control device are effectively executed, operation feedback information needs to be fed back to the central control device.
[0094] Specifically, see Figure 5 The method for controlling a content server in a content distribution network provided by an embodiment of the present disclosure can be executed by a central control device or a resource management device in the content distribution network. Figure 5 The following steps are also included:
[0095] S511: The resource management device obtains operation feedback information of the target content server, where the operation feedback information is used to represent the execution status of the offline operation or the online operation of the target content server.
[0096] In this embodiment, the resource management device obtains the operation feedback information of the target content server from the degree calling result.
[0097] S513: The resource management device sends operation feedback information to the central control device.
[0098] In one embodiment, when the operation feedback information is used to indicate that the offline operation or the online operation of the target content server is successfully executed, the resource management device sends the operation feedback information to the central control device and modifies the online and offline status of the target content server.
[0099] In one embodiment, when the operation feedback information is used to characterize the failure of an offline operation or an online operation of a target content server, the resource management device sends the operation feedback information to the central control device, so that the central control device sends the operation feedback information to the alarm interface, and the alarm interface prompts manual operation on the target content server based on the operation feedback information.
[0100] At this time, the execution status of the online and offline operations can be clarified through the feedback of the operation feedback information. Furthermore, if the online and offline operations fail to be automatically executed, the alarm interface can be called to prompt the operator to perform manual operations on the target content server to ensure successful online and offline control of the target content server.
[0101] See also Figure 6 , an exemplary description is given of the control method of a content server in a content distribution network provided by the present application. The method may include the following steps:
[0102] S61: The content server reports first availability information to the central control device.
[0103] The first availability information is reported by the content server and is related to the availability of its real address.
[0104] S62: The central control device detects second availability information of the content server.
[0105] The second availability information is information related to the availability of the real address of the content server detected by the central control device.
[0106] S63: When the central control device determines that the content server meets the exclusion condition, the central control device sends a control instruction to the resource management device.
[0107] In this embodiment, the central control device combines the first availability information and the second availability information to determine whether the content server currently in the online state meets the elimination condition. If the content server meets the elimination condition, the central control device generates a control instruction for representing the offline operation of the target content server and sends the control instruction to the resource management device.
[0108] S64: The resource management device sends a file deletion command to the content server, so that the content server is adjusted to an offline state.
[0109] In this embodiment, the resource management device sends a file deletion command to the target content server based on the instruction of the control instruction; the target content server deletes the second detection file used for detecting the intranet address based on the file deletion command, thereby adjusting to an offline state.
[0110] S65: When the operation feedback information indicates that the offline operation fails, the central control device triggers an alarm to the alarm center.
[0111] In this embodiment, the resource management device can receive operation feedback information and feed it back to the central control device. If the operation feedback information indicates that the offline operation fails, the central control device calls the alarm center to trigger an alarm to prompt the operator to use manual operation to adjust the content server to the offline state.
[0112] See also Figure 7 In one embodiment of the present disclosure, a central control device is provided. The central control device is in a content distribution network. The content distribution network also includes content nodes. The content nodes include one or more content servers. The central control device includes:
[0113] The availability information acquisition unit 100 is used to acquire the availability information of the real address of the target content server in the content node, where the real address is the address at which the target content server provides services externally;
[0114] A control instruction generating unit 200, configured to generate a control instruction for the target content server based on the availability information, wherein the control instruction is used to indicate that an online operation or an offline operation is performed on the target content server;
[0115] The control instruction sending unit 300 is used to send the control instruction to the resource management device, so that the resource management device sets the target content server to an online state or an offline state through the intranet address of the target content server.
[0116] In one embodiment, the availability information acquisition unit 100 is also used to receive first availability information of the real address reported by the target content server; detect the real address of the target content server to obtain second availability information; aggregate the first availability information and the second availability information to obtain the availability information of the real address of the target content server.
[0117] In one embodiment, the availability information acquisition unit 100 is also used to receive the first availability information reported by other content servers in the content node when the target content server fails to report information to the central control device. The first availability information is sent by the target content server to the other content servers.
[0118] In one embodiment, the control instruction generating unit 200 is further configured to generate a control instruction for representing the execution of an offline operation on the target content server if the availability information satisfies a rejection condition when the target content server is in an online state; and to generate a control instruction for representing the execution of an online operation on the target content server if the availability information satisfies a recovery condition when the target content server is in an offline state;
[0119] Among them, the exclusion condition includes at least one of the following: the availability represented by the first availability information reported by the target content server is lower than a first threshold, the reporting of the first availability information fails, and the availability represented by the second availability information detected by the central control device is lower than a second threshold; the recovery condition includes at least one of the following: the availability represented by the first availability information is higher than a third threshold, the reporting of the first availability information is successful, and the availability represented by the second availability information is higher than a fourth threshold.
[0120] In one embodiment, the availability information includes at least one of the following:
[0121] The load of the target content server;
[0122] Packet loss situation of the target content server;
[0123] A status code of a first detection file in the target content server for detecting the real address.
[0124] In one embodiment, the central control device further includes: a feedback information receiving unit and a feedback information sending unit;
[0125] The feedback information receiving unit is used to receive the operation feedback information sent by the resource management device, where the operation feedback information is used to represent the execution status of the offline operation or the online operation of the target content server;
[0126] The feedback information sending unit is used to send the operation feedback information to the alarm interface when the operation feedback information is used to represent the failure of the offline operation or the online operation of the target content server, so that the alarm interface prompts the target content server to perform manual operation based on the operation feedback information.
[0127] Each unit described in the above embodiments may be implemented by a computer chip or a product having a certain function. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0128] For the convenience of description, the above devices are described in terms of functions and are described separately in various units. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0129] See also Figure 8 In one embodiment of the present disclosure, a resource management device is provided. The resource management device is in a content distribution network. The content distribution network also includes a content node. The content node includes one or more content servers. The resource management device includes:
[0130] A control instruction receiving unit 400 is used to receive a control instruction sent by a central control device for a target content server in the content node, wherein the control instruction is used to indicate that an online operation or an offline operation is performed on the target content server, and the control instruction is generated by the central control device based on the availability information of the real address of the target content server, and the real address is the address of the target content server providing services to the outside world;
[0131] The content server control unit 500 is configured to set the target content server to an offline state through the intranet address of the target content server when the control instruction is used to indicate that an offline operation is performed on the target content server;
[0132] The content server control unit 500 is further configured to set the target content server to an online state through the intranet address of the target content server when the control instruction is used to represent an online operation on the target content server.
[0133] In one embodiment, the content server control unit 500 is further used to send a file deletion command to the target content server, so that the target content server deletes the second detection file used to detect the intranet address based on the file deletion command.
[0134] In one embodiment, the content server control unit 500 is further configured to, when a failure occurs in the resource management device sending a command to the target content server, send the file deletion command to other content servers in the content node, so that the other content servers forward the file deletion command to the target content server.
[0135] In one embodiment, the content server control unit 500 is further used to send a file creation command to the target content server, so that the target content server creates a second detection file for detecting the intranet address based on the file creation command.
[0136] In one embodiment, the content server control unit 500 is further used to send the file creation command to other content servers in the content node when a failure occurs in the resource management device sending a command to the target content server, so that the other content servers forward the file creation command to the target content server.
[0137] In one embodiment, the resource management device further includes: a feedback information acquisition unit and a feedback information sending unit;
[0138] The feedback information acquisition unit is used to acquire the operation feedback information of the target content server, where the operation feedback information is used to represent the execution status of the offline operation or the online operation of the target content server;
[0139] The feedback information sending unit is used to send the operation feedback information to the central control device and modify the online and offline status of the target content server when the operation feedback information is used to indicate that the offline operation or the online operation of the target content server is successfully executed;
[0140] The feedback information sending unit is also used to send the operation feedback information to the central control device when the operation feedback information is used to characterize the failure of the offline operation or the online operation of the target content server, so that the central control device sends the operation feedback information to the alarm interface, and then the alarm interface prompts manual operation on the target content server based on the operation feedback information.
[0141] Each unit described in the above embodiments may be implemented by a computer chip or a product having a certain function. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0142] For the convenience of description, the above devices are described in terms of functions and are described separately in various units. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0143] See also Fig. 9 The present application also provides a central control device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the control method of the content server in the above-mentioned content distribution network is implemented.
[0144] See also Fig.10 The present application also provides a resource management device, which includes a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the control method of the content server in the above-mentioned content distribution network is implemented.
[0145] The present application also provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, the control method of the content server in the content distribution network is implemented.
[0146] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0147] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method embodiment.
[0148] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0149] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0150] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the server and the storage medium, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0151] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
[0152] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for controlling a content server in a content distribution network, characterized in that: The content distribution network includes content nodes, the content nodes provide external services with virtual addresses, the content nodes include one or more content servers, the content servers have real addresses and intranet addresses, and the method is applied to a central control device, and the method includes: Acquire availability information of a real address of a target content server in the content node, where the real address is an address at which the target content server provides services externally; Based on the availability information, generating a control instruction for the target content server, the control instruction being used to indicate that an online operation or an offline operation is performed on the target content server; The control instruction is sent to a resource management device, so that the resource management device sets the target content server to an online state or an offline state through the intranet address of the target content server.
2. The method according to claim 1, characterized in that The obtaining the availability information of the real address of the target content server in the content node includes: Receiving first availability information of a real address reported by the target content server; Detecting the real address of the target content server to obtain second availability information; The first availability information and the second availability information are aggregated to obtain the availability information of the real address of the target content server.
3. The method according to claim 2, characterized in that In the case where a failure occurs in the target content server reporting information to the central control device, the method further includes: The first availability information reported by other content servers in the content node is received, and the first availability information is sent by the target content server to the other content servers.
4. The method according to claim 1, characterized in that: The generating a control instruction for the target content server based on the availability information includes: In the case where the target content server is in an online state, if the availability information meets a rejection condition, generating a control instruction for indicating that an offline operation is performed on the target content server; In the case where the target content server is in an offline state, if the availability information meets a recovery condition, generating a control instruction for indicating that an online operation is performed on the target content server; Among them, the exclusion condition includes at least one of the following: the availability represented by the first availability information reported by the target content server is lower than a first threshold, the reporting of the first availability information fails, and the availability represented by the second availability information detected by the central control device is lower than a second threshold; the recovery condition includes at least one of the following: the availability represented by the first availability information is higher than a third threshold, the reporting of the first availability information is successful, and the availability represented by the second availability information is higher than a fourth threshold.
5. The method according to claim 1, characterized in that The availability information includes at least one of the following: The load of the target content server; Packet loss situation of the target content server; A status code of a first detection file in the target content server for detecting the real address.
6. The method according to claim 1, characterized in that The method further comprises: receiving operation feedback information sent by the resource management device, wherein the operation feedback information is used to represent the execution status of the offline operation or the online operation of the target content server; When the operation feedback information is used to indicate that an offline operation or an online operation of the target content server fails, the operation feedback information is sent to an alarm interface, so that the alarm interface prompts a manual operation on the target content server based on the operation feedback information.
7. A method for controlling a content server in a content distribution network, characterized in that: The content distribution network includes content nodes, the content nodes provide external services with virtual addresses, the content nodes include one or more content servers, the content servers have real addresses and intranet addresses, and the method is applied to a resource management device, and the method includes: receiving a control instruction for a target content server in the content node sent by a central control device, the control instruction being used to indicate that an online operation or an offline operation is performed on the target content server, the control instruction being generated by the central control device based on availability information of a real address of the target content server, the real address being an address for providing services to the outside by the target content server; In a case where the control instruction indicates that an offline operation is to be performed on the target content server, setting the target content server to an offline state through the intranet address of the target content server; In a case where the control instruction represents executing an online operation on the target content server, the target content server is set to an online state through the intranet address of the target content server.
8. The method according to claim 7, characterized in that The step of setting the target content server to an offline state by using the intranet address of the target content server includes: A file deletion command is issued to the target content server, so that the target content server deletes the second detection file used for detecting the intranet address based on the file deletion command.
9. The method according to claim 8, characterized in that In the case where a failure occurs in the resource management device sending a command to the target content server, the method further includes: The file deletion command is issued to other content servers in the content node, so that the other content servers forward the file deletion command to the target content server.
10. The method according to claim 7, characterized in that The step of setting the target content server to an online state by using the intranet address of the target content server includes: A file creation command is issued to the target content server, so that the target content server creates a second detection file for detecting the intranet address based on the file creation command.
11. The method according to claim 10, characterized in that In the case where a failure occurs in the resource management device sending a command to the target content server, the method further includes: The file creation command is issued to other content servers in the content node, so that the other content servers forward the file creation command to the target content server.
12. The method according to claim 7, characterized in that The method further comprises: Acquiring operation feedback information of the target content server, where the operation feedback information is used to characterize the execution status of an offline operation or an online operation of the target content server; When the operation feedback information is used to indicate that the offline operation or the online operation of the target content server is successfully executed, the operation feedback information is sent to the central control device, and the online and offline status of the target content server is modified; In the case where the operation feedback information is used to characterize the failure of an offline operation or an online operation of the target content server, the operation feedback information is sent to the central control device, so that the central control device sends the operation feedback information to an alarm interface, and the alarm interface prompts manual operation on the target content server based on the operation feedback information.
13. A central control device, characterized in that: The central control device is in a content distribution network, the content distribution network also includes a content node, the content node provides services externally with a virtual address, the content node includes one or more content servers, the content server has a real address and an intranet address, and the central control device includes: An availability information acquisition unit, configured to acquire availability information of a real address of a target content server in the content node, wherein the real address is an address at which the target content server provides services externally; A control instruction generating unit, configured to generate a control instruction for the target content server based on the availability information, wherein the control instruction is used to indicate that an online operation or an offline operation is performed on the target content server; The control instruction sending unit is used to send the control instruction to the resource management device, so that the resource management device sets the target content server to an online state or an offline state through the intranet address of the target content server.
14. A resource management device, characterized in that: The resource management device is in a content distribution network, the content distribution network also includes a content node, the content node provides services externally with a virtual address, the content node includes one or more content servers, the content server has a real address and an intranet address, and the resource management device includes: a control instruction receiving unit, configured to receive a control instruction sent by a central control device for a target content server in the content node, wherein the control instruction is used to indicate that an online operation or an offline operation is performed on the target content server, and the control instruction is generated by the central control device based on availability information of a real address of the target content server, wherein the real address is an address at which the target content server provides services externally; A content server control unit, configured to set the target content server to an offline state through an intranet address of the target content server when the control instruction is used to indicate that an offline operation is performed on the target content server; The content server control unit is further configured to set the target content server to an online state through the intranet address of the target content server when the control instruction is used to represent an online operation on the target content server.
15. A central control device, characterized in that: The central control device comprises a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 6 is implemented.
16. A resource management device, characterized in that: The resource management device comprises a memory and a processor, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method according to any one of claims 7 to 12 is implemented.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 or 7 to 12 is implemented.
