Resource state determination method, system, device and product

By setting up a state machine in the cloud network, the problem of cloud network resource state agnostic is solved, the visibility and accessibility of resource state is realized, and the effectiveness and predictability of cloud network resources at the bottom are ensured.

CN119697013AActive Publication Date: 2025-03-25CHINA TELECOM CLOUD TECH CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411706819.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-25
Estimated Expiration
2044-11-26

AI Technical Summary

Technical Problem

The lack of visibility of resource status in the current cloud network makes it agnostic whether the cloud network resources have been created/configured at the bottom, and there is a problem that the status of the cloud network resources in the system cannot be confirmed.

Method used

By setting up the state machine of cloud network resources, the resource life cycle management service receives the cloud network resource operation request initiated by the user and forwards it to the gateway controller. The gateway controller converts the operation request into configuration information and sends it to the gateway. The gateway configures based on the configuration information, obtains the configuration result and returns, and the gateway controller sends it to the resource life cycle management service in the form of state update through the state machine.

Benefits of technology

The visibility and accessibility of cloud network resource states are realized, the visibility of cloud network resources taking effect at the underlying level is ensured, and the emergence of unknown states is prevented.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697013A_ABST
    Figure CN119697013A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource state determination method, system, device and product, and relates to the technical field of cloud networks. The method comprises the following steps: a resource life cycle management service receives a cloud network resource operation request initiated by a user, determines and forwards the cloud network resource operation request to a corresponding gateway controller based on an identifier of a cloud network resource; the gateway controller converts the cloud network resource operation request into cloud network resource configuration information and issues the cloud network resource configuration information to a corresponding gateway; the gateway performs cloud network resource configuration based on the cloud network resource configuration information to obtain a cloud network resource configuration result and returns the cloud network resource configuration result to the gateway controller; and based on the cloud network resource configuration result, the gateway controller sends the result to the resource life cycle management service in a state updating form through the state machine so as to display the result to the user. According to the resource state determination method provided by the embodiment of the invention, the visibility and accessibility of the cloud network resource state in the system are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of cloud network technology, and in particular, to a resource status determination method, system, device and product. Background Art

[0002] Cloud networking uses the cloud (a centralized third-party resource provider) to enable connectivity between network resources. Cloud networking acts as a gatekeeper for applications, and mastering this concept means that you can leverage the cloud for infrastructure, network management, network monitoring, and maintenance. In other words, you can design, configure, manage, and fine-tune network resources in the cloud to create simple and resilient networks.

[0003] With cloud networking, the network can be either cloud-enabled or fully cloud-based. In cloud-enabled networking, the network is on-premises, but some or all of the resources used to manage it are in the cloud. The core network infrastructure (packet forwarding, routing, and data) remains on-premises, but things like network management, monitoring, maintenance, and security services are done through the cloud. For example, using a SaaS-based firewall to protect an on-premises network. In cloud-based networking, the entire network is in the cloud, and this includes network management resources and physical hardware. Cloud-based networking is used to provide connectivity between applications and resources deployed in the cloud.

[0004] Among them, the visibility of the system (cloud) status refers to the degree to which the system status is communicated to the user. Ideally, the system should always let the user know what is happening through appropriate feedback within a reasonable time. However, due to the lack of implementation of resource status visibility in the current cloud network, it is unknown whether the cloud network resources have been created / configured at the bottom layer, and there is a problem that the status of the cloud network resources in the system cannot be confirmed. Therefore, how to determine the status of cloud network resources in the system is a problem to be solved by the present invention. Summary of the invention

[0005] The embodiments of the present invention provide a method, system, device and product for determining resource status, which ensure the visibility and accessibility of the cloud network resource status in the system by setting a state machine of the cloud network resources.

[0006] A first aspect of an embodiment of the present invention provides a method for determining a resource status, the method comprising:

[0007] The resource lifecycle management service receives a cloud network resource operation request initiated by a user, determines an identifier of a cloud network resource, and forwards the cloud network resource operation request to a corresponding gateway controller based on the identifier of the cloud network resource; the resource lifecycle management service is in communication connection with a plurality of gateway controllers;

[0008] The gateway controller converts the cloud network resource operation request into cloud network resource configuration information and sends it to the corresponding gateway; the gateway controller corresponds to the gateway one by one;

[0009] The gateway performs cloud network resource configuration based on the cloud network resource configuration information, obtains a cloud network resource configuration result and returns it to the gateway controller;

[0010] The gateway controller sends the cloud network resource configuration result to the resource lifecycle management service in the form of a status update through a state machine for display to the user.

[0011] A second aspect of an embodiment of the present invention provides a resource status determination system, the system is used to execute the resource status determination method provided by the first aspect of the embodiment of the present invention, the system includes: a resource lifecycle management service, a plurality of gateway controllers and a plurality of gateways, the resource lifecycle management service is communicatively connected with the plurality of gateway controllers, the gateway controllers correspond to the gateways one by one;

