Mirror server configuration methods, devices, equipment and storage media
Patent Information
- Application Number
- CN202311601429.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2043-11-28
AI Technical Summary
[0002]随着计算机和网络技术的快速发展,大量的数据在互联网上进行传输,极大地增加了内容服务器、网络和数据中心的负载,从而影响服务器的传输质量甚至导致网络链路故障
[0014]The mirror server configuration method provided in this embodiment of the invention obtains a target network topology diagram of mirror server nodes and user nodes, determines the two-sided connected components between nodes from the target network topology diagram, shrinks the two-sided connected components according to a first preset rule to generate a first target tree. The first target tree includes a first leaf node containing user nodes and a second leaf node not containing user nodes. The second leaf node in the first target tree is iteratively shrunk to a target parent node to generate a second target tree. The target parent node contains user nodes. The location and number of mirror servers to be configured are determined based on the leaf nodes of the second target tree. By setting the location and number of mirror servers, this embodiment of the invention enables users to be connected to a mirror server with a smaller hop length after the server transmission quality is affected or the network link fails.
Smart Images

Figure CN117729218B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for configuring a mirror server. Background Technology
[0002] With the rapid development of computer and network technologies, massive amounts of data are transmitted over the internet, significantly increasing the load on content servers, networks, and data centers. This can affect server transmission quality and even lead to network link failures. To address this issue, existing methods involve placing mirror servers with identical content on the network. When server transmission quality is affected or a network link failure is detected, user requests are routed to one of the mirror servers to reduce latency and balance server load.
[0003] While using mirror servers can reduce access latency, it also places high demands on the location of the mirror server. Specifically, it must be able to connect users to a mirror server with a small hop length when server transmission quality is affected or network links fail. Summary of the Invention
[0004] The purpose of this invention is to provide a mirror server configuration method, apparatus, device, and storage medium, enabling users to connect to a mirror server with a smaller hop length after server transmission quality is affected or network link failure occurs, thereby reducing access latency. The specific technical solution is as follows: In a first aspect of this invention, a mirror server configuration method is provided, characterized in that the method includes: Obtain a target network topology diagram of the mirror server nodes and user nodes; Determine the two-sided connectivity components between nodes from the target network topology diagram; The two connected components are shrunk according to the first preset rule to generate a first target tree. The first target tree includes: a first leaf node containing user nodes and a second leaf node not containing user nodes. The second leaf node in the first target tree is iteratively shrunk to the target parent node to generate a second target tree, wherein the target parent node contains user nodes; The location and number of mirror servers to be configured are determined based on the leaf nodes of the second target tree.
[0005] Optionally, before obtaining the target network topology diagram of the mirror server nodes and user nodes, the method further includes: Determine the network topology for the initial image server node and the initial user node; Links are added to the network topology according to the second preset rule to generate the target network topology diagram.
[0006] Optionally, the step of adding links to the network topology according to the second preset rule to generate a target network topology diagram includes: According to the K-NA-edge-connected network topology, links are added to the network topology so that there are at least K links from any user node to the mirror server node, where K≥2; The target network topology diagram is generated by adding the network topology of the links.
[0007] Optionally, after generating the target network topology diagram by adding the network topology of the links, the method further includes: The user node sends a target request to the first mirror server node, and the distance between the first mirror server node and the user node is the first distance; If a fault is detected in the first mirror server node, the second mirror server node receives the target request through the link control of the target network topology diagram. The distance between the second mirror server node and the user node is a second distance, and the increment of the second distance compared with the first distance is less than or equal to 1.
[0008] Optionally, determining the two-sided connected components between nodes from the network topology graph includes: Obtain multiple edges of the network topology graph; The two-way connectivity components between nodes are determined by multiple edges of the network topology graph.
[0009] Optionally, the step of shrinking the two connected components according to a first preset rule to generate a first target tree includes: Identify the user nodes in the network topology diagram; Obtain the two-sided connected components of the user node from the two-sided connected components between the nodes; By shrinking the mirror server connected to the user node through the two connected components on both sides of the user node, the first leaf node of the user node is generated. Identify the unshrunken mirror server nodes in the network topology diagram and obtain the location information of the unshrunken mirror server nodes; Obtain the unshrunken connected components of the two sides of the mirror server node from the two-sided connected components between the nodes; The unshrinkable mirror server nodes are divided into regions based on their location information and the connectivity components on both sides. Shrink the unshrunken mirror server nodes belonging to the same region to generate a second leaf node that does not contain user nodes; A first target tree is generated based on the first leaf node and the second leaf node.
[0010] Optionally, determining the location and number of mirror servers to be configured based on the leaf nodes of the second target tree includes: The second number of mirror servers to be configured is determined based on the first number of leaf nodes of the second target tree, wherein the second number is greater than or equal to the first number; The image servers to be configured are deployed on each leaf node of the second target tree.
[0011] In a second aspect of the present invention, a mirror server configuration apparatus is also provided, characterized in that it comprises: The first acquisition module is used to acquire a target network topology diagram of the mirror server nodes and user nodes; The first determining module is used to determine the two-sided connected components between nodes from the target network topology diagram; The first generation module is used to shrink the two connected components according to a first preset rule to generate a first target tree. The first target tree includes: a first leaf node containing user nodes and a second leaf node not containing user nodes. The second generation module is used to iteratively shrink the second leaf node in the first target tree to the target parent node to generate a second target tree, wherein the target parent node contains user nodes. The second determining module is used to determine the location and number of mirror servers to be configured based on the leaf nodes of the second target tree.
[0012] In a third aspect of the present invention, a communication device is also provided, comprising: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; The processor is used to read the program in the memory to execute any of the above-described mirror server configuration methods.
[0013] In a fourth aspect of the invention, a computer-readable storage medium is also provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform any of the above-described mirror server configuration methods.
[0014] The mirror server configuration method provided in this embodiment of the invention obtains a target network topology diagram of mirror server nodes and user nodes, determines the two-sided connected components between nodes from the target network topology diagram, shrinks the two-sided connected components according to a first preset rule to generate a first target tree. The first target tree includes a first leaf node containing user nodes and a second leaf node not containing user nodes. The second leaf node in the first target tree is iteratively shrunk to a target parent node to generate a second target tree. The target parent node contains user nodes. The location and number of mirror servers to be configured are determined based on the leaf nodes of the second target tree. By setting the location and number of mirror servers, this embodiment of the invention enables users to be connected to a mirror server with a smaller hop length after the server transmission quality is affected or the network link fails. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0016] Figure 1 This is one of the flowcharts of the image server configuration method provided in the embodiments of the present invention; Figure 2 yes Figure 1 The diagram shown illustrates the generation of the second target tree in the image server configuration method provided in this embodiment of the invention. Figure 3 This is the second step of the flowchart of the image server configuration method provided in the embodiment of the present invention; Figure 4 yes Figure 3 The diagram shown is a schematic representation of the target network topology in the mirror server configuration method provided in this embodiment of the invention. Figure 5 This is a schematic diagram of the structure of a mirror server configuration device provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a communication device provided in an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details are presented in the various embodiments of the present invention to facilitate a better understanding of this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for ease of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with and referenced by each other without contradiction.
[0018] Reference Figure 1 The diagram illustrates one of the steps of a mirror server configuration method provided in an embodiment of the present invention. The method may include: Step 101: Obtain the target network topology diagram for the mirror server nodes and user nodes.
[0019] The target network topology diagram in this embodiment of the invention is a K-NA-edge-connected topology, that is, there are at least K independent paths between any user node and a set of vertices corresponding to the node where the mirror server is located. So when K-1 paths fail simultaneously, at least one path from any node to at least one mirror server still exists, and the mirror server can continue to work. The value of K is not fixed, but it must be greater than or equal to 2, and can be 4, 5, or 6. This invention does not make a specific limitation here.
[0020] In addition, an edge in the target network topology diagram is defined as a hop length for access. That is, when the path length from the user node to the mirror server node in the target network topology diagram is 2 edges, the hop length for the user to access the corresponding mirror server is 2.
[0021] Step 102: Determine the two-sided connectivity components between nodes from the target network topology diagram.
[0022] In this embodiment of the invention, there are multiple paths between the mirror server node and the user node. However, in order for the user to access the mirror server with a smaller hop length when the link fails, the edges connecting each node can be determined first, and then these edges can be collected to determine the connected components between the two sides of the nodes. The specific execution steps include: Obtain multiple edges from the network topology graph; The two-way connectivity components between nodes are determined by multiple edges in the network topology graph.
[0023] These bilateral connectivity components include bilateral connectivity components between user nodes and mirror server nodes, bilateral connectivity components between user nodes, and bilateral connectivity components between mirror server nodes.
[0024] In addition, since the path from a user node to a mirror server node can be represented as multiple edges in the target network topology graph, the path length is defined as the number of all edges contained in the path. The shortest path between two vertices is defined as the path with the smallest path length among all paths between the two vertices. For example, user node 1 to mirror server node A includes multiple paths such as 1-abcA, 1-aA, and 1-decA. The shortest path is 1-aA, where a, b, c, d, and e are edges in the target network topology graph.
[0025] Step 103: Shrink the connected components on both sides according to the first preset rule to generate the first target tree.
[0026] The first target tree in this embodiment of the invention includes: a first leaf node containing user nodes and a second leaf node not containing user nodes. After determining the two-sided connected components between nodes, the two-sided connected components related to user nodes are first selected. The mirror server nodes related to the two-sided connected components belonging to the same user node are shrunk with the connected user nodes to obtain the first leaf node. At this time, the path between the mirror server nodes and user nodes in the first leaf node is the shortest, which is 1, that is, the user can directly access the mirror server node through a hop length. However, there are still some mirror server nodes with a path length greater than 1 with any user node, which can be path 2 or 3 with the user node. These mirror server nodes with a path length greater than 1 need to be shrunk as well. First, the positions of these unshrunk mirror server nodes and the two-sided connected components of these unshrunk mirror server nodes are determined. Then, regions are divided according to the positions and the two-sided connected components. The nodes in the regions are shrunk to obtain the second leaf node. The final first target tree is determined based on the first and second leaf nodes. The specific implementation steps include: Identify the user nodes in the network topology diagram; Obtain the two-sided connected components of the user node from the two-sided connected components between the nodes; By shrinking the mirror server connected to the user node through the two connected components on both sides of the user node, a first leaf node is generated. Identify the unshrunken mirror server nodes in the network topology diagram and obtain the location information of the unshrunken mirror server nodes; Obtain the unshrunken connected components of the two sides of the mirror server node from the two-sided connected components between the nodes; The unshrinkable mirror server nodes are divided into regions based on their location information and the connectivity components on both sides. Shrink the unshrinked mirror server nodes belonging to the same region to generate second leaf nodes; A first target tree is generated based on the first leaf node and the second leaf node.
[0027] By using the above-mentioned shrinkage method, the number of subsequent mirror servers can be reduced, and the path length between these mirror servers and users can also be reduced.
[0028] Step 104: Iteratively shrink the second leaf node in the first target tree to the target parent node to generate the second target tree.
[0029] In this embodiment of the invention, the target parent node includes a user node. After obtaining the first target tree, in order to ensure that users have a smaller hop length when accessing the mirror server, and also to reduce the number of mirror servers deployed, the second leaf node that does not contain a user node is iteratively shrunk towards the parent node until the parent node contains a user node. At this point, the iteration ends, and the second target tree is obtained.
[0030] For example, the process of generating the second target tree described above is as follows: Figure 2 As shown, firstly, the connected components on both sides are determined in the target network topology diagram a. The black bolded components are user nodes, and the unbolded components are mirror server nodes. Then, the connected components on both sides are shrunk according to the first preset rule to generate the first target tree b. That is, the mirror servers connected to the user nodes are shrunk to generate the black bolded nodes in diagram b. The unshrunk mirror server nodes belonging to the same region are shrunk to generate the black unbolded nodes in diagram b. Finally, the second leaf nodes in the first target tree are iteratively shrunk to the target parent node to generate the second target tree c. At this time, each node has at least one user node.
[0031] Step 105: Determine the location and number of mirror servers to be configured based on the leaf nodes of the second target tree.
[0032] In this embodiment of the invention, after obtaining the second target tree, since each leaf node of the second target tree includes at least one user node, to minimize the hop length when users access these leaf nodes, a mirror server is deployed on each leaf. Therefore, the number of mirror servers to be configured is determined based on the number of leaf nodes of the second target tree (to reduce overhead, at least one mirror server is deployed on each leaf, so the number of mirror servers to be configured is greater than or equal to the number of leaf nodes of the second target tree). The location of the mirror servers to be configured is determined based on the location of the leaf nodes of the second target tree, specifically including: The second number of mirror servers to be configured is determined based on the first number of leaf nodes in the second target tree, and the second number is greater than or equal to the first number. The image servers to be configured are deployed on each leaf node of the second target tree.
[0033] The above deployment method minimizes the number of mirror servers while also reducing the hop length of the path from the user to the server. It's worth noting that during the generation of the second target tree, the second leaf node in the first target tree is iteratively shrunk to the target parent node. This target parent node is also the optimal location for deploying the mirror servers in the second target tree, as this minimizes overhead and saves costs.
[0034] The mirror server configuration method provided in this embodiment of the invention obtains a target network topology diagram of mirror server nodes and user nodes, determines the two-sided connected components between nodes from the target network topology diagram, shrinks the two-sided connected components according to a first preset rule to generate a first target tree. The first target tree includes a first leaf node containing user nodes and a second leaf node not containing user nodes. The second leaf node in the first target tree is iteratively shrunk to a target parent node to generate a second target tree. The target parent node contains user nodes. The location and number of mirror servers to be configured are determined based on the leaf nodes of the second target tree. By setting the location and number of mirror servers, this embodiment of the invention enables users to be connected to a mirror server with a smaller hop length after the server transmission quality is affected or the network link fails.
[0035] Reference Figure 3 The second flowchart of the image server configuration method provided in this embodiment of the invention is shown, specifically including: Step 201: Determine the network topology for the initial image server node and the initial user node.
[0036] In order to ensure that users can still access other mirror servers through other paths when the first mirror server fails, a reliable network topology needs to be designed in this embodiment of the invention. For this purpose, the network topology of the initial mirror server node and the initial user node is first determined.
[0037] Step 202: Add links to the network topology according to the second preset rule to generate the target network topology diagram.
[0038] In this embodiment of the invention, after determining the initial network topology structure composed of nodes, links are added to the network topology structure according to a second preset rule to generate a target network topology diagram. Adding links to the network topology structure according to the second preset rule means designing the current network topology structure according to a K-NA-edge-connected topology. Specific implementation steps include: Based on the K-NA-edge-connected network topology, add links to the network topology so that there are at least K links from any user node to the mirror server node, where K≥2; Generate the target network topology diagram by adding links to the network topology.
[0039] The K-NA-edge-connected topology ensures that there are at least k independent paths between any vertex and a set of vertices corresponding to the node where the mirror server is located. Therefore, even if k-1 links fail simultaneously, at least one path from any node to at least one mirror server still exists, and the mirror server can continue to operate, guaranteeing the reliability of user access. The specific steps include: The user node sends a target request to the first mirror server node, and the distance between the first mirror server node and the user node is the first distance; If a failure is detected in the first mirror server node, the second mirror server node receives the target request through the link control of the target network topology diagram. The distance between the second mirror server node and the user node is the second distance, and the increment of the second distance compared with the first distance is less than or equal to 1.
[0040] Based on this, the target network topology diagram can preserve users' right to access the mirror server to the greatest extent, thereby reducing latency and balancing server load.
[0041] For example, such as Figure 4As shown, gray nodes are the nodes where the servers reside; white nodes are user nodes. For ease of description, they are numbered sequentially from top to bottom and left to right, resulting in mirror server node 1, mirror server node 2, mirror server node 3, user node 1, user node 2, user node 3, user node 4, and user node 5. When a user sends a request from user node 1 to the mirror server, the optimal selection method (minimum hop length) is to send the request to mirror server node 1 (the first mirror server node). However, if mirror server 1 fails, requests need to be sent to other mirror servers. It can be seen that the distance between user node 1 and mirror server node 1 is 1, and the minimum distance between user node 1 and mirror server nodes 2 and 3 is 2. The distance increment must be equal to 1, so mirror server nodes 2 and 3 can both serve as the second mirror server node to receive requests.
[0042] Step 203: Obtain the target network topology diagram for the mirror server nodes and user nodes.
[0043] Step 204: Determine the two-sided connectivity components between nodes from the target network topology diagram.
[0044] Step 205: Shrink the connected components on both sides according to the first preset rule to generate the first target tree.
[0045] Step 206: Shrink the target leaf nodes in the first target tree that do not contain user nodes to the parent nodes of the target leaf nodes that contain user nodes, and generate the second target tree.
[0046] Step 207: Determine the location and number of mirror servers to be configured based on the leaf nodes of the second target tree.
[0047] Steps 203-207 above refer to the content of steps 101-105 discussed earlier, and will not be repeated here. It should be noted that when determining the location and number of mirror servers to be configured, the present invention executes the following algorithm: Input: Graph
[0048] positive integers k = 1, r = n, t, L. Output: W. 1:
[0049] 2:Connect
[0050] 3:if U is included in a 2-edge-connected component
[0051] then 4:
[0052] 5: goto line 15 6:end if 7:Make
[0053] 8: for all do 9:if then 10:output 'infeasible' 11:else 12:
[0054] 13:end if 14: end for 15: if then 16:output 'infeasible' 17: end if 18: output W In the above algorithm, the input G = (V, E), where V and E are the vertex set and edge set in the target network topology graph, respectively, and are the images representing the network structure. The output W (W ≤ |L|) represents the mirror server node to be configured, U is the vertex subset of the user node, L is the path length, and all two-way connected components are output through (G, 2, C), where C is the two-way connected component between nodes. This is the second target tree mentioned above, where t is the number of image servers to be configured, and in line 4, LPP (Lightweight Presentation Protocol) is mentioned. The algorithm is as follows: Input: Graph
[0055] a positive integer t, a 2-edge-connected component , all 2-edge-connected components of G. Output: S 1: Make
[0056] from C so that = 1. 2: if then 3:
[0057] 4: else if then 5: Output 'infeasible' 6: else 7:
[0058] 8: Let be the component with the maximum size in D. 9: if then 10:
[0059] 11:while do 12:if then 13:
[0060] 14:end if 15:
[0061] 16:end while 17:
[0062] 18:else 19:output 'infeasible' 20:end if 21: end if 22: output S Using the LPP algorithm described above, the final location and number of mirror server nodes to be configured can be determined based on the following three scenarios: (1) The t-server can be located in W or other locations. (As can be seen from the algorithm program in lines 2-3 above); (2) The cutting size is less than or equal to 1 (as can be seen from the algorithm program in lines 4-5 above); (3) Other scenarios (as can be seen from the algorithm program in lines 6-20 above).
[0063] For case (1), it can be done by... The optimal solution is obtained by locating the t-server in the middle.
[0064] In scenario (2), this is not feasible because users can only access... (<t) servers.
[0065] For case (3), this process will connect the server to the component excluding the largest component. All other components are positioned equally; then the server is positioned. .lie in The number of servers in the data is excluding... The maximum number of servers in components other than U. The resulting graph obtained by removing any edge contains at least t servers in components of U, because when removing... and When the edges between them are defined, it reaches its minimum value. Therefore, the algorithm can output the minimum number of server locations.
[0066] Correspondingly, in terms of time complexity, Connect(G,2,C) has a time complexity of O(n) because it decomposes a graph into components that are connected at both ends. Since all components need to be checked for shrinkage, the execution... The time complexity is The time complexity of cases (1) and (2) is O(n). The time complexity of case (3) is O(t) = O(n). Therefore, the total time complexity is O(t). .
[0067] Reference Figure 5 The diagram illustrates a structural schematic of a mirror server configuration device provided in an embodiment of the present invention, as shown below. Figure 5 As shown, the device may include: The first acquisition module 301 is used to acquire a target network topology diagram of the mirror server node and user nodes.
[0068] The first determining module 302 is used to determine the two-sided connected components between nodes from the target network topology diagram.
[0069] The first generation module 303 is used to shrink the connected components on both sides according to the first preset rule to generate a first target tree. The first target tree includes: a first leaf node containing user nodes and a second leaf node not containing user nodes.
[0070] The second generation module 304 is used to iteratively shrink the second leaf node in the first target tree to the target parent node to generate the second target tree, wherein the target parent node contains user nodes.
[0071] The second determining module 305 is used to determine the location and number of mirror servers to be configured based on the leaf nodes of the second target tree.
[0072] Optionally, the mirror server configuration apparatus also includes: The third determining module is used to determine the network topology of the initial image server node and the initial user node.
[0073] The third generation module is used to add links to the network topology according to the second preset rules and generate the target network topology diagram.
[0074] Optionally, the third generation module also includes: The first addition submodule is used to add links in the network topology according to the K-NA-edge-connected network topology, so that there are at least K links from any user node to the mirror server node, where K≥2.
[0075] The first generation submodule is used to generate a target network topology diagram by adding links to the network topology.
[0076] The first sending submodule is used to send a target request from the user node to the first mirror server node, and the distance between the first mirror server node and the user node is the first distance.
[0077] The first receiving submodule is used to receive the target request by controlling the second mirror server node through the link of the target network topology diagram when a failure of the first mirror server node is detected. The distance between the second mirror server node and the user node is the second distance, and the increment of the second distance compared with the first distance is less than or equal to 1.
[0078] Optionally, the first determining module 302 further includes: The first acquisition submodule is used to acquire multiple edges of the network topology graph.
[0079] The first determination submodule is used to determine the two-sided connectivity components between nodes through multiple edges of the network topology graph.
[0080] Optionally, the first generation module 303 further includes: The second determination submodule is used to determine the user nodes in the network topology diagram.
[0081] The second acquisition submodule is used to obtain the two-sided connected components of the user node from the two-sided connected components between nodes.
[0082] The second generation submodule is used to shrink the mirror servers connected to the user node by using the two connected components on both sides of the user node, and generate the first leaf node of the user node.
[0083] The third acquisition submodule is used to determine the unshrunken mirror server nodes in the network topology diagram and obtain the location information of the unshrunken mirror server nodes.
[0084] The fourth acquisition submodule is used to obtain the unshrunken connected components of the mirror server nodes from the connected components between the nodes.
[0085] The first partitioning submodule is used to partition the unshrinked mirror server nodes into regions based on the location information of the unshrinked mirror server nodes and the connected components on both sides.
[0086] The third generation submodule is used to shrink the unshrinked mirror server nodes belonging to the same region to generate a second leaf node that does not contain user nodes.
[0087] The fourth generation submodule is used to generate the first target tree based on the first leaf node and the second leaf node.
[0088] Optionally, the second determining module 305 further includes: The third determining submodule is used to determine the second number of mirror servers to be configured based on the first number of leaf nodes of the second target tree, wherein the second number is greater than or equal to the first number.
[0089] The deployment submodule is used to deploy the image server to be configured to each leaf node of the second target tree.
[0090] The mirror server configuration method provided in this embodiment of the invention obtains a target network topology diagram of mirror server nodes and user nodes, determines the two-sided connected components between nodes from the target network topology diagram, shrinks the two-sided connected components according to a first preset rule to generate a first target tree. The first target tree includes a first leaf node containing user nodes and a second leaf node not containing user nodes. The second leaf node in the first target tree is iteratively shrunk to a target parent node to generate a second target tree. The target parent node contains user nodes. The location and number of mirror servers to be configured are determined based on the leaf nodes of the second target tree. By setting the location and number of mirror servers, this embodiment of the invention enables users to be connected to a mirror server with a smaller hop length after the server transmission quality is affected or the network link fails.
[0091] This invention also provides a communication device, such as... Figure 6As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404. Memory 403 is used to store computer programs; When processor 401 executes the program stored in memory 403, it performs the following steps: Obtain a target network topology diagram of the mirror server nodes and user nodes; Determine the two-sided connectivity components between nodes from the target network topology diagram; The two connected components are shrunk according to the first preset rule to generate a first target tree. The first target tree includes: a first leaf node containing user nodes and a second leaf node not containing user nodes. The second leaf node in the first target tree is iteratively shrunk to the target parent node to generate a second target tree, wherein the target parent node contains user nodes; The location and number of mirror servers to be configured are determined based on the leaf nodes of the second target tree.
[0092] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0093] The communication interface is used for communication between the aforementioned terminal and other devices.
[0094] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0095] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0096] The present invention also provides a readable storage medium, wherein when the instructions in the storage medium are executed by the processor of an electronic device, the electronic device is able to perform the access control method of the foregoing embodiments.
[0097] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0098] The algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other equipment. The structure required to construct such a device is readily apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0099] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0100] Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed invention requires more features than expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.
[0101] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0102] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention can also be implemented as a device or apparatus program for performing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0103] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0104] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0105] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0106] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0107] It should be noted that the various data-related processes in the embodiments of this application are carried out in compliance with the relevant data protection laws and policies of the country where the location is located, and with the authorization granted by the owner of the corresponding device.
Claims
1. A method for configuring a mirror server, characterized in that, The method includes: Obtain a target network topology diagram of the mirror server nodes and user nodes; Determine the two-sided connectivity components between nodes from the target network topology diagram; Identify the user nodes in the network topology diagram; Obtain the two-sided connected components of the user node from the two-sided connected components between the nodes; By shrinking the mirror server connected to the user node through the two connected components on both sides of the user node, the first leaf node of the user node is generated. Identify the unshrunken mirror server nodes in the network topology diagram and obtain the location information of the unshrunken mirror server nodes; Obtain the unshrunken connected components of the two sides of the mirror server node from the two-sided connected components between the nodes; The unshrinkable mirror server nodes are divided into regions based on their location information and the connectivity components on both sides. Shrink the unshrunken mirror server nodes belonging to the same region to generate a second leaf node that does not contain user nodes; A first target tree is generated based on the first leaf node and the second leaf node. The first target tree includes: a first leaf node containing user nodes and a second leaf node not containing user nodes. The second leaf node in the first target tree is iteratively shrunk to the target parent node to generate a second target tree, wherein the target parent node contains user nodes; The location and number of mirror servers to be configured are determined based on the leaf nodes of the second target tree.
2. The method according to claim 1, characterized in that, Before obtaining the target network topology diagram of the mirror server nodes and user nodes, the process also includes: Determine the network topology for the initial image server node and the initial user node; Based on the K-NA-edge-connected network topology, links are added to the network topology such that there are at least K paths between any user node and a set of vertices of the node where the mirror server is located, where K≥2; The target network topology diagram is generated by adding the network topology of the links.
3. The method according to claim 2, characterized in that, After generating the target network topology diagram by adding the network topology of the links, the process further includes: The user node sends a target request to the first mirror server node, and the distance between the first mirror server node and the user node is the first distance; If a failure is detected in the first mirror server node, the second mirror server node receives the target request through the link control of the target network topology diagram. The distance between the second mirror server node and the user node is a second distance, and the increment of the second distance compared with the first distance is less than or equal to 1.
4. The method according to claim 1, characterized in that, Determining the two-way connectivity components between nodes from the network topology graph includes: Obtain multiple edges of the network topology graph; The two-way connectivity components between nodes are determined by multiple edges of the network topology graph.
5. The method according to claim 1, characterized in that, The step of determining the location and number of mirror servers to be configured based on the leaf nodes of the second target tree includes: The second number of mirror servers to be configured is determined based on the first number of leaf nodes of the second target tree, wherein the second number is greater than or equal to the first number; The image server to be configured is deployed on each leaf node of the second target tree.
6. A mirror server configuration device, characterized in that, include: The first acquisition module is used to acquire a target network topology diagram of the mirror server nodes and user nodes; The first determining module is used to determine the two-sided connected components between nodes from the target network topology diagram; The first generation module is used to determine the user nodes in the network topology diagram; Obtain the two-sided connected components of the user node from the two-sided connected components between the nodes; shrink the mirror server connected to the user node through the two-sided connected components of the user node to generate the first leaf node of the user node. Identify the unshrunken mirror server nodes in the network topology diagram and obtain the location information of the unshrunken mirror server nodes; Obtain the unshrunken connected components of the two sides of the mirror server node from the two-sided connected components between the nodes; The unshrinkable mirror server nodes are divided into regions based on their location information and the connectivity components on both sides. Shrink the unshrunken mirror server nodes belonging to the same region to generate a second leaf node that does not contain user nodes; A first target tree is generated based on the first leaf node and the second leaf node. The first target tree includes: a first leaf node containing user nodes and a second leaf node not containing user nodes. The second generation module is used to iteratively shrink the second leaf node in the first target tree to the target parent node to generate a second target tree, wherein the target parent node contains user nodes. The second determining module is used to determine the location and number of mirror servers to be configured based on the leaf nodes of the second target tree.
7. A communication device, characterized in that, include: A transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; The processor is used to read a program from the memory to implement the steps in the mirror server configuration method as described in any one of claims 1-5.
8. A readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the steps in the mirror server configuration method as described in any one of claims 1-5.
Citation Information
Patent Citations
Method and system for configuring mirror images of virtual memory devices in virtual host
CN102622282A
Mirror image file management method and device, computer readable medium and electronic equipment
CN117061503A