CN112910995A - Resource allocation method and device based on multi-cloud environment, electronic equipment and medium - Google Patents

Resource allocation method and device based on multi-cloud environment, electronic equipment and medium Download PDF

Info

Publication number
CN112910995A
CN112910995A CN202110130426.9A CN202110130426A CN112910995A CN 112910995 A CN112910995 A CN 112910995A CN 202110130426 A CN202110130426 A CN 202110130426A CN 112910995 A CN112910995 A CN 112910995A
Authority
CN
China
Prior art keywords
cloud environment
resource
target application
application request
environment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110130426.9A
Other languages
Chinese (zh)
Other versions
CN112910995B (en
Inventor
王文超
黄国仲
杨江波
夏曙东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing China Transinfo Stock Co ltd
Original Assignee
Beijing China Transinfo Stock Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing China Transinfo Stock Co ltd filed Critical Beijing China Transinfo Stock Co ltd
Priority to CN202110130426.9A priority Critical patent/CN112910995B/en
Publication of CN112910995A publication Critical patent/CN112910995A/en
Application granted granted Critical
Publication of CN112910995B publication Critical patent/CN112910995B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a resource allocation method and device based on a multi-cloud environment, electronic equipment and media. In the application, a network resource request generated by a target application can be obtained, wherein the network resource request comprises a URL (uniform resource locator) identifier of the target application; analyzing the URL identification, and determining a first cloud environment where the target application is located; and if the first cloud environment where the target application is located is determined to be not in the same cloud environment as the public cloud gateway, forwarding the network resource request to the first cloud environment. By applying the technical scheme of the application, the complexity of request forwarding can be solved by identifying the URL of the target application; the security of the application can be ensured through the flow forwarding of the gateway, and the resource service cannot be directly exposed to the public network, so that the request without login or without permission to access can be completely intercepted by the gateway.

Description

Resource allocation method and device based on multi-cloud environment, electronic equipment and medium
Technical Field
The present application relates to data processing technologies, and in particular, to a method and an apparatus for resource allocation based on a cloud environment, an electronic device, and a medium.
Background
The application deployment under the multi-cloud environment relates to data synchronization among a plurality of cloud environments, and the data synchronization rule is complex and has a large number of uncertain factors. In the related art, when a resource forwarding instruction is received, a public cloud directly forwards traffic to a cloud environment corresponding to the instruction.
However, the public cloud gateway in the related art can only forward traffic in a single cloud environment, and is not suitable for forwarding traffic in a multi-cloud environment. Therefore, when a certain cloud environment fails, other cloud environments are usually affected, and the safety and reliability of the system are greatly reduced
Disclosure of Invention
The embodiment of the application provides a method, an apparatus, an electronic device and a medium for resource allocation based on a multi-cloud environment, wherein according to an aspect of the embodiment of the application, the provided method for resource allocation based on a multi-cloud environment is characterized in that, when applied to a public cloud, the method comprises the following steps:
acquiring a target application request, wherein the target application request comprises a URL (uniform resource locator) identifier;
analyzing the URL identification, and determining a first cloud environment where a resource corresponding to the target application request is located;
judging whether a first cloud environment where the resource corresponding to the target application request is located and a public cloud environment where the public cloud gateway is located belong to the same cloud environment;
and if the first cloud environment where the resource corresponding to the target application request is located and the public cloud environment where the public cloud gateway is located are determined not to belong to the same cloud environment, forwarding the target application request to the first cloud environment.
Optionally, in another embodiment based on the foregoing method of the present application, the parsing the URL identifier and determining the first cloud environment where the resource corresponding to the target application request is located includes:
determining a resource configuration corresponding to the target application request according to the URL identification of the target application request, wherein the resource configuration comprises the resource path, cloud environment information of the resource, authority configuration information of the resource and the target application to which the resource belongs, and the resource configuration is uniquely marked by an environment label;
and acquiring an environment tag in the resource configuration information, and determining a first cloud environment where the resource corresponding to the target application request is located based on the environment tag.
Optionally, in another embodiment based on the foregoing method of the present application, after determining the first cloud environment in which the resource corresponding to the target application request is located, the method further includes:
determining a gateway address of the first cloud environment based on the acquired environment tag in the resource configuration information;
forwarding the target application request to the gateway address.
Optionally, in another embodiment based on the foregoing method of the present application, after the parsing the URL identifier and determining the first cloud environment where the resource corresponding to the target application request is located, the method further includes:
and if the first cloud environment and the public cloud environment where the public cloud gateway is located belong to the same cloud environment, calling a service processing module to process the target application request.
Optionally, in another embodiment based on the foregoing method of the present application, after the obtaining the target application request, the method further includes:
detecting whether resource configuration information corresponding to the target application request exists in a historical resource allocation list;
and if the resource does not exist, analyzing the URL identification of the target application request, and determining the first cloud environment where the resource corresponding to the target application request is located.
Optionally, in another embodiment based on the foregoing method of the present application, when there is an update to the write data in the first cloud environment, the data synchronization component automatically synchronizes the updated write data to the public cloud environment;
or the like, or, alternatively,
when the write data in the public cloud environment is updated, the data synchronization component automatically synchronizes the updated write data to the first cloud environment corresponding to the updated write data.
Optionally, in another embodiment based on the foregoing method of the present application, the resource registration module is called in advance to be responsible for registering each cloud environment resource and identifying the cloud environment where the resource is located, where the information of the resource registration may include but is not limited to: the method comprises the steps of resource path, cloud environment information of the resource, authority configuration information of the resource and target application of the resource.
Optionally, in another embodiment based on the foregoing method of the present application, before determining the first cloud environment in which the resource corresponding to the target application request is located, the method further includes:
user permission verification, wherein the user information contained in the obtained target application request is matched with permission configuration information in resource configuration information corresponding to the target application request;
if the matching is successful, judging that the user sending the target application request is a legal user;
and if the matching fails, judging that the user sending the target application request is an illegal user.
According to another aspect of the embodiments of the present application, there is provided an apparatus for resource allocation based on a multi-cloud environment, which is applied to a public cloud, including:
an acquisition module configured to acquire a target application request, the target application request including a URL identification;
the analysis module is configured to analyze the URL identification and determine a first cloud environment where a resource corresponding to the target application request is located;
the judging module is configured to judge whether a first cloud environment where the resource corresponding to the target application request is located and a public cloud environment where the public cloud gateway is located belong to the same cloud environment;
the sending module is configured to forward the target application request to a first cloud environment if it is determined that the first cloud environment where the resource corresponding to the target application request is located and the public cloud environment where the public cloud gateway is located do not belong to the same cloud environment.
According to another aspect of the embodiments of the present application, there is provided an electronic device including:
a memory for storing executable instructions; and
a display for display with the memory to execute the executable instructions to perform the operations of any of the above-described methods of resource allocation based on a multi-cloud environment.
According to a further aspect of the embodiments of the present application, there is provided a computer-readable storage medium for storing computer-readable instructions, which when executed, perform the operations of any one of the above methods for resource allocation based on a cloud environment.
In the application, a network resource request generated by a target application can be obtained, wherein the network resource request comprises a URL (uniform resource locator) identifier of the target application; analyzing the URL identification, and determining a first cloud environment where the target application is located; and if the first cloud environment where the target application is located is determined to be not in the same cloud environment as the public cloud gateway, forwarding the network resource request to the first cloud environment. By applying the technical scheme of the application, the complexity of request forwarding can be solved by identifying the URL of the target application; the security of the application can be ensured through the flow forwarding of the gateway, and the resource service cannot be directly exposed to the public network, so that the request without login or without permission to access can be completely intercepted by the gateway.
The technical solution of the present application is further described in detail by the accompanying drawings and examples.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description, serve to explain the principles of the application.
The present application may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
fig. 1 is a schematic diagram of a resource allocation method based on a cloud environment according to the present application;
fig. 2 is an exemplary diagram of a public cloud gateway multi-cloud traffic forwarding service request proposed in the present application;
fig. 3 is a schematic structural diagram of an electronic device for resource allocation based on a cloud environment according to the data of the present application;
fig. 4 is a schematic structural diagram of an electronic device for resource allocation based on a multi-cloud environment according to the present application.
Detailed Description
Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
In addition, technical solutions between the various embodiments of the present application may be combined with each other, but it must be based on the realization of the technical solutions by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination of technical solutions should be considered to be absent and not within the protection scope of the present application.
It should be noted that all the directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present application are only used to explain the relative positional relationship between the components, the movement situation, etc. in a certain posture (as shown in the drawings), and if the certain posture is changed, the directional indication is changed accordingly.
A method for resource allocation based on a cloud environment according to an exemplary embodiment of the present application is described below in conjunction with fig. 1-2. It should be noted that the following application scenarios are merely illustrated for the convenience of understanding the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
The application also provides a resource allocation method and device based on the multi-cloud environment, a target terminal and a medium.
Fig. 1 schematically shows a flowchart of a method for resource allocation based on a multi-cloud environment according to an embodiment of the present application. As shown in fig. 1, the method is applied to a public cloud, and includes:
s101, a target application request is obtained, and the target application request comprises a URL identification.
Further, as shown in fig. 2, since application deployment in a multi-cloud environment involves data synchronization between multiple cloud environments, and a data synchronization rule is complex and has a large number of uncertain factors, the complexity and uncertainty of data bidirectional synchronization can be solved by using an application gateway multi-cloud traffic forwarding scheme, and it can be ensured that a single cloud environment does not affect other cloud environments when a fault occurs. The safety and the reliability of the system are improved. Therefore, the present application may correspondingly add a URL (Uniform Resource Locator) identifier of each target application to the network Resource request generated by the target application. So that the subsequent public cloud gateway can decide whether to send the request to the corresponding cloud environment according to the identification.
The URL is a relatively uniform format with parameters pointing to an address. According to the embodiment of the application, the cloud environment corresponding to the network resource request can be determined through the URL identification.
In addition, it should be noted that the present application is not specifically limited to a target application, that is, the target application may be any application system with a service capability in a cloud environment.
S102, the URL identification is analyzed, and a first cloud environment where the resource corresponding to the target application request is located is determined.
Furthermore, the resource registration module can be called in advance to be responsible for registering of each cloud environment resource and identifying the cloud environment where the resource is located. The resource registration information may include, but is not limited to: the method comprises the following steps of (1) a path of a resource, cloud environment information of the resource, authority configuration information of the resource, an application to which the resource belongs and the like, wherein the resource configuration is uniquely marked by an environment tag; and acquiring an environment tag in the resource configuration information, and determining a first cloud environment where the resource corresponding to the target application request is located based on the environment tag.
Furthermore, the gateway routing module in the public cloud gateway can be called to analyze the URL identification, and the first cloud environment where the target application is located is determined. Therefore, after the application request is obtained, the corresponding resource configuration is obtained according to the URL of the application request, forwarding is carried out according to the environment tag of the resource, if the cloud environment configuration of the environment tag of the resource is not in the same environment as the current cloud environment, forwarding is carried out according to the gateway configuration of the target cloud environment corresponding to the environment tag of the resource, and otherwise, forwarding is directly carried out to the corresponding service.
The method for determining the first cloud environment of the target application according to the URL identifier is not specifically limited, for example, the corresponding first cloud environment may be determined for acquiring the corresponding resource configuration according to the URL, or the corresponding first cloud environment may be determined according to a preset configuration list.
S103, judging whether the first cloud environment where the resource corresponding to the target application request is located and the public cloud environment where the public cloud gateway is located belong to the same cloud environment
And S104, if the first cloud environment where the resource corresponding to the target application request is located and the public cloud environment where the public cloud gateway is located are determined not to belong to the same cloud environment, forwarding the target application request to the first cloud environment.
The method and the device aim to solve the problem that when a single cloud environment breaks down, other cloud environments are affected, and therefore the safety and the reliability of the system are reduced. In an embodiment of the present application, a certain redundancy may be set for a resource, for example, a resource responding to the same target application request is placed in different cloud environments, and a resource corresponding to each target application request is allocated by a load balancing algorithm, so that when a certain cloud environment or a resource therein fails, the target application request is forwarded to a cloud environment that does not fail.
The Load balancing algorithm can be realized by using a Load Balance LB (Load Balance LB), and specifically, the Load balancer can distribute tasks to a plurality of operation units, so that each operation unit respectively executes respective subtasks to realize that a work task is jointly completed. And further, the purposes of expanding the bandwidth of network equipment and a server, increasing the throughput, strengthening the network data processing capacity and improving the flexibility and the usability of the network can be achieved.
In addition, the data synchronization module can be called to synchronize the data in the multi-cloud environment. In particular, data written to the cloud environment may be synchronized to clusters of other cloud environments by a synchronization component. In one mode, the data synchronization module can synchronize data in a MySQL database and data in a Redis cache, a synchronization component adopted by MySQL is DataX which is suitable for data synchronization in a plurality of MySQL cluster environments, and the DataX is a heterogeneous data source offline synchronization tool and aims to realize stable and efficient data synchronization functions among various heterogeneous data sources including a relational database (MySQL, Oracle and the like), HDFS, Hive, ODPS, HBase, FTP and the like; the method comprises the following steps that a Redis-shake is used by a Redis synchronization component, and the basic principle of the Redis-shake is to simulate a slave node to join a source Redis cluster, firstly, full pulling and playback are carried out, and then incremental pulling (through a psync command) is carried out to carry out Redis data synchronization; the data synchronized by the synchronization module is mainly data change in a single cloud environment in a multi-cloud environment, and is synchronized to a storage system (such as mysql Redis) in other cloud environments.
In the application, a network resource request generated by a target application can be obtained, wherein the network resource request comprises a URL (uniform resource locator) identifier of the target application; analyzing the URL identification, and determining a first cloud environment where the target application is located; and if the first cloud environment where the target application is located is determined to be not in the same cloud environment as the public cloud gateway, forwarding the network resource request to the first cloud environment. By applying the technical scheme of the application, the complexity of request forwarding can be solved by identifying the URL of the target application; the security of the application can be ensured through the flow forwarding of the gateway, and the resource service cannot be directly exposed to the public network, so that the request without login or without permission to access can be completely intercepted by the gateway.
Optionally, in another embodiment based on the foregoing method of the present application, parsing the URL identifier to determine the first cloud environment where the resource corresponding to the target application request is located includes:
determining resource configuration corresponding to the target application request according to the URL identification of the target application request, wherein the resource configuration comprises the resource path, cloud environment information of the resource, authority configuration information of the resource, the target application of the resource, and the resource configuration is uniquely marked by an environment label;
and acquiring an environment tag in the resource configuration information, and determining a first cloud environment where the resource corresponding to the target application request is located based on the environment tag.
Further, the method and the device can invoke a gateway routing module in the public cloud gateway to analyze the URL identification, and determine the first cloud environment where the target application is located. Therefore, after the application request is obtained, the corresponding resource configuration is obtained according to the URL of the application request, forwarding is carried out according to the environment tag of the resource, if the cloud environment configuration of the environment tag of the resource is not in the same environment as the current cloud environment, forwarding is carried out according to the gateway configuration of the target cloud environment corresponding to the environment tag of the resource, and otherwise, forwarding is directly carried out to the corresponding service.
Optionally, in another embodiment based on the foregoing method of the present application, after determining the first cloud environment in which the resource corresponding to the target application request is located, the method further includes:
determining a gateway address of the first cloud environment based on the environment tag in the acquired resource configuration information;
and forwarding the target application request to a gateway address corresponding to the first cloud environment.
Optionally, in another embodiment of the method according to the present application, after parsing the URL identifier and determining the first cloud environment where the resource corresponding to the target application request is located, the method further includes:
and if the first cloud environment and the public cloud environment where the public cloud gateway is located belong to the same cloud environment, calling the service processing module to process the target application request.
Further, in the application, a resource path of a network resource request generated by a target application is acquired at a public cloud gateway, the current resource path refers to a URL (uniform resource locator) identifier of the request, and further configuration information of the resource, including a cloud environment where the resource is located, can be determined through the request path. Furthermore, the public cloud gateway can judge whether the write request cloud environment of the resource is consistent with the deployment environment of the application, the request for the resource can cause data change, and whether the cloud environment deployed by the application is in the same cloud environment. It can be understood that if the requests are consistent, the relevant service is called to process the corresponding request, and if the requests are not consistent, the requests can be directly forwarded to the gateway of the corresponding cloud environment according to the configuration of the target cloud environment.
Optionally, in another embodiment of the method according to the present application, after parsing the URL identifier and determining the first cloud environment where the resource corresponding to the target application request is located, the method further includes:
and if the first cloud environment and the public cloud environment where the public cloud gateway is located belong to the same cloud environment, calling the service processing module to process the target application request.
Optionally, in another embodiment based on the foregoing method of the present application, after obtaining the target application request, the method further includes:
detecting whether resource configuration information corresponding to the target application request exists in a historical resource allocation list;
and if the resource does not exist, analyzing the URL identification of the target application request, and determining the first cloud environment where the resource corresponding to the target application request is located.
Optionally, in another embodiment based on the foregoing method of the present application, when the write data in the first cloud environment is updated, the data synchronization component automatically synchronizes the updated write data to the public cloud environment;
or the like, or, alternatively,
when the write data in the public cloud environment is updated, the data synchronization component automatically synchronizes the updated write data to the first cloud environment corresponding to the updated write data.
Optionally, in another embodiment based on the foregoing method of the present application, the resource registration module is called in advance to register each cloud environment resource and identify the cloud environment where the resource is located.
The resource registration information of the public cloud environment may include a path of the resource, cloud environment information where the resource is located, authority configuration information of the resource, and the like.
In addition, the resource registration information of the private cloud environment may include a path of the resource, cloud environment information where the resource is located, a target application to which the resource belongs, and the like.
Optionally, in another embodiment based on the foregoing method of the present application, before determining the first cloud environment in which the target application requests the corresponding resource, the method further includes:
user authority verification, wherein the user information contained in the obtained target application request is matched with authority configuration information in the resource configuration information corresponding to the target application request;
if the matching is successful, judging that the user sending the target application request is a legal user;
and if the matching fails, judging that the user sending the target application request is an illegal user.
Further, for a certain application program, after the cloud environment detection is performed on the certain application program in the historical period, the problem of system resource consumption caused by repeated cloud environment detection on the same application program is avoided. According to the method and the device, after the network resource request generated by the target application is obtained, the URL identification corresponding to the application is not analyzed at the first time, and whether the resource request generated by the target application exists or not is detected in the historical resource allocation list.
It can be understood that, when the resource request generated by the target application is detected in the historical resource allocation list, it may be determined that the target application has already performed detection on the cloud environment where the target application is located in the historical period, and then the resource request received this time may be directly processed according to the cloud environment where the application is located, which is described in the historical resource allocation list. When the target application is in the first cloud environment, the first cloud environment is different from the public cloud gateway, and the network resource request is forwarded to the first cloud environment. Or when the first cloud environment where the target application is located and the public cloud gateway are in the same cloud environment, forwarding the network resource request to the corresponding service processing.
Further, only when the resource request generated by the target application is not detected in the historical resource allocation list, the URL identification of the target application is analyzed, and the first cloud environment where the target application is located is determined, so that whether the network resource request received this time is forwarded to the first cloud environment is determined subsequently.
Further, the data synchronization module can be called to synchronize the data in the multi-cloud environment. In particular, data written to the cloud environment may be synchronized to clusters of other cloud environments by a synchronization component.
In one mode, the data synchronization module of the present application may automatically synchronize updated write data to a corresponding common cloud environment when it is detected that the write data in the first cloud environment is updated. Specifically, the data synchronization module may synchronize data in a mysql database and data in a Redis cache in the cloud environment. For MySQL, the adopted synchronization component is DataX, which is suitable for data synchronization in a plurality of MySQL cluster environments, and the DataX is a heterogeneous data source offline synchronization tool and aims to realize stable and efficient data synchronization functions among various heterogeneous data sources including relational databases (MySQL, Oracle and the like), HDFS, Hive, ODPS, HBase, FTP and the like.
In another mode, the data synchronization module of the present application may also be configured to, when it is detected that the write data in the public cloud environment is updated, automatically synchronize the updated write data to the corresponding private cloud environment. Specifically, the data synchronization module may synchronize data in a mysql database and data in a Redis cache in the cloud environment. For Redis, the principle that a synchronization component can be used is Redis-share, the Redis-share is based on the principle that a slave node is simulated to join a source Redis cluster, full pulling and playback are firstly carried out, then incremental pulling (through a psync command) is carried out to carry out Redis data synchronization, and data mainly synchronized by a data synchronization module is data change in a single cloud environment under a multi-cloud environment and is synchronized to a storage system (such as mysql or Redis) in other cloud environments.
Optionally, in another embodiment based on the foregoing method of the present application, after the data synchronization component automatically synchronizes updated write data to the public cloud environment, the method may further include: generating a log record based on the updated write data, and writing the log record into an operation log library corresponding to the cloud environment; and when the synchronization instruction is received, forwarding the log record to an operation log library in which the member environment corresponding to the synchronization instruction is positioned.
Note that the log record in this application is a kind of write data. In addition, in the embodiment of the application, only when the synchronization instruction is received, the system forwards the log record to the operation log library in which the meta environment corresponding to the synchronization instruction is located.
In the application, a network resource request generated by a target application can be obtained, wherein the network resource request comprises a URL (uniform resource locator) identifier of the target application; analyzing the URL identification, and determining a first cloud environment where the target application is located; and if the first cloud environment where the target application is located is determined to be not in the same cloud environment as the public cloud gateway, forwarding the network resource request to the first cloud environment. By applying the technical scheme of the application, the complexity of request forwarding can be solved by identifying the URL of the target application; by introducing a data synchronization component of three parties, developers are more concentrated on services without considering complex synchronization rules of data; the flow forwarding through the gateway can well ensure the safety of the application, the resource service cannot be directly exposed to the public network, and the request without login or without permission to access can be completely intercepted by the gateway.
In another embodiment of the present application, as shown in fig. 3, the present application further provides an apparatus for resource allocation based on a multi-cloud environment. The cloud computing system comprises an acquisition module 201, an analysis module 202 and a sending module 203, and is applied to public clouds,
an acquisition module configured to acquire a target application request, the target application request including a URL identification;
the analysis module is configured to analyze the URL identification and determine a first cloud environment where a resource corresponding to the target application request is located;
the judging module is configured to judge whether a first cloud environment where the resource corresponding to the target application request is located and a public cloud environment where the public cloud gateway is located belong to the same cloud environment;
the sending module is configured to forward the target application request to a first cloud environment if it is determined that the first cloud environment where the resource corresponding to the target application request is located and the public cloud environment where the public cloud gateway is located do not belong to the same cloud environment.
In the application, a network resource request generated by a target application can be obtained, wherein the network resource request comprises a URL (uniform resource locator) identifier of the target application; analyzing the URL identification, and determining a first cloud environment where the target application is located; and if the first cloud environment where the target application is located is determined to be not in the same cloud environment as the public cloud gateway, forwarding the network resource request to the first cloud environment. By applying the technical scheme of the application, the complexity of request forwarding can be solved by identifying the URL of the target application; the security of the application can be ensured through the flow forwarding of the gateway, and the resource service cannot be directly exposed to the public network, so that the request without login or without permission to access can be completely intercepted by the gateway.
In another embodiment of the present application, the obtaining module 201 further includes:
an obtaining module 201, configured to determine, according to the URL identifier of the target application request, a resource configuration corresponding to the target application request, where the resource configuration includes the resource path, cloud environment information where the resource is located, authority configuration information of the resource, and a target application to which the resource belongs, and the resource configuration is uniquely marked by an environment tag;
the obtaining module 201 is configured to obtain the environment tag in the resource configuration information, and determine, based on the environment tag, a first cloud environment where the resource corresponding to the target application request is located.
In another embodiment of the present application, the obtaining module 201 further includes:
an obtaining module 201 configured to determine a gateway address of the first cloud environment based on the obtained environment tag in the resource configuration information;
an obtaining module 201 configured to forward the target application request to the gateway address.
In another embodiment of the present application, the obtaining module 201 further includes:
the obtaining module 201 is configured to, if it is determined that the first cloud environment and the public cloud environment where the public cloud gateway is located belong to the same cloud environment, call a service processing module to process the target application request.
In another embodiment of the present application, the obtaining module 201 further includes:
an obtaining module 201 configured to detect whether resource configuration information corresponding to the target application request exists in a historical resource allocation list;
the obtaining module 201 is configured to, if not, analyze the URL identifier of the target application request, and determine a first cloud environment where a resource corresponding to the target application request is located.
In another embodiment of the present application, the obtaining module 201 further includes:
an obtaining module 201, configured to, when there is an update to the write data in the first cloud environment, automatically synchronize the updated write data to the public cloud environment by a data synchronization component;
or the like, or, alternatively,
the obtaining module 201 is configured to, when there is an update to the write data in the public cloud environment, automatically synchronize the updated write data to the first cloud environment corresponding to the update by the data synchronization component.
Optionally, in another embodiment based on the foregoing method of the present application, the resource registration module is called in advance to be responsible for registering each cloud environment resource and identifying the cloud environment where the resource is located, where the information of the resource registration may include but is not limited to: the method comprises the steps of resource path, cloud environment information of the resource, authority configuration information of the resource and target application of the resource.
In another embodiment of the present application, the obtaining module 201 further includes:
the obtaining module 201 is configured to verify a user right, and match user information included in the obtained target application request with right configuration information in resource configuration information corresponding to the target application request;
an obtaining module 201, configured to determine that a user sending the target application request is a valid user if matching is successful;
the obtaining module 201 is configured to determine that the user sending the target application request is an illegal user if the matching fails.
Fig. 4 is a block diagram illustrating a logical structure of an electronic device in accordance with an exemplary embodiment. For example, the electronic device 300 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium, such as a memory, including instructions executable by an electronic device processor to perform the method for multi-cloud environment based resource allocation described above, the method comprising: acquiring a target application request, wherein the target application request comprises a URL (uniform resource locator) identifier; analyzing the URL identification, and determining a first cloud environment where a resource corresponding to the target application request is located; judging whether a first cloud environment where the resource corresponding to the target application request is located and a public cloud environment where the public cloud gateway is located belong to the same cloud environment; and if the first cloud environment where the resource corresponding to the target application request is located and the public cloud environment where the public cloud gateway is located are determined not to belong to the same cloud environment, forwarding the target application request to the first cloud environment. Optionally, the instructions may also be executable by a processor of the electronic device to perform other steps involved in the exemplary embodiments described above. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided an application/computer program product including one or more instructions executable by a processor of an electronic device to perform the above method for resource allocation based on a multi-cloud environment, the method comprising: acquiring a target application request, wherein the target application request comprises a URL (uniform resource locator) identifier; analyzing the URL identification, and determining a first cloud environment where a resource corresponding to the target application request is located; judging whether a first cloud environment where the resource corresponding to the target application request is located and a public cloud environment where the public cloud gateway is located belong to the same cloud environment; and if the first cloud environment where the resource corresponding to the target application request is located and the public cloud environment where the public cloud gateway is located are determined not to belong to the same cloud environment, forwarding the target application request to the first cloud environment. Optionally, the instructions may also be executable by a processor of the electronic device to perform other steps involved in the exemplary embodiments described above.
Fig. 4 is an exemplary diagram of the computer device 30. Those skilled in the art will appreciate that the schematic diagram 4 is merely an example of the computer device 30 and does not constitute a limitation of the computer device 30 and may include more or less components than those shown, or combine certain components, or different components, e.g., the computer device 30 may also include input output devices, network access devices, buses, etc.
The Processor 302 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor 302 may be any conventional processor or the like, the processor 302 being the control center for the computer device 30 and connecting the various parts of the overall computer device 30 using various interfaces and lines.
Memory 301 may be used to store computer readable instructions 303 and processor 302 may implement various functions of computer device 30 by executing or executing computer readable instructions or modules stored within memory 301 and by invoking data stored within memory 301. The memory 301 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the computer device 30, and the like. In addition, the Memory 301 may include a hard disk, a Memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Memory Card (Flash Card), at least one disk storage device, a Flash Memory device, a Read-Only Memory (ROM), a Random Access Memory (RAM), or other non-volatile/volatile storage devices.
The modules integrated by the computer device 30 may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by hardware related to computer readable instructions, which may be stored in a computer readable storage medium, and when the computer readable instructions are executed by a processor, the steps of the method embodiments may be implemented.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for resource allocation based on a multi-cloud environment is applied to public clouds and comprises the following steps:
acquiring a target application request, wherein the target application request comprises a URL (uniform resource locator) identifier;
analyzing the URL identification, and determining a first cloud environment where a resource corresponding to the target application request is located;
judging whether a first cloud environment where the resource corresponding to the target application request is located and a public cloud environment where the public cloud gateway is located belong to the same cloud environment;
and if the first cloud environment where the resource corresponding to the target application request is located and the public cloud environment where the public cloud gateway is located are determined not to belong to the same cloud environment, forwarding the target application request to the first cloud environment.
2. The method of claim 1, wherein the parsing the URL identification to determine the first cloud environment in which the resource corresponding to the target application request is located comprises:
determining a resource configuration corresponding to the target application request according to the URL identification of the target application request, wherein the resource configuration comprises the resource path, cloud environment information of the resource, authority configuration information of the resource and the target application to which the resource belongs, and the resource configuration is uniquely marked by an environment label;
and acquiring an environment tag in the resource configuration information, and determining a first cloud environment where the resource corresponding to the target application request is located based on the environment tag.
3. The method of claim 2, wherein after determining the first cloud environment in which the target application requests the corresponding resource, further comprising:
determining a gateway address of the first cloud environment based on the acquired environment tag in the resource configuration information;
forwarding the target application request to the gateway address.
4. The method of claim 1, wherein after parsing the URL identification and determining the first cloud environment in which the resource corresponding to the target application request is located, further comprising:
and if the first cloud environment and the public cloud environment where the public cloud gateway is located belong to the same cloud environment, calling a service processing module to process the target application request.
5. The method of claim 1, wherein after obtaining the target application request, further comprising:
detecting whether resource configuration information corresponding to the target application request exists in a historical resource allocation list;
and if the resource does not exist, analyzing the URL identification of the target application request, and determining the first cloud environment where the resource corresponding to the target application request is located.
6. The method of claim 1, further comprising:
when the write data in the first cloud environment is updated, a data synchronization component automatically synchronizes the updated write data to the public cloud environment;
or the like, or, alternatively,
when the write data in the public cloud environment is updated, the data synchronization component automatically synchronizes the updated write data to the first cloud environment corresponding to the updated write data.
7. The method of claim 1, further comprising:
resource registration, namely, calling a resource registration module in advance to be responsible for registration of each cloud environment resource and identify a cloud environment where the resource is located, wherein information of the resource registration may include but is not limited to: the method comprises the steps of resource path, cloud environment information of the resource, authority configuration information of the resource and target application of the resource.
8. The method of claim 2, wherein prior to determining the first cloud environment in which the target application requests the corresponding resource, the method further comprises:
user permission verification, wherein the user information contained in the obtained target application request is matched with permission configuration information in resource configuration information corresponding to the target application request;
if the matching is successful, judging that the user sending the target application request is a legal user;
and if the matching fails, judging that the user sending the target application request is an illegal user.
9. An apparatus for resource allocation based on a multi-cloud environment, applied to a public cloud, includes:
an acquisition module configured to acquire a target application request, the target application request including a URL identification;
the analysis module is configured to analyze the URL identification and determine a first cloud environment where a resource corresponding to the target application request is located;
the judging module is configured to judge whether a first cloud environment where the resource corresponding to the target application request is located and a public cloud environment where the public cloud gateway is located belong to the same cloud environment;
the sending module is configured to forward the target application request to a first cloud environment if it is determined that the first cloud environment where the resource corresponding to the target application request is located and the public cloud environment where the public cloud gateway is located do not belong to the same cloud environment.
10. A computer-readable storage medium storing computer-readable instructions that, when executed, perform the operations of the method for resource allocation based on a cloudy environment of any one of claims 1 to 7.
CN202110130426.9A 2021-01-29 2021-01-29 Resource allocation method and device based on multi-cloud environment, electronic equipment and medium Active CN112910995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110130426.9A CN112910995B (en) 2021-01-29 2021-01-29 Resource allocation method and device based on multi-cloud environment, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110130426.9A CN112910995B (en) 2021-01-29 2021-01-29 Resource allocation method and device based on multi-cloud environment, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN112910995A true CN112910995A (en) 2021-06-04
CN112910995B CN112910995B (en) 2023-05-02

Family

ID=76121695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110130426.9A Active CN112910995B (en) 2021-01-29 2021-01-29 Resource allocation method and device based on multi-cloud environment, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN112910995B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113741918A (en) * 2021-09-10 2021-12-03 安超云软件有限公司 Method for deploying applications on cloud and applications
CN117539630A (en) * 2023-11-20 2024-02-09 上海直真君智科技有限公司 Cloud heterogeneous joint calculation method and system based on DAG extension mechanism
CN117579480A (en) * 2023-11-20 2024-02-20 上海直真君智科技有限公司 Cloud distributed resource data model expansion and labeling method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357660A (en) * 2017-07-06 2017-11-17 华为技术有限公司 The distribution method and device of a kind of virtual resource
US20170339070A1 (en) * 2016-05-23 2017-11-23 Cisco Technology, Inc. Inter-cloud broker for hybrid cloud networks

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170339070A1 (en) * 2016-05-23 2017-11-23 Cisco Technology, Inc. Inter-cloud broker for hybrid cloud networks
CN107357660A (en) * 2017-07-06 2017-11-17 华为技术有限公司 The distribution method and device of a kind of virtual resource

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113741918A (en) * 2021-09-10 2021-12-03 安超云软件有限公司 Method for deploying applications on cloud and applications
CN117539630A (en) * 2023-11-20 2024-02-09 上海直真君智科技有限公司 Cloud heterogeneous joint calculation method and system based on DAG extension mechanism
CN117579480A (en) * 2023-11-20 2024-02-20 上海直真君智科技有限公司 Cloud distributed resource data model expansion and labeling method and system
CN117579480B (en) * 2023-11-20 2024-07-12 上海直真君智科技有限公司 Cloud distributed resource data model expansion and labeling method and system

Also Published As

Publication number Publication date
CN112910995B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN108897691B (en) Data processing method, device, server and medium based on interface simulation service
CN112910995B (en) Resource allocation method and device based on multi-cloud environment, electronic equipment and medium
CN110784446B (en) User permission-based cloud resource acquisition method and device and computer equipment
CN108470298B (en) Method, device and system for transferring resource numerical value
CN107633016B (en) Data processing method and device and electronic equipment
CN110442610A (en) The method, apparatus of load balancing calculates equipment and medium
CN113050900B (en) Screen sharing method, device, equipment and storage medium
CN110659206A (en) Simulation architecture establishing method, device, medium and electronic equipment based on microservice
CN111881209A (en) Data synchronization method and device for heterogeneous database, electronic equipment and medium
CN109039803A (en) A kind of method, system and the computer equipment of processing readjustment notification message
CN114356521A (en) Task scheduling method and device, electronic equipment and storage medium
CN105847320A (en) Resource obtaining method and device
CN113179295B (en) Message processing method and device
CN114401187A (en) Gray scale distribution method and device, computer equipment and storage medium
CN106357549B (en) Method, apparatus, system and the load balancer that high concurrent shunts in clustered deploy(ment)
US11360785B2 (en) Execution path determination in a distributed environment
KR20200046316A (en) Web application server, method for handling user request and method for handling intergrated request
CN115052003A (en) Data synchronization method, related device and medium
US10671505B2 (en) System and method for monitoring service
CN112256654B (en) Document sharing method and device
CN114677138A (en) Data processing method, data processing equipment and computer readable storage medium
US10977146B2 (en) Application operation monitoring apparatus and application operation monitoring method
CN109032655A (en) A kind of configuration method, server and computer readable storage medium monitoring example
CN110933184A (en) Resource publishing platform and resource publishing method
CN105227615A (en) A kind of method that distributed system data are transmitted and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant