Dual-mode balancing method for multiple copies, server, and container cloud platform
By adopting a dual-mode balance method for multiple replicas in the container cloud, combining resource guarantee and competitive allocation modes to dynamically adjust the storage node load, the low throughput and unstable service quality of the resource allocation mode in the existing technology is solved. The problem has been realized efficient resource allocation and business processing.
Patent Information
- Application Number
- CN201910102981.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-02-01
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2039-02-01
AI Technical Summary
In the resource allocation model of the existing container cloud architecture, the resource guarantee model has a low throughput, while the resource competition model cannot guarantee business quality, making it difficult to simultaneously increase business processing speed and reduce resource usage.
Using a dual-mode equalization method for multiple replicas, the central server queries the storage node according to the terminal resource request, determines the resource allocation mode, and controls the final storage node to send resources to the terminal according to the feedback mode, combining resource guarantee and resource competition allocation mode , dynamically adjust the load situation of the storage node to optimize resource allocation.
It realizes the improvement of throughput and processing speed while ensuring business quality, reduce resource usage, and ensures the quality and efficient transmission of users' requested resources.
Smart Images

Figure CN109842683B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of container cloud of smart distribution network, and in particular to a balancing method for executing dual modes on multiple copies, a server and a container cloud platform. Background Art
[0002] Container cloud is a new concept that extends and develops from the concept of cloud computing. In the era of container cloud, we can abandon mobile devices such as USB flash drives, and solve the problem of data loss due to PC hard drive damage. However, with the widespread application of electronic devices and the rapid development of Internet technology, the scale of data is getting larger and larger, and the storage capacity, computing speed and transmission bandwidth of massive data are facing huge challenges.
[0003] At present, common architectures of container clouds are as follows: Figure 1 As shown in the figure, it includes source server, central server and edge server. Among them, edge server is mainly used to distribute data. Edge server can provide two services for users, one is resource guarantee mode and the other is resource competition mode. However, the throughput of resource guarantee mode is low, and resource competition mode cannot guarantee the quality of service. Summary of the invention
[0004] In view of the deficiencies of the prior art, the purpose of the present invention is to ensure both the quality of services and the throughput, increase the speed of service processing, and reduce the resources occupied by executing services.
[0005] The purpose of the present invention is achieved by adopting the following technical solutions:
[0006] A dual-mode balancing method for multiple replicas, the improvement of which includes:
[0007] Based on the resource request from the terminal, the central server queries all storage nodes that store copies of the corresponding resources;
[0008] The central server sends a resource allocation mode query request to each storage node;
[0009] Each storage node feeds back the resource allocation mode of each storage node to the central server based on its current load situation;
[0010] The central server determines the final storage node that participates in resource allocation to the terminal according to the resource allocation mode of each storage node;
[0011] The central server controls the final storage node to send resources to the terminal according to the fed-back resource allocation mode.
[0012] Preferably, the resource is multimedia content, the resource copy is a multimedia content copy, and the resource request is a request for multimedia content required by the user.
[0013] Preferably, the resource allocation mode includes:
[0014] Resource-guaranteed allocation model and resource-competitive allocation model;
[0015] Among them, the resource guarantee allocation mode is that the storage node provides resources to the terminal according to the bandwidth and storage space pre-agreed between it and the terminal, and the resource competition allocation mode is that the storage node provides resources to the terminal according to the priority of the terminal with which it establishes a connection.
[0016] Preferably, each storage node feeds back the current resource allocation mode of each storage node to the central server according to its own load condition, including:
[0017] If the remaining bandwidth of the storage node itself is greater than the first threshold and the remaining storage space of the storage node itself is greater than the second threshold, the resource allocation mode fed back by the storage node to the central server is a resource guarantee allocation mode; otherwise, the resource allocation mode fed back by the storage node to the central server is a resource competition allocation mode.
[0018] Furthermore, the first threshold is 10% of the total bandwidth of the storage node storing the corresponding resource copy, and the second threshold is 10% of the total storage space of the storage node storing the corresponding resource copy.
[0019] Preferably, the central server determines the final storage node that participates in allocating resources to the terminal according to the resource allocation mode returned by each storage node, including:
[0020] If the number of storage nodes that can provide a resource-guaranteed allocation mode is greater than or equal to 2 and the number of storage nodes that can provide a resource-guaranteed allocation mode is greater than or equal to 4, the central server arbitrarily selects 2 storage nodes as storage nodes that provide a resource-guaranteed allocation mode, and arbitrarily selects 4 storage nodes that can provide a resource-competitive allocation mode as storage nodes that provide a resource-competitive allocation mode;
[0021] If the number of storage nodes that can provide the resource-guaranteed allocation mode is 1 and the number of storage nodes that can provide the resource-guaranteed allocation mode is greater than or equal to 6, the central server uses the storage node as the storage node that provides the resource-guaranteed allocation mode, and arbitrarily selects 6 storage nodes that can provide the resource-competition allocation mode as the storage nodes that provide the resource-competition allocation mode;
[0022] If the number of storage nodes that can provide the resource guarantee allocation mode is 0 and the number of storage nodes that can provide the resource guarantee allocation mode is greater than or equal to 8, the central server arbitrarily selects 8 storage nodes that can provide the resource competition allocation mode as the storage nodes that provide the resource competition allocation mode;
[0023] Otherwise, the central server re-issues a resource allocation mode query request to each storage node.
[0024] Preferably, after the central server controls the final storage node to send resources to the terminal according to the respective resource allocation modes, the method further includes:
[0025] When the query cycle preset in the central server is reached, the central server controls the final storage node to stop sending resources and determines whether the final storage node has completed sending resources to the terminal;
[0026] If the sending is completed, the operation ends;
[0027] Otherwise, the central server re-issues a resource allocation mode query request to each storage node until all resources are sent to the terminal.
[0028] Preferably, while or after the central server controls the final storage node to send resources to the terminal according to the respective resource allocation modes, the process further includes:
[0029] When the central server receives a request from any storage node in the final storage node that it cannot send resources according to the fed-back resource allocation mode, it re-sends a resource allocation mode inquiry request to each storage node until the resources are sent to the terminal.
[0030] A central server, the improvement of which is that it comprises:
[0031] A query unit, used to query all storage nodes storing corresponding resource copies according to the resource request of the terminal, and send a query request instruction to the query unit;
[0032] An inquiry unit, configured to send a resource allocation mode inquiry request to each storage node according to the inquiry request instruction sent by the query unit, and send the resource allocation mode fed back by each storage node to the determination unit;
[0033] A determination unit, configured to receive the resource allocation mode fed back by each storage node from the inquiry unit, determine the final storage node participating in resource allocation to the terminal according to the resource allocation mode fed back by each storage node, and send the final storage node selection result to the control unit; while sending the final storage node selection result to the control unit, the selection result may also be sent to each storage node;
[0034] The control unit is used to control the final storage node to send resources to the terminal according to the resource allocation mode fed back by the final storage node.
[0035] Preferably, the resource allocation mode includes:
[0036] Resource-guaranteed allocation model and resource-competitive allocation model;
[0037] The determining unit comprises:
[0038] A transceiver module, used for receiving the resource allocation mode fed back by each storage node from the inquiry unit, wherein the resource allocation mode includes a resource guarantee allocation mode and a resource competition allocation mode; and also used for sending the final storage node selection result determined by the first, second or third selection module to the control unit;
[0039] A first selection module is used to arbitrarily select 2 storage nodes as storage nodes providing the resource-guaranteed allocation mode if the number of storage nodes that can provide the resource-guaranteed allocation mode is greater than or equal to 2 and the number of storage nodes that can provide the resource-guaranteed allocation mode is greater than or equal to 4, and arbitrarily select 4 storage nodes that can provide the resource-competition allocation mode as storage nodes providing the resource-competition allocation mode;
[0040] A second selection module is used to use the storage node as the storage node providing the resource guarantee allocation mode if the number of storage nodes that can provide the resource guarantee allocation mode is 1 and the number of storage nodes that can provide the resource guarantee allocation mode is greater than or equal to 6, and arbitrarily select 6 storage nodes that can provide the resource competition allocation mode as the storage nodes providing the resource competition allocation mode;
[0041] A third selection module is used to randomly select 8 storage nodes that can provide a resource competition allocation mode as storage nodes that provide a resource competition allocation mode if the number of storage nodes that can provide a resource guarantee allocation mode is 0 and the number of storage nodes that can provide a resource guarantee allocation mode is greater than or equal to 8;
[0042] The request module is used to re-issue a resource allocation mode inquiry request to each storage node if the number of storage nodes with the corresponding resource allocation mode does not meet the requirements of the above three selection modules.
[0043] An edge server, the improvement of which comprises:
[0044] A storage unit is used to store a number of storage nodes and the load conditions of the storage nodes;
[0045] The execution unit is used to feed back the resource allocation mode of each storage node to the central server according to the current load condition of the storage node itself.
[0046] Preferably, the load condition of the storage node may at least include the actual physical location of the storage node, the remaining bandwidth, the remaining storage space, the total bandwidth and the total storage space.
[0047] Preferably, the execution unit is specifically used for:
[0048] If the remaining bandwidth of the storage node itself is greater than the first threshold and the remaining storage space of the storage node itself is greater than the second threshold, the resource allocation mode fed back by the storage node to the central server is a resource guarantee allocation mode; otherwise, the resource allocation mode fed back by the storage node to the central server is a resource competition allocation mode.
[0049] A container cloud platform includes the above-mentioned central server and the above-mentioned edge server.
[0050] Compared with the closest prior art, the present invention has the following beneficial effects:
[0051] The technical solution provided by the present invention is that the central server queries all storage nodes storing corresponding resource copies according to the resource request of the terminal; the central server sends a resource allocation mode inquiry request to each storage node; each storage node feeds back the resource allocation mode of each storage node to the central server according to its current load situation; the central server determines the final storage node participating in resource allocation to the terminal according to the resource allocation mode of each storage node; the central server controls the final storage node to send resources to the terminal according to the fed-back resource allocation mode. Based on the technical solution provided by the present invention, the quality of the resources requested by the user can be guaranteed, and the throughput can be guaranteed, the processing speed can be improved, and the resource occupation can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a common architecture for container clouds;
[0053] Figure 2 It is a flow chart of a method for balancing dual modes for multiple copies provided by the present invention;
[0054] Figure 3 It is a schematic diagram of the structure of a central server provided by the present invention;
[0055] Figure 4 This is a schematic diagram of the structure of an edge server provided by the present invention;
[0056] Figure 5 It is a schematic diagram of the structure of a container cloud platform provided by the present invention. DETAILED DESCRIPTION
[0057] The specific implementation modes of the present invention will be further described in detail below in conjunction with the accompanying drawings.
[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] Example 1
[0060] This embodiment provides a dual-mode balancing method for multiple copies, such as Figure 2 As shown, the specific steps are as follows:
[0061] Step 101. The central server queries all storage nodes storing corresponding resource copies according to the resource request of the terminal; wherein the central server stores index information of resource copies stored in each storage node;
[0062] Step 102: The central server sends a resource allocation mode query request to each storage node;
[0063] The resource allocation mode includes:
[0064] Resource-guaranteed allocation model and resource-competitive allocation model;
[0065] Among them, the resource guarantee allocation mode is that the storage node provides resources to the terminal according to the bandwidth and storage space pre-agreed between it and the terminal, and the resource competition allocation mode is that the storage node provides resources to the terminal according to the priority of the terminal with which it establishes a connection.
[0066] Step 103. Each storage node feeds back the resource allocation mode of each storage node to the central server according to its current load situation;
[0067] If the remaining bandwidth of the storage node itself is greater than the first threshold and the remaining storage space of the storage node itself is greater than the second threshold, the resource allocation mode fed back by the storage node to the central server is a resource guarantee allocation mode; otherwise, the resource allocation mode fed back by the storage node to the central server is a resource competition allocation mode.
[0068] The first threshold is 10% of the total bandwidth of the storage node storing the corresponding resource copy, and the second threshold is 10% of the total storage space of the storage node storing the corresponding resource copy.
[0069] Step 104. The central server determines the final storage node that participates in allocating resources to the terminal according to the resource allocation mode of each storage node;
[0070] If the number of storage nodes that can provide a resource-guaranteed allocation mode is greater than or equal to 2 and the number of storage nodes that can provide a resource-guaranteed allocation mode is greater than or equal to 4, the central server arbitrarily selects 2 storage nodes as storage nodes that provide a resource-guaranteed allocation mode, and arbitrarily selects 4 storage nodes that can provide a resource-competitive allocation mode as storage nodes that provide a resource-competitive allocation mode;
[0071] If the number of storage nodes that can provide the resource-guaranteed allocation mode is 1 and the number of storage nodes that can provide the resource-guaranteed allocation mode is greater than or equal to 6, the central server uses the storage node as the storage node that provides the resource-guaranteed allocation mode, and arbitrarily selects 6 storage nodes that can provide the resource-competition allocation mode as the storage nodes that provide the resource-competition allocation mode;
[0072] If the number of storage nodes that can provide the resource guarantee allocation mode is 0 and the number of storage nodes that can provide the resource guarantee allocation mode is greater than or equal to 8, the central server arbitrarily selects 8 storage nodes that can provide the resource competition allocation mode as the storage nodes that provide the resource competition allocation mode;
[0073] Otherwise, return to step 102, and the central server re-issues a resource allocation mode query request to each storage node.
[0074] Step 105: The central server controls the final storage node to send resources to the terminal according to the fed-back resource allocation mode.
[0075] The central server is a global node in the container cloud platform and is responsible for task management of global users.
[0076] The resource is multimedia content, the resource copy is a multimedia content copy, and the resource request is a request for multimedia content required by a user.
[0077] Based on the same inventive concept, the present invention also provides a central server, such as Figure 3 As shown, including:
[0078] A query unit, used to query all storage nodes storing corresponding resource copies according to the resource request of the terminal, and send a query request instruction to the query unit;
[0079] An inquiry unit, configured to send a resource allocation mode inquiry request to each storage node according to the inquiry request instruction sent by the query unit, and send the resource allocation mode fed back by each storage node to the determination unit;
[0080] A determination unit, configured to receive the resource allocation mode fed back by each storage node from the query unit, determine the final storage node participating in resource allocation to the terminal according to the resource allocation mode fed back by each storage node, and send the final storage node selection result to the control unit;
[0081] Preferably, while sending the final storage node selection result to the control unit, the selection result can also be notified to each storage node;
[0082] The control unit is used to control the final storage node to send resources to the terminal according to the resource allocation mode fed back by the final storage node.
[0083] The determining unit comprises:
[0084] A transceiver module, used for receiving the resource allocation mode fed back by each storage node from the inquiry unit, wherein the resource allocation mode includes a resource guarantee allocation mode and a resource competition allocation mode; and also used for sending the final storage node selection result determined by the first, second or third selection module to the control unit;
[0085] Preferably, while sending the final storage node selection result to the control unit, the selection result can also be notified to each storage node;
[0086] A first selection module is used to arbitrarily select 2 storage nodes as storage nodes providing the resource-guaranteed allocation mode if the number of storage nodes that can provide the resource-guaranteed allocation mode is greater than or equal to 2 and the number of storage nodes that can provide the resource-guaranteed allocation mode is greater than or equal to 4, and arbitrarily select 4 storage nodes that can provide the resource-competition allocation mode as storage nodes providing the resource-competition allocation mode;
[0087] A second selection module is used to use the storage node as the storage node providing the resource guarantee allocation mode if the number of storage nodes that can provide the resource guarantee allocation mode is 1 and the number of storage nodes that can provide the resource guarantee allocation mode is greater than or equal to 6, and arbitrarily select 6 storage nodes that can provide the resource competition allocation mode as the storage nodes providing the resource competition allocation mode;
[0088] A third selection module is used to randomly select 8 storage nodes that can provide a resource competition allocation mode as storage nodes that provide a resource competition allocation mode if the number of storage nodes that can provide a resource guarantee allocation mode is 0 and the number of storage nodes that can provide a resource guarantee allocation mode is greater than or equal to 8;
[0089] The request module is used to re-issue a resource allocation mode inquiry request to each storage node if the number of storage nodes with the corresponding resource allocation mode does not meet the requirements of the above three selection modules.
[0090] Based on the same inventive concept, the present invention also provides an edge server, such as Figure 4 As shown, including:
[0091] A storage unit is used to store a number of storage nodes and the load conditions of the storage nodes;
[0092] The execution unit is used to feed back the resource allocation mode of each storage node to the central server according to the current load condition of the storage node itself.
[0093] The load condition of the storage node may include at least the actual physical location of the storage node, the remaining bandwidth, the remaining storage space, the total bandwidth and the total storage space.
[0094] Execution unit, specifically used for:
[0095] If the remaining bandwidth of the storage node itself is greater than the first threshold and the remaining storage space of the storage node itself is greater than the second threshold, the resource allocation mode fed back by the storage node to the central server is a resource guarantee allocation mode; otherwise, the resource allocation mode fed back by the storage node to the central server is a resource competition allocation mode.
[0096] The first threshold is 10% of the total bandwidth of the storage node storing the corresponding resource copy, and the second threshold is 10% of the total storage space of the storage node storing the corresponding resource copy.
[0097] Based on the same inventive concept, the present invention also provides a container cloud platform, such as Figure 5 As shown, it includes the above-mentioned central server and the above-mentioned edge server.
[0098] Example 2
[0099] The specific implementation method of the dual-mode balancing method for multiple copies proposed in this embodiment is basically the same as that in Embodiment 1, except that the central server in this embodiment is preset with an inquiry cycle. If the final storage node does not complete the resource transmission within the inquiry cycle, the next round of inquiry cycle inquiry request, resource allocation mode determination, and final storage node determination participating in resource transmission will be started until the resource transmission is completed, and the whole method ends. The specific steps are as follows:
[0100] Step 201. The central server queries all storage nodes storing copies of corresponding resources according to the resource request of the terminal;
[0101] Step 202: The central server sends a resource allocation mode query request to each storage node;
[0102] Step 203. Each storage node feeds back the resource allocation mode of each storage node to the central server according to its current load situation;
[0103] Step 204: The central server determines the final storage node that participates in allocating resources to the terminal according to the resource allocation mode of each storage node;
[0104] Step 205: The central server controls the final storage node to send resources to the terminal according to the resource allocation mode fed back by the central server;
[0105] Step 206. When the inquiry cycle preset in the central server is reached, the central server controls the final storage node to stop sending resources and determines whether the final storage node has completed sending resources to the terminal; if completed, the operation ends; otherwise, returns to step 202 and repeats steps 202-205 until the resources are sent to the terminal.
[0106] The central server in this embodiment includes:
[0107] A query unit, used to query all storage nodes storing corresponding resource copies according to the resource request of the terminal, and send a query request instruction to the query unit;
[0108] An inquiry unit, configured to send a resource allocation mode inquiry request to each storage node according to the inquiry request instruction sent by the query unit or the judgment unit, and send the resource allocation mode fed back by each storage node to the determination unit;
[0109] A determination unit, configured to receive the resource allocation mode fed back by each storage node from the inquiry unit, determine the final storage node participating in resource allocation to the terminal according to the resource allocation mode fed back by each storage node, and send the final storage node selection result to the control unit; while sending the final storage node selection result to the control unit, the selection result may also be sent to each storage node;
[0110] A control unit, used to control the final storage node to send resources to the terminal according to the resource allocation mode fed back by the final storage node;
[0111] The judgment unit is used to control the final storage node to stop sending resources when the inquiry cycle preset in the central server is reached, and to judge whether the final storage node has completed sending resources to the terminal; if completed, the operation is terminated; otherwise, an inquiry request instruction is sent to the inquiry unit.
[0112] In this embodiment, except that the inquiry unit and the judgment unit in the central server are different from those in Embodiment 1, the specific composition and functions of other units in the central server and the edge server are the same as those in Embodiment 1 and will not be repeated here.
[0113] Based on the same inventive concept, the present invention also provides a container cloud platform, including the above-mentioned central server and the above-mentioned edge server in this embodiment.
[0114] Example 3
[0115] This embodiment proposes a dual-mode balancing method for multiple copies. Steps 301-305 in this embodiment are basically the same as steps 101-105 in embodiment 1, except that step 306 is also included during or after the execution of step 305 in this embodiment. The specific steps are as follows:
[0116] Step 301. The central server queries all storage nodes storing copies of corresponding resources according to the resource request of the terminal;
[0117] Step 302: The central server sends a resource allocation mode query request to each storage node;
[0118] Step 303. Each storage node feeds back the resource allocation mode of each storage node to the central server according to its current load situation;
[0119] Step 304: The central server determines the final storage node that participates in allocating resources to the terminal according to the resource allocation mode of each storage node;
[0120] Step 305: The central server controls the final storage node to send resources to the terminal according to the resource allocation mode fed back by the central server;
[0121] Step 306. When the central server receives a request from any storage node in the final storage node that it cannot send resources according to the fed-back resource allocation mode, it returns to step 302 and repeats steps 302-305 until the resources are sent to the terminal.
[0122] Based on the same inventive concept, this embodiment also proposes a central server, including:
[0123] A query unit, used to query all storage nodes storing corresponding resource copies according to the resource request of the terminal, and send a query request instruction to the query unit;
[0124] An inquiry unit, configured to send a resource allocation mode inquiry request to each storage node according to the inquiry request instruction sent by the query unit or the judgment unit, and send the resource allocation mode fed back by each storage node to the determination unit;
[0125] A determination unit, configured to receive the resource allocation mode fed back by each storage node from the query unit, determine the final storage node participating in resource allocation to the terminal according to the resource allocation mode fed back by each storage node, and send the final storage node selection result to the control unit;
[0126] The determination unit sends the final storage node selection result to the control unit and can also notify each storage node of the selection result;
[0127] A control unit, used to control the final storage node to send resources to the terminal according to the resource allocation mode fed back by the final storage node;
[0128] The judgment unit is used to send an inquiry request instruction to the inquiry unit when the central server receives a change mode request that any storage node in the final storage node cannot send resources according to the fed-back resource allocation mode.
[0129] In this embodiment, except that the functions of the inquiry unit and the judgment unit in the central server are different from those in Embodiment 1, the other units in the central server are the same as those in Embodiment 1 and will not be described again here.
[0130] Based on the same inventive concept, this embodiment also proposes an edge server, including:
[0131] A storage unit is used to store a number of storage nodes and the load conditions of the storage nodes;
[0132] The execution unit is used to feed back the resource allocation mode of each storage node to the central server according to the current load of the storage node itself;
[0133] The monitoring module is used to monitor the current load of the node selected as the final storage node. When the load of any final storage node cannot send resources according to the feedback resource allocation mode, a request for changing the mode is sent to the judgment unit of the central server.
[0134] The load status of the storage node may at least include the actual physical location of the storage node, the remaining bandwidth, the remaining storage space, the total bandwidth and the total storage space.
[0135] Execution unit, specifically used for:
[0136] If the remaining bandwidth of the storage node itself is greater than the first threshold and the remaining storage space of the storage node itself is greater than the second threshold, the resource allocation mode fed back by the storage node to the central server is a resource guarantee allocation mode; otherwise, the resource allocation mode fed back by the storage node to the central server is a resource competition allocation mode.
[0137] The first threshold is 10% of the total bandwidth of the storage node storing the corresponding resource copy, and the second threshold is 10% of the total storage space of the storage node storing the corresponding resource copy.
[0138] Based on the same inventive concept, the present invention also provides a container cloud platform, including the above-mentioned central server and the above-mentioned edge server in this embodiment.
[0139] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0140] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0141] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0142] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A dual-mode balancing method for multiple copies, characterized in that: The method comprises: Based on the resource request from the terminal, the central server queries all storage nodes that store copies of the corresponding resources; The central server sends a resource allocation mode query request to each storage node; Each storage node feeds back the resource allocation mode of each storage node to the central server based on its current load situation; The central server determines the final storage node that participates in resource allocation to the terminal according to the resource allocation mode of each storage node; The central server controls the final storage node to send resources to the terminal according to the feedback resource allocation mode; Each storage node feeds back the current resource allocation mode of each storage node to the central server according to its own load condition, including: If the remaining bandwidth of the storage node itself is greater than the first threshold and the remaining storage space of the storage node itself is greater than the second threshold, the resource allocation mode fed back by the storage node to the central server is the resource guarantee allocation mode; otherwise, the resource allocation mode fed back by the storage node to the central server is the resource competition allocation mode; The first threshold is 10% of the total bandwidth of the storage node storing the corresponding resource copy, and the second threshold is 10% of the total storage space of the storage node storing the corresponding resource copy; The central server determines the final storage node that participates in allocating resources to the terminal according to the resource allocation mode returned by each storage node, including: If the number of storage nodes that can provide the resource guarantee allocation mode is greater than or equal to 2 and the number of storage nodes that can provide the resource competition allocation mode is greater than or equal to 4, the central server arbitrarily selects 2 storage nodes that can provide the resource guarantee allocation mode as the storage nodes that provide the resource guarantee allocation mode, and arbitrarily selects 4 storage nodes that can provide the resource competition allocation mode as the storage nodes that provide the resource competition allocation mode; If the number of storage nodes that can provide the resource guarantee allocation mode is 1 and the number of storage nodes that can provide the resource competition allocation mode is greater than or equal to 6, the central server will use the storage node that can provide the resource guarantee allocation mode as the storage node that provides the resource guarantee allocation mode, and arbitrarily select 6 storage nodes that can provide the resource competition allocation mode as the storage nodes that provide the resource competition allocation mode; If the number of storage nodes that can provide the resource guarantee allocation mode is 0 and the number of storage nodes that can provide the resource competition allocation mode is greater than or equal to 8, the central server arbitrarily selects 8 storage nodes that can provide the resource competition allocation mode as the storage nodes that provide the resource competition allocation mode; Otherwise, the central server re-issues a resource allocation mode query request to each storage node; The resource allocation mode includes: Resource-guaranteed allocation model and resource-competitive allocation model; Among them, the resource guarantee allocation mode is that the storage node provides resources to the terminal according to the bandwidth and storage space pre-agreed between it and the terminal, and the resource competition allocation mode is that the storage node provides resources to the terminal according to the priority of the terminal with which it establishes a connection.
2. The method according to claim 1, characterized in that The resource is multimedia content, the resource copy is a multimedia content copy, and the resource request is a request for multimedia content required by a user.
3. The method according to claim 1, characterized in that After the central server controls the final storage node to send resources to the terminal according to the feedback resource allocation mode, the method further includes: When the query cycle preset in the central server is reached, the central server controls the final storage node to stop sending resources and determines whether the final storage node has completed sending resources to the terminal; If the sending is completed, the operation ends; Otherwise, the central server re-issues a resource allocation mode query request to each storage node until all resources are sent to the terminal.
4. The method according to claim 1, characterized in that While or after the central server controls the final storage node to send resources to the terminal according to the feedback resource allocation mode, the method further includes: When the central server receives a request from any storage node in the final storage node that it cannot send resources according to the fed-back resource allocation mode, it re-sends a resource allocation mode inquiry request to each storage node until the resources are sent to the terminal.
5. A central server, characterized in that: The central server comprises: A query unit, used to query all storage nodes storing corresponding resource copies according to the resource request of the terminal, and send a query request instruction to the query unit; An inquiry unit, configured to send a resource allocation mode inquiry request to each storage node according to the inquiry request instruction sent by the query unit, and send the resource allocation mode fed back by each storage node to the determination unit; A determination unit, configured to receive the resource allocation mode fed back by each storage node from the query unit, determine the final storage node participating in resource allocation to the terminal according to the resource allocation mode fed back by each storage node, and send the final storage node selection result to the control unit; A control unit, used to control the final storage node to send resources to the terminal according to the resource allocation mode fed back by the final storage node; The determining unit comprises: A transceiver module, used for receiving the resource allocation mode fed back by each storage node from the inquiry unit, wherein the resource allocation mode includes a resource guarantee allocation mode and a resource competition allocation mode; and also used for sending the final storage node selection result determined by the first, second or third selection module to the control unit; A first selection module is used for arbitrarily selecting two storage nodes that can provide the resource guarantee allocation mode as the storage nodes that provide the resource guarantee allocation mode, and arbitrarily selecting four storage nodes that can provide the resource competition allocation mode as the storage nodes that provide the resource competition allocation mode, if the number of storage nodes that can provide the resource guarantee allocation mode is greater than or equal to 2 and the number of storage nodes that can provide the resource competition allocation mode is greater than or equal to 4; A second selection module is used for, if the number of storage nodes that can provide a resource-guaranteed allocation mode is 1 and the number of storage nodes that can provide a resource-competitive allocation mode is greater than or equal to 6, then using the storage node that can provide a resource-guaranteed allocation mode as the storage node that provides a resource-guaranteed allocation mode, and arbitrarily selecting 6 storage nodes that can provide a resource-competitive allocation mode as the storage nodes that provide a resource-competitive allocation mode; A third selection module is used for arbitrarily selecting 8 storage nodes that can provide the resource competition type allocation mode as the storage nodes that provide the resource competition type allocation mode if the number of storage nodes that can provide the resource guarantee type allocation mode is 0 and the number of storage nodes that can provide the resource competition type allocation mode is greater than or equal to 8; A request module, used for re-issuing a resource allocation mode inquiry request to each storage node if the number of storage nodes with the corresponding resource allocation mode does not meet the requirements of the above three selection modules; The resource allocation mode includes: Resource-guaranteed allocation model and resource-competitive allocation model; Among them, the resource guarantee allocation mode is that the storage node provides resources to the terminal according to the bandwidth and storage space pre-agreed between it and the terminal, and the resource competition allocation mode is that the storage node provides resources to the terminal according to the priority of the terminal with which it establishes a connection.
6. An edge server, characterized in that: The edge server comprises: A storage unit is used to store a number of storage nodes and the load conditions of the storage nodes; An execution unit, configured to feed back the resource allocation mode of each storage node to the central server as claimed in claim 5 according to the current load of the storage node itself; The execution unit is specifically used for: If the remaining bandwidth of the storage node itself is greater than the first threshold and the remaining storage space of the storage node itself is greater than the second threshold, the resource allocation mode fed back by the storage node to the central server is a resource guarantee allocation mode; otherwise, the resource allocation mode fed back by the storage node to the central server is a resource competition allocation mode.
7. The edge server according to claim 6, characterized in that: The load condition of the storage node includes at least the actual physical location of the storage node, the remaining bandwidth, the remaining storage space, the total bandwidth and the total storage space.
8. A container cloud platform, comprising a central server as claimed in claim 5 and an edge server as claimed in claims 6-7.