[0012] The resource lifecycle management service is used to receive a cloud network resource operation request initiated by a user, determine an identifier of a cloud network resource, and forward the cloud network resource operation request to a corresponding gateway controller based on the identifier of the cloud network resource;

[0013] The gateway controller is used to convert the cloud network resource operation request into cloud network resource configuration information and send it to the corresponding gateway;

[0014] The gateway is used to perform cloud network resource configuration based on the cloud network resource configuration information, obtain a cloud network resource configuration result and return it to the gateway controller;

[0015] The gateway controller is used to send the cloud network resource configuration result to the resource lifecycle management service in the form of a status update through a state machine for display to the user.

[0016] A third aspect of an embodiment of the present invention provides a resource status determination device, the device comprising:

[0017] a forwarding module, deployed in the resource lifecycle management service, for receiving a cloud network resource operation request initiated by a user, determining an identifier of a cloud network resource, and forwarding the cloud network resource operation request to a corresponding gateway controller based on the identifier of the cloud network resource; the resource lifecycle management service is in communication connection with a plurality of gateway controllers;

[0018] A conversion module, deployed in the gateway controller, for converting the cloud network resource operation request into cloud network resource configuration information and sending it to the corresponding gateway; the gateway controller corresponds to the gateway one by one;

[0019] A configuration module, deployed on the gateway, configured to perform cloud network resource configuration based on the cloud network resource configuration information, obtain a cloud network resource configuration result and return it to the gateway controller;

[0020] The state determination module is deployed in the gateway controller and is used to send the cloud network resource configuration result to the resource lifecycle management service in the form of a state update through a state machine for display to the user.

[0021] A fourth aspect of an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the computer program is executed by the processor, the method for determining the resource status of the first aspect of the embodiment of the present invention is implemented.

[0022] A fifth aspect of an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the resource status determination method of the first aspect of the embodiment of the present invention is implemented.

[0023] A sixth aspect of an embodiment of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the resource status determination method of the first aspect of the embodiment of the present invention.

[0024] In the resource state determination method provided in the embodiment of the present invention, the resource lifecycle management service receives the cloud network resource operation request initiated by the user, determines and forwards the cloud network resource operation request to the corresponding gateway controller based on the identification of the cloud network resource; the gateway controller converts the cloud network resource operation request into cloud network resource configuration information and sends it to the corresponding gateway; the gateway performs cloud network resource configuration based on the cloud network resource configuration information, obtains the cloud network resource configuration result and returns it to the gateway controller; the gateway controller then sends the cloud network resource configuration result to the resource lifecycle management service in the form of a state update through the state machine to display it to the user. In this way, this embodiment sets a state machine for cloud network resources in the gateway controller, and returns the cloud network resource configuration result returned by the gateway to the resource lifecycle management service in the form of a state update through the set state machine to display it to the user, thereby realizing the visibility of the cloud network resource state in the cloud, ensuring the visibility of the cloud network resource in the underlying effective state, and ensuring that each state is foreseeable and operable, and preventing the occurrence of unknown states. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0026] Figure 1 is a flow chart of a method for determining resource status according to an embodiment of the present invention;

[0027] Figure 2 It is a flow chart of an implementation of a method for determining a cloud network resource status proposed in an embodiment of the present invention;

[0028] Figure 3 is a schematic diagram of state migration in a state machine proposed in one embodiment of the present invention;

[0029] Figure 4 is an example diagram of a cloud network resource state change shown in an embodiment of the present invention;

[0030] Figure 5 is a structural block diagram of a resource status determination system provided by an embodiment of the present invention;

[0031] Figure 6 is a structural block diagram of a resource status determination device provided by an embodiment of the present invention;

[0032] Figure 7 It is a schematic diagram of an electronic device shown in an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0034] refer to Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for determining resource status according to an embodiment of the present invention. Figure 1 As shown, the resource status determination method of this embodiment may include the following steps:

[0035] Step S11: The resource lifecycle management service receives a cloud network resource operation request initiated by a user, determines the identifier of the cloud network resource, and forwards the cloud network resource operation request to a corresponding gateway controller based on the identifier of the cloud network resource; the resource lifecycle management service is in communication connection with multiple gateway controllers.

[0036] In this embodiment, a user may initiate a cloud network resource operation request to request related operations on cloud network resources. For example, the cloud network resource operation request may include at least any of the following: a cloud network resource creation request, a cloud network resource query request, a cloud network resource update request, a cloud network resource deletion request, etc. Among them, cloud network resources may include but are not limited to: a virtual router, a virtual private network (VPN), a virtual firewall, a data connection, a load balancer, a virtual bridge, a virtual adapter, etc.

[0037] The resource lifecycle management service is responsible for receiving cloud network resource operation requests initiated by users and forwarding them to the gateway controller. The resource lifecycle management service is connected to multiple gateway controllers, which correspond to gateways one by one, and each gateway corresponds to multiple cloud network resources.

[0038] Specifically, the resource lifecycle management service can determine the identifier of the cloud network resource based on the received cloud network resource operation request, and then determine the gateway corresponding to the cloud network resource based on the identifier of the cloud network resource, thereby forwarding the cloud network resource operation request to the gateway controller corresponding to the gateway corresponding to the cloud network resource.

[0039] In an optional implementation, when the resource lifecycle management service receives a cloud network resource creation request from a user, it will, based on the identifier of the cloud network resource to be created in the cloud network resource creation request, store the cloud network resource to be created in the database, so that the resource lifecycle management service can manage all created / existing cloud network resources and ensure the management and forwarding of subsequent cloud network resource query / update / deletion requests.

[0040] Step S12: The gateway controller converts the cloud network resource operation request into cloud network resource configuration information and sends it to the corresponding gateway; the gateway controller corresponds to the gateway one by one.

[0041] In this embodiment, the gateway controller is responsible for translating the cloud network resource operation request sent by the resource lifecycle management service into configuration information recognizable by the gateway and sending it to the corresponding gateway. Specifically, after receiving the cloud network resource operation request, the gateway controller can convert the cloud network resource operation request into cloud network resource configuration information recognizable by the gateway and send it to the corresponding gateway.

[0042] In an optional implementation, after receiving a cloud network resource operation request, the gateway controller may pull the cloud network resource details, determine the details of the cloud network resource corresponding to the cloud network resource operation request from the cloud network resource details, and convert the cloud network resource operation request into cloud network resource configuration information recognizable by the gateway based on the details of the cloud network resource and send it to the gateway. Among them, for the cloud network resources sent for the first time, that is, for the cloud network resources to be created, the gateway controller will wait for the cloud network resource configuration result returned by the creation and send it to the managed cloud network resource details.

[0043] Step S13: The gateway performs cloud network resource configuration based on the cloud network resource configuration information, obtains a cloud network resource configuration result and returns it to the gateway controller.

[0044] In this embodiment, the gateway is responsible for forwarding specific network traffic. After receiving the cloud network resource configuration information sent by the gateway controller, the gateway can determine the corresponding cloud network resource based on the identifier of the cloud network resource in the cloud network resource configuration information, and perform cloud network resource configuration of the corresponding cloud network resource based on the cloud network resource configuration information (for example, delete, create, update, query, etc.), and obtain the cloud network resource configuration result of the corresponding cloud network resource, and then return the cloud network resource configuration result to the gateway controller.

[0045] Step S14: The gateway controller sends the cloud network resource configuration result to the resource lifecycle management service in the form of a status update through a state machine for display to the user.

[0046] In this embodiment, a state machine for cloud network resources is provided in the gateway controller. The state machine is used to ensure the visibility of the effectiveness of cloud network resources at the bottom layer, and to ensure that each state is predictable and operational, so as to prevent the occurrence of unknown states. That is to say, this embodiment ensures the visibility and accessibility of the state of cloud network resources by setting up a state machine.

[0047] After receiving the cloud network resource configuration result returned by the gateway, the gateway controller can send the cloud network resource configuration result in the form of a status update to the resource lifecycle management service through the state machine based on the cloud network resource configuration result for display to the user.

[0048] In this embodiment, cloud network resource operation requests are converted, forwarded and responded to through the resource lifecycle management service, the gateway controller and the gateway, and the cloud network resource configuration results are sent to the resource lifecycle management service in the form of a status update through the state machine for display to the user. In this way, this embodiment sets a state machine for cloud network resources in the gateway controller, and returns the cloud network resource configuration results returned by the gateway to the resource lifecycle management service in the form of a status update through the set state machine for display to the user, thereby achieving visibility of the status of cloud network resources in the cloud, ensuring visibility of the effectiveness of cloud network resources at the bottom layer, and ensuring that each state is foreseeable and operational, preventing the occurrence of unknown states.

[0049] like Figure 2 As shown, Figure 2 1 is a flowchart of a method for determining the state of cloud network resources proposed in one embodiment of the present invention. Figure 2 In this example, we take the creation of cloud network resources as an example. The specific implementation process is as follows:

[0050] ① Resource lifecycle management services (such as API-server, including lifecycle management of VPC, ELB, etc.) receive cloud network resource creation requests from users, store the resources in the database, and notify the gateway controller.

[0051] ② The gateway controller pulls the cloud network resource details, translates the cloud network resource creation request into a configuration that the gateway can recognize, and sends it to the gateway. At this time, for the resources sent for the first time, the gateway controller waits for the gateway to return the result; in addition, in an optional embodiment, the gateway controller will regularly perform configuration checks on the gateway and collect the results.

