Resource management method, and server
Through the multi-canvas isolation and resource logical topology management methods, the problem of multiple users editing cloud computing resources at the same time is solved, resource management efficiency and user experience are improved, and global planning capabilities for non-network resources are realized.
Patent Information
- Application Number
- PCT/CN2024/078982
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-28
- Filing Date
- 2024-02-28
- Publication Date
- 2025-02-06
AI Technical Summary
When the business resource relationship of existing cloud computing resource management methods is complex, it is difficult to realize the function of multiple users editing multiple resources at the same time, resulting in low resource management efficiency and low user experience.
The concept of multiple canvas isolates users' operations on resources and manages them based on the logical topological relationship of resources. Using directed graphs to identify the inclusion relationship between resources, users can generate resource logic diagrams on the canvas for management.
It realizes the isolation and mutual perception of multiple users in managing resources on different canvases, improves resource management efficiency and user experience, breaks the limitations of network attributes, and allows non-network resources to also participate in logical topology modeling.
Smart Images

Figure CN2024078982_06022025_PF_FP_ABST
Abstract
Description
Resource management method and server
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on July 28, 2023, with application number 202310953273.7, and invention name “A Resource Management Method and Server”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a resource management method and server. Background Art
[0003] With the development of cloud computing technology, there are currently two main methods for managing cloud computing resources: one is the CRUD (create, read, update, and delete) interface management method; the other is the virtual node management method based on the network topology. Both methods can achieve the management of cloud computing resources, but when the business resource relationships are complex, it is difficult for multiple users to edit multiple resources simultaneously.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a resource management method, server, and resource management system, which can enable multiple users to manage resources through a canvas, thereby improving resource management efficiency and enhancing user experience.
[0006] In a first aspect, an embodiment of the present application provides a resource management method, which is applied to a server. The method includes: obtaining first canvas information and second canvas information, the first canvas information including a first resource logic diagram and an operation type of at least one first resource in the first resource logic diagram, and the second canvas information including a second resource logic diagram and an operation type of at least one second resource in the second resource logic diagram; when there is no conflict between the operation type of the first resource and the operation type of the second resource, resource management is performed according to the first canvas information and the second canvas information.
[0007] In this solution, resources are managed based on their logical topological relationships, allowing users to generate resource logic diagrams on a canvas. Furthermore, when managing resources, the concept of multiple canvases is used to isolate user operations on resources. For example, a first user can manage resources on a first canvas, while a second user can manage resources on a second canvas. After the first user submits information for the first canvas and the second user submits information for the second canvas, conflicts between the operation types of the first resource and the second resource can be determined. This allows different users to manage resources on different canvases while maintaining isolation and awareness of resource changes.
[0008] In one possible implementation, the method further includes: the first canvas information also includes the operating status of at least one first resource in the first resource logic diagram, and the second canvas information also includes the operating status of at least one second resource in the second resource logic diagram, and the operating status is used to indicate whether the resource is edited; the operating status of the first resource and the second resource with the same resource identifier are compared, and if the operating status of the first resource and the second resource are both in the edited state, it is determined that there is a conflict between the operation type of the first resource and the operation type of the second resource.
[0009] In other words, when a conflict exists between the operation type of a first resource and the operation type of a second resource, it is necessary to determine whether a conflict exists between the operation types of the first resource and the second resource with the same resource identifier in the first resource logic diagram and the second resource logic diagram. By performing conflict detection on the first resource logic diagram and the second resource logic diagram, users corresponding to different canvases can perceive resource changes in each other.
[0010] In one possible implementation, when there is no conflict between the operation type of the first resource and the operation type of the second resource, resource management is performed according to the first canvas information and the second canvas information, including: obtaining a first execution state of the first resource logic diagram carried in the first canvas information, and when the first execution state is an effective state, executing the first resource logic diagram, obtaining an execution result of the first resource logic diagram and returning the execution result to the electronic device.
[0011] That is, if there is no conflict between the operation type of the first resource and the operation type of the second resource, the resources included in the first canvas information and the resources included in the second canvas information can be managed separately. This allows multiple users to be isolated from each other when managing resources based on the resource logic diagram.
[0012] In a possible implementation, before executing the first resource logic graph, the method further includes: dividing the first resource logic graph to obtain at least one subgraph.
[0013] That is, the first resource logic graph can be divided into multiple sub-graphs, and then executed in units of sub-graphs, so as to avoid occupying too many processor resources at one time.
[0014] In one possible implementation, the first resource logic diagram is divided to obtain at least one sub-diagram, including: according to the operation status of each resource in the first resource logic diagram, deleting the resources with an unedited operation status to obtain an updated first resource logic diagram; according to the operation type of each resource in the updated first resource logic diagram, splitting the updated first resource logic diagram into at least one sub-diagram, and the first resource in each sub-diagram has the same operation type.
[0015] That is, when dividing the first resource logic graph into at least one subgraph, unedited resources in the first resource logic graph can be deleted, while edited resources can be retained. The edited resources can then be divided into subgraphs based on the type of operation performed when the resource was edited. This allows only the edited resources to be executed during execution, reducing processor resource usage.
[0016] In one possible implementation, based on the operation status of each resource in the first resource logic diagram, resources with an operation status of an unedited state are deleted to obtain an updated first resource logic diagram, including: if there is a first resource in the first resource logic diagram with an operation status of an edit state and an operation type of a create type, obtaining the first resource associated with the first resource; marking the operation status of the first resource associated with the first resource as an edit state and marking the operation type as a create type.
[0017] That is, before deleting unedited resources in the first resource logic graph, the operation status of the resources associated with the resource marked as the create type must be marked as edit, and the operation type must be marked as create. This allows the resources associated with the resource marked as the create type to be retained when the first resource logic graph is divided into at least one subgraph. Since the resource marked as the create type is newly added to the first resource logic graph, retaining the resources associated with the resource marked as the create type can indicate the location of the newly added resource in the first resource logic graph.
[0018] In one possible implementation, before dividing the first resource logic graph to obtain at least one subgraph, the method further includes: adjusting the direction of the connection between two associated first resources in the first resource logic graph according to the logical relationship between the first resources in the first resource logic graph.
[0019] That is, in the first resource logic diagram, adding the direction of the connection line between two associated resources can indicate the inclusion relationship between the two associated resources.
[0020] In one possible implementation, after dividing the first resource logic graph to obtain at least one subgraph, the method further includes: configuring a corresponding processing method for each subgraph in the at least one subgraph, where the processing method is used to represent the management of resources corresponding to the subgraph according to the operation type.
[0021] That is, after dividing the first resource logic graph into at least one subgraph, a corresponding processing method needs to be configured for each subgraph in the at least one subgraph, so that the subgraph can be executed according to the processing method when it is subsequently executed.
[0022] In one possible implementation, the method further includes: when an operation type of the first resource conflicts with an operation type of the second resource, returning resource information of the conflicting resource to the electronic device.
[0023] That is, when there is a conflict between the operation type of the first resource and the operation type of the second resource, the resource information of the conflicting resource is returned to the electronic device, so that users corresponding to different canvases can perceive the change of the resource.
[0024] In one possible implementation, the method further includes: obtaining a first execution state of a first resource logic diagram carried in the first canvas information and a second execution state of a second resource logic diagram carried in the second canvas information; when the first execution state is an effective state and the second execution state is an ineffective state, executing the first resource logic diagram, obtaining an execution result of the first resource logic diagram, and returning the execution result to the electronic device.
[0025] That is, after determining that the operation type of the first resource conflicts with the operation type of the second resource, it is necessary to determine the first execution state of the first resource logic diagram and the second execution state of the second resource logic diagram. If only one execution state is valid, the resource logic diagram in the valid state is executed and the execution result is returned to the electronic device, so that the user can perceive the changes in the resource logic diagram they edited.
[0026] In one possible implementation, the method further includes: when the first execution state and the second execution state are both in effective states, determining whether the execution time of the first resource logic diagram is earlier than the execution time of the second resource logic diagram; when the execution time of the first resource logic diagram is earlier than the execution time of the second resource logic diagram, executing the first resource logic diagram, obtaining the execution result of the first resource logic diagram, and returning the execution result to the electronic device.
[0027] That is, after determining that the operation type of the first resource conflicts with the operation type of the second resource, if both the first execution state and the second execution state are in effect, the effective time is determined, and the resource logic diagram with the earlier effective time is executed, and the execution result is returned to the electronic device, so that the user can perceive the changes in the resource logic diagram edited by the user.
[0028] In a second aspect, an embodiment of the present application provides a server, including:
[0029] at least one memory for storing a program;
[0030] At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method described in the first aspect or any possible implementation of the first aspect.
[0031] In a third aspect, an embodiment of the present application provides a resource management system, including: a graph locking module, a graph detection module, a graph classification module, a graph processing module, a graph execution module, and a graph change monitoring module, wherein:
[0032] Image locking module, used to lock resources on the canvas;
[0033] A graph detection module is used to obtain canvas information, which includes a resource logic graph and an operation type of at least one resource in the resource logic graph; and detect whether the operation type of the resource conflicts with the operation type of other resources in the canvas information;
[0034] A graph classification module is used to divide the resource logic graph in the canvas information into at least one subgraph, and classify each subgraph according to the operation type;
[0035] The graph processing module is used to configure the corresponding processing method for the classified subgraphs. The processing method is used to represent the management of the resources corresponding to the subgraph according to the operation type;
[0036] Graph execution module, used to execute the processing method corresponding to the subgraph;
[0037] The graph change monitoring module is used to monitor whether resources have changed.
[0038] In a fourth aspect, an embodiment of the present application provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.
[0039] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0041] FIG2 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0042] FIG3 is a schematic diagram of the hardware structure of a server provided in an embodiment of the present application;
[0043] FIG4 is a schematic diagram of the structure of a resource management system provided in an embodiment of the present application;
[0044] FIG5a is a schematic diagram of a resource locking process according to an embodiment of the present application;
[0045] FIG5 b is a schematic diagram of a process of unlocking a resource provided by an embodiment of the present application;
[0046] FIG6 is a schematic diagram of a conflict determination process of a resource logic diagram provided in an embodiment of the present application;
[0047] FIG7 is a schematic diagram of a resource logic diagram partitioning process provided in an embodiment of the present application;
[0048] FIG8 is a flow chart of a resource logic diagram processing process provided by an embodiment of the present application.
[0049] FIG9 is a flow chart illustrating an execution process of a resource logic diagram provided in an embodiment of the present application;
[0050] FIG10 is a schematic diagram of a process flow of resource change detection according to an embodiment of the present application;
[0051] FIG11 is a flow chart of a resource management method provided in an embodiment of the present application;
[0052] FIG12 is a schematic diagram of resource topology on a canvas provided in an embodiment of the present application;
[0053] FIG13 is a schematic diagram of resource topology on a canvas provided in an embodiment of the present application;
[0054] FIG14 is a schematic diagram of resource topology on a canvas provided in an embodiment of the present application;
[0055] FIG15 is a schematic diagram of prompt information on a canvas provided in an embodiment of the present application;
[0056] FIG16 is a schematic diagram of resource topology on another canvas provided in an embodiment of the present application;
[0057] FIG17 is a schematic structural diagram of a subgraph of a target resource logic graph provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
[0059] In the description of the embodiments of this application, any embodiment or design scheme using "exemplary," "for example," or "for example" should not be understood as being more preferred or advantageous than other embodiments or designs. Rather, the use of words such as "exemplary," "for example," or "for example" is intended to present the relevant concepts in a concrete manner.
[0060] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly identifying the technical features being referred to. Thus, features specified as "first" or "second" may explicitly or implicitly include one or more of such features. The terms "include," "comprising," "having," and their variations all mean "including but not limited to," unless otherwise specifically emphasized.
[0061] Before introducing this solution, we first introduce the technical terms involved in this solution.
[0062] Digraph: A directed graph in which all edges have a given direction.
[0063] Breadth-first traversal: An algorithm for traversing or searching a tree or graph that starts at a node in the graph (such as the root node), visits all the adjacent nodes of the root node, and then for each adjacent node, visits their unvisited nodes, and so on, until all nodes in the connected range have been visited.
[0064] Hyperconvergence: An information infrastructure framework that integrates storage devices and virtual computing.
[0065] Application Programming Interface (API): A computing interface that defines the interactions between multiple software intermediaries, including the types of calls or requests that can be made, how to make them, the data formats to be used, and the conventions to be followed. It also provides extension mechanisms so that users can extend existing functionality to varying degrees in various ways. An API can be completely customized for a specific component or designed based on industry standards to ensure interoperability. By hiding information, APIs enable modular programming, allowing users to use the interface independently.
[0066] A virtual machine (VM) is a complete computer system simulated by software, with full hardware system functionality, running in a completely isolated environment. Any tasks that can be performed on a physical computer can also be performed on a VM. When creating a VM, a portion of the physical machine's hard drive and memory capacity is used as the VM's hard drive and memory capacity. Each VM has its own independent CMOS, hard drive, and operating system, allowing operations to be performed just like a physical machine.
[0067] Storage pool: A collection of storage resources that can include space from one or more types of physical storage devices (such as hard disk drives, solid-state drives, etc.). A storage pool can be viewed by the operating system or storage management software as a single logical storage resource that can be allocated to various applications or services as needed. It also provides flexibility and efficiency because resources can be dynamically allocated and reallocated based on real-time demand.
[0068] Distributed virtual switches: Commonly used in data center networks, these switches are designed to handle large volumes of network traffic quickly and efficiently. The core concept behind these switches is to expand the traditional model of a single, independent switch device into a logical unit composed of multiple switch devices, allowing them to share information and work together in a clustered environment as if they were a single, large switch. This improves data communication efficiency, scalability, and redundancy, making distributed switches ideal for large and complex network environments. This article refers to software that emulates a physical switch.
[0069] Next, this program is introduced.
[0070] Hyperconvergence is the process of integrating storage, computing, and networking resources into a single IT framework, reducing data center complexity and improving scalability. A hyperconverged platform includes multiple virtual nodes, each representing a basic configuration of network resources.
[0071] In the hyperconvergence world, virtual nodes need to be managed. Typically, users manage virtual nodes based on the network topology by dragging and dropping them on a canvas on the front-end page. During virtual node management, later changes will overwrite earlier ones. The canvas is the front-end component that provides users with drag-and-drop operations and is responsible for displaying change detection and execution results.
[0072] Although the canvas allows for resource management on a hyperconverged platform, operations performed by different users on the same canvas on the front-end interface can affect each other, preventing the ability to isolate resource operations. For example, if user A edits the properties of a resource and user B also edits the same resource, upon submitting the work, user A will find that the resource configuration that takes effect is not the one they configured, but rather the one configured by user B. Furthermore, network topology-based management can only manage network resources, limiting the resources operated on the canvas to only those with network attributes.
[0073] In view of this, an embodiment of the present application provides a resource management method that isolates user operations on resources through multiple canvases, manages resources through resource logical relationships, and identifies the inclusion relationship between logically associated resources through directed graphs. Managing resources through resource logical graphs allows the existence of virtual resources that are not allowed to exist independently in reality, breaking the limitations of network attributes. For example, non-network resources such as storage pools and hard disks can also be added to the logical topology modeling, providing a global planning capability for resources in the hyper-converged platform, making it convenient for users to plan resources clearly at one time.
[0074] For example, FIG1 shows a schematic diagram of an application scenario provided by an embodiment of the present application. As shown in FIG1 , the scenario includes: an electronic device 100 and a hyper-convergence platform 300. The software system of the hyper-convergence platform 300 can run on a server 200. The electronic device 100 displays a canvas as a front-end display device, and receives user operations on the canvas for managing resources. After the electronic device 100 obtains the user's operations on the canvas for managing resources, it also needs to pass the edited resource logic diagram to the server 200. After receiving the edited resource logic diagram, the server 200 needs to judge the edited resource logic diagram to determine whether the edited resource logic diagram conflicts with resource logic diagrams uploaded by other users. If there is a conflict, the server 200 needs to send a prompt message to the electronic device 100. After receiving the edited resource logic diagram, the server 200 needs to execute the edited resource logic diagram and send the execution result to the electronic device 100 for display. During the process of executing the modified resource logical graph, the server 200 may interact with the basic business modules in the hyper-converged platform 300 to implement the functions corresponding to the various resources in the modified resource logical graph.
[0075] For example, FIG2 shows a hardware structure of an electronic device 100. The electronic device 100 may be, but is not limited to, a mobile phone, a tablet computer, a laptop computer, a PC (personal computer), or other electronic devices. The embodiments of the present application do not specifically limit the type of electronic device.
[0076] As shown in Figure 2, the electronic device 100 may include: a processor 110, a memory 120, a display 130, a communication module 140, and an input device 150. The processor 110, the memory 120, the display 130, the communication module 140, and the input device 150 may be connected via a bus or other means.
[0077] The processor 110 is the computing core and control core of the electronic device 100. The processor 110 may include one or more processing units.
[0078] The memory 120 may store a program that can be executed by the processor 110, so that the processor 110 executes part or all of the methods required to be executed by the electronic device 100 provided in the embodiments of the present application. The memory 120 may also store data. The processor 110 may read the data stored in the memory 120. The memory 120 and the processor 110 may be provided separately. Alternatively, the memory 120 may also be integrated into the processor 110.
[0079] The display 130 is used to display images, videos, etc. For example, the display 130 can display a canvas that needs to be loaded on the electronic device 100.
[0080] The communication module 140 includes a mobile communication module, and the communication module 140 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100.
[0081] In some embodiments, the electronic device 100 may further include an input device 150. Based on the content on the canvas displayed on the display 130, information can be input to the electronic device 100 and / or control instructions can be issued via the input device 150 to trigger changes to the resources on the canvas displayed on the display 130. For example, the input device 150 may be, but is not limited to, a mouse, a keyboard, or the like.
[0082] It should be understood that the structure illustrated in FIG. 2 of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or may have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0083] For example, FIG3 illustrates a hardware structure of a server 200. Server 200 may be used, but is not limited to, to provide cloud services. Server 200 may be a hardware server or embedded in a virtualized environment. For example, server 200 may be a virtual machine executing on a hardware server that includes one or more other virtual machines.
[0084] As shown in Figure 3, the server 200 may include: a processor 210, a network interface 220, and a memory 230. The processor 210, the network interface 220, and the memory 230 may be connected via a bus or other means.
[0085] In the embodiment of the present application, the processor 210 (also called a central processing unit (CPU)) is the computing core and control core of the server 200 .
[0086] The network interface 220 may include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.), and is controlled by the processor 210 to send and receive data, for example, receiving a changed resource logic diagram sent by the electronic device 100, and sending prompt information to the electronic device 100.
[0087] The memory 230 (memory) is a storage device of the server 200 and is used to store programs and data, for example, to store the modified resource logic diagram sent by the electronic device.
[0088] It should be understood that the structure illustrated in FIG. 3 of the embodiment of the present application does not constitute a specific limitation on the server 200. In other embodiments of the present application, the server 200 may be a cloud server. The server 200 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0089] Next, based on the description in the above embodiment, a resource management system provided by an embodiment of the present application is introduced. Taking the application scenario shown in Figure 1 as an example, in this scenario, the resource management system can be configured on the server 200. Exemplarily, Figure 4 shows a structural diagram of a resource management system provided by an embodiment of the present application. Referring to Figure 4, the system includes: a display module 401, a graph locking module 402, a graph detection module 404, a graph classification module 405, a graph processing module 406, a graph execution module 407, and a graph change monitoring module 408. Among them, the display module 401 can be configured on the electronic device 100, and the resource management system may not include the display module 401. The graph locking module 402, the graph detection module 404, the graph classification module 405, the graph processing module 406, the graph execution module 407, and the graph change monitoring module 408 can be configured on the server 200.
[0090] The resource management system may further include: a database 403 and a hyper-convergence service module 409. The hyper-convergence service module 409 may be configured on a server.
[0091] The display module 401 is used to display a canvas, which includes a topological diagram of at least one resource. Users can edit at least one resource on the canvas by dragging and dropping, for example, to add, delete, or update a resource. The display module 401 is also used to receive prompt information sent by the diagram change monitoring module 408 and display the prompt information on the canvas.
[0092] It is understandable that in an embodiment of the present application, each display module can correspond to an electronic device, the same canvas can be displayed on multiple electronic devices, and different electronic devices can display different canvases. For example, the same canvas (such as a first canvas) is displayed on a first device and a second device, a first user operates the first device to operate the resources on the first canvas, and a second user operates the second device to operate the resources on the first canvas. The same resource on the first canvas is not allowed to be operated by two users at the same time. A third user can edit the second canvas on a third device, and after the first and second canvases are edited, they are compared.
[0093] The database 403 is used to store the logical relationship between various resources on the canvas and information about each resource, such as the name and status of the resource.
[0094] The image locking module 402 is used to lock resources on the canvas. For example, if an operation is required on resource A on the canvas, after the user clicks on resource A, the image locking module 402 may receive a first message from the display module 401. The first message instructs the image locking module 402 to lock resource A. After the user completes the operation on resource A, the image locking module 402 unlocks resource A based on the second message received from the display module 401. The image locking module 402 can lock and unlock resource A by modifying the status of resource A in the database.
[0095] In one possible example, after receiving the first message, the graph locking module 402 queries the database for the status of resource A. If the status of resource A is "uneditable," the graph locking module 402 needs to send a first prompt message to the graph change monitoring module 408. The first prompt message is used to indicate that resource A is being edited by another user. If the status of resource A is "editable," the graph locking module 402 changes the status of resource A to "uneditable."
[0096] After the map locking module 402 receives the second information, the map locking module 402 changes the status of the resource A to “editable” in the database.
[0097] In a possible example, FIG5 a shows a schematic diagram of a resource locking process, including steps 5011 to 5014 .
[0098] Step 5011: Receive first information, where the first information is used to indicate that an editing operation needs to be performed on the target resource.
[0099] In this embodiment, a user can click on a target resource on the canvas to trigger the display module 401 to send a first message to the image locking module 402. The first message indicates that the user wants to edit the target resource on the canvas. The first message also carries identification information of the target resource, which can be used to uniquely identify a resource.
[0100] Step 5012, determine whether the target resource has been locked, if so, execute step 5014, otherwise execute step 5013.
[0101] In this embodiment, since the target resource on the same canvas can be operated by one user within a time period. Therefore, after receiving the first information, the image locking module 402 needs to determine whether the target resource is being edited by other users. Specifically, the image locking module 402 can search for the target resource in the database and obtain the status of the target resource based on the identification information of the target resource carried in the first information. If the status of the target resource is "editable", it indicates that the target resource is not locked. If the status of the target resource is "uneditable", it indicates that the target resource has been locked by other users.
[0102] Step 5013: Change the state of the target resource to a locked state and set the locking time.
[0103] In this embodiment, if the target resource is not locked, the image locking module 402 can lock the target resource by changing the target resource's status to "uneditable." After locking the target resource, the image locking module 402 also needs to set a lock time for the target resource, where the lock time can be 30 minutes or 60 minutes. After the lock time expires, the target resource that has not been unlocked will be automatically unlocked.
[0104] Step 5014: Send a first prompt message to the electronic device, where the first prompt message is used to indicate that the target resource has been locked.
[0105] In this embodiment, when the target resource has been locked by other users, the image locking module 402 can send a first prompt message to the electronic device through the image change monitoring module 408 to indicate that the target resource has been locked by other users. A canvas is displayed on the electronic device, and the canvas contains the target resource. When the target resource has not been locked by other users, after locking the target resource, the image locking module 402 also needs to send a first prompt message to the image change monitoring module 408 to indicate that the target resource has been locked by the current user. After receiving the first prompt message, the image change monitoring module 408 also needs to send the first prompt message to the electronic device.
[0106] FIG5 b shows a schematic diagram of a process of unlocking a resource, including steps 5021 to 5024 .
[0107] Step 5021: Receive second information, where the second information is used to indicate that the editing operation on the target resource needs to be ended.
[0108] In this embodiment, after the user finishes the operation on the target resource, the display module 401 needs to send a second message to the image locking module 402. The second message is used to indicate that the editing operation on the target resource needs to be ended, and the second message also carries the identification information of the target resource.
[0109] Step 5022, determine whether the target resource has been locked, if so, execute step 5023, otherwise execute step 5024.
[0110] In this embodiment, after receiving the second information, the image locking module 402 needs to determine whether the target resource is in a locked state. Specifically, the image locking module 402 can search the target resource in the database based on the identification information of the target resource carried in the second information and obtain the status of the target resource. If the status of the target resource is "editable", it indicates that the target resource has been unlocked. If the status of the target resource is "uneditable", it indicates that the target resource has not been unlocked.
[0111] For a locked target resource, the target resource will be automatically unlocked after the lock time of the target resource expires.
[0112] Step 5023: Change the state of the target resource to an unlocked state.
[0113] In this embodiment, the map locking module 402 can modify the state of the target resource to "editable" to unlock the target resource.
[0114] Step 5024: Send a second prompt message to the electronic device, where the second prompt message is used to prompt that the target resource has been unlocked.
[0115] In this embodiment, after determining that the target resource has been unlocked, the image locking module 402 further needs to send a second prompt message to the image change monitoring module 408 to indicate that the target resource has been unlocked. After receiving the second prompt message, the image change monitoring module 408 further needs to send the second prompt message to the electronic device. The electronic device displays a canvas that includes the target resource.
[0116] The diagram detection module 404 is used to obtain canvas information, which includes a resource logic diagram and the operation type of at least one resource in the resource logic diagram, and to detect whether the resource operation type conflicts with the operation type of resources in other canvas information. Specifically, after obtaining the canvas information, the diagram detection module 408 compares the resource logic diagram in the received canvas with the resource logic diagrams in other canvases stored in the database 403 to determine whether the received resource logic diagram conflicts with the resource logic diagrams in other canvases. A conflict refers to the situation where multiple users have edited the same resource in different canvases. If the diagram detection module 404 detects that the received resource logic diagram conflicts with the resource logic diagram stored in the database 403, the diagram detection module 404 needs to send the conflict data to the diagram change monitoring module 408 so that the diagram change monitoring module 408 can send a conflict prompt to the electronic device where the corresponding canvas is located. After receiving the conflict prompt, the electronic device can display the prompt in text on the electronic device's display screen or provide a prompt in voice broadcast, which is not limited in the present embodiment.
[0117] In a possible example, FIG6 shows a schematic diagram of a conflict determination process of a resource logic diagram, which includes steps 601 to 606 .
[0118] Step 601: Obtain n canvases from a database, where n is a natural number greater than or equal to 1.
[0119] In this embodiment, over a period of time, different users can edit resource logic diagrams within a hyper-converged architecture through multiple canvases. Resource logic diagrams that have been edited by users but have not yet taken effect are saved in the database. After completing operations on the canvas, the user needs to submit the target resource logic diagram on the canvas to the graph detection module 404 for conflict detection. When submitting the target resource logic diagram, the user also needs to submit a first execution state of the target resource logic diagram. The first execution state is determined by the user when submitting the target resource logic diagram and indicates whether the server needs to execute the target resource logic diagram after submitting it to the server. This first execution state includes, but is not limited to, a saved or effective state. The user can make a selection when submitting the resource logic diagram. Specifically, when submitting the target resource logic diagram on the canvas, the user can submit the target resource logic diagram on the canvas in two ways. First, the user clicks the "Save" button on the canvas to send the target resource logic diagram on the canvas as image data to the graph detection module 404. After receiving the target resource logic diagram on the canvas, the graph detection module 404 performs conflict detection and saves the target resource logic diagram. In the second method, the user clicks the "Validate" button on the canvas to send the target resource logic information on the canvas in the form of image data to the graph detection module 404. After receiving the target resource logic graph on the canvas, the graph detection module 404 performs conflict detection and then executes the resources on the target resource logic graph.
[0120] When the graph detection module 404 detects the target resource logic graph, the graph detection module 404 needs to obtain n canvases from the database, wherein the resource logic graphs on the obtained multiple canvases are not yet valid.
[0121] Step 602: Obtain edited nodes and edges in the resource logic graph in the mth canvas.
[0122] In this embodiment, after obtaining n canvases from the database, the graph detection module 404 sequentially selects one canvas from the n canvases as the canvas to be compared. Specifically, when the canvas to be compared is first selected, m is 1. After the canvas to be compared is determined, the edited nodes and edges in the resource logic graph of the canvas to be compared are retrieved to serve as comparison objects with the target resource logic graph.
[0123] It is understood that in the embodiments of the present application, the nodes in the resource logic graph can be resources such as hosts, virtual machines, distributed switches, and storage pools in a hyper-converged architecture. Nodes are descriptions of resources at the logical structure level. Edges are used to identify the relationships between resources.
[0124] In step 603, the edited nodes and edges obtained from the mth canvas are compared with the edited nodes and edges in the target resource logic graph to determine whether there are nodes or edges with the same identifier. If so, step 604 is executed; otherwise, step 605 is executed.
[0125] In this embodiment, after obtaining the edited nodes and edges in the canvas to be compared, the identifiers of the edited nodes and edges in the canvas to be compared are compared with the identifiers of the edited nodes and edges in the target resource logical graph. If they are the same, it indicates that the compared nodes or edges are the same node or edge. The node or edge identifier can be a node or edge ID, which can uniquely identify a node or edge.
[0126] Step 604: Send third prompt information to the electronic device, where the third prompt information is used to indicate that conflicting data exists in the target resource logic diagram.
[0127] In this embodiment, if the identifiers of the edited nodes or edges in the canvas to be compared are the same as the identifiers of the nodes or edges in the target resource logic diagram, it indicates that a node or edge edited in the target resource logic diagram has also been edited in the canvas to be compared. For example, the identifier of resource A in the target resource logic diagram is the same as the identifier of resource B in the canvas to be compared. It can be determined that resource A in the target resource logic diagram and resource B in the canvas to be compared are the same resource. At this time, two users have modified resource A (B), that is, resource A has a conflict.
[0128] After determining that a conflict has occurred with resource A, graph detection module 404 needs to send a third prompt message to graph change monitoring module 408. The third prompt message indicates that a conflict has occurred with resource A in the target resource logical graph and includes an identifier for resource A. After receiving the third prompt message, graph change monitoring module 408 needs to send the third prompt message to the electronic device. The electronic device displays a canvas containing the target resource.
[0129] In step 605 , let m=m+1 and determine whether m is less than or equal to n. If m≤n, execute step 602 ; otherwise, execute step 606 .
[0130] In this embodiment, if the identifiers of the edited nodes or edges in the canvas to be compared are different from the identifiers of the nodes or edges in the target resource logical graph, it indicates that the edited nodes in the target resource logical graph have not been edited in the canvas to be compared. In this case, the next canvas in the n canvases can be obtained for comparison until all the n canvases have been compared.
[0131] Step 606: Send the target resource logic diagram to the diagram classification module.
[0132] In this embodiment, after the graph detection module 404 compares the edited resources in the target resource logic graph with the edited resources in the resource logic graphs in the acquired n canvases, it also needs to send the target resource logic graph to the graph allocation module 405 for further processing.
[0133] In one possible example, after sending the third prompt information to the electronic device, the graph change monitoring module 408 also needs to receive the execution status information of the target resource logic diagram sent by the user through the electronic device. Among them, the execution status information carries the second execution status of the target resource logic diagram. The second execution status is the execution status of the target resource logic diagram selected by the user when there are conflicting resources in the target resource logic diagram. The second execution status is used to characterize whether the target resource logic diagram needs to be executed. After receiving the resource conflict information, the user can choose to change the execution status of the target resource logic diagram and send the changed execution status to the graph detection module 404 through the graph change monitoring module 408. The graph detection module 404 can update the first execution status information of the target resource logic diagram through the second execution status information of the target resource logic diagram submitted by the user.
[0134] After performing conflict detection on the target resource logic diagram submitted by the user, the graph detection module 404 also needs to determine whether the target resource logic diagram needs to be sent to the graph classification module for further processing based on the first execution status information of the target resource logic diagram. If the first execution status information of the target resource logic diagram is "save", the graph detection module 404 sends the target resource logic diagram to the device specified by the user for storage, and ends the processing of the target resource logic diagram. If the first execution status of the target resource logic diagram is "effective", the graph detection module 404 needs to send the target resource logic diagram to the graph classification module 405 for further processing.
[0135] The graph classification module 405 is used to divide the resource logic graph in the canvas information into at least one subgraph and classify each subgraph according to the operation type of the resources in the resource logic graph. Operation types for resources in the resource logic graph include adding resources, modifying resources, and deleting resources. When dividing the resource logic graph received from the graph detection module 404 into several subgraphs, the graph classification module 405 must ensure that the logical structure of the resources in the resulting subgraphs remains unchanged.
[0136] In a possible example, FIG7 shows a schematic diagram of a resource logic diagram partitioning process, as shown in FIG7 , including: steps: step 701 to step 704 .
[0137] Step 701, obtain the edited nodes and edges in the target resource logic graph, and mark the edited nodes as update nodes, create nodes, or delete nodes according to the operation type of the edited nodes, or update the edited edges to update edges, create edges, or delete edges according to the type of the edited edges.
[0138] In this embodiment, the graph classification module 405 traverses the nodes in the target resource logic graph and marks the edited nodes in the target resource logic graph as update nodes, create nodes, or delete nodes according to the type of editing operation.
[0139] The graph classification module 405 traverses the edges in the target resource logic graph and marks the edited edges in the target resource logic graph as update edges, create edges, and delete edges according to the type of editing operation.
[0140] Step 702: Obtain nodes and edges adjacent to the creation node, mark the nodes adjacent to the creation node as creation nodes, mark the adjacent edges as creation edges, and obtain nodes adjacent to the creation edges, mark the nodes adjacent to the creation edges as creation nodes.
[0141] In this embodiment, when classifying and marking edited nodes and edges in the target resource logical graph, for nodes marked as creation nodes, it is necessary to obtain the nodes and edges adjacent to the creation node. A creation node is a node newly added to the target resource logical graph. Obtaining the nodes and edges adjacent to the creation node can indicate the position of the creation node in the target resource logical graph.
[0142] For edges marked as creation edges, you need to obtain the nodes adjacent to the creation edge. A creation edge is an edge newly added to the target resource logical graph. Obtaining the nodes adjacent to the creation edge can indicate the position of the creation edge in the target resource logical graph.
[0143] Step 703: traverse all nodes and edges in the target resource logic graph, and delete unmarked nodes and edges in the target resource logic graph.
[0144] In this embodiment, the graph classification module 405 traverses all nodes and edges in the target resource logic graph and deletes unmarked nodes and edges in the target resource logic graph, wherein the unmarked nodes are nodes or edges in the target resource logic graph that have not been edited.
[0145] Step 704: Split the remaining nodes and edges in the target resource logic graph into at least one subgraph according to the tag type, wherein the nodes or edges contained in each subgraph have the same tag type.
[0146] In this embodiment, after deleting the unmarked nodes and edges in the target resource logic graph, the graph classification module 405 also needs to split the target resource logic graph into multiple subgraphs according to the marking type of the marked nodes or edges, and each subgraph contains nodes or edges of the same marking type.
[0147] In an embodiment of the present application, unmarked nodes or edges in the target resource logic graph are deleted, while edited nodes and edges or nodes and edges related to the edited nodes and edges are retained. Furthermore, the retained nodes in the target resource logic graph are divided into multiple subgraphs according to the operation type. This allows subsequent image processing to be performed as subgraphs and to process the edited nodes or edges, thereby improving processing efficiency.
[0148] After the graph classification module 405 divides the resource logic graph received from the graph detection module 404 into a plurality of subgraphs, for any of the plurality of subgraphs, the graph classification module 405 further needs to adjust the undirected edges between any two resources in the subgraph into directed edges that satisfy the business resource dependency relationship. It is understood that adding a direction to the edge between two associated resources in the resource logic graph allows the resource logic graph to form a directed graph. In a directed graph, the direction of the edge between two associated resources can indicate the containment relationship between the two resources.
[0149] In one possible example, before dividing the resource logic graph received from the graph detection module 404 into several subgraphs, the graph classification module 405 adjusts the undirected edges between any two resources in the received resource logic graph to edges that satisfy the business resource dependency relationship.
[0150] The graph processing module 406 stores at least one processor, and any one of the at least one processor can support a certain operation of a certain resource, and can provide expansion capabilities for the resource in the form of a registry. For example, a processor that supports the data forwarding function of a switch is stored. After receiving multiple subgraphs sent by the graph classification module 405, the graph processing module 406 configures corresponding processing methods (processors) for the classified subgraphs, wherein the processing method is used to represent the management of resources corresponding to the subgraph according to the operation type. Specifically, the graph processing module 406 needs to determine whether the processor stored in the graph processing module 406 supports the processing of all nodes and edges in each of the multiple subgraphs received. If supported, the graph processing module 406 needs to bind the processor that meets the requirements to the specific nodes or edges in the subgraph.
[0151] It can be understood that in the embodiment of the present application, the processor refers to a specific processing method (processing function) for resources. For example, deleting a virtual machine means calling the hyper-converged computing service API to delete the virtual machine.
[0152] In a possible example, FIG8 shows a flowchart of an image processing process, referring to FIG8 , which includes: steps 801 to 805 .
[0153] Step 801: Obtain an unprocessed node or edge in the target subgraph.
[0154] In this embodiment, when the graph processing module 406 processes the nodes or edges in the target subgraph, the graph processing module 406 may sequentially obtain the nodes or edges in the target subgraph, wherein the graph processing module 406 obtains one node or edge at a time during the processing.
[0155] Step 802 , determine whether there is a processor corresponding to the node or edge. If so, execute step 803 ; otherwise, execute step 805 .
[0156] In this embodiment, the graph processing module 406 can obtain node A in the target subgraph. The processing module 406 can then search for a processor corresponding to node A among the multiple processors stored by the graph processing module 406. The processor corresponding to node A means that the processor can support operations corresponding to node A.
[0157] Step 803: Bind the node or edge to the corresponding processor.
[0158] In this embodiment, if a processor corresponding to node A exists in graph processing module 406, graph processing module 406 needs to bind the processor to the node. For example, an association relationship is established between node A and the processor. When node A is executed, the processor is automatically triggered.
[0159] Step 804 , determining whether there are any unprocessed nodes or edges in the target subgraph. If so, executing step 801 ; otherwise, terminating the processing of the target subgraph.
[0160] In this embodiment, the graph processing module 406 needs to process the nodes and edges in the target subgraph in sequence until all the nodes and edges in the target subgraph are processed.
[0161] Step 805: outputting a prompt message, where the prompt message is used to indicate that a processing error exists in the target subgraph.
[0162] In this embodiment, if there is no processor corresponding to node A in the graph processing module 406, the graph processing module 406 needs to output a prompt message to prompt the user that an error occurred during the processing of the target subgraph and end the processing of the target subgraph.
[0163] Graph execution module 407 executes the processing method corresponding to the subgraph. Upon receiving multiple processed subgraphs from graph processing module 406, graph execution module 407 executes, for each received subgraph, the interactions between the processors bound to each node or edge in the subgraph and each basic service on the hyper-converged platform, and feeds the execution results back to graph change monitoring module 408. Graph change monitoring module 408 then transmits the execution results to the electronic device displaying the canvas containing the target resource.
[0164] In a possible example, FIG9 shows a flowchart of an execution process of a resource logic diagram, referring to FIG9 , which includes: Step 901 to Step 903 .
[0165] Step 901: Obtain an unvisited node or edge in the target subgraph.
[0166] In this embodiment, after obtaining the target subgraph, the graph execution module 407 needs to execute the obtained target subgraph. When executing the target subgraph, the graph execution module 407 can execute the execution in units of a node or an edge.
[0167] Step 902: Execute the acquired node or edge binding processor.
[0168] In this embodiment, when executing the target subgraph, the graph execution module 407 executes the function that needs to be implemented by the node or edge being visited through the processor corresponding to the node or edge.
[0169] It can be understood that in the embodiment of the present application, the processor refers to a specific processing method (processing function) for resources. For example, deleting a virtual machine means calling the hyper-converged computing service API to delete the virtual machine.
[0170] Step 903 , determining whether there are any unvisited nodes or edges in the target subgraph; if so, executing step 901 ; otherwise, ending the execution of the target subgraph.
[0171] In this embodiment, the graph execution module 407 executes the nodes or edges in the target subgraph in sequence until all nodes and edges in the target subgraph are executed.
[0172] The diagram change monitoring module 408 is configured to detect changed resources in the resource logic diagram and transmit information about the changed resources to an electronic device displaying a canvas containing the resource logic diagram. Furthermore, when it is determined that a user's edited resource logic diagram conflicts with an existing resource logic diagram, the electronic device may display a conflict prompt to the user.
[0173] In a possible example, FIG10 shows a flowchart of a resource change detection process, referring to FIG10 , which includes: steps 1001 to 1008 .
[0174] Step 1001: Acquire the changed resources in the target resource logic diagram.
[0175] In this embodiment, the graph change monitoring module 408 can receive prompt information sent by the graph locking module 402 or the graph detection module 404. The prompt information sent by the graph locking module 402 or the graph detection module 404 carries information about the changed resource. The resource information includes the identifier of the changed resource, the resource type, and the conflict type of the changed resource. The conflict type of the changed resource includes two types: conflicting resources and non-conflicting resources.
[0176] Step 1002, determine whether the resource is a node in the target resource logic graph, if so, execute step 1003, otherwise execute step 1004.
[0177] In this embodiment, after obtaining the changed resource information, the graph change monitoring module 408 can determine whether the type of the changed resource is a node according to the type of the resource carried in the resource information.
[0178] Step 1003: Send prompt information to at least one canvas corresponding to the target resource logic diagram. The prompt information is used to prompt that a node in the target resource logic diagram has been changed.
[0179] In this embodiment, if the graph change monitoring module 408 determines that the type of the changed resource is a node, the graph change monitoring module 408 needs to send a prompt message to at least one canvas corresponding to the changed resource, prompting the user that a node in the canvas has changed. The prompt message carries the identifier of the changed node.
[0180] Step 1004 , determine whether the type of the resource is an edge in the target resource logic graph, if so, execute step 1005 , otherwise execute step 1007 .
[0181] In this embodiment, after obtaining the changed resource information, the graph change monitoring module 408 can determine whether the type of the changed resource is an edge according to the type of the resource carried in the resource information.
[0182] Step 1005: Send prompt information to at least one canvas corresponding to the target resource logic graph, where the prompt information is used to prompt that an edge in the target resource logic graph has changed.
[0183] In this embodiment, if the graph change monitoring module 408 determines that the type of the changed resource is an edge, the graph change monitoring module 408 needs to send a prompt message to at least one canvas corresponding to the changed resource, prompting the user that an edge in the canvas has changed. The prompt message carries the identifier of the changed edge.
[0184] Step 1006: Update at least one canvas corresponding to the target resource logic diagram according to the changed resources in the target resource logic diagram.
[0185] In this embodiment, after the graph change monitoring module 408 determines that the type of the changed resource is a node or an edge, the graph change monitoring module 408 can update the corresponding node or edge in at least one canvas corresponding to the changed resource according to the identification information of the changed resource.
[0186] Step 1007: Determine whether the resource to be changed is a conflicting resource. If it is a conflicting resource, execute step 1008; otherwise, terminate the current operation.
[0187] In this embodiment, after obtaining the changed resource information, the graph change monitoring module 408 can determine whether the changed resource is a conflicting resource that conflicts with resources in other resource logic graphs based on the conflict type of the changed resource in the resource information carried in the resource information.
[0188] Step 1008: Send a prompt message to the canvas related to the conflicting resource. The prompt message is used to prompt that a resource in the canvas conflicts with a resource in another canvas.
[0189] In this embodiment, if the graph change monitoring module 408 determines that the changed resource is a conflicting resource that conflicts with resources in other resource logic graphs, the graph change monitoring module 408 needs to send a prompt message to the canvas associated with the conflicting resource. The prompt message is used to inform the user that a resource in the canvas has been edited in another canvas. The prompt message carries the resource identifier of the conflicting resource.
[0190] The hyper-converged service module 409 includes multiple services. When the graph execution module 407 executes the resources in the acquired sub-graph, it can interact with the multiple services in the hyper-converged service module through the server bound to the resources in the sub-graph being executed to realize the functions of each resource in the sub-graph being executed.
[0191] In one possible example, the resource management system also includes a resource import / export module (not shown in Figure 4). The resource import / export module can export the resources edited by the user on the canvas into a JSON file, import the JSON file corresponding to the resource logic diagram into the resource management system, and display it in the form of a resource logic diagram in the canvas being edited by the user.
[0192] When exporting a resource logic graph in the canvas as a JSON file, you can organize the graph into two data structures: nodes and edges. During export, basic information such as the node name, type, coordinates, resource configuration, and operation type is saved, while basic edge data such as the source node, target node, connection configuration, and operation type is saved.
[0193] Based on the resource management system in the above embodiment, the present application also provides a resource management method, which can be executed by the resource management system shown in Figure 4. Figure 11 is a flow chart of a resource management method provided in the present application embodiment. As shown in Figure 11, the method includes: Step 1101-Step 1102.
[0194] Step 1101: Obtain first canvas information and second canvas information. The first canvas information includes a first resource logic diagram and an operation type of at least one first resource in the first resource logic diagram. The second canvas information includes a second resource logic diagram and an operation type of at least one second resource in the second resource logic diagram.
[0195] In this embodiment, the image detection module 404 in the resource management system receives first canvas information and second canvas information. The first canvas information and the second canvas information are sent by different users. For example, the first canvas information may be sent by the first user, and the second canvas information may be sent by the second user.
[0196] The first canvas information includes the first resource logic diagram edited by the first user, as well as the execution state of the first resource logic diagram in the first canvas selected by the user when sending the first canvas information. The execution state of the first resource logic diagram includes but is not limited to states such as a saved state and an effective state. In the saved state, it is not necessary to bind the corresponding execution function (also referred to as a processor) to each resource in the first resource logic diagram, and the logical relationship between each resource in the first resource logic diagram can be saved in a local storage device. In the effective state, it is necessary to bind the corresponding execution function to each resource in the first resource logic diagram, and execute each resource in the first resource logic diagram.
[0197] Similarly, the second canvas information includes the second resource logic diagram edited by the second user, as well as the execution state of the second resource logic diagram in the second canvas selected by the user when sending the second canvas information. Among them, the execution state of the second resource logic diagram includes but is not limited to: save state and effective state and other states. In the save state, there is no need to bind the corresponding execution function (also called a processor) for each resource in the second resource logic diagram, and the logical relationship of each resource in the second resource logic diagram can be saved in the local storage device. In the effective state, it is necessary to bind the corresponding execution function for each resource in the second resource logic diagram, and execute each resource in the second resource logic diagram.
[0198] Step 1102 : When there is no conflict between the operation type of the first resource and the operation type of the second resource, perform resource management according to the first canvas information and the second canvas information.
[0199] In this embodiment, when the graph detection module 404 performs conflict detection on resources in the first resource logic graph and the second resource logic graph, it is necessary to compare at least one first resource in the first resource logic graph with at least one second resource in the second resource logic graph. If there is a conflict between any first resource in the first resource logic graph and a second resource with the same resource identifier in the second resource logic graph, it is determined that there is a conflicting resource in the target resource logic. It is understood that "resource conflict" in the embodiment of the present application refers to the modification of two resources with the same resource identifier in two different canvases.
[0200] In one possible example, the graph detection module 404 may compare the operational states of two resources with the same resource identifier in the second resource logic graph and the first resource logic graph. The operational state is used to identify whether the resource is being edited. If the operational states of the two resources with the same resource identifier are both in the edited state, it can be determined that there is a conflict between the two resources with the same identifier. Otherwise, it can be determined that there is no conflict between the operational type of the first resource in the first resource logic graph and the operational type of the second resource in the second resource logic graph.
[0201] In the case that the operation type of the first resource does not conflict with the operation type of the second resource, the resource management system can manage the resource according to the first canvas information and the second canvas information. Take the management of the first resource in the first canvas information as an example.
[0202] After performing conflict detection on the resources in the first resource logic graph, graph detection module 404 also needs to obtain a first execution state of the first resource logic graph. The first execution state is selected by the user when submitting the first logical resource and indicates whether the server should execute the target resource logic graph after submitting it to the server. This first execution state includes, but is not limited to, two states: saved and effective.
[0203] When the first execution state is active, the resource management system needs to execute the first resources in the first resource logic graph. For example, it binds a corresponding processor function to each first resource in the first resource logic graph. The bound processor functions are then executed to interact with each basic service module on the hyper-converged platform.
[0204] In one possible example, when executing the first resources in the first resource logic graph, the first resources in the first resource logic graph can be classified, and during execution, the edited first resources are executed. Specifically, the graph classification module 405 first adjusts the direction of the connection between two associated first resources in the first resource logic graph based on the logical relationship between the first resources in the first resource logic graph.
[0205] Then, the graph classification module 405 traverses the first resource in the first resource logic graph. If there is a first resource in the first resource logic graph whose operation status is edit and whose operation type is create, the first resource associated with the first resource is obtained. Then, the operation status of the first resource associated with the first resource is marked as edit and the operation type is marked as create.
[0206] Based on the operation status of each first resource in the first resource logic graph, first resources in the unedited operation status are deleted to obtain an updated first resource logic graph. Based on the operation type of each first resource in the updated first resource logic graph, the updated first resource logic graph is split into at least one subgraph. The operation type includes at least one of a create type, an update type, and a delete type.
[0207] After receiving at least one subgraph of the first resource logic graph, the graph processing module 406 needs to determine whether the processor stored in the graph processing module 406 supports processing of nodes and edges in each of the at least one received subgraph. If supported, the graph processing module 406 needs to bind the processor that meets the requirements to a specific node or edge in the subgraph.
[0208] After receiving at least one subgraph of the processed first resource logical graph, the graph execution module 407 executes, for each subgraph, interactions between the processors bound to each node or edge in the subgraph and each basic service on the hyper-converged platform, and feeds the execution results back to the graph change monitoring module 408. The graph change monitoring module 408 then sends the execution results to the electronic device. The electronic device displays the first canvas.
[0209] The resource management system's processing of the second resource logic diagram may refer to the processing of the first resource logic diagram, and will not be described in detail here.
[0210] In one possible example, if the operation type of a first resource conflicts with the operation type of a second resource, the resource management system needs to send information about the conflicting resource to the electronic device containing the first canvas or the electronic device containing the second canvas before performing resource management on the first and second canvas information. Resource management can then be performed on the first and second canvas information. Next, we will use the management of the first resource in the first canvas information as an example.
[0211] After the graph detection module 404 determines that conflicting resources exist in the first resource logic graph, the graph detection module 404 needs to send a notification message to the graph change monitoring module 408 . The notification message carries resource information of the conflicting resources in the first resource logic graph.
[0212] After receiving the notification information, the image change monitoring module 408 needs to send a prompt message to the electronic device displaying the first canvas. The prompt message is used to instruct the first canvas to display conflict information, including resource information of conflicting resources.
[0213] After sending a prompt message to the electronic device displaying the first canvas, graph change monitoring module 408 also needs to receive a first message sent by the first user via the electronic device. The first message carries the second execution state of the first resource logic graph. After obtaining the second execution state of the first resource logic graph, graph change monitoring module 408 needs to send the second execution state to graph detection module 404. If the second execution state is different from the first execution state, graph detection module 404 updates the first execution state based on the second execution state.
[0214] In one possible example, when the user submits the first canvas, the selected execution status is "effective". When the graph detection module 404 detects that there are conflicting resources in the first resource logic graph in the first canvas, and sends the conflict information to the electronic device displaying the first canvas through the graph change monitoring module 408. The user can choose to continue executing the first resource logic graph or stop executing the first resource logic graph through the electronic device. When the user chooses to stop executing the first resource logic graph, the user can send a first message to the graph change monitoring module 408 through the electronic device, and the second execution status carried in the first message is "save". After obtaining the second execution status of the first resource logic graph, the graph detection module 404 can update the first execution status to "save".
[0215] In one possible example, when submitting the first canvas information, the user selects the execution state as “valid.” After the diagram detection module 404 performs conflict detection on resources in the first resource logic diagram in the first canvas, the first resource logic diagram may be saved on a designated device.
[0216] In the embodiment of the present application, multi-user visual resource management in the hyper-convergence field is achieved through graphical operations and dynamic processor mechanisms.
[0217] It is understandable that the size of the sequence number of each step in the above embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. In addition, in some possible implementations, the steps in the above embodiment can be selectively executed according to actual conditions, and can be partially executed or fully executed, which is not limited here. In addition, all or part of any features in the above embodiment can be freely and arbitrarily combined without contradiction. The combined technical solution is also within the scope of this application.
[0218] Next, the resource management method in the above embodiment is introduced by taking the host, virtual machine, distributed switch, storage pool and other resources under the hyper-converged architecture as an example.
[0219] (1) Resource management system front-end display process.
[0220] For example, Figure 12 shows a schematic diagram of a resource topology on a canvas. As shown in Figure 12, the topology includes storage pool A, host A, host B, host C, distributed switch A, distributed switch B, virtual machines 1, virtual machines 2, virtual machines 3, and virtual machines 4. Storage pool A is associated with hosts A, B, and C; hosts A and B are both associated with distributed switch A; host C is associated with distributed switch B; distributed switch A is associated with virtual machines 1 and 2; and distributed switch B is associated with virtual machines 3 and 4.
[0221] User A, User B, and User C edit resources on the canvas shown in Figure 12. Before editing the resource logical graph of resources such as hosts, virtual machines, distributed switches, and storage pools in the hyper-converged architecture, User A, User B, and User C have registered the creation, update, and deletion processors of hosts, virtual machines, distributed switches, and storage pools.
[0222] It is understandable that when the user operates the resources on the canvas, he needs to drag the resource icon first, and then connect the resource icons. Among them, the direction of the connection shown in Figure 12 is not necessary. The direction of the connection between resources will be normalized in the graph classification module 403 according to the logical relationship of business resources. For example, the storage pool is actually created by the host, so in business logic, the host points to the storage pool. In Figure 12, the direction of the connection between storage pool A and host A-host B is storage pool A pointing to host A-host B. At this time, the resource management system will not report an error.
[0223] User A edits the resource logical graph shown in Figure 12 on canvas 1, resulting in the edited resource logical graph shown in Figure 13. In Figure 13, user A updates host A, host C, and distributed switch A, deleting VM 1 associated with distributed switch A, adding VM 5 associated with distributed switch A, and adding distributed switch C associated with host C.
[0224] As shown in Figure 14, when user A is editing the resource logic diagram in Canvas 1, they can drag a resource icon from the resource bar to add it to the resource logic diagram. To edit an existing resource on Canvas 1, user A can double-click it. For example, if user A double-clicks host A, an edit operation dialog box will pop up. User A can select an operation for component A by clicking an option in the edit operation dialog box.
[0225] In one possible example, see step ① in Figure 14 . User A can drag the virtual machine icon from the resource bar to the editing area of Canvas 1 to add Virtual Machine 5 to the resource logic diagram on Canvas 1. After the user drags the virtual machine icon to the editing area of Canvas 1, a prompt box will pop up on Canvas 1, prompting the user to confirm the addition of the virtual machine. If the user clicks OK, a virtual machine information configuration box will pop up on Canvas 1, allowing User A to configure the name of the virtual machine and other resources associated with the virtual machine. Only after User A completes the configuration of Virtual Machine 5 is Virtual Machine 5 added to the resource logic diagram on Canvas 1.
[0226] In one possible example, see step ② in Figure 14 . User A selects to update Host A in the edit operation box for Host A. After the user selects the "Update" button in the edit operation box, a Host A information update operation box pops up on Canvas 1, displaying the updateable information for Host A. After completing the update operation for Host A, User A can click the "Done" button in the edit operation box to end the update.
[0227] In one possible example, see ③ in Figure 14 , user A can also choose to delete host 1 in the edit operation box of virtual machine 1. After the user selects the "Delete" button in the edit operation box of virtual machine 1, to prevent accidental deletion, the resource management system will pop up another operation box on canvas 1, allowing the user to confirm whether to delete virtual machine 1.
[0228] Assume that both user B and user A can operate canvas 1, that is, the resource logic diagrams seen by user B and user A are the same. If user A wants to update distributed switch A, user A can lock distributed switch A by clicking on distributed switch A. Specifically, after user A clicks on switch A, canvas 1 will send the switch information (for example, the identifier of distributed switch A) to the diagram locking module 402. After receiving the information of distributed switch A, the diagram locking module 402 modifies the status of distributed switch A in the database 403 according to the information of distributed switch A, such as changing the status of distributed switch A to "uneditable". Then, the diagram locking module 402 also needs to send the locking information of distributed switch A to the diagram change monitoring module 408, so that the diagram change monitoring module 408 notifies other users on canvas 1 that distributed switch A has been locked.
[0229] For example, after user A locks distributed switch A, user B also clicks on distributed switch A on canvas 1. At this time, a prompt message as shown in Figure 15 will pop up on canvas 1 corresponding to user B, which prompts user B that distributed switch A has been locked.
[0230] After user A completes editing distributed switch A, they end the editing operation by clicking the "Finish" or "Effect" button in the edit operation box of distributed switch A. When user A clicks the "Finish" or "Effect" button, canvas 1 sends an unlock message to graph locking module 402. After receiving the unlock message from canvas 1, graph locking module 402 modifies the status of the distributed switch in database 403 to "Editable" based on the information about distributed switch A contained in the unlock message. After unlocking distributed switch A, graph locking module 402 also sends the unlock message to graph change monitoring module 408, so that graph change monitoring module 408 notifies other users on canvas 1 that distributed switch A has been unlocked. After distributed switch A is unlocked, the pop-up window on user B's interface closes, and the configuration of distributed switch A is refreshed.
[0231] In one possible example, user C creates canvas 2 as shown in Figure 16, and updates distributed switch A and virtual machine 3 on canvas 2, as well as adding storage pool B. Because user C and user A are not operating on the same canvas, user C's operations on distributed switch A on canvas 2 will not be warned.
[0232] If user A clicks the "Effective" button on canvas 1, and then user C clicks the "Effective" button on canvas 2. The graph detection module 404 will detect that the virtual distributed machine A and virtual machine 3 edited by user C on canvas 2 conflict with the distributed switch A and virtual machine 3 edited by user A on canvas 1. At this time, a conflict prompt message will pop up on user C's canvas 2. After the resource logic graph submitted by user A takes effect, the graph change monitoring module 408 also needs to send a prompt message to user C to remind user C that virtual machine 1 has been deleted, host A, distributed switch A, and virtual machine 3 have been modified, and to prompt user C to choose whether to configure the resources on canvas 2 as remote configuration or local configuration. Remote configuration means that after user C chooses to save the resource configuration on canvas 2, the configuration information will be published to the network for use by other users. Local configuration means that after user C chooses to save the resource configuration on canvas 2, the resource configuration information will be saved locally for use by user C himself.
[0233] If user C chooses remote configuration, the changes made by user C to distributed switch A and VM 3 on canvas 2 will be overwritten. If user C chooses local configuration, the changes made by user C to distributed switch A and VM 3 on canvas 2 will be retained.
[0234] If user C submits the resource configuration on canvas 2 first and it takes effect, and user A submits the resource configuration on canvas 1 later, a conflict prompt message will be submitted to user A.
[0235] (2) The back-end processing of the resource management system.
[0236] After user A completes editing the resources on canvas 1 on the front-end display, he can click the "Done" or "Effective" button on canvas 1 to submit the resource logic diagram on canvas 1 to the back-end of the resource management system for processing.
[0237] After the back-end service of the resource management system receives the resource logic diagram submitted by user A, it needs to submit the resource logic diagram to the graph detection module 404. The graph detection module 404 performs conflict detection on the resource logic diagram submitted by user A. After the graph detection module 404 receives the resource logic diagram submitted by user A, it compares the resource logic diagram with the resource logic diagram in at least one canvas obtained from the database to determine whether the same resource is edited in the resource logic diagram in the obtained at least one canvas and the resource logic diagram submitted by user A. If so, it is considered that the resource in the resource logic diagram of user A conflicts with the resource in other canvases. The graph detection module 404 needs to send information to the graph change monitoring module 408. The graph change monitoring module 408 sends the received information to the host used by user A. The information is used to indicate that there are conflicting resources in the resource logic diagram submitted by user A, and that the information carries information about conflicting resources.
[0238] In one possible example, after user A submits a resource logic diagram, the diagram detection module 404 receives a resource logic diagram submitted by user C. The diagram detection module 404 compares the resource logic diagram submitted by user C with the resource logic diagram on the canvas stored in the database and discovers a conflict with the resource logic diagram submitted by user A. The diagram detection module 404 then sends user C's information and the conflicting resources in user C's resource logic diagram to the diagram change monitoring unit 408. The diagram change monitoring unit 408 then sends the conflicting resources to the canvas corresponding to user C.
[0239] After performing conflict detection on the resource logic graph submitted by User A, Graph Detection Module 404 sends the resource logic graph submitted by User A to Graph Classification Module 405. Upon receiving the resource logic graph submitted by User A, Graph Classification Module 405 normalizes the logical relationships within the resource logic graph. For example, Graph Classification Module 405 traverses the resource logic graph submitted by User A and adjusts the direction of the connection between two related resources in the resource logic graph based on the actual logical relationships. Common logical relationships include dependency relationships, inclusion relationships, and association relationships.
[0240] The graph detection module 404 further splits the resource logic graph submitted by user A into multiple subgraphs according to the operation type of the resource being edited in the resource logic graph submitted by user A. The operation type of the resources included in each subgraph is the same.
[0241] For example, Figure 17 shows that after the graph classification module 405 splits the resource logic graph submitted by user A, the resulting subgraphs include: update subgraph, create subgraph, and delete subgraph. In particular, the create subgraph includes not only the newly created resource but also the resources associated with the newly created resource.
[0242] After the graph processing module 405 receives the update subgraph, create subgraph, and delete subgraph information sent by the graph detection module 404, the graph processing module 405 needs to search for the processor in the registry for the resource in the subgraph and bind the processor to the resource. Here, the processor refers to the specific processing method for the resource, and binding the processor to the resource means binding the processor function to the resource node or edge. For example, to delete virtual machine 1 in the subgraph, when performing the deletion operation, it is necessary to call the hyper-converged computing service API to delete the virtual machine, so the function that calls the hyper-converged computing service API needs to be bound to the node corresponding to virtual machine 1.
[0243] After processing the received subgraph, graph processing module 405 sends the processed subgraph to graph execution module 406 for execution. After receiving the subgraph, graph execution module 406 traverses the graph using a breadth-first algorithm along the edges in the subgraph. Graph execution module 406 executes one subgraph at a time.
[0244] To delete a subgraph, since child nodes must be deleted before parent nodes, a graph flip operation can be performed to swap the order of edges. After the graph execution module 406 completes its execution, it notifies the graph change monitoring module 408 of the execution results, which in turn notifies the host used by user A. At this point, user A's operation is complete.
[0245] In the embodiment of the present application, the limitations of network attributes are broken, and non-network resources such as storage pools can also be added to the topology modeling, providing global planning capabilities, making it convenient for users to plan resources clearly at one time, while allowing multiple users to operate simultaneously, thereby improving usability.
[0246] In one possible example, the resource management system can also export and import user-edited canvases. Specifically, the resource logic diagram in the canvas can be summarized into two data structures: nodes and edges. When exporting the resource logic diagram, basic information such as the node name, type, coordinates, resource configuration, and operation type is saved. Basic data such as the source node, target node, connection configuration, and operation type of the edge is saved and saved as the following data structure:
[0247] When you export a resource logic diagram from a canvas, you can save it as a JSON file. This saved JSON file can also be imported into another canvas. When importing, the topology is restored by following the basic structure of the directed graph.
[0248] The export / import function of resource logic diagrams has been added to the resource management system, realizing the function of one-time planning and multiple implementations. Users can archive the planning results and import them at any time to rebuild the same resource topology, as well as realize the backup and restoration of the entire resource.
[0249] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.
[0250] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)).
[0251] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.
Claims
1. A resource management method, characterized in that: Applied to a server, the method comprises: Acquire first canvas information and second canvas information, wherein the first canvas information includes a first resource logic diagram and an operation type of at least one first resource in the first resource logic diagram, and the second canvas information includes a second resource logic diagram and an operation type of at least one second resource in the second resource logic diagram; When there is no conflict between the operation type of the first resource and the operation type of the second resource, resource management is performed according to the first canvas information and the second canvas information.
2. The method according to claim 1, characterized in that The method further comprises: The first canvas information further includes the operation status of at least one first resource in the first resource logic diagram, and the second canvas information further includes the operation status of at least one second resource in the second resource logic diagram, wherein the operation status is used to indicate whether the resource is edited; The operation states of a first resource and a second resource having the same resource identifier are compared. If the operation states of the first resource and the second resource are both in an edited state, it is determined that there is a conflict between the operation type of the first resource and the operation type of the second resource.
3. The method according to claim 1, characterized in that The performing resource management according to the first canvas information and the second canvas information when there is no conflict between the operation type of the first resource and the operation type of the second resource includes: Obtain a first execution state of a first resource logic diagram carried in the first canvas information, and when the first execution state is a valid state, execute the first resource logic diagram, obtain an execution result of the first resource logic diagram and return the execution result to the electronic device.
4. The method according to claim 2 or 3, characterized in that: Before executing the first resource logic diagram, the method further includes: The first resource logic graph is divided into at least one sub-graph.
5. The method according to claim 4, characterized in that The step of dividing the first resource logic graph to obtain at least one sub-graph includes: According to the operation status of each resource in the first resource logic diagram, delete the resources whose operation status is unedited to obtain an updated first resource logic diagram; According to the operation type of each resource in the updated first resource logic graph, the updated first resource logic graph is split into at least one sub-graph, and the first resources in each sub-graph have the same operation type.
6. The method according to claim 5, characterized in that The step of deleting the resources whose operation status is an unedited state according to the operation status of each resource in the first resource logic diagram to obtain an updated first resource logic diagram includes: If there is a first resource in the first resource logic graph whose operation state is an edit state and whose operation type is a create type, obtaining a first resource associated with the first resource; The operation state of the first resource associated with the first resource is marked as an editing state, and the operation type is marked as a creation type.
7. The method according to claim 4, characterized in that Before dividing the first resource logic graph to obtain at least one subgraph, the method further includes: According to the logical relationship between the first resources in the first resource logic diagram, the direction of the connection between two associated first resources in the first resource logic diagram is adjusted.
8. The method according to claim 4, characterized in that After dividing the first resource logic graph to obtain at least one subgraph, the method further includes: A corresponding processing method is configured for each subgraph in the at least one subgraph, where the processing method is used to represent managing resources corresponding to the subgraph according to the operation type.
9. The method according to claim 1, characterized in that: The method further comprises: When there is a conflict between the operation type of the first resource and the operation type of the second resource, resource information of the conflicting resource is returned to the electronic device.
10. The method according to claim 9, characterized in that The method further comprises: Acquire a first execution state of a first resource logic diagram carried in the first canvas information and a second execution state of a second resource logic diagram carried in the second canvas information; When the first execution state is an effective state and the second execution state is an ineffective state, the first resource logic diagram is executed to obtain an execution result of the first resource logic diagram, and the execution result is returned to the electronic device.
11. The method according to claim 10, characterized in that The method further comprises: When both the first execution state and the second execution state are in effective state, determining whether the execution time of the first resource logic diagram is earlier than the execution time of the second resource logic diagram; In the case that the execution time of the first resource logic diagram is earlier than the execution time of the second resource logic diagram, the first resource logic diagram is executed, an execution result of the first resource logic diagram is obtained, and the execution result is returned to the electronic device.
12. A server, characterized in that: include: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory, and when the program stored in the memory is executed, the processor is used to execute the method described in any one of claims 1-11.
13. A resource management system, characterized in that: include: Graph locking module, graph detection module, graph classification module, graph processing module, graph execution module, graph change monitoring module, among which, The image locking module is used to lock resources on the canvas; The graph detection module is used to obtain canvas information, wherein the canvas information includes a resource logic graph and an operation type of at least one resource in the resource logic graph; and detect whether the operation type of the resource conflicts with the operation type of resources in other canvas information; The graph classification module is used to divide the resource logic graph in the canvas information into at least one sub-graph, and classify each of the sub-graphs according to the operation type; The graph processing module is used to configure a corresponding processing method for the classified subgraph, wherein the processing method is used to indicate that resources corresponding to the subgraph are managed according to the operation type; The graph execution module is used to execute the processing method corresponding to the subgraph; The graph change monitoring module is used to monitor whether the resource has changed.
Citation Information
Patent Citations
Method and device for editing and displaying topological graph
CN111581444A
Multimedia file production method and device, electronic equipment and readable storage medium
CN111796818A
Cross-device desktop management method, first electronic device and second electronic device
CN115657897A
Resource management method and server
CN117056067A
Persistent transactional memory metadata-based buffer caches
US20190056934A1