CN112910995B - 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
CN112910995B
CN112910995B CN202110130426.9A CN202110130426A CN112910995B CN 112910995 B CN112910995 B CN 112910995B CN 202110130426 A CN202110130426 A CN 202110130426A CN 112910995 B CN112910995 B CN 112910995B
Authority
CN
China
Prior art keywords
resource
cloud environment
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.)
Active
Application number
CN202110130426.9A
Other languages
Chinese (zh)
Other versions
CN112910995A (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 method, a device, electronic equipment and a medium for resource allocation based on a multi-cloud environment. In the application, a network resource request generated by a target application can be acquired, 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; if the first cloud environment where the target application is located and the public cloud gateway are not in the same cloud environment, forwarding the network resource request to the first cloud environment. By applying the technical scheme, the complexity of request forwarding can be solved through the identification of 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 can not be directly exposed to the public network, so that the request without login or access permission 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, an apparatus, an electronic device, and a medium for resource allocation based on a cloud environment.
Background
Application deployment in a 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, generally, 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 perform traffic forwarding in a single cloud environment, and is not suitable for traffic forwarding in a multi-cloud environment. Therefore, when one cloud environment fails, other cloud environments are generally affected, which also greatly reduces the safety and reliability of the system
Disclosure of Invention
The embodiment of the application provides a method, a device, an electronic device and a medium for resource allocation based on a multi-cloud environment, wherein according to one aspect of the embodiment of the application, the method for resource allocation based on the multi-cloud environment is characterized by being applied to public clouds and comprising 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 the 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 or not;
and if the first cloud environment where the resources corresponding to the target application request are 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 of the foregoing method of the present application, the analyzing the URL identifier and determining a first cloud environment where the resource corresponding to the target application request is located include:
determining resource configuration corresponding to the target application request according to the URL identification of the target application request, wherein the resource configuration comprises 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 label 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 label.
Optionally, in another embodiment of the foregoing method of the present application, after determining the first cloud environment where 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 label in the resource configuration information;
forwarding the target application request to the gateway address.
Optionally, in another embodiment of the method according to the present application, after the analyzing 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 are determined to belong to the same cloud environment, a service processing module is called to process the target application request.
Optionally, in another embodiment of the method according to 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;
if the resource does not exist, analyzing the URL identification of the target application request, and determining a first cloud environment where the resource corresponding to the target application request is located.
Optionally, in another embodiment based on the method described above, 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 alternatively, the first and second heat exchangers may be,
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 method described above, the resource registration module is invoked 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 path of the resource, cloud environment information of the resource, authority configuration information of the resource and a target application to which the resource belongs.
Optionally, in another embodiment of the method according to the present application, before determining the first cloud environment where the resource corresponding to the target application request is located, the method further includes:
user permission verification, namely matching the user information contained in the acquired target application request with permission 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;
if the matching fails, judging that the user sending the target application request is an illegal user.
According to still another aspect of the embodiments of the present application, a device for resource allocation based on a multi-cloud environment is provided, which is applied to public clouds, and includes:
the system comprises an acquisition module configured to acquire a target application request, wherein the target application request comprises a URL (uniform resource locator) identifier;
the analyzing module is configured to analyze the URL identification and determine a first cloud environment where the 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 or not;
the sending module is configured to forward the target application request to the first cloud environment 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.
According to still another aspect of the embodiments of the present application, there is provided an electronic device including:
a memory for storing executable instructions; and
and a display for displaying 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 cloudy environment.
According to yet another aspect of embodiments of the present application, there is provided a computer-readable storage medium storing computer-readable instructions that, when executed, perform the operations of any of the above-described methods of resource allocation based on a multi-cloud environment.
In the application, a network resource request generated by a target application can be acquired, 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; if the first cloud environment where the target application is located and the public cloud gateway are not in the same cloud environment, forwarding the network resource request to the first cloud environment. By applying the technical scheme, the complexity of request forwarding can be solved through the identification of 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 can not be directly exposed to the public network, so that the request without login or access permission can be completely intercepted by the gateway.
The technical scheme of the present application is described in further detail below through 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 will 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 method for resource allocation based on a cloud environment according to the present application;
fig. 2 is an example 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.
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, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present application unless it is specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the application, its application, or uses.
Techniques, methods, and apparatus known to one 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 numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
In addition, the technical solutions of the embodiments of the present application may be combined with each other, but it is necessary to be based on the fact that those skilled in the art can implement the technical solutions, and when the technical solutions are contradictory or cannot be implemented, the combination of the technical solutions should be considered to be absent, and is not within the scope of protection claimed in the present application.
It should be noted that all directional indicators (such as up, down, left, right, front, rear, etc.) in the embodiments of the present application are merely used to explain the relative positional relationship, movement conditions, etc. between the components in a certain specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicators are correspondingly changed.
A method for resource allocation based on a cloudy 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 scenario is only shown for the convenience of understanding the spirit and principles of the present application, and embodiments of the present application are not limited in any way in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
The application also provides a method, a device, a target terminal and a medium for resource allocation based on the multi-cloud environment.
Fig. 1 schematically shows a flow diagram 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 public cloud, and includes:
s101, acquiring a target application request, wherein the target application request comprises a URL identifier.
Further, as shown in fig. 2, because the application deployment in the multi-cloud environment involves data synchronization among a plurality of cloud environments, the data synchronization rule is complex and a large number of uncertain factors exist, the complexity and uncertainty of bidirectional data synchronization can be solved by adopting the application gateway multi-cloud traffic forwarding scheme, and other cloud environments can be ensured not to be affected when a single cloud environment fails. The safety and the reliability of the system are improved. The application can add a URL (Uniform Resource Locator ) identifier of each target application in 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.
Wherein, URL is a format in which a comparatively uniform band parameter points to a certain address. The embodiment of the application can determine the cloud environment corresponding to the network resource request through the URL identification.
In addition, the application does not specifically limit the target application, that is, the target application may be any application system with service capability in a cloudy environment.
S102, analyzing the URL identification, and determining a first cloud environment where the resource corresponding to the target application request is located.
Furthermore, the resource registration module can be called in advance to be responsible for registering each cloud environment resource and identifying the cloud environment where the resource is located. The information of the resource registration may include, but is not limited to: the method comprises the steps of 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 label; and acquiring an environment label 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 label.
Furthermore, the application can call 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. After the application request is acquired, the corresponding resource configuration is acquired according to the URL of the application request, and the forwarding is carried out according to the environment label of the resource, if the cloud environment configuration of the environment label of the resource is not in the same environment with the current cloud environment, the forwarding is carried out according to the gateway configuration of the target cloud environment corresponding to the environment label of the resource, otherwise, the forwarding is directly carried out to the corresponding service.
The method for determining the first cloud environment where the target application is located according to the URL identification is not specifically limited, for example, the corresponding first cloud environment may be determined for obtaining the corresponding resource configuration according to the URL, the corresponding first cloud environment may be determined according to a preset configuration list, and the like.
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 or not
And S104, if the first cloud environment where the resources corresponding to the target application request are 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 aims to solve the problem that when a single cloud environment fails, other cloud environments are affected, and therefore the safety and reliability of the system are reduced. In one embodiment of the present application, a certain redundancy may be set for the resources, for example, the resources responding to the same target application request are placed in different cloud environments, and the resources corresponding to each target application request are allocated through a load balancing algorithm, so that when a certain cloud environment or the resources therein fail, the target application request is forwarded to the cloud environment without failure.
The Load balancing algorithm can be implemented by using a Load balancing device (Load Balance LB), and specifically, the Load balancing device can split tasks onto a plurality of operation units, so that each operation unit executes respective sub-tasks respectively, and thus work tasks are completed together. The method can further achieve the purposes of expanding the bandwidth of network equipment and servers, increasing throughput, enhancing network data processing capacity and improving flexibility and usability of the network.
In addition, the data synchronization module can be called to synchronize the data in the cloud environment. Specifically, data written to the cloud environment may be synchronized by a synchronization component into clusters of other cloud environments. In one mode, the data synchronization module can synchronize data of the MySQL database and data in the Redis cache, and a synchronization component adopted by the mySQL is DataX, which is suitable for data synchronization under 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) and HDFS, hive, ODPS, HBase, FTP; the synchronization component of the Redis uses the principle that a node joins a source Redis cluster, and the Redis-shake is simulated, and full-scale pulling and playback are firstly carried out, and then incremental pulling (through a psync command) is carried out to carry out Redis data synchronization; the data mainly synchronized by the synchronization module is data change in a single cloud environment in a multi-cloud environment and is synchronized to a storage system in other cloud environments (such as mysql Redis).
In the application, a network resource request generated by a target application can be acquired, 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; if the first cloud environment where the target application is located and the public cloud gateway are not in the same cloud environment, forwarding the network resource request to the first cloud environment. By applying the technical scheme, the complexity of request forwarding can be solved through the identification of 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 can not be directly exposed to the public network, so that the request without login or access permission can be completely intercepted by the gateway.
Optionally, in another embodiment of the method according to the present application, analyzing the URL identifier, and determining the first cloud environment where the resource corresponding to the target application request is located includes:
determining resource configuration corresponding to a target application request according to the URL identification of the target application request, wherein the resource configuration comprises cloud environment information of the resource, authority configuration information of the resource, the target application to which the resource belongs, and the resource configuration is uniquely marked by an environment label;
and acquiring an environment label 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 label.
Further, the application can call 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. After the application request is acquired, the corresponding resource configuration is acquired according to the URL of the application request, and the forwarding is carried out according to the environment label of the resource, if the cloud environment configuration of the environment label of the resource is not in the same environment with the current cloud environment, the forwarding is carried out according to the gateway configuration of the target cloud environment corresponding to the environment label of the resource, otherwise, the forwarding is directly carried out to the corresponding service.
Optionally, in another embodiment of the method according to the present application, after determining the first cloud environment where the resource corresponding to the target application request is located, the method further includes:
determining a gateway address of a first cloud environment based on the environment label 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 analyzing 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 positioned are determined to belong to the same cloud environment, a service processing module is called to process the target application request.
Further, in the application, a public cloud gateway obtains a resource path of a network resource request generated by a target application, wherein the current resource path refers to a URL (uniform resource locator) identifier of the request, and further configuration information of the resource can be determined through the request path, wherein the configuration information comprises cloud environment and the like of the resource. 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, and whether the write request cloud environment of the resource is consistent with the deployment environment of the application, the request of the resource can cause data change, and whether the cloud environment deployed by the application is in a cloud environment or not. It can be appreciated that if the request is consistent, the relevant service is invoked to process the corresponding request, and if the request is inconsistent, the request can be directly forwarded to the gateway of the corresponding cloud environment according to the target cloud environment configuration.
Optionally, in another embodiment of the method according to the present application, after analyzing 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 positioned are determined to belong to the same cloud environment, a service processing module is called to process the target application request.
Optionally, in another embodiment based on the above 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;
if the resource is not available, 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 method described above, 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 alternatively, the first and second heat exchangers may be,
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 above method of the present application, the resource registration module is invoked in advance to be responsible for registering each cloud environment resource and identifying the cloud environment in which the resource is located.
The resource registration information of the public cloud environment can comprise a path of the resource, cloud environment information of the resource, 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 of the resource, a target application to which the resource belongs, and the like.
Optionally, in another embodiment of the method according to the present application, before determining the first cloud environment where the resource corresponding to the target application request is located, the method further includes:
user permission verification, namely matching the user information contained in the acquired target application request with permission configuration information in the resource configuration information corresponding to the target application request;
if the matching is successful, judging the user in the target application request is a legal user;
if the matching fails, the user in the target application request is judged to be an illegal user.
Further, for a certain application program, after the history period has performed detection of the cloud environment, in order to avoid the problem of consuming system resources caused by repeatedly performing detection of the cloud environment on the same application program. The method and the device can also not analyze the URL identification corresponding to the application at the first time after acquiring the network resource request generated by the target application, but detect whether the resource request generated by the target application exists 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 can be determined that the target application has performed detection of the cloud environment where the target application is located in the historical period, and then the received resource request can be directly processed according to the cloud environment where the application is located recorded in the historical resource allocation list. And forwarding the network resource request to the first cloud environment when the target application is not in the same cloud environment as the public cloud gateway. 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, analyzing the URL identification of the target application, and determining the first cloud environment where the target application is located, so that whether the received network resource request is forwarded to the first cloud environment is determined later.
Furthermore, the data synchronization module can be called to synchronize the data in the cloud environment. Specifically, data written to the cloud environment may be synchronized by a synchronization component into clusters of other cloud environments.
In one mode, the data synchronization module of the present application may automatically synchronize the updated write data to the corresponding common cloud environment when the update of the write data in the first cloud environment is detected. Specifically, the data synchronization module may synchronize data of the mysql database and data in the Redis cache in the cloud environment. For MySQL, the synchronization component that may be used is DataX, which is suitable for performing data synchronization in multiple MySQL cluster environments, where DataX is a heterogeneous data source offline synchronization tool, and is dedicated to implementing a stable and efficient data synchronization function between various heterogeneous data sources including relational databases (MySQL, oracle, etc.), HDFS, hive, ODPS, HBase, FTP, etc.
In another mode, the data synchronization module of the application can automatically synchronize the updated write data to the private cloud environment corresponding to the updated write data when the update of the write data in the public cloud environment is detected. Specifically, the data synchronization module may synchronize data of the mysql database and data in the Redis cache in the cloud environment. For the Redis, a synchronization component can be adopted, wherein the Redis-shake is used, the basic principle of the Redis-shake is to simulate a slave node 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 are data changes in a single cloud environment in a multi-cloud environment and are synchronized to storage systems in other cloud environments (such as mysql or Redis).
Optionally, in another embodiment of the method according to the present application, after the data synchronization component automatically synchronizes the 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; when the synchronous instruction is received, the log record is forwarded to an operation log library where the meta environment corresponding to the synchronous instruction is located.
Note that, the log record in this application is one of writing 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 where the meta environment corresponding to the synchronization instruction is located.
In the application, a network resource request generated by a target application can be acquired, 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; if the first cloud environment where the target application is located and the public cloud gateway are not in the same cloud environment, forwarding the network resource request to the first cloud environment. By applying the technical scheme, the complexity of request forwarding can be solved through the identification of the URL of the target application; by introducing a data synchronization component of three parties, developers are more focused on complex synchronization rules of the service without considering data; the security of the application can be well ensured by the flow forwarding of the gateway, the resource service can not be directly exposed to the public network, and the request without login or access permission 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 system comprises an acquisition module 201, an analysis module 202 and a sending module 203, which are applied to public cloud, wherein,
the system comprises an acquisition module configured to acquire a target application request, wherein the target application request comprises a URL (uniform resource locator) identifier;
the analyzing module is configured to analyze the URL identification and determine a first cloud environment where the 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 or not;
the sending module is configured to forward the target application request to the first cloud environment 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.
In the application, a network resource request generated by a target application can be acquired, 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; if the first cloud environment where the target application is located and the public cloud gateway are not in the same cloud environment, forwarding the network resource request to the first cloud environment. By applying the technical scheme, the complexity of request forwarding can be solved through the identification of 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 can not be directly exposed to the public network, so that the request without login or access permission 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 a URL identifier of the target application request, a resource configuration corresponding to the target application request, where the resource configuration includes cloud environment information where the resource is located, rights configuration information of the resource, and a target application to which the resource belongs, where the resource configuration is uniquely marked by an environment tag;
the obtaining module 201 is configured to obtain an environment tag in the resource configuration information, and determine, based on the environment tag, a first cloud environment in which the resource corresponding to the target application request is located.
In another embodiment of the present application, the obtaining module 201 further includes:
an acquisition module 201 configured to determine a gateway address of the first cloud environment based on an environment tag in the acquired resource configuration information;
an acquisition module 201 is 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 invoke a service processing module to process the target application request 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.
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 history resource allocation list;
the obtaining module 201 is configured to parse the URL identifier of the target application request if the URL identifier does not exist, and determine 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 acquisition module 201 configured to, when write data in the first cloud environment is updated, automatically synchronize the updated write data to the public cloud environment by a data synchronization component;
or alternatively, the first and second heat exchangers may be,
the acquisition module 201 is configured to automatically synchronize the updated write data to the first cloud environment corresponding to the updated write data when the write data in the public cloud environment is updated.
Optionally, in another embodiment based on the method described above, the resource registration module is invoked 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 path of the resource, cloud environment information of the resource, authority configuration information of the resource and a target application to which the resource belongs.
In another embodiment of the present application, the obtaining module 201 further includes:
an obtaining module 201, configured to verify user rights, and match user information contained in the obtained target application request with rights configuration information in resource configuration information corresponding to the target application request;
the obtaining module 201 is configured to determine that the user sending the target application request is a legal user if the matching is successful;
the obtaining module 201 is configured to determine that the user who issues the target application request is an illegal user if the matching fails.
Fig. 4 is a block diagram of a logic structure of an electronic device, according to an example embodiment. For example, electronic device 300 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
In an exemplary embodiment, there is also provided a non-transitory computer readable storage medium including instructions, such as a memory including instructions, executable by an electronic device processor to perform the above-described method of resource allocation based on a cloudy 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 the 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 or not; and if the first cloud environment where the resources corresponding to the target application request are 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 above instructions may also be executed by a processor of the electronic device to perform the other steps involved in the above-described exemplary embodiments. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
In an exemplary embodiment, there is also provided an application/computer program product comprising one or more instructions executable by a processor of an electronic device to perform the above-described method of resource allocation based on a cloudy 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 the 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 or not; and if the first cloud environment where the resources corresponding to the target application request are 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 above instructions may also be executed by a processor of the electronic device to perform the other steps involved in the above-described exemplary embodiments.
Fig. 4 is an exemplary diagram of a computer device 30. It will be appreciated by those skilled in the art that the schematic diagram 4 is merely an example of the computer device 30 and is not meant to be limiting of the computer device 30, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the computer device 30 may also include input and output devices, network access devices, buses, etc.
The processor 302 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor 302 may be any conventional processor or the like, the processor 302 being a control center of the computer device 30, with various interfaces and lines connecting the various parts of the entire computer device 30.
The memory 301 may be used to store computer readable instructions 303 and the processor 302 implements the various functions of the computer device 30 by executing or executing computer readable instructions or modules stored in the memory 301 and invoking data stored in the 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 (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device 30, or 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 Card (Flash Card), at least one magnetic disk storage device, a Flash Memory device, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or other nonvolatile/volatile storage device.
The modules integrated by the computer device 30 may be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product. Based on such understanding, the present invention may implement all or part of the flow of the method of the above-described embodiments, or may be implemented by means of computer readable instructions to instruct related hardware, where the computer readable instructions may be stored in a computer readable storage medium, where the computer readable instructions, when executed by a processor, implement the steps of the method embodiments described above.
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 application 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 application 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 is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (9)

1. A method for resource allocation based on a multi-cloud environment, applied to a public cloud, 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 the resource corresponding to the target application request is located;
judging whether a first cloud environment where the resources corresponding to the target application requests are located and a public cloud environment where a public cloud gateway is located belong to the same cloud environment or not;
if the first cloud environment where the resources corresponding to the target application request are 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 analyzing the URL identifier, and determining a 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 resource paths, 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 label 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 label.
2. The method of claim 1, wherein after determining the first cloud environment in which the resource corresponding to the target application request is located, further comprising:
determining a gateway address of the first cloud environment based on the acquired environment label in the resource configuration information;
forwarding the target application request to the gateway address.
3. The method of claim 1, wherein the parsing the URL identification, after determining the first cloud environment in which the resource corresponding to the target application request is located, further comprises:
and if the first cloud environment and the public cloud environment where the public cloud gateway is located are determined to belong to the same cloud environment, a service processing module is called to process the target application request.
4. The method of claim 1, wherein after the 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;
if the resource does not exist, analyzing the URL identification of the target application request, and determining a first cloud environment where the resource corresponding to the target application request is located.
5. The method as recited in 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 alternatively, the first and second heat exchangers may be,
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.
6. The method of claim 1, wherein the method further comprises:
the method comprises the steps of registering resources, and calling a resource registering module in advance to be responsible for registering each cloud environment resource and identifying the cloud environment where the resource is located, wherein the information of the resource registering comprises the following steps: the path of the resource, cloud environment information of the resource, authority configuration information of the resource and a target application to which the resource belongs.
7. The method of claim 1, wherein prior to determining the first cloud environment in which the resource to which the target application request corresponds is located, the method further comprises:
user permission verification, namely matching the user information contained in the acquired target application request with permission 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;
if the matching fails, judging that the user sending the target application request is an illegal user.
8. A device for resource allocation based on a multi-cloud environment, applied to public clouds, comprising:
the system comprises an acquisition module configured to acquire a target application request, wherein the target application request comprises a URL (uniform resource locator) identifier;
the analyzing module is configured to analyze the URL identification and determine a first cloud environment where the 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 or not;
the sending module is configured to forward the target application request to the first cloud environment 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;
the analyzing the URL identifier, and determining a 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 resource paths, 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 label 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 label.
9. A computer readable storage medium storing computer readable instructions, which when executed perform the operations of the method of resource allocation based on a multi-cloud environment of any of claims 1-6.
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 CN112910995A (en) 2021-06-04
CN112910995B true 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)