[0052] ③ The gateway feeds back the configuration results of creating cloud network resources to the gateway controller through HTTP communication connection.

[0053] ④ The gateway controller sends the collected configuration information on the gateway to the resource lifecycle management service in the form of status updates for display to users.

[0054] In combination with the above embodiments, in one implementation, an embodiment of the present invention further provides a method for determining resource status. Specifically, in this embodiment, in addition to the above steps, step S21 is also included, and the above step S14 may specifically include steps S22 to S24:

[0055] Step S21: the gateway controller obtains the first state of the cloud network resources at the last moment.

[0056] In this embodiment, the gateway corresponds to multiple cloud network resources, and the gateway will regularly feedback the status of its corresponding cloud network resources to the gateway controller. After receiving the cloud network resource configuration result returned by the gateway, the gateway controller of this embodiment can obtain the first state of the cloud network resource at the last moment. The first state refers to the state of the cloud network resource at the last moment.

[0057] Step S22: The gateway controller determines the second state of the cloud network resources at the current moment based on the cloud network resource configuration result.

[0058] In this embodiment, the gateway controller may determine the second state of the cloud network resource at the current moment based on the cloud network resource configuration result returned by the gateway, wherein the second state refers to the state of the cloud network resource at the current moment.

[0059] Step S23: The gateway controller determines the state information of the cloud network resources through the state machine based on the first state and the second state.

[0060] In this embodiment, the state machine of the cloud network resource set in the gateway controller defines the resource state corresponding to the state transition relationship of the cloud network resource, ensuring that each state of the cloud network resource is reachable and can be accurately defined. The gateway controller can determine the state information of the cloud network resource through the state machine based on the first state and the second state of the cloud network resource.

[0061] Step S24: The gateway controller sends the status information of the cloud network resources to the resource lifecycle management service, and displays it to the user in the form of status update.

[0062] In this embodiment, after determining the status information of the cloud network resource, the gateway controller may send the status information of the cloud network resource to the resource lifecycle management service and display it to the user in the form of a status update.

[0063] In combination with the above embodiments, in one implementation, the present invention also provides a method for determining resource status. Specifically, in this method, the above step S23 may include steps S31 to S34:

[0064] Step S31: when the first state is an initial state and the second state is an effective state, the gateway controller determines through the state machine that the state information of the cloud network resource is: the cloud network resource is created and sent to the gateway successfully.

[0065] In this embodiment, the state machine is defined as follows: an initial state, an effective state, and an error state; wherein the initial state indicates that the cloud network resource is not effective at the bottom layer (indicating that the resource has not been issued, i.e., the resource has not been created), the effective state indicates that the cloud network resource is effective at the bottom layer, and the error state indicates that the state of the cloud network resource at the bottom layer is unknown, i.e., an error state.

[0066] When the gateway controller determines that the first state is the initial state and the second state is the effective state, the gateway controller can determine through the state machine that the state information of the cloud network resource is: the creation of the cloud network resource is successfully sent to the gateway, which means that the cloud network resource is successfully created.

[0067] Step S32: When the first state is a valid state and the second state is an error state, the gateway controller determines through the state machine that the state information of the cloud network resource is: updating / querying the cloud network resource on the gateway fails.

[0068] In this embodiment, when the gateway controller determines that the first state is a valid state and the second state is an error state, the gateway controller can determine through the state machine that the state information of the cloud network resource is: update / query of the cloud network resource on the gateway fails.

[0069] Step S33: When the first state is an error state and the second state is a valid state, the gateway controller determines through the state machine that the state information of the cloud network resource is: the update / query of the cloud network resource on the gateway is successful.

[0070] In this embodiment, when the gateway controller determines that the first state is an error state and the second state is a valid state, the gateway controller can determine through the state machine that the state information of the cloud network resource is: the cloud network resource is updated / queried successfully on the gateway.

[0071] Step S34: When the first state is a valid state and the second state is an initial state, or when the first state is an error state and the second state is an initial state, the gateway controller determines through the state machine that the state information of the cloud network resource is: the cloud network resource is successfully deleted on the gateway.

[0072] In this embodiment, when the gateway controller determines that the first state is the effective state and the second state is the initial state, the gateway controller can determine through the state machine that the state information of the cloud network resource is: the cloud network resource is successfully deleted on the gateway. When the gateway controller determines that the first state is the error state and the second state is the initial state, the gateway controller can determine through the state machine that the state information of the cloud network resource is: the cloud network resource is successfully deleted on the gateway.

[0073] like Figure 3 As shown, Figure 3 FIG. 1 is a schematic diagram of state transition in a state machine proposed in one embodiment of the present invention. Figure 2 In the description, each status is as follows:

[0074] DOWN: Initial state, indicating that the cloud network resources are not effective at the bottom layer.

