Resource operation method, device, and storage medium
By obtaining resource operation instructions in the cloud platform and sending requests to the computing nodes, combining user operation log database and cache technology to determine and display resource status in real time, the problem of resource status display delay in the existing technology is solved and efficiency is improved.
Patent Information
- Application Number
- CN202111372320.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2041-11-18
AI Technical Summary
In the prior art, there is a delay in the display of resource states, resulting in inefficient display of states.
By obtaining resource operation instructions triggered based on the resource operation interface, responding to the resource operation instructions, sending resource operation requests to the computing node; obtaining resource update information based on the user operation log database, determining the current status information of the target resource from the cache based on this information, and mapping it with the resource basic information, and finally displaying it in real time in the resource operation interface.
Real-time display of resource status is realized, the efficiency of resource status display is improved, and the delay is reduced.
Smart Images

Figure CN114138598B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer and Internet technologies, and in particular, to a resource operation method, apparatus, and storage medium. Background Art
[0002] In a cloud scenario, the cloud platform has a need to display resources on the computing node platform and issue resource operations to the computing nodes. There are the following several ways for the cloud platform to obtain the attributes and status of resources on the computing nodes:
[0003] 1. Periodic interface synchronization: The cloud platform initiates an interface call to the computing node at regular intervals to obtain resource attribute and status information.
[0004] 2. Computing node reporting: When the computing node discovers that its own status information and attributes have changed, it calls the management platform interface to push the changed resources to the management platform.
[0005] 3. Cloud platform self-storing data: The cloud platform stores all data of resources by itself. When resources need to be used, it remotely calls the computing node through Remote Procedure Call (RPC) for resource operations.
[0006] However, for the above three solutions, the computing node needs to complete the resource response before it can feedback the status information to the cloud platform, and then the cloud platform can perform synchronous display of the resource status. Therefore, in the prior art, there is a delay in the display of resource status, resulting in low status display efficiency. Summary of the Invention
[0007] A resource operation method, apparatus, and storage medium provided by embodiments of the present invention can improve the display efficiency of resource status and thus reduce latency.
[0008] The technical solution of the present invention is implemented as follows:
[0009] Embodiments of the present invention provide a resource operation method, including:
[0010] Obtain a resource operation instruction triggered based on a resource operation interface, and in response to the resource operation instruction, send a resource operation request to a computing node;
[0011] Obtain resource update information based on a user operation log database; the resource update information is the status information of a target resource feedback by the computing node in response to the resource operation request;
[0012] Based on the resource update information, determine the current status information of the target resource from a cache, and map and cache the current status information with the resource basic information of the target resource;
[0013] Obtain the current status information from the cache and display it in the resource operation interface.
[0014] In the above solution, the cache is a storage layer connected to the front end and having a real-time data transmission function.
[0015] In the above solution, after obtaining a resource operation instruction triggered by a resource operation interface, responding to the resource operation instruction, and sending a resource operation request to a computing node, and before obtaining resource update information based on a user operation log database, the method further includes:
[0016] Send a query instruction to the computing node;
[0017] Obtain the resource update information fed back by the computing node in response to the query instruction, and store the resource update information in the user operation log database; the resource update information is formed by the computing node in response to the resource operation request.
[0018] In the above solution, after obtaining a resource operation instruction triggered by a resource operation interface, responding to the resource operation instruction, and sending a resource operation request to a computing node, and before determining the current status information of the target resource from the cache based on the resource update information, the method further includes:
[0019] Form resource basic information corresponding to the target resource and store it in the user operation log database;
[0020] Monitor the user operation log database to obtain the resource basic information, and store the resource basic information in the cache.
[0021] In the above solution, the resource update information includes: identification information, progress information, and operation success status information of the target resource; the cache includes: multiple identification information of multiple resources, and multiple operation action information corresponding to the multiple identification information;
[0022] Determining the current status information of the target resource from the cache based on the resource update information includes:
[0023] Determine, among the multiple operation action information corresponding to the multiple identification information in the cache, the operation action information that matches the identification information;
[0024] Determine the current status information according to the operation action information, the progress information, and the operation success status information.
[0025] In the above solution, the current status information includes any one of: being created, shut down, unknown status, starting up, running, and shutting down.
[0026] Determining the current status information according to the operation action information, the progress information, and the operation success status information includes one of the following:
[0027] If the operation action information represents creation, the progress information represents not completed, and the operation success status information is blank, then determine that the current status information is being created;
[0028] If the operation action information represents creation, the progress information represents completed, and the operation success status information represents success, then determine that the current status information is shut down;
[0029] If the operation action information represents creation, the progress information represents not completed, and the operation success status information represents failure, then determine that the current status information is unknown status;
[0030] If the operation action information represents starting up, the progress information represents not completed, and the operation success status information is blank, then determine that the current status information is starting up;
[0031] If the operation action information represents starting up, the progress information represents completed, and the operation success status information represents success, then determine that the current status information is running;
[0032] If the operation action information represents starting up, the progress information represents not completed, and the operation success status information represents failure, then determine that the current status information is shut down.
[0033] In the above solution, the resource basic information includes: the identification information of the target resource; the resource update information includes: the identification information;
[0034] Mapping and caching the current status information with the resource basic information of the target resource includes:
[0035] Forming a corresponding relationship between the current status information and the identification information in the corresponding resource update information;
[0036] In the cache, determine the resource basic information with the same identification information as the corresponding relationship, and map and store the corresponding relationship and the resource basic information in the cache.
[0037] An embodiment of the present invention also provides a resource operation method, including:
[0038] Receive a resource operation request sent by a cloud platform, perform an operation on a target resource in response to the resource operation request, and form resource update information of the target resource;
[0039] Receive a query instruction sent by the cloud platform, and in response to the query instruction, feedback the resource update information to the cloud platform for the cloud platform to determine the status information of the target resource according to the feedback resource update information.
[0040] An embodiment of the present invention further provides a resource operation device, including:
[0041] A response unit, configured to obtain a resource operation instruction triggered based on a resource operation interface, and in response to the resource operation instruction, send a resource operation request to a computing node;
[0042] A monitoring unit, configured to obtain resource update information based on a user operation log database; the resource update information is the status information of a target resource fed back by the computing node in response to the resource operation request;
[0043] A determining storage unit, configured to determine the current status information of the target resource from a cache based on the resource update information, and map and cache the current status information with the resource basic information of the target resource;
[0044] A display unit, configured to obtain the current status information from the cache in real time and display it in the resource operation interface.
[0045] An embodiment of the present invention further provides a resource operation device, including:
[0046] A receiving unit, configured to receive a resource operation request sent by a cloud platform, perform an operation on a target resource in response to the resource operation request, and form resource update information of the target resource;
[0047] A sending unit, configured to receive a query instruction sent by the cloud platform, and in response to the query instruction, feedback the resource update information to the cloud platform for the cloud platform to determine the status information of the target resource according to the feedback resource update information.
[0048] An embodiment of the present invention further provides a resource operation device, including a first memory and a first processor, where the first memory stores a computer program that can run on the first processor, and when the first processor executes the program, the steps in the method on the cloud platform side are implemented.
[0049] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a first processor, the steps in the method on the cloud platform side are implemented.
[0050] An embodiment of the present invention further provides a resource operation device, including a second memory and a second processor. The second memory stores a computer program that can run on the second processor, and when the second processor executes the program, the steps in the method on the side of the computing node are implemented.
[0051] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the second processor, the steps in the method on the side of the computing node are implemented.
[0052] In an embodiment of the present invention, by obtaining a resource operation instruction triggered based on a resource operation interface, responding to the resource operation instruction, and sending a resource operation request to a computing node; obtaining resource update information based on a user operation log database; the resource update information is the status information of a target resource fed back by the computing node in response to the resource operation request; based on the resource update information, determining the current status information of the target resource from a cache, and mapping and caching the current status information with the resource basic information of the target resource; obtaining the current status information from the cache and displaying it in the resource operation interface. Since the current status information displayed by the cloud platform is the status information determined from the cache, real-time display can be performed without waiting for the computing node to complete the response of the target resource. Therefore, the cloud platform improves the display efficiency of the resource status and reduces the latency. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is an optional effect schematic diagram of the resource operation method provided by an embodiment of the present invention;
[0054] Figure 2 It is an optional effect schematic diagram of the resource operation method provided by an embodiment of the present invention;
[0055] Figure 3 It is an optional effect schematic diagram of the resource operation method provided by an embodiment of the present invention;
[0056] Figure 4 It is an optional effect schematic diagram of the resource operation method provided by an embodiment of the present invention;
[0057] Figure 5 It is an optional flow schematic diagram of the resource operation method provided by an embodiment of the present invention;
[0058] Figure 6 It is an optional effect schematic diagram of the resource operation method provided by an embodiment of the present invention;
[0059] Figure 7 It is an optional effect schematic diagram of the resource operation method provided by an embodiment of the present invention;
[0060] Figure 8 An optional schematic diagram of the effect of the resource operation method provided by an embodiment of the present invention;
[0061] Figure 9 An optional schematic diagram of the effect of the resource operation method provided by an embodiment of the present invention;
[0062] Figure 10 An optional schematic diagram of the effect of the resource operation method provided by an embodiment of the present invention;
[0063] Figure 11 An optional schematic diagram of the effect of the resource operation method provided by an embodiment of the present invention;
[0064] Figure 12 An optional flowchart of the resource operation method provided by an embodiment of the present invention;
[0065] Figure 13 An optional flowchart of the resource operation method provided by an embodiment of the present invention;
[0066] Figure 14 An optional flowchart of the resource operation method provided by an embodiment of the present invention;
[0067] Figure 15 An optional flowchart of the resource operation method provided by an embodiment of the present invention;
[0068] Figure 16 An optional flowchart of the resource operation method provided by an embodiment of the present invention;
[0069] Figure 17 An interaction diagram of the resource operation method provided by an embodiment of the present invention;
[0070] Figure 18 Structural schematic of the resource operation device provided by an embodiment of the present invention Figure 1 ;
[0071] Figure 19 A hardware entity schematic of the resource operation device provided by an embodiment of the present invention Figure 1 ;
[0072] Figure 20 Structural schematic of the resource operation device provided by an embodiment of the present invention Figure 2 ;
[0073] Figure 21 A hardware entity schematic of the resource operation device provided by an embodiment of the present invention Figure 2 。 Detailed implementation manners
[0074] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be further elaborated in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be construed as limitations on the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention.
[0075] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.
[0076] If similar descriptions such as "first / second" appear in the invention document, the following explanation is added. In the following description, the terms "first / second / third" are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.
[0077] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.
[0078] In the first solution of the related art, the cloud platform initiates an interface call to the computing node at regular intervals to obtain the attribute and status information of the resource. Exemplarily, in combination with Figure 1 , user 100 periodically sends an interface call request to computing node 102 through cloud platform 101. After receiving the interface call request, computing node 102 feeds back the attribute and status information of the updated resource to cloud platform 101. Only after cloud platform 101 receives the fed-back status information can it display the status information.
[0079] In the second solution, when computing node 102 discovers that its own status information and attributes have changed, it calls the management platform interface to push the changed resources to cloud platform 101. Exemplarily, in combination with Figure 2 , when computing node 102 discovers that the status information and attributes of its own updated resources have changed, computing node 102 calls the management platform interface to push the changed resources to cloud platform 101. Only after cloud platform 101 receives the fed-back status information can it display the status information.
[0080] In the third solution, the cloud platform 101 stores all the data of its own storage resources. When resources need to be used, remote procedure call (RPC) is used to operate on the resources by the computing node 102. Exemplarily, in combination with Figure 3 , all the data of the cloud platform 101's own storage resources. When the cloud platform 101 needs to operate on a certain resource, the cloud platform remotely calls the computing node 102 through RPC to operate on the resource. After the computing node 102 completes the operation of the resource, it feeds back the status information of the resource to the cloud platform 101. Only at this time can the cloud platform 101 display the status information.
[0081] Exemplarily, in combination with Figure 4 , through the above three solutions of the prior art, it can be obtained that the user 100 can perceive the change of the resource status only after going through the operation log, resource operation, and the response of the computing platform 102. That is, the user 100 initiates a resource operation through the cloud platform 101. The cloud platform 101 stores the basic information of the resource operation in the operation log database 103. The cloud platform 103 sends an operation request to the computing node 102. The computing node 102 performs the resource operation. After the computing node 102 completes the resource operation, the computing node 102 feeds back the status information of the resource to the operation log database of the cloud platform 101. The cloud platform 101 can query the status information of the resource in the operation log database 103 and then display it to the user 100. Therefore, in the prior art, there is a delay in the display of the resource status, resulting in low status display efficiency.
[0082] Figure 5 FIG. is an optional flowchart of the resource operation method provided by the embodiment of the present invention, which will be described in combination with Figure 5 the steps shown.
[0083] S101. Obtain a resource operation instruction triggered by a resource operation interface, and in response to the resource operation instruction, send a resource operation request to a computing node.
[0084] In the embodiment of the present invention, the cloud platform obtains a resource operation instruction triggered by a resource operation interface, and in response to the resource operation instruction, sends a resource operation request to a computing node.
[0085] In the embodiment of the present invention, the cloud platform obtains a resource operation instruction triggered by a user on a resource operation interface, and in response to the resource operation instruction, sends a resource operation request to a computing node.
[0086] In the embodiment of the present invention, the user can trigger a resource operation instruction on the resource operation interface of the cloud platform through the human-computer interaction device of the cloud platform.
[0087] In the embodiment of the present invention, the resource operation request is used to start a preset program of the computing node and respond to the operation target resource.
[0088] S102, obtaining resource update information based on a user operation log database; the resource update information is the state information of the target resource fed back by the computing node in response to the resource operation request.
[0089] In the embodiment of the present invention, the cloud platform obtains resource update information based on the user operation log database; the resource update information is the status information of the target resource fed back by the computing node in response to the resource operation request.
[0090] In the embodiment of the present invention, the cloud platform monitors the user operation log database in real time to obtain resource update information, wherein the resource update information is the state information of the corresponding target resource formed by the computing node in response to the resource operation request, and is fed back to the cloud platform for the cloud platform to obtain and store in the user operation log database.
[0091] In the embodiment of the present invention, when the computing node operates the target resource, the resource update information of the target resource is fed back in real time. After receiving the resource update information, the cloud platform stores the resource update information in the user operation log database. Since the cloud platform monitors the user operation log database in real time, the resource update information is obtained. Among them, the operation of the computing node on the target resource may include a construction operation and a deletion operation.
[0092] In the embodiment of the present invention, the cloud platform refers to a platform with management functions that provides computing, network and storage capabilities based on hardware resources and software resources. Cloud computing platforms can be divided into three categories: storage-type cloud platforms that focus on data storage, computing-type cloud platforms that focus on data processing, and comprehensive cloud computing platforms that take both computing and data storage processing into account. The computing node in the embodiment of the present invention is a computing service center that communicates with the cloud platform. The computing node can be a terminal with computing and processing capabilities, a mobile terminal, or a combination of terminals with computing and processing capabilities.
[0093] In the embodiment of the present invention, the resources may be cloud hosts, cloud hard disks, networks, images, central processing units (CPUs), number of cores, hard disks, and other resources used for data processing.
[0094] In an embodiment of the present invention, after receiving a resource operation request sent by a cloud platform, a computing node can generate resource update information while operating a target resource. The cloud platform sends a query request to the computing node, and the computing node responds to the query request and feeds back resource update information to the cloud platform. The cloud platform receives the fed-back resource update information and stores it in a user operation log database. Then, the cloud platform can monitor the resource update information in the user operation log database.
[0095] In an embodiment of the present invention, the computing node may also operate on the target resource according to a preset program instruction or a user instruction corresponding to the computing node.
[0096] S103. Based on the resource update information, determine the current status information of the target resource from the cache, and map and cache the current status information with the resource basic information of the target resource.
[0097] In an embodiment of the present invention, the cloud platform determines the current status information of the target resource from the cache based on the resource update information, and maps and caches the current status information with the resource basic information of the target resource.
[0098] In an embodiment of the present invention, since the identification information in the resource basic information corresponding to the target resource is the same as the identification information in the resource update information corresponding to the target resource, the cloud platform may determine the resource basic information of the target resource in the cache based on the identification information of the target resource in the resource update information. The cloud platform combines the resource update information and the resource basic information to determine the current status information, and maps and caches the current status information with the resource basic information of the target resource. Among them, the cache stores the resource basic information of multiple resources.
[0099] Among them, the cache is a storage layer connected to the front end of the cloud platform and having a real-time data transmission function.
[0100] In an embodiment of the present invention, the cloud platform obtains the resource update information by listening to the user operation log database. Since the resource update information is information reflecting the status of the target resource fed back by the computing node, the cloud platform may determine the current status information of the target resource based on the resource update information.
[0101] In an embodiment of the present invention, the resource update information may include operation success status information. If the cloud platform listens to obtain the operation success status information indicating success, the cloud platform may determine the current status information of the successfully operated target resource.
[0102] Exemplarily, in combination with Table 1, the cloud platform may determine the current status information of the target resource according to various resource update information.
[0103]
[0104] Table 1
[0105] Combined with Table 1, if the cloud platform monitors that the operation action information represents creation, the progress information represents not completed, and the operation success status information is blank, then determine that the current status information is in the process of creation. If the cloud platform monitors that the operation action information represents creation, the progress information represents completed, and the operation success status information represents success, then determine that the current status information is shutdown. If the cloud platform monitors that the operation action information represents creation, the progress information represents not completed, and the operation success status information represents failure, then determine that the current status information is an unknown state. If the cloud platform monitors that the operation action information represents startup, the progress information represents not completed, and the operation success status information is blank, then determine that the current status information is in the process of startup. If the cloud platform monitors that the operation action information represents startup, the progress information represents completed, and the operation success status information represents success, then determine that the current status information is running. If the cloud platform monitors that the operation action information represents startup, the progress information represents not completed, and the operation success status information represents failure, then determine that the current status information is shutdown.
[0106] S104. Obtain the current status information from the cache and display it in the resource operation interface.
[0107] In the embodiment of the present invention, the cloud platform obtains the current status information from the cache and displays it in the resource operation interface.
[0108] In the embodiment of the present invention, the cloud platform maps and caches the current status information with the resource basic information of the target resource stored in the cache. The cloud platform then displays the current status information in real time through the websocket connection method between the cache and the resource operation interface. Among them, WebSocket is a protocol for full-duplex communication on a single Transmission Control Protocol (TCP) connection. WebSocket makes the data exchange between the front end and the server simpler and allows the server to actively push data to the client. In the Application Programming Interface (API) of WebSocket, the front end and the server only need to complete a handshake once, and then a persistent connection can be directly created between the two for two-way data transmission. WebSocket has stronger real-time performance. Since the protocol is full-duplex, the server can actively send data to the client at any time, and the delay is significantly less. Furthermore, the delay of the current status information displayed by the cloud platform is lower.
[0109] In the embodiment of the present invention, the cache of the cloud platform can send the current status information and the corresponding resource basic information to the resource operation interface at the same time, and then display them to the user in the resource operation interface.
[0110] In the embodiments of the present invention, the current status information of the target resource may include: being created, being shut down, being restarted, and being deleted.
[0111] Exemplarily, in combination with Figure 6 , Figure 6 Figure 7 shows a schematic diagram of the effect of a resource being created as displayed on the resource operation interface of the cloud platform. Among them, the cloud platform monitors the resource update information fed back by the computing node, and the cloud platform determines the current status information as being created based on the resource update information. The cloud platform displays the current status information of being created through the resource operation interface. Referring to Figure 6 , the status bar shows that it is being created, the task status creation completion rate is 36%, the behavior information is to create a cloud host, the object is demo, the start time is 2021-09-29; 09:54. The operator is zly(1.1.1.254), the grouping is the default grouping, the type is HCI(x86), and the expiration time is unlimited.
[0112] Referring to Figure 7 , the status bar shows that it is being shut down, the shutdown completion rate is 30%, the behavior information is to turn off the power of the cloud host, and other information is the same as that in Figure 6 .
[0113] Referring to Figure 8 , the status bar shows that it is being restarted, the restart completion rate is 30%, the behavior information is to restart the cloud host, and other information is the same as that in Figure 6 .
[0114] Referring to Figure 9 , the status bar shows that it is being deleted, the deletion progress is completed, the behavior information is to delete the cloud host, and other information is the same as that in Figure 6 .
[0115] Exemplarily, in combination with Figure 10 , in the embodiments of the present invention, the cloud platform 101 realizes the rapid response of the resource status and resource basic information on the front end 105 based on the log operation records fed back by the computing node 102 and the resource basic information stored in the cache, achieving a response display effect at the millisecond level. In the embodiments of the present invention, the cloud platform 101 monitors the log database data 103, and based on the resource operation action information, resource type information, progress information, and operation success status information, obtains the current status information according to the configured policy and directly updates it to the cache 104. At the same time, the cloud platform 101 monitors the basic data of the resources, and the cloud platform 101 quickly updates the changed resource basic data to the cache 104. The cloud platform 101 reads the current status information for display based on the websocket connection between the front end 105 and the cache 104, achieving the effect of timely pushing the changed cache data to the front end interface.
[0116] Exemplarily, in combination withFigure 11 In the embodiment of the present invention, user 100 performs resource operations through cloud platform 101. Meanwhile, cloud platform 101 generates resource basic information and stores it in cache 104. Cloud platform 101 sends an operation request to computing node 102 based on the user's operation. Computing node 102 performs resource operations and feeds back resource update information to the operation main database of cloud platform 101. Cloud platform 101 obtains the resource update information by listening to operation log database 103 and stores the resource update information in cache 104. Cloud platform 101 obtains the current status information of the target resource through the resource update information and the resource basic information, and then displays it to user 100 through front end 105.
[0117] In the embodiment of the present invention, by obtaining a resource operation instruction triggered based on a resource operation interface, responding to the resource operation instruction, and sending a resource operation request to a computing node; obtaining resource update information based on a user operation log database; the resource update information is the status information of a target resource fed back by the computing node in response to the resource operation request; based on the resource update information, determining the current status information of the target resource from a cache, and mapping and caching the current status information with the resource basic information of the target resource; obtaining the current status information from the cache and displaying it in the resource operation interface. Since the current status information displayed by the cloud platform is the status information determined from the cache and can be displayed in real time without waiting for the computing node to complete the response of the target resource, the cloud platform improves the display efficiency of the resource status and reduces the latency.
[0118] In some embodiments, Figure 5 What is shown between S101 and S102 may also be implemented through S105 to S106, and will be described in combination with each step.
[0119] S105: Send a query instruction to the computing node.
[0120] In the embodiment of the present invention, the cloud platform sends a query instruction to the computing node.
[0121] In the embodiment of the present invention, the cloud platform sends a query instruction to the computing node in real time.
[0122] In the embodiment of the present invention, the cloud platform may also send a query instruction to the computing node at intervals of a predetermined time. The predetermined time may be 1 second or 1 minute and is not limited in this embodiment.
[0123] In the embodiment of the present invention, the query instruction is used for resource update information formed by the computing node operating on resources.
[0124] S106: Obtain the resource update information fed back by the computing node in response to the query instruction, and store the resource update information in the user operation log database.
[0125] In an embodiment of the present invention, the cloud platform obtains the resource update information fed back by the computing node in response to the query instruction, and stores the resource update information in the user operation log database. The resource update information is formed by the computing node in response to the resource operation request.
[0126] In an embodiment of the present invention, after the computing node obtains the resource operation request sent by the cloud platform, the computing node starts to respond to the target resource to be operated, and generates the resource update information of the target resource in real time. Since the cloud platform sends the query instruction to the computing node in real time, after the computing node obtains the query instruction, it responds to the operation instruction and feeds back the real-time resource update information to the cloud platform for the cloud platform to store in the user operation log database.
[0127] In an embodiment of the present invention, after the cloud platform sends the resource operation request to the computing node, it sends a query request to the computing node, so as to quickly and real-time obtain the resource update information of the resource, and then determine the current status information for display, reducing the delay of the status information display.
[0128] In some embodiments, between S101 and S102, S107 to S108 are also included, which will be described in combination with each step.
[0129] S107. Form the resource basic information corresponding to the target resource, and store it in the user operation log database.
[0130] In an embodiment of the present invention, the cloud platform obtains the resource operation instruction of the user, responds to the resource operation instruction, sends a resource operation request to the computing node, forms the resource basic information corresponding to the target resource, and stores it in the user operation log database.
[0131] In an embodiment of the present invention, after the cloud platform obtains the resource operation instruction, the cloud platform can form the resource basic information of the target resource while sending the resource operation request to the computing node.
[0132] S108. Monitor the user operation log database to obtain the resource basic information, and store the resource basic information in the cache.
[0133] In an embodiment of the present invention, the cloud platform monitors the user operation log database in real time to obtain the resource basic information, and stores the resource basic information in the cache.
[0134] In an embodiment of the present invention, the process of the cloud platform monitoring the user operation log database in real time to obtain the resource basic information can be carried out simultaneously with S101. Exemplarily, refer to Figure 12 , which will be described in combination with the steps.
[0135] S401. Monitor.
[0136] S402. Data change.
[0137] S403. Basic information writing.
[0138] S404. Basic information updating.
[0139] S405. Basic information deletion.
[0140] S406. Cache.
[0141] Actually, the cloud platform monitors the user operation log database in real time. When there is a data change in the user operation log database, such as basic information writing, basic information updating, and basic information deletion, the cloud platform will store the resource basic information written, deleted, and updated in the cache.
[0142] Exemplarily, while the cloud platform monitors the resource basic information in real time, it also monitors the resource update information. Refer to Figure 13 , which will be described in combination with the steps.
[0143] S401. Monitoring.
[0144] S402. Data change.
[0145] S407. Information writing.
[0146] S408. Information updating.
[0147] S409. Matching status policy configuration.
[0148] S406. Cache.
[0149] In the embodiments of the present invention, the cloud platform monitors the resource update information while monitoring the resource basic information in real time. The computing node feeds back the resource update information to the cloud platform in real time. The cloud platform stores the resource update information in the user operation log database. The cloud platform monitors the data change of the user operation log database and monitors the writing and updating of the resource update information. The cloud platform determines the current status information according to the monitored resource update information in combination with the matching status policy configuration. The cloud platform stores the current status information in the cache, which is convenient for subsequent determination of the current status information for display, improving the display efficiency.
[0150] In some embodiments, S103 can be implemented through S109 to S112, which will be described in combination with each step.
[0151] S109. Determine the operation action information corresponding to the identification information from the multiple operation action information corresponding to the multiple identification information in the cache.
[0152] In an embodiment of the present invention, the cloud platform determines, from multiple operation action information corresponding to multiple identification information in the cache, the operation action information that matches the identification information. The resource update information includes: identification information of the target resource, progress information, and operation success status information; the cache includes: multiple identification information of multiple resources, and multiple operation action information corresponding to the multiple identification information.
[0153] In an embodiment of the present invention, the operation action information and the identification information match, and the progress information and the operation success status information also match the identification information. Since the resource update information and the resource basic information corresponding to the same target resource both include the same identification information. The cloud platform can determine, in the cache, the operation action information corresponding to the identification information in the resource update information.
[0154] S110. Determine the current status information according to the operation action information, the progress information, and the operation success status information.
[0155] In an embodiment of the present invention, the cloud platform determines the current status information according to the operation action information, the progress information, and the operation success status information.
[0156] In an embodiment of the present invention, the current status information may include: any one of creating, shutting down, unknown status, starting up, running, and shutting down.
[0157] In some embodiments, S110 may be implemented through S1101 to S1106, and each step will be described in combination.
[0158] S1101. The cloud platform detects that if the operation action information represents creation, the progress information represents not completed, and the operation success status information is blank, then it is determined that the current status information is creating.
[0159] S1102. The cloud platform detects that if the operation action information represents creation, the progress information represents completed, and the operation success status information represents success, then it is determined that the current status information is shutting down.
[0160] S1103. The cloud platform detects that if the operation action information represents creation, the progress information represents not completed, and the operation success status information represents failure, then it is determined that the current status information is unknown status.
[0161] S1104. The cloud platform detects that if the operation action information represents starting up, the progress information represents not completed, and the operation success status information is blank, then it is determined that the current status information is starting up.
[0162] S1105. The cloud platform detects that if the operation action information represents starting up, the progress information represents completed, and the operation success status information represents success, then it is determined that the current status information is running.
[0163] S1106. If the cloud platform detects that the operation action information represents power-on, the progress information represents incomplete, and the operation success status information represents failure, then determine that the current status information is power-off.
[0164] In an embodiment of the present invention, the cloud platform determines the operation action information corresponding to the target resource in the cache according to the identification information, and then can accurately determine the corresponding current status information.
[0165] S111. Establish a corresponding relationship between the current status information and the identification information in the corresponding resource update information.
[0166] In an embodiment of the present invention, the cloud platform establishes a corresponding relationship between the current status information and the identification information in the corresponding resource update information.
[0167] In an embodiment of the present invention, since the identification information in the resource update information and the resource basic information of the same target resource is the same, the cloud platform establishing a corresponding relationship between the current status information and the identification information in the corresponding resource update information is equivalent to establishing a corresponding relationship between the current status information and the identification information in the resource basic information.
[0168] S112. In the cache, determine the resource basic information having the same identification information as the corresponding relationship, and map and store the corresponding relationship and the resource basic information in the cache.
[0169] In an embodiment of the present invention, the cloud platform determines in the cache the resource basic information having the same identification information as the corresponding relationship, and maps and stores the mapping relationship and the resource basic information in the cache.
[0170] In an embodiment of the present invention, since the identification information in the resource update information and the resource basic information of the same target resource is the same, the cloud platform can determine in the cache the resource basic information having the same identification information as the corresponding relationship.
[0171] Exemplarily, see Figure 14 , Figure 14 which is an optional flowchart of the prescription information processing method provided by the embodiment of the present invention. S102 to S112 can be implemented through S410 to S406, and will be described in combination with each step.
[0172] S410. Resource type information.
[0173] S411. Operation action information.
[0174] S412. Progress information.
[0175] S413. Operation success status information.
[0176] S414. Match and update the corresponding resource status.
[0177] S410. Cache.
[0178] In a cloud scenario, each operation of the cloud platform on a resource will generate an operation log (ULOG) corresponding to this operation, and key information such as resource type (object_type), resource identification information (object_id), operation action information (action), operation progress information (progress), and operation success status (state) is assigned to the information stored in the operation log. Both the operation log (ULOG) and the resource information will be stored in their own databases.
[0179] The cloud platform monitors the ULOG data table. If the ULOG data changes, the corresponding object_id, object_type, action, progress, and state data are collected, and the current status information is determined based on a preset matching policy example. Then, the object-id is used to update the corresponding status data of the resource in the resource cache.
[0180] The resource basic information and status data are quickly synchronized to the cache. The user interface directly reads the data from the cache through the established websocket connection, achieving the effect of second-level response for the resource operation interface.
[0181] Exemplarily, see Figure 15 , Figure 15 , which is an optional process schematic diagram of the prescription information processing method provided by the embodiment of the present invention, and will be described in combination with each step.
[0182] S415. Obtain a resource operation instruction.
[0183] S416. Obtain resource basic information.
[0184] S417. User operation log database.
[0185] S418. Initiate a resource operation request to the computing platform.
[0186] S419. Obtain resource update information.
[0187] S420. Wait for the computing platform operation to complete.
[0188] S421. Is it successful?
[0189] S422. Detect resource update information.
[0190] S423. The operation success status information indicates success.
[0191] S424. Detect resource update information.
[0192] S425. Indicate that the operation success status fails.
[0193] S426. Delete the resource from the resource database.
[0194] S427. The resource operation is completed.
[0195] In the embodiment of the present invention, user 100 operates on cloud platform 101, such as creating a cloud host. Cloud platform 101 obtains the resource operation instruction sent by user 100. At this time, the cloud platform generates the resource basic information of the resource. The resource basic information may include resource type information and operation action information. That is, generate the ULOG of this operation, with object-type being the cloud host and action being creating the cloud host.
[0196] The cloud platform stores the resource basic information into the cloud host database table. Cloud platform 101 initiates a creation request to computing node 102. The computing node starts to create the cloud host. The cloud platform queries the creation progress of the cloud host in real time and obtains the resource update information including the progress information. At this time, update the progress parameter of the corresponding ULOG.
[0197] After the computing node completes the creation of the resource, the cloud platform obtains the information on whether the cloud host of the computing node is successfully created. If it is successfully created, update the state of the ulog to success. If it fails to be created, update the state of the ulog to failed and delete the cloud host data of this cloud host in the cloud host database.
[0198] See Figure 16 , Figure 16 which is an optional process schematic diagram of the prescription information processing method provided by the embodiment of the present invention, and will be described in combination with each step.
[0199] S201. Receive the resource operation request sent by the cloud platform, respond to the resource operation request to operate on the target resource, and form the resource update information of the target resource.
[0200] In the embodiment of the present invention, the computing node receives the resource operation request sent by the cloud platform, responds to the resource operation request to operate on the target resource, and forms the resource update information of the target resource.
[0201] S202. Receive the query instruction sent by the cloud platform, respond to the query instruction, and feedback the resource update information to the cloud platform; for the cloud platform to determine the status information of the target resource according to the feedback resource update information.
[0202] In an embodiment of the present invention, a computing node receives a query instruction sent by a cloud platform, responds to the query instruction, and feeds back resource update information to the cloud platform; the cloud platform determines the status information of a target resource based on the fed-back resource update information.
[0203] Since the current status information displayed by the cloud platform is based on the status information fed back by the computing node and it can be displayed in real time without waiting for the computing node to complete the response of the target resource, the cloud platform improves the display efficiency of the resource status and reduces the latency.
[0204] See Figure 17 , Figure 17 which is an optional flowchart of the prescription information processing method provided by the embodiment of the present invention and will be described in combination with each step.
[0205] S301. The cloud platform obtains a resource operation instruction triggered based on a resource operation interface, responds to the resource operation instruction, and sends a resource operation request to the computing node.
[0206] The detailed implementation of step S301 is the same as that of S101 and will not be elaborated here.
[0207] S302. The computing node receives the resource operation request sent by the cloud platform, responds to the resource operation request to operate on the target resource, and forms resource update information of the target resource.
[0208] The detailed implementation of step S301 is the same as that of S201 and will not be elaborated here.
[0209] S303. The computing node receives the query instruction sent by the cloud platform, responds to the query instruction, and feeds back the resource update information to the cloud platform.
[0210] The detailed implementation of step S302 is the same as that of S202 and will not be elaborated here.
[0211] S304. The cloud platform obtains the resource update information based on the user operation log database; the resource update information is the status information of the target resource fed back by the computing node in response to the resource operation request.
[0212] The detailed implementation of step S304 is the same as that of S102 and will not be elaborated here.
[0213] S305. The cloud platform determines the current status information of the target resource from the cache based on the resource update information, and maps and caches the current status information with the resource basic information of the target resource.
[0214] The detailed implementation of step S305 is the same as that of S103 and will not be elaborated here.
[0215] S306. The cloud platform obtains the current status information from the cache and displays it in the resource operation interface.
[0216] The detailed implementation of step S306 is the same as that of S104 and will not be elaborated here.
[0217] See Figure 18 , Figure 18 which is the structural schematic diagram of the prescription information processing device provided by the embodiment of the present invention Figure 1 .
[0218] The embodiment of the present invention also provides a resource operation device 800, including: a response unit 803, a monitoring unit 804, a determination storage unit 805, and a display unit 806.
[0219] The response unit 803 is configured to obtain a resource operation instruction triggered based on the resource operation interface, and in response to the resource operation instruction, send a resource operation request to the computing node;
[0220] The monitoring unit 804 is configured to obtain resource update information based on the user operation log database; the resource update information is the status information of the target resource fed back by the computing node in response to the resource operation request;
[0221] The determination storage unit 805 is configured to determine the current status information of the target resource from the cache based on the resource update information, and map and cache the current status information with the resource basic information of the target resource;
[0222] The display unit 806 is configured to obtain the current status information from the cache and display it in the resource operation interface.
[0223] In the embodiment of the present invention, the cache is a storage layer connected to the front end and having a real-time data transmission function.
[0224] In the embodiment of the present invention, the resource operation device 800 is further configured to send a query instruction to the computing node; obtain the resource update information fed back by the computing node in response to the query instruction, and store the resource update information in the user operation log database; the resource update information is formed by the computing node in response to the resource operation request.
[0225] In the embodiment of the present invention, the determination storage unit 805 in the resource operation device 800 is configured to form the resource basic information corresponding to the target resource and store it in the user operation log database; the monitoring unit 804 is configured to monitor the user operation log database to obtain the resource basic information and store the resource basic information in the cache.
[0226] In an embodiment of the present invention, the resource update information includes: identification information of the target resource, progress information, and operation success status information; the cache includes: multiple identification information of multiple resources, and multiple operation action information corresponding to the multiple identification information; a determining storage unit 805 is configured to determine, from the multiple operation action information corresponding to the multiple identification information in the cache, the operation action information that matches the identification information; and determine the current state information according to the operation action information, the progress information, and the operation success status information.
[0227] In an embodiment of the present invention, the current state information includes any one of: being created, shutting down, unknown state, starting up, running, and shutting down; the determining storage unit 805 is configured to, if the operation action information represents creation, the progress information represents not completed, and the operation success status information is blank, determine that the current state information is being created; if the operation action information represents creation, the progress information represents completed, and the operation success status information represents success, determine that the current state information is shutting down; if the operation action information represents creation, the progress information represents not completed, and the operation success status information represents failure, determine that the current state information is the unknown state; if the operation action information represents starting up, the progress information represents not completed, and the operation success status information is blank, determine that the current state information is starting up; if the operation action information represents starting up, the progress information represents completed, and the operation success status information represents success, determine that the current state information is running; if the operation action information represents starting up, the progress information represents not completed, and the operation success status information represents failure, determine that the current state information is shutting down.
[0228] In an embodiment of the present invention, the resource basic information includes: identification information of the target resource; the resource update information includes: the identification information; the determining storage unit 805 is configured to form a corresponding relationship between the current state information and the identification information in the corresponding resource update information; determine, in the cache, the resource basic information that has the same identification information as the corresponding relationship, and map and store the corresponding relationship and the resource basic information in the cache.
[0229] In an embodiment of the present invention, a resource operation instruction triggered based on a resource operation interface is obtained through a response unit 803, and in response to the resource operation instruction, a resource operation request is sent to a computing node; a monitoring unit 804 is configured to obtain resource update information based on a user operation log database; the resource update information is status information of a target resource fed back by the computing node in response to the resource operation request; a determination storage unit 805 is configured to determine current status information of the target resource from a cache based on the resource update information, and map and cache the current status information with resource basic information of the target resource; a display unit 806 is configured to obtain the current status information from the cache and display it in the resource operation interface. Since the current status information displayed by the cloud platform is the status information determined from the cache and real-time display can be performed without waiting for the computing node to complete the response of the target resource, the cloud platform improves the display efficiency of the resource status and reduces the latency.
[0230] It should be noted that in an embodiment of the present invention, if the above-mentioned resource operation method is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present invention, in essence or the part that contributes to the related art, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a resource operation device (which can be a personal computer, etc.) to execute all or part of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disc that can store program codes. Thus, the embodiment of the present invention is not limited to any specific combination of hardware and software.
[0231] Correspondingly, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method are implemented.
[0232] Correspondingly, an embodiment of the present invention provides a resource operation device, including a first memory 802 and a first processor 801. The first memory 802 stores a computer program that can run on the first processor 801, and when the first processor 801 executes the program, the steps in the above method are implemented.
[0233] It should be pointed out here that: the descriptions of the above storage medium and device embodiments are similar to those of the above method embodiments and have beneficial effects similar to those of the method embodiments. For the technical details not disclosed in the storage medium and device embodiments of the present invention, please refer to the descriptions of the method embodiments of the present invention for understanding.
[0234] It should be noted thatFigure 19 A schematic diagram of a hardware entity of the resource operation device provided by an embodiment of the present invention Figure 1 , as Figure 19 shown, the hardware entity of the resource operation device 800 includes: a first processor 801 and a first memory 802, where;
[0235] The first processor 801 generally controls the overall operation of the resource operation device 800.
[0236] The first memory 802 is configured to store instructions and applications executable by the first processor 801, and can also cache data to be processed or already processed by the first processor 801 and each module in the resource operation device 800 (for example, image data, audio data, voice communication data, and video communication data), and can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0237] See Figure 20 , Figure 20 A structural schematic diagram of the prescription information processing device provided by an embodiment of the present invention Figure 2 .
[0238] An embodiment of the present invention further provides a resource operation device 900, including: a receiving unit 903 and a sending unit 904.
[0239] The receiving unit 903 is configured to receive a resource operation request sent by the cloud platform, operate on the target resource in response to the resource operation request, and form resource update information of the target resource;
[0240] The sending unit 904 is configured to receive a query instruction sent by the cloud platform, and in response to the query instruction, feed back the resource update information to the cloud platform for the cloud platform to determine the status information of the target resource according to the fed-back resource update information.
[0241] In an embodiment of the present invention, the receiving unit 903 receives a resource operation request sent by the cloud platform, operates on the target resource in response to the resource operation request, and forms resource update information of the target resource; the sending unit 904 receives a query instruction sent by the cloud platform, and in response to the query instruction, feeds back the resource update information to the cloud platform for the cloud platform to determine the status information of the target resource according to the fed-back resource update information. Since the current status information obtained by the cloud platform is real-time status information determined according to the real-time resource update information fed back by the computing node, and it is not necessary to wait for the computing node to complete the response of the target resource to perform real-time display, the cloud platform improves the display efficiency of the resource status and reduces the latency.
[0242] Correspondingly, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method are implemented.
[0243] Correspondingly, an embodiment of the present invention provides a resource operation device, including a second memory 902 and a second processor 901. The second memory 902 stores a computer program that can run on the second processor 901, and when the second processor 901 executes the program, the steps in the above method are implemented.
[0244] It should be noted here that the descriptions of the above storage medium and device embodiments are similar to the descriptions of the above method embodiments and have similar beneficial effects to the method embodiments. For the technical details not disclosed in the storage medium and device embodiments of the present invention, please refer to the descriptions of the method embodiments of the present invention for understanding.
[0245] It should be noted that Figure 21 is a schematic diagram of a hardware entity of the resource operation device provided by an embodiment of the present invention Figure 2 , as Figure 21 shown, the hardware entity of the resource operation device 900 includes: a second processor 901 and a second memory 902, where;
[0246] The second processor 901 generally controls the overall operation of the resource operation device 900.
[0247] The second memory 902 is configured to store instructions and applications executable by the second processor 901, and can also cache data to be processed or already processed by the second processor 901 and each module in the resource operation device 900 (for example, image data, audio data, voice communication data, and video communication data), and can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0248] It should be understood that throughout the specification, the mention of "an embodiment" or "an embodiment" means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present invention. Therefore, the appearances of "in an embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in various embodiments of the present invention, the magnitudes of the serial numbers of the above processes do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention. The serial numbers of the embodiments of the present invention above are only for description and do not represent the advantages or disadvantages of the embodiments.
[0249] It should be noted that in this text, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising that element.
[0250] In several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of the units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling or communication connection between the components shown or discussed with each other can be through some interfaces. The indirect coupling or communication connection of the apparatus or unit can be electrical, mechanical or other forms.
[0251] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units; they can be located in one place or distributed to multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0252] In addition, each functional unit in the embodiments of the present invention can be all integrated in a processing unit, or each unit can be separately used as a unit, or two or more units can be integrated in a unit; the above integrated units can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.
[0253] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps including the above method embodiments; and the foregoing storage medium includes various media that can store program codes, such as removable storage devices, read-only memory (ROM), magnetic disks or optical discs.
[0254] Alternatively, if the above integrated units of the present invention are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present invention, in essence or the part that contributes to the related technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media such as a removable storage device, a ROM, a magnetic disk, or an optical disc that can store program codes.
[0255] As described above, the above are only the implementation manners of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A resource operation method, characterized in that, Including: Obtain a resource operation instruction triggered by a resource operation interface, and in response to the resource operation instruction, send a resource operation request to a computing node; wherein, the resource operation request is used to start a preset program of the computing node to respond to an operation target resource. Obtain resource update information based on a user operation log database; the resource update information is status information of a target resource fed back by the computing node in response to the resource operation request; wherein, the resource update information includes: identification information, progress information, and operation success status information of the target resource. Determine, from multiple operation action information corresponding to multiple identification information in a cache, the operation action information corresponding to and matching the identification information; wherein, the cache includes: resource basic information of the target resource, multiple identification information of multiple resources, and multiple operation action information corresponding to the multiple identification information. Determine current status information according to the operation action information, the progress information, and the operation success status information, and map and cache the current status information with the resource basic information of the target resource. Obtain the current status information from the cache and display it in the resource operation interface.
2. The resource operation method according to claim 1, characterized in that, The cache is a storage layer connected to the front end and having a real-time data transmission function.
3. The resource operation method according to claim 1, characterized in that, After obtaining the resource operation instruction triggered by the resource operation interface, responding to the resource operation instruction, and sending a resource operation request to the computing node, and before obtaining the resource update information based on the user operation log database, the method further includes: Send a query instruction to the computing node. Obtain the resource update information fed back by the computing node in response to the query instruction, and store the resource update information in the user operation log database; the resource update information is formed by the computing node in response to the resource operation request.
4. The resource operation method according to claim 3, characterized in that, After obtaining the resource operation instruction triggered by the resource operation interface, responding to the resource operation instruction, and sending a resource operation request to the computing node, and before determining the current status information of the target resource from the cache based on the resource update information, the method further includes: Form resource basic information corresponding to the target resource and store it in the user operation log database. Monitor the user operation log database to obtain the resource basic information and store the resource basic information in the cache.
5. The resource operation method according to claim 1, characterized in that, The current status information includes any one of: being created, shut down, unknown status, starting up, running, and shutting down. The determining the current status information according to the operation action information, the progress information, and the operation success status information includes one of the following: If the operation action information represents creation, the progress information represents not completed, and the operation success status information is blank, then determine that the current status information is being created. If the operation action information represents creation, the progress information represents completed, and the operation success status information represents success, then determine that the current status information is shut down. If the operation action information represents creation, the progress information represents incomplete, and the operation success status information represents failure, determine that the current status information is the unknown status; If the operation action information represents power-on, the progress information represents incomplete, and the operation success status information is blank, determine that the current status information is powering on; If the operation action information represents power-on, the progress information represents complete, and the operation success status information represents success, determine that the current status information is running; If the operation action information represents power-on, the progress information represents incomplete, and the operation success status information represents failure, determine that the current status information is power-off.
6. The resource operation method according to claim 4, characterized in that, The resource basic information includes: the identification information of the target resource; the resource update information includes: the identification information; The mapping and caching of the current status information with the resource basic information of the target resource includes: Form a corresponding relationship between the current status information and the identification information in the corresponding resource update information; In the cache, determine the resource basic information with the same identification information as the corresponding relationship, and map and store the corresponding relationship and the resource basic information in the cache.
7. A resource operation device, characterized in that, Includes: A response unit, configured to obtain a resource operation instruction triggered based on a resource operation interface, respond to the resource operation instruction, and send a resource operation request to a computing node; wherein, the resource operation request is used to start a preset program of the computing node to respond to the operation target resource; a monitoring unit, configured to obtain resource update information based on a user operation log database; the resource update information is the status information of the target resource fed back by the computing node in response to the resource operation request; wherein, the resource update information includes: the identification information of the target resource, progress information, and operation success status information; A determination and storage unit, configured to determine, from multiple operation action information corresponding to multiple identification information in a cache, the operation action information corresponding and matching the identification information; determine the current status information according to the operation action information, the progress information, and the operation success status information, and map and cache the current status information with the resource basic information of the target resource; wherein, the cache includes: the resource basic information of the target resource, multiple identification information of multiple resources, and multiple operation action information corresponding to multiple identification information; A display unit, configured to obtain the current status information from the cache and display it in the resource operation interface.
8. A resource operation device, characterized in that, Includes a first memory and a first processor, the first memory stores a computer program that can run on the first processor, and when the first processor executes the program, it implements the steps in the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by the first processor, it implements the steps in the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Resource monitoring method and device
CN108540341A
Underlying resource state synchronization method and device, cloud platform system and storage medium
CN110572464A