Families Citing this family (3)

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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10129177B2 (en) * 2016-05-23 2018-11-13 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

Also Published As

Publication number Publication date
CN112910995A (en) 2021-06-04

Similar Documents

Publication Publication Date Title
CN112910995B (en) Resource allocation method and device based on multi-cloud environment, electronic equipment and medium
CN108897691B (en) Data processing method, device, server and medium based on interface simulation service
CN109542865B (en) Method, device, system and medium for synchronizing configuration files of distributed cluster system
CN107633016B (en) Data processing method and device and electronic equipment
CN103577319A (en) Source code file detection method, source code file detection device and file release system
CN110532021B (en) Processing method of configuration file of distributed control system, client and service device
US12032952B2 (en) Service upgrade method, apparatus, and system
CN107092553A (en) A kind of method, device and computer system for setting up request call chain between process
CN111881209A (en) Data synchronization method and device for heterogeneous database, electronic equipment and medium
CN114092252A (en) Block chain transaction execution method, device, equipment and readable storage medium
CN105847320A (en) Resource obtaining method and device
CN114676205A (en) Event information processing method and device
CN113179295B (en) Message processing method and device
CN115996179A (en) Service node testing method and device, readable medium and electronic equipment
CN114356521A (en) Task scheduling method and device, electronic equipment and storage medium
CN113987303A (en) Automatic driving log data processing method and device
CN110764838B (en) Service model loading method and system, electronic equipment and storage medium
CN107291575B (en) Processing method and equipment for data center fault
US11360785B2 (en) Execution path determination in a distributed environment
CN114025014A (en) Asset detection method and device, electronic equipment and storage medium
CN113688040A (en) System testing method, apparatus, storage medium, and computer program product
US10671505B2 (en) System and method for monitoring service
US10977146B2 (en) Application operation monitoring apparatus and application operation monitoring method
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium
CN109032655A (en) A kind of configuration method, server and computer readable storage medium monitoring example

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