[0075] UP: Indicates that cloud network resources are effective at the bottom layer.

[0076] ERROR: Indicates that the actual status of the cloud network resources at the bottom layer is unknown, which is an error.

[0077] Introduction to the transition between states:

[0078] DOWN→UP: The cloud network resource is created and sent to the gateway successfully (i.e. Figure 3 in create).

[0079] UP→ERROR: Failed to update / query cloud network resources on the gateway (i.e. Figure 3 in the error).

[0080] UP→DOWN: The cloud network resource is deleted successfully on the gateway (i.e. Figure 3 in the .

[0081] ERROR→UP: Update / query cloud network resources on the gateway successfully (i.e. Figure 3 in the update).

[0082] ERROR→DOWN: The cloud network resource was successfully deleted on the gateway (i.e. Figure 3 in the .

[0083] In one embodiment, the resource status determination method proposed in this embodiment can achieve elastic load balancing.

[0084] In combination with the above embodiment, in another implementation, the embodiment of the present invention further provides a method for determining resource status. Specifically, in this embodiment, in addition to the above steps, steps S41 to S44 may also be included:

[0085] Step S41: The gateway controller periodically obtains cloud network resource configuration result information from the corresponding gateway.

[0086] In this embodiment, the gateway controller periodically obtains cloud network resource configuration result information from its corresponding gateway, wherein the cloud network resource configuration result information includes configuration information of multiple cloud network resources corresponding to the gateway, and the configuration information represents the resource status of the cloud network resources.

[0087] Step S42: When the gateway controller determines that the received cloud network resource operation request is a cloud network resource query request, it determines whether the corresponding gateway is faulty.

[0088] In this embodiment, when the gateway controller determines that the received cloud network resource operation request is a cloud network resource query request, it may first determine that a gateway corresponding to the gateway controller performs fault detection to determine whether the gateway is faulty.

[0089] When the gateway controller determines that the corresponding gateway is not faulty, it can send the cloud network resource query request to the corresponding gateway to wait for the gateway to return the configuration information of the cloud network resource, and then determine the cloud network resource query result of the cloud network resource based on the configuration information at the previous moment and the configuration information returned by the gateway at the current moment through the state machine, and send it to the resource lifecycle management service for display to the user.

[0090] Step S43: When determining that the corresponding gateway fails, the gateway controller determines the cloud network resource query result through a state machine based on the cloud network resource query request and the regularly acquired cloud network resource configuration result information.

[0091] In this embodiment, when the gateway controller determines that the corresponding gateway has failed, it can determine the latest configuration information of the cloud network resources corresponding to the cloud network resource query request from the cloud network resource configuration result information based on the cloud network resource query request and the regularly obtained cloud network resource configuration result information, thereby determining the latest status of the cloud network resources corresponding to the cloud network resource query request; and then determine the cloud network resource query result of the cloud network resource through the state machine based on the configuration information at the previous moment (status information at the previous moment) and the latest configuration information of the cloud network resources obtained from the regularly obtained cloud network resource configuration results (the latest status of the cloud network resources).

[0092] Step S44: The gateway controller sends the cloud network resource query result to the resource lifecycle management service for display to the user.

[0093] In this embodiment, after obtaining the cloud network resource query result, the gateway controller may send the cloud network resource query result to the resource lifecycle management service for display to the user.

[0094] In this embodiment, the gateway controller can periodically obtain the configuration of cloud network resources from the gateway so that it can still query the cloud network resources and return the query results in time when the gateway fails, preventing the gateway from causing configuration failure and inability to present to users in a timely and accurate manner.

[0095] In combination with the above embodiment, in another implementation, the embodiment of the present invention further provides a method for determining resource status. In this embodiment, the above step S24 may include step S51 and step S52:

[0096] Step S51: the gateway controller aggregates the status information of the plurality of cloud network resources within the first time period to obtain a status aggregation result.

[0097] To prevent the problem of inaccurate status display caused by heavy load on resource lifecycle management services due to simultaneous reporting of multiple cloud network resources, the gateway controller in this embodiment can aggregate and uniformly report the status of multiple cloud network resources.

[0098] Specifically, the gateway controller aggregates the state information of multiple cloud network resources received within the first time to obtain a state aggregation result. The first time is the specified time for the gateway controller to aggregate the state information. For example, the first time can be 10 seconds, 1 minute, 2 minutes, etc. This embodiment does not impose any restrictions on the specific value of the first time. If the first time is 10 seconds, the gateway will aggregate the state information of multiple cloud network resources received within every 10 seconds to obtain a state aggregation result.

[0099] Step S52: the gateway controller sends the status aggregation results to the resource lifecycle management service to display them to the user.

[0100] In this embodiment, after obtaining the state combination result, the gateway controller may send the state aggregation result to the resource lifecycle management service to display it to the user.

[0101] like Figure 4 As shown, Figure 4 FIG. 1 is a diagram showing an example of a cloud network resource state change according to an embodiment of the present invention. Figure 4 In the example, the cloud network resource status changes as follows:

[0102] ① The user creates a cloud network resource request and creates a cloud network resource instance through the api-server (i.e., resource lifecycle management service).

[0103] ②The api-server notifies the gw-controller (gateway controller) of the user's cloud network resource creation message (i.e., the created resources).

[0104] ③gw-controller pulls the details of the cloud network resources, translates the cloud network resource creation message into a configuration recognizable by the GW (gateway), and sends it to the GW.

[0105] ④GW returns the request of gw-controller to create / update / delete / query cloud network resource configuration, and gw-controller periodically pulls the configuration status on GW.

[0106] ⑤gw-controller feeds back the configuration status on GW to api-server. Specifically, gw-controller aggregates the cloud network resource status and sends it to api-server for update.

[0107] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0108] Based on the same inventive concept, an embodiment of the present invention provides a resource status determination system. Figure 5 , Figure 5 FIG. 1 is a structural block diagram of a resource status determination system provided by an embodiment of the present invention. Figure 5 As shown, the resource state determination system is used to execute the resource state determination method as described in any of the above embodiments, and the resource state determination system includes: a resource lifecycle management service, multiple gateway controllers and multiple gateways, the resource lifecycle management service is communicatively connected with the multiple gateway controllers, and the gateway controllers correspond to the gateways one by one;

[0109] The resource lifecycle management service is used to receive a cloud network resource operation request initiated by a user, determine an identifier of a cloud network resource, and forward the cloud network resource operation request to a corresponding gateway controller based on the identifier of the cloud network resource;

[0110] The gateway controller is used to convert the cloud network resource operation request into cloud network resource configuration information and send it to the corresponding gateway;

[0111] The gateway is used to perform cloud network resource configuration based on the cloud network resource configuration information, obtain a cloud network resource configuration result and return it to the gateway controller;

[0112] The gateway controller is used to send the cloud network resource configuration result to the resource lifecycle management service in the form of a status update through a state machine for display to the user.

[0113] Optionally, the gateway controller is further used to obtain the first state of the cloud network resource at the last moment;

[0114] The gateway controller is specifically used for:

[0115] Based on the cloud network resource configuration result, determining a second state of the cloud network resource at a current moment;

[0116] Based on the first state and the second state, determining state information of the cloud network resource by the state machine;

[0117] The status information of the cloud network resources is sent to the resource lifecycle management service and displayed to the user in the form of status updates.

[0118] Optionally, the state machine defines: an initial state, an effective state, and an error state; the initial state indicates that the cloud network resource is not effective at the bottom layer, the effective state indicates that the cloud network resource is effective at the bottom layer, and the error state indicates that the cloud network resource is unknown at the bottom layer;

[0119] The gateway controller is specifically used for:

[0120] When the first state is an initial state and the second state is an effective state, the state information of the cloud network resource is determined by the state machine as follows: the cloud network resource is created and sent to the gateway successfully;

[0121] In a case where the first state is a valid state and the second state is an error state, determining the state information of the cloud network resource through the state machine is: updating / querying the cloud network resource on the gateway fails;

[0122] When the first state is an error state and the second state is a valid state, the state information of the cloud network resource is determined by the state machine as follows: the cloud network resource is updated / queried successfully on the gateway;

[0123] When the first state is a valid state and the second state is an initial state, or when the first state is an error state and the second state is an initial state, the state information of the cloud network resource is determined by the state machine as follows: the cloud network resource is successfully deleted on the gateway.

[0124] Optionally, the gateway controller is further used for:

[0125] Regularly obtain cloud network resource configuration result information from the corresponding gateway;

[0126] In the case where it is determined that the received cloud network resource operation request is a cloud network resource query request, determining whether the corresponding gateway is faulty;

[0127] In the case of determining that the corresponding gateway fails, determining the cloud network resource query result through the state machine based on the cloud network resource query request and the regularly acquired cloud network resource configuration result information;

[0128] The cloud network resource query result is sent to the resource lifecycle management service for display to the user.

[0129] Optionally, the gateway controller is specifically used to:

[0130] Aggregating the state information of the plurality of cloud network resources within the first time to obtain a state aggregation result;

[0131] The state aggregation results are uniformly sent to the resource lifecycle management service for display to the user.

[0132] Based on the same inventive concept, an embodiment of the present invention provides a resource status determination device. Figure 6 , Figure 6 FIG. 1 is a structural block diagram of a resource status determination device provided by an embodiment of the present invention. Figure 6 As shown, the device comprises:

[0133] a forwarding module, deployed in the resource lifecycle management service, for receiving a cloud network resource operation request initiated by a user, determining an identifier of a cloud network resource, and forwarding the cloud network resource operation request to a corresponding gateway controller based on the identifier of the cloud network resource; the resource lifecycle management service is in communication connection with a plurality of gateway controllers;

[0134] A conversion module, deployed in the gateway controller, for converting the cloud network resource operation request into cloud network resource configuration information and sending it to the corresponding gateway; the gateway controller corresponds to the gateway one by one;

[0135] A configuration module, deployed on the gateway, configured to perform cloud network resource configuration based on the cloud network resource configuration information, obtain a cloud network resource configuration result and return it to the gateway controller;

[0136] The state determination module is deployed in the gateway controller and is used to send the cloud network resource configuration result to the resource lifecycle management service in the form of a state update through a state machine for display to the user.

[0137] Optionally, the device further comprises:

[0138] A first state determination module, deployed in the gateway controller, for obtaining a first state of the cloud network resource at a previous moment;

[0139] The state determination module comprises:

[0140] A second state determination module, used to determine the second state of the cloud network resource at a current moment based on the cloud network resource configuration result;

[0141] a state information determination module, configured to determine the state information of the cloud network resource through the state machine based on the first state and the second state;

[0142] The status information sending module is used to send the status information of the cloud network resources to the resource lifecycle management service and display it to the user in the form of status update.

[0143] Optionally, the state machine defines: an initial state, an effective state, and an error state; the initial state indicates that the cloud network resource is not effective at the bottom layer, the effective state indicates that the cloud network resource is effective at the bottom layer, and the error state indicates that the cloud network resource is unknown at the bottom layer;

[0144] The state information determination module includes:

[0145] A first determining module is used to determine, through the state machine, when the first state is an initial state and the second state is a valid state, that the state information of the cloud network resource is: the creation of the cloud network resource is successful and sent to the gateway;

[0146] A second determination module is used to determine, through the state machine, when the first state is a valid state and the second state is an error state, that the state information of the cloud network resource is: failure to update / query the cloud network resource on the gateway;

[0147] A third determination module is used to determine, when the first state is an error state and the second state is a valid state, through the state machine to determine that the state information of the cloud network resource is: the cloud network resource is updated / queried successfully on the gateway;

[0148] The fourth determination module is used to determine, through the state machine, the status information of the cloud network resources as follows: the cloud network resources are successfully deleted on the gateway when the first state is a valid state and the second state is an initial state, or when the first state is an error state and the second state is an initial state.

[0149] Optionally, the device further comprises:

[0150] A periodic acquisition module, deployed in the gateway controller, for periodically acquiring cloud network resource configuration result information from the corresponding gateway;

[0151] A fault determination module, deployed in the gateway controller, for determining whether the corresponding gateway is faulty when determining that the received cloud network resource operation request is a cloud network resource query request;

[0152] A query result acquisition module, deployed in the gateway controller, for determining a cloud network resource query result through a state machine based on the cloud network resource query request and regularly acquired cloud network resource configuration result information when a corresponding gateway failure is determined;

[0153] The query result sending module is deployed in the gateway controller and is used to send the cloud network resource query result to the resource lifecycle management service for display to the user.

[0154] Optionally, the status information sending module includes:

[0155] A state aggregation module, used to aggregate state information of the plurality of cloud network resources within a first time to obtain a state aggregation result;

[0156] The state unified sending module is used to send the state aggregation results to the resource lifecycle management service in a unified manner to display them to the user.

[0157] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, such as Figure 7 shown. Figure 7 The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the resource status determination method described in any of the above embodiments of the present invention when executing the computer program.

[0158] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the resource status determination method described in any of the above embodiments of the present invention are implemented.

[0159] Based on the same inventive concept, another embodiment of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in the resource status determination method described in any of the above embodiments of the present invention.

[0160] As for the system and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0161] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0162] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, embodiments of the present invention may take the form of complete hardware embodiments, complete software embodiments, or embodiments combining software and hardware. Furthermore, embodiments of the present invention may take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0163] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0164] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0165] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0166] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0167] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0168] The above is a detailed introduction to a resource status determination method, system, device and product provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for determining resource status, characterized in that: The method comprises: The resource lifecycle management service receives a cloud network resource operation request initiated by a user, determines an identifier of a cloud network resource, and forwards the cloud network resource operation request to a corresponding gateway controller based on the identifier of the cloud network resource; the resource lifecycle management service is in communication connection with a plurality of gateway controllers; The gateway controller converts the cloud network resource operation request into cloud network resource configuration information and sends it to the corresponding gateway; the gateway controller corresponds to the gateway one by one; The gateway performs cloud network resource configuration based on the cloud network resource configuration information, obtains a cloud network resource configuration result and returns it to the gateway controller; The gateway controller sends the cloud network resource configuration result to the resource lifecycle management service in the form of a status update through a state machine for display to the user.

2. The method according to claim 1, characterized in that: The method further comprises: The gateway controller obtains the first state of the cloud network resource at the last moment; The gateway controller sends the cloud network resource configuration result to the resource lifecycle management service in the form of a state update through a state machine for display to the user, including: The gateway controller determines, based on the cloud network resource configuration result, a second state of the cloud network resource at a current moment; The gateway controller determines the state information of the cloud network resource through the state machine based on the first state and the second state; The gateway controller sends the status information of the cloud network resources to the resource lifecycle management service and displays it to the user in the form of status updates.

3. The method according to claim 2, characterized in that The state machine is defined as follows: an initial state, an effective state, and an error state; the initial state indicates that the cloud network resource is not effective at the bottom layer, the effective state indicates that the cloud network resource is effective at the bottom layer, and the error state indicates that the cloud network resource is unknown at the bottom layer; The gateway controller determines the state information of the cloud network resource through the state machine based on the first state and the second state, including: When the first state is an initial state and the second state is an effective state, the gateway controller determines through the state machine that the state information of the cloud network resource is: the cloud network resource is created and sent to the gateway successfully; In the case where the first state is a valid state and the second state is an error state, the gateway controller determines through the state machine that the state information of the cloud network resource is: updating / querying the cloud network resource on the gateway fails; When the first state is an error state and the second state is a valid state, the gateway controller determines through the state machine that the state information of the cloud network resource is: the cloud network resource is updated / queried successfully on the gateway; When the first state is a valid state and the second state is an initial state, or when the first state is an error state and the second state is an initial state, the gateway controller determines through the state machine that the state information of the cloud network resource is: the cloud network resource is successfully deleted on the gateway.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The gateway controller periodically obtains cloud network resource configuration result information from the corresponding gateway; The gateway controller determines whether the corresponding gateway is faulty when determining that the received cloud network resource operation request is a cloud network resource query request; The gateway controller determines the cloud network resource query result through a state machine based on the cloud network resource query request and the regularly acquired cloud network resource configuration result information when determining that the corresponding gateway fails; The gateway controller sends the cloud network resource query result to the resource lifecycle management service for display to the user.

5. The method according to claim 2 or 3, characterized in that: The gateway controller sends the status information of the cloud network resources to the resource lifecycle management service and displays it to the user in the form of status updates, including: The gateway controller aggregates the state information of the plurality of cloud network resources within the first time to obtain a state aggregation result; The gateway controller sends the status aggregation results to the resource lifecycle management service for display to the user.

6. A resource status determination system, characterized in that: The system is used to execute the resource status determination method according to any one of claims 1 to 5, the system comprising: a resource lifecycle management service, a plurality of gateway controllers and a plurality of gateways, the resource lifecycle management service is communicatively connected with the plurality of gateway controllers, and the gateway controllers correspond to the gateways one by one; The resource lifecycle management service is used to receive a cloud network resource operation request initiated by a user, determine an identifier of a cloud network resource, and forward the cloud network resource operation request to a corresponding gateway controller based on the identifier of the cloud network resource; The gateway controller is used to convert the cloud network resource operation request into cloud network resource configuration information and send it to the corresponding gateway; The gateway is used to perform cloud network resource configuration based on the cloud network resource configuration information, obtain a cloud network resource configuration result and return it to the gateway controller; The gateway controller is used to send the cloud network resource configuration result to the resource lifecycle management service in the form of a status update through a state machine for display to the user.

7. A resource status determination device, characterized in that: The device comprises: a forwarding module, deployed in the resource lifecycle management service, for receiving a cloud network resource operation request initiated by a user, determining an identifier of a cloud network resource, and forwarding the cloud network resource operation request to a corresponding gateway controller based on the identifier of the cloud network resource; the resource lifecycle management service is in communication connection with a plurality of gateway controllers; A conversion module, deployed in the gateway controller, for converting the cloud network resource operation request into cloud network resource configuration information and sending it to the corresponding gateway; the gateway controller corresponds to the gateway one by one; A configuration module, deployed on the gateway, configured to perform cloud network resource configuration based on the cloud network resource configuration information, obtain a cloud network resource configuration result and return it to the gateway controller; The state determination module is deployed in the gateway controller and is used to send the cloud network resource configuration result to the resource lifecycle management service in the form of a state update through a state machine for display to the user.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the computer program is executed by the processor, the method for determining the resource status according to any one of claims 1 to 5 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining the resource status according to any one of claims 1 to 5 is implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the resource status determination method described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Resource operation method and device and storage medium

    CN114138598A

  • Method and device for acquiring network resources and related products

    CN115250185A

  • Containerized network system, containerized IPV6 communication method and device, medium and equipment

    CN115550316A

  • Display method of state information and interaction method and device based on state information

    CN116527618A

  • Service processing method based on cloud native gateway, related device and storage medium

    CN117834737A