CN118660001A - Route configuration method, device, electronic equipment and storage medium - Google Patents

Route configuration method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN118660001A
CN118660001A CN202410688904.1A CN202410688904A CN118660001A CN 118660001 A CN118660001 A CN 118660001A CN 202410688904 A CN202410688904 A CN 202410688904A CN 118660001 A CN118660001 A CN 118660001A
Authority
CN
China
Prior art keywords
service
resource
routing
domain
sub
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.)
Pending
Application number
CN202410688904.1A
Other languages
Chinese (zh)
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.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
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 Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN202410688904.1A priority Critical patent/CN118660001A/en
Publication of CN118660001A publication Critical patent/CN118660001A/en
Pending legal-status Critical Current

Links

Landscapes

  • Telephonic Communication Services (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a route configuration method, a device, electronic equipment and a storage medium, which relate to the field of network communication and comprise the following steps: the method is applied to a cross-domain resource service grid, wherein a total routing service, a main routing service and a sub-routing service are deployed in the cross-domain resource service grid, and comprises the following steps: controlling a main routing service, and acquiring public resource information of all domains in a cross-domain resource service grid from auxiliary services deployed in a total routing service; storing the public resource information in a main routing table of the main routing service and a sub routing table of each sub routing service of the domain where the main routing service is located; and storing the private resource information of the domain where the main routing service is located in a main routing table and each sub routing table in the same domain. The application optimizes the size of the routing table in the modes of global routing and local routing, thereby not only reducing the memory overhead of all routing services and the time when the resource service is called in a cross-domain manner, but also guaranteeing the security of the private resource in the cross-domain resource service grid.

Description

Route configuration method, device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of network communication, in particular to a route configuration method, a route configuration device, electronic equipment and a storage medium.
Background
With the development of cloud computing, big data, and the like, more and more services and data are deployed in the cloud, and accessed and called through an API (Application Programming Interface ) interface. These services and data may be distributed in different domains, in which context resources and data need to be acquired or exchanged from different domains to implement various functions and services. However, due to the complexity of network topology, there may be multiple sets of networks in different forms in the domain itself and different domains, and thus there is a problem that network communication is limited between domains or between different domains, so that it is difficult to implement interconnection and interworking between resource services or different domains in the domain.
Although related technologies of cross-domain resource service call appear at present, when cross-domain call of a certain resource service is realized, the cross-domain call of the resource service is realized by storing the information of the resource service in the routing tables of the main routing service and the sub routing service of each domain of the cross-domain resource service in advance, so that the cross-domain call of the resource service is realized when the corresponding cross-domain call information of the resource service exists in the routing tables; that is, each resource service participating in the cross-domain resource service needs to be stored in all the routing tables, so that the size of the routing tables of the routing service can linearly increase along with the increase of the number of the resource services, and the maintenance and query costs of the routing tables can also increase along with the increase of the number of the resource services, thereby influencing the cross-domain call of the resource service.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the embodiments of the present application and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The embodiment of the application mainly aims to provide a route configuration method, a device, electronic equipment and a storage medium, and aims to solve the technical problem of high cost of cross-domain calling of resource services.
To achieve the above objective, an embodiment of the present application provides a route configuration method, applied to a cross-domain resource service grid, where a total route service, a main route service, and a sub-route service are deployed in the cross-domain resource service grid, the method includes:
Controlling the main routing service, and acquiring public resource information of all domains in the cross-domain resource service grid from auxiliary services deployed in the main routing service;
Storing the public resource information in a main routing table of the main routing service and a sub routing table of each sub routing service of the domain where the main routing service is located;
and storing the private resource information of the domain where the main routing service is located in the main routing table and each sub routing table in the same domain.
In an embodiment, the public resource information includes domain public resource information, and the method further includes:
And controlling each domain in the cross-domain resource service grid to store the respective domain public resource information in the auxiliary service.
In one embodiment, the step of storing the public resource information in a main routing table of the main routing service and a sub routing table of each sub routing service of the domain where the main routing service is located includes:
the public resource information is used as a global route to be stored in a main route table of the main route service;
Based on the main routing service and the main routing table, the global routing is adjacently transferred among all sub routing services of the domain where the main routing service is located;
and storing the global route in a respective sub-route table of each sub-route service.
In an embodiment, the private resource information includes sub-private service information of a sub-routing service;
the step of storing the private resource information of the domain where the main routing service is located in the main routing table and each sub routing table in the same domain includes:
Controlling the main routing service and each sub routing service of the domain where the main routing service is located, and adjacently transmitting each sub private service information of each sub routing service;
And storing the sub-private service information as local routes in the main routing table and the sub-routing tables of the sub-routing services respectively.
In one embodiment, the method further comprises:
if a resource access request of a resource service to be accessed in the cross-domain resource service grid is monitored, calling a service starter where the resource service to be accessed is located to request connection of a target service of a target resource identifier determined from the resource access request under the condition that a target access state of the resource service to be accessed meets a preset first access condition;
judging whether the request connection condition between the service starter and the target service meets a preset connection success condition or not;
And if the request connection condition meets the preset connection success condition, controlling the resource service to be accessed to access the target service.
In an embodiment, the step of controlling the resource service to be accessed to access the target service includes:
Invoking a target sub-routing service associated with the resource service to be accessed, and sending a target address of the target service to the resource service to be accessed, wherein the target address is determined from an address resolution result, and the address resolution result is obtained by performing address resolution on a target resource identifier based on the target sub-routing service;
And controlling the resource service to be accessed to access the target service through the target address, and storing the resource service to be accessed, the target service and the request connection condition association in the target sub-routing service.
In an embodiment, after the step of detecting a resource access request for a resource service to be accessed in the cross-domain resource service grid, the method further includes:
if the target access state of the resource service to be accessed meets the preset repeated access condition, the target sub-routing service is called, and a target address obtained by analyzing the target resource identification in the resource access request is sent to the resource service to be accessed; the preset repeated access condition comprises a request connection condition that the target resource identifier and the resource service to be accessed are associated together in the target sub-routing service, and the request connection condition is that the request connection is successful;
and controlling the resource service to be accessed to access the target service through the target address.
In addition, to achieve the above object, an embodiment of the present application provides a route configuration device applied to a cross-domain resource service grid, where a total route service, a main route service, and a sub-route service are deployed in the cross-domain resource service grid, the device includes:
the acquisition module is used for controlling the main routing service and acquiring public resource information of all domains in the cross-domain resource service grid from auxiliary services deployed in the total routing service;
The public storage module is used for storing the public resource information in a main routing table of the main routing service and a sub routing table of each sub routing service of the domain where the main routing service is located;
And the private preservation module is used for preserving private resource information of the domain where the main routing service is located in the main routing table and each sub routing table in the same domain.
In addition, to achieve the above object, an embodiment of the present application further provides an electronic device, including: the route configuration method comprises a memory, a processor and a program of the route configuration method stored in the memory and capable of running on the processor, wherein the program of the route configuration method can realize the steps of the route configuration method when being executed by the processor.
In addition, in order to achieve the above object, an embodiment of the present application also provides a computer-readable storage medium having stored thereon a program for implementing a route configuration method, which when executed by a processor, implements the steps of the route configuration method as described above.
In addition, to achieve the above object, an embodiment of the present application further provides a computer program product, including a computer program, which when executed by a processor implements the steps of the route configuration method described above.
One or more technical solutions provided by the embodiments of the present application at least have the following technical effects:
The embodiment of the application acquires the public resource information of all domains in the cross-domain resource service grid from the auxiliary service of the total routing service by controlling the main routing service deployed in the cross-domain resource service grid, and stores the public resource information in the main routing table and the sub routing table, namely, all the main routing services in the cross-domain resource service grid can acquire the public resource information from the auxiliary service, and all the main routing services and the sub routing services can store the public resource information, so that the cross-domain call can be realized based on the stored public resource information when the cross-domain call is performed.
Further, since the private resource information of the domain where the main routing service is located is stored in the main routing table and the sub routing table in the same domain, but is not stored in the main routing table and the sub routing table in other domains, even when the resource service is newly added in the cross-domain resource service grid, the information of the newly added resource service can be saved in all the main routing tables and the sub routing tables in the cross-domain resource service grid, and the private resource information is stored in the main routing table and the sub routing table in the domain where the newly added resource service is stored, so that all the main routing tables and the sub routing tables in the cross-domain resource service grid can not linearly increase along with the increase of the number of the resource service, and since the private resource information reflects the private resource service in the domain and is not accessed by other domains, the private resource information is not required to be used in the cross-domain call, and even if all the private resource information in the cross-domain resource service grid is not stored, the cross-domain resource service is not required to be called, but the cross-domain resource information is not influenced by the main routing table and the cross-domain resource service is not called, and the linear increase of the number of the resources in the cross-domain resource service grid is not influenced; the large-scale increase of the size of the routing tables (all the sub-routing tables and all the main routing tables) of the whole cross-domain resource service grid can be avoided, so that the cost of route maintenance and searching can be reduced, and the defect of high cross-domain calling cost is overcome.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the embodiments of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of a first embodiment of a route configuration method according to an embodiment of the present application;
Fig. 2 is a schematic diagram of a cross-domain resource service grid architecture in a route configuration method according to an embodiment of the present application;
Fig. 3 is a flowchart of a second embodiment of a routing configuration method according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of a resource service access in a routing configuration method according to an embodiment of the present application;
Fig. 5 is a schematic block diagram of a route configuration device according to an embodiment of the present application;
fig. 6 is a schematic device structure diagram of a hardware operating environment related to a routing configuration method in an embodiment of the present application.
The implementation, functional features and advantages of the embodiments of the present application will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of the embodiments of the present application, and are not intended to limit the embodiments of the present application.
For a better understanding of the technical solutions of the embodiments of the present application, the following detailed description will be given with reference to the drawings and specific embodiments.
With the development of cloud computing, big data and API economy, more and more services and data are deployed in the cloud and accessed and called through an API interface. These services and data may be distributed among different domains or sources, in which context different applications or systems often need to acquire resources and data from different sources (protocols, domain names, ports) to implement various functions and services. However, due to application or system homology policy limitations, cross-domain requests tend to be blocked, making it difficult to achieve interworking and resource sharing between different applications and systems.
Although the related technology of cross-domain resource service calling is presented at present, when cross-domain calling of a certain resource service is realized, the cross-domain calling is realized by inquiring the resource service information in the routing tables of the main routing service and the sub routing service of each domain of the cross-domain resource service in advance; therefore, when only the resource service is newly added in the cross-domain resource service, the information of the resource service is newly added and stored in the main routing table and the sub routing tables of all domains in the cross-domain resource service, and the cross-domain call can be realized only by the newly added resource service, so that the size of the routing table of the routing service can linearly increase along with the increase of the number of the resource service, the maintenance and query cost of the routing table can also increase along with the increase of the number of the resource service, and further the cross-domain call of the resource service is influenced.
To this end, in view of the above drawbacks, an embodiment of the present application proposes a solution, specifically including: in the cross-domain resource service grid, the main routing tables and the sub routing tables of the main routing service and the sub routing service of all domains can store public resource information in the cross-domain resource service grid, and private resource information of each domain is only stored in the main routing tables and the sub routing tables of the main routing service and the sub routing service in the same domain, so that when the resource service is newly added in the cross-domain resource service grid, the information of the newly added resource service can not be stored in all the main routing tables and the sub routing tables, and further, the large-scale increase of the size of the routing tables of the cross-domain resource service grid along with the increase of the number of the resource service is avoided under the condition that the cross-domain call is not influenced.
Specifically, auxiliary services are deployed in the total routing services in the cross-domain resource service grid, so that public resource information of all domains in the cross-domain resource service grid can be stored in the auxiliary services, the main routing service of each domain can acquire public resource information of all domains from the auxiliary services, the sub-routing service of the domain where the main routing service is located can also acquire public resource information, and private resource information in the same domain is stored in the main routing service and the sub-routing service in the same domain without being given to the main routing service and the sub-routing service of other domains, so that the size of a routing table of the cross-resource service grid cannot be increased in scale. Meanwhile, because the private resource information is only stored in the main routing service and the sub routing service in the same domain, the private resource information cannot be revealed to other domains, and therefore the information security of the cross-domain resource service grid can be improved. The embodiment of the application optimizes the size of the routing table in a global routing and local routing mode, thereby reducing the memory overhead of all routing services and the time when the resource service is called in a cross-domain mode, and guaranteeing the safety of the private resource in the cross-domain resource service grid. The time cost of the resource service when being called in the domain is reduced by detecting and optimizing the call flow of the resource service in the same domain.
According to the solution provided by the embodiment of the application, the public resource information of all domains in the cross-domain resource service grid can be obtained from the auxiliary service of the total routing service by controlling the main routing service deployed in the cross-domain resource service grid, and the public resource information is stored in the main routing table and the sub routing table, namely, all the main routing services in the cross-domain resource service grid can be obtained from the auxiliary service, and the public resource information can be stored in all the main routing service and the sub routing service, so that the cross-domain call can be realized based on the stored public resource information when the cross-domain call is performed.
Further, since the private resource information of the domain where the main routing service is located is stored in the main routing table and the sub routing table in the same domain, but is not stored in the main routing table and the sub routing table in other domains, even when the resource service is newly added in the cross-domain resource service grid, the information of the newly added resource service can be saved in all the main routing tables and the sub routing tables in the cross-domain resource service grid, and the private resource information is stored in the main routing table and the sub routing table in the domain where the newly added resource service is stored, so that all the main routing tables and the sub routing tables in the cross-domain resource service grid can not linearly increase along with the increase of the number of the resource service, and since the private resource information reflects the private resource service in the domain and is not accessed by other domains, the private resource information is not required to be used in the cross-domain call, and even if all the private resource information in the cross-domain resource service grid is not stored, the cross-domain resource service is not required to be called, but the cross-domain resource information is not influenced by the main routing table and the cross-domain resource service is not called, and the linear increase of the number of the resources in the cross-domain resource service grid is not influenced; the large-scale increase of the size of the routing tables (all the sub-routing tables and all the main routing tables) of the whole cross-domain resource service grid can be avoided, so that the cost of route maintenance and searching can be reduced, and the defect of high cross-domain calling cost is overcome.
Based on this, the embodiment of the present application provides a route configuration method, and referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of the route configuration method according to the embodiment of the present application.
The route configuration method in this embodiment is applied to a cross-domain resource service grid, where a total route service, a main route service, and a sub-route service are deployed in the cross-domain resource service grid, and the route configuration method includes steps S10 to S30:
step S10, controlling the main routing service and acquiring public resource information of all domains in the cross-domain resource service grid from auxiliary services deployed in the total routing service;
It should be noted that, the present embodiment is applied to a cross-domain resource service grid, where the cross-domain resource service grid is a network structure capable of performing cross-domain call of resource services by connection between routing services when resources in different domains are required to be called, and the cross-domain resource service grid is formed by a total routing service, a main routing service and a sub routing service in each domain, where the total routing service is used to connect each main routing service.
In this embodiment, a resource generally refers to a software or hardware resource on a computer or server, such as a storage resource, a computing resource, a software resource, and the like. The execution body in this embodiment is a cross-domain resource service grid, in which multiple domains may exist, and a "domain" is an independent network area with specific management authority and security partition. The domain is a resource provider of a cloud service provider, a data center, a supercomputer center, or the like. Each domain comprises a main routing service and a plurality of sub routing services, the cross-domain resource service grid also comprises a total routing service, and the total routing service can be connected with the main routing service of each domain, so that each domain can realize cross-domain calling of resources among the domains by taking the total routing service as an intermediary.
The individual resource services may be registered in a routing service that is used to open network connections between the individual resource services. The resource service may be registered in the routing service at any time based on actual service requirements, and the embodiment is not limited in particular, where the resource service includes a public resource service and a private resource service, and the public resource information includes a public resource service and does not include a private resource service, and the private resource information includes a private resource service and does not include a public resource service. The resource service is formed by packaging software and hardware resources on a computer or a server, the service routing service can be divided into a total routing service, a main routing service and a sub-routing service, the total routing service and the main routing service are required to have public network addresses, each routing service comprises a routing service identifier, the routing service identifier is text information serving as a unique identifier of the routing service, and no special format requirement exists.
In this embodiment, an auxiliary service is deployed on the total routing service, where the public resource information includes domain public resource information of domains, and the auxiliary service is used to store the domain public resource information of each domain in the cross-domain resource service grid.
All primary routing services in the cross-domain resource service grid can obtain public resource information from the secondary service. When there is a new domain in the cross-domain resource service grid, the new domain can be controlled to acquire the public resource information of all domains from the auxiliary service. The main routing service can be controlled to periodically acquire the public resource information from the auxiliary service in the total routing service, so that when the public resource information stored in the auxiliary service is updated, the main routing service can acquire the updated public resource information in time, and the main routing table and the sub routing table of the main routing service can be updated in time. The public resource information refers to domain public resource information of all domains in a cross-domain resource service grid, the domain public resource information comprises resource services which can be accessed by other domains in the domain, the public resource information and the domain public resource information both comprise resource services which can be accessed by other domains, the resource services refer to services which are formed by packaging software and hardware resources on a computer or a server, a unified resource calling interface is provided for the outside, and one service can only provide one type of resource but can provide a plurality of instances of the type of resource.
Illustratively, each main routing service in the cross-domain resource service grid is controlled to acquire the public resource information from the auxiliary service, and a plurality of main routing services can synchronously acquire the public resource information in the auxiliary service. In the embodiment, the auxiliary service is deployed, so that each main routing service can acquire the service information of the public resources of all domains, and the cross-domain resource call is prevented from being influenced.
In a possible embodiment, the route configuration method further includes:
and step X10, controlling each domain in the cross-domain resource service grid to store the respective domain public resource information in the auxiliary service.
It should be noted that the auxiliary service is registered in the total routing service in the cross-domain resource service grid to deploy the auxiliary service in the total routing service. After the auxiliary service is deployed in the total routing service, the main routing service of each domain in the cross-domain resource service grid registers domain public resource information of each domain in the auxiliary service. The common resource information may be determined by an administrator of the domain so as to automatically control the registration of the common resource information in the auxiliary service.
New domains can be added at any time in the cross-domain resource service grid, and each domain generally has only one main routing service, and the main routing service of each domain in the cross-domain resource service grid can be directly communicated with the total routing service. When a domain is newly added in the cross-domain service grid, domain public information of the newly added domain can be registered in the auxiliary service. So that other domains can acquire domain public resource information of the newly added domain, and cross-domain calling can be realized between the other domains and the newly added domain.
Illustratively, each domain in the cross-domain resource service grid is controlled to register respective domain common resource information in the auxiliary service to store the respective domain common resource information in the auxiliary service. Each domain in the cross-domain resource service grid can register respective domain public resource information with the auxiliary service at any time.
According to the embodiment, the domain public resource information of each domain is registered in the auxiliary service, so that each main routing service and each sub routing service can acquire the public resource information of all domains in the cross-domain resource service grid, and cross-domain calling of resource service can be realized between the domains conveniently.
Step S20, the public resource information is stored in a main routing table of the main routing service and a sub routing table of each sub routing service of the domain where the main routing service is located;
It should be noted that, each main routing service has a corresponding main routing table, each sub routing service has a corresponding sub routing table, and the main routing table and the sub routing table can be used for storing public resource information. The public resource information is a route address and/or route identifier of a total route service and a plurality of main route services which can be known by each domain in the cross-domain resource service grid, and can also include route addresses and/or route identifiers of partial sub-route services, and can also include route forwarding relations among the main route services, among the partial sub-route services, or between the main route and the sub-route services, and the like. For example, the public resource information may include a routing identifier of the total routing service and a routing identifier of the auxiliary service, and a routing forwarding relationship between the total routing service and the auxiliary service, that is, the auxiliary service may be accessed through the total routing service, and a routing relationship between the main routing service and the total routing service may be included, and the total routing service may be accessed through the main routing service.
For each main routing service, the public resource information is stored in a main routing table of the main routing service, and the public resource information stored in the main routing table is diffused to all sub routing services of a domain where the main routing service is located so as to be stored in respective sub routing tables of all sub routing services.
In one possible implementation manner, step S20 further includes steps S21 to S23:
step S21, the public resource information is used as a global route to be stored in a main route table of the main route service;
step S22, based on the main routing service and the main routing table, the global routing is adjacently transferred among all sub routing services of the domain where the main routing service is located;
Step S23, the global route is stored in the respective sub-route tables of the sub-route services.
The common resource information is stored as a global route in each main routing table and each sub routing table. The adjacent transfer refers to resource sharing between adjacent sub-routing services in the same domain, and between adjacent main routing service and each sub-routing service in the same domain, and may be sharing of public resource information. The global route may be a dynamic route. The global route is a route that would be maintained in all the main routing tables and all the sub-routing tables in the cross-domain resource service grid.
When the main routing service obtains the public resource information, the public resource information can be stored in the main routing table as a global routing, and when the routing relation in the main routing table changes, the global routing in the main routing table is diffused into the domain where the main routing service is located and the adjacent sub-routing service of the main routing service so as to store the public resource information in the sub-routing service, and the public resource information can be mutually diffused among the sub-routing services in the same domain, so that all the sub-routing services and the main routing service in the domain can obtain the public resource information, and the public resource information can be stored in the main routing table and the sub-routing table as a global routing. The private resource information and the sub-private resource information both comprise resource services which are not accessed by other domains, the resource services refer to services which are formed by packaging software and hardware resources on a computer or a server, a uniform resource calling interface is provided for the outside, and one service can only provide one type of resource, but can provide a plurality of instances of the resource.
Illustratively, steps S21 through S23 include: the public resource information is used as a global route to be stored in a main route table of the main route service; the main routing service is controlled to share the public resource information to each sub-routing service adjacent to the main routing service in the same domain, so that the public resource information is stored in the sub-routing table of each sub-routing service as a global route, and the public resource information is shared among all adjacent sub-routing services in the same domain, so that the global route corresponding to the public resource information is stored in the sub-routing tables of all the sub-routing services in the same domain. The main routing table and the sub routing table of each domain in the cross-domain resource service grid can store the global routing corresponding to the public resource information through steps S21 to S23.
According to the embodiment, the public resource information is stored in the sub-routing tables of all sub-routing services in the same domain through the main routing service, so that each sub-routing service in the cross-domain resource service grid can correspondingly realize cross-domain calling.
And step S30, storing the private resource information of the domain where the main routing service is located in the main routing table and each sub routing table in the same domain.
It should be noted that, the private resource information is private information inside the domain and not disclosed outside the domain, and the private resource information may be determined based on actual situations. For each domain, the private resource information is stored only in the main routing table of the main routing service and the sub routing table of the sub routing service in the same domain. The private resource information of the same domain includes sub-private service information of each sub-routing service in the same domain. It may be appreciated that each sub-routing service may have respective sub-private service information, which may be set based on actual conditions.
Illustratively, for each primary routing service in the cross-domain resource service grid, private resource information of a domain in which each primary routing service is located is spread among the primary routing service and the secondary routing service in the same domain to be stored in the primary routing table and each of the secondary routing tables in the same domain.
In one possible implementation manner, step S30 further includes steps S31 to S32:
Step S31, controlling the main routing service and each sub routing service of the domain where the main routing service is located, and adjacently transmitting respective sub private service information of each sub routing service;
and step S32, storing the sub-private service information as local routes in the main routing table and the sub-routing tables of the sub-routing services respectively.
It should be noted that, each sub-routing service in the same domain may have sub-private service information, and because each sub-private service information in the same domain is stored in each sub-routing service in a scattered manner, if private resource information is to be stored in all sub-routing services and main routing services in the same domain, each sub-routing service and each adjacent sub-routing service need to share each sub-private service information, and finally, each sub-private service information of each sub-routing service may be shared into the main routing service through a sub-routing service adjacent to the main routing service, so that private resource information of the domain where the main routing service is located is also stored in the main routing service. Thereby enabling resource calls within the domain. The sub-private service information may be stored as a local route in the main routing table and the sub-routing table, and it may be appreciated that the private resource information may be stored as a local route in the main routing table and the sub-routing table. Local routing may also be dynamic routing. The local route is a route stored only in the main route table and the sub route table in the same domain.
When the main routing service transfers the resources stored in the main routing table, it will first judge whether the adjacent sub-routing service of the main routing service is the sub-routing service of the domain where the main routing service is located, if the adjacent sub-routing service is not the sub-routing service of the domain where the main routing service is located, the private resource information is not shared to the adjacent sub-routing service, and if the adjacent sub-routing service is the sub-routing service of the domain where the main routing service is located, the private resource information is shared to the adjacent sub-routing service. It will be appreciated that the primary routing service may also pass on sub-private service information that is not already stored by a neighboring sub-routing service of the same domain to the neighboring sub-routing service.
Illustratively, steps S31-S32 further include: controlling the main routing service and each sub routing service of the domain where the main routing service is located, and adjacently transmitting each sub private service information of each sub routing service; and storing the sub-private service information as local routes in the main routing table and the sub-routing tables of the sub-routing services respectively. The private resource information is stored as the local route in the same domain, so that all the main routing table and the sub routing table can be prevented from storing all the resource information, the main routing table and the sub routing table are prevented from being overlarge, the private resource information is not disclosed outside the same domain, the resource call in the same domain is reflected, and the access is not necessarily provided for other domains, therefore, even if the private resource information is invisible to other domains, the cross-domain call is not influenced, and meanwhile, the security of the private resource information can be also protected.
For a better understanding of the present embodiment, the architecture of the cross-domain resource service grid in the present embodiment is described with reference to fig. 2. The cross-domain resource service grid of fig. 2 includes a total routing service M-R1 and M-R1 as identifiers of the total routing service, an auxiliary service R-Helper, a domain a and a domain B, the domain a includes a main routing service M-R2, a sub routing service a-S-R1 and a sub routing service a-S-R2, the domain B includes a main routing service and a sub routing service M-R3, a sub routing service B-S-R1 and a sub routing service B-S-R2, the sub routing service a-S-R1 corresponds to a sub Private service information a-Private-R1 and a domain Public resource information a-Public-R1, the sub routing service a-S-R2 corresponds to a sub Private service information a-Private-R2 and a domain Public resource information a-Public-R2, the sub routing service B-S-R1 corresponds to a sub routing service information B-PrivBte-R1 and a domain Public resource information B-R1 and a domain Public resource information B-62-R2. The arrows in fig. 2 point to illustrations, and adjacent two may communicate with each other. Wherein the sub-Private service information is stored as a local route in the sub-routing service and is not stored by other domains, e.g. the sub-Private service information a-Private-R2 is stored as a local route in the routing table of the sub-routing service a-S-R2, but the sub-routing services B-S-R1 and B-S-R2 in the domain B do not store the local route of the sub-Private service information a-Private-R2. The case of the routing table will be described with reference to fig. 2 and the following table, in which the total routing service also has a corresponding routing table, and the following description will be given with reference to the routing table of the total routing service M-R1 and the routing table of the main routing service M-R2).
The routing tables of the total routing service M-R1 are global routing, are public resource information, the routing tables of the main routing service M-R2 comprise global routing, and also comprise local routing, namely public resource information and Private resource information, the routing tables of the main routing service M-R2 are local routing except the global routing of the routing table of the total routing service M-R1, for example, in the routing tables of the total routing service M-R1, A-Private-R1-, A-S-R1-, A-Private-R2-, A-S-R1-, A-S-R2-, M-R2-, and Private resource information of the domain where the main routing service M-R2 is located. "- >" means the next hop. The routing table records the service of the next hop which needs to pass when each service is accessed, and if the next hop is the routing service itself, the next hop indicates that the access can be directly performed, for example, the next hop of 'M-R3- > M-R2' in the routing table of the main routing service M-R2 is the main routing service M-R2, so that when the main routing service inquires that the service needs to reach the main routing service M-R2, the main routing service M-R2 can be directly accessed.
Further, referring to fig. 3, in another embodiment of the present application, the same or similar content as the above embodiment may be referred to the above description, and will not be repeated. On this basis, referring to fig. 3, the route configuration method further includes steps a10 to a30:
Step A10, if a resource access request of a resource service to be accessed in the cross-domain resource service grid is monitored, a service starter where the resource service to be accessed is located is called to request connection of a target service of a target resource identifier determined from the resource access request under the condition that a target access state of the resource service to be accessed meets a preset first access condition;
It should be noted that, the application scenario of this embodiment is resource forwarding in the same domain. The resource service to be accessed is any resource service in the same domain, the resource access request is a request for accessing the target service by the resource service to be accessed, the target access state is an access state of the target service to be accessed by the resource service to be accessed, the target access state comprises the first access of the target service to be accessed by the resource service to be accessed after the cross-domain resource service grid is restarted, and the target service to be accessed is repeatedly accessed by the resource service to be accessed after the cross-domain resource service grid is restarted. The preset first access condition comprises the condition that the target access state meets the first access target service of the resource service to be accessed after the cross-domain resource service grid is restarted. The resource service to be accessed has a corresponding service initiator. The resource service to be accessed is the same as the address of its associated service initiator. The target service is a service to be accessed by the resource service to be accessed, the target resource identifier is used for distinguishing different target services, and the target resource identifier can be a domain name of the target service. The resource service to be accessed is a resource service registered in a cross-domain resource service grid.
A service initiator may be invoked to monitor whether a resource service to be accessed in a cross-domain resource service grid initiates a resource access request. The target sub-routing service is a corresponding sub-routing service of the domain in which the resource service to be accessed is located.
Illustratively, step a10 includes: the call service starter monitors whether the resource service to be accessed initiates a resource access request, if so, intercepts the resource access request of the resource service to be accessed, sends the resource access request to a target sub-routing service corresponding to the resource service to be accessed, analyzes the resource access request through the target sub-routing service, and judges whether the target access state of the resource to be accessed meets the preset first access condition; and if the target access state of the resource service to be accessed meets the preset first access condition, calling a service starter where the resource service to be accessed is located, and trying to connect with the target service corresponding to the target resource identifier.
The step of analyzing the resource access request through the target sub-routing service and judging whether the target access state of the resource to be accessed meets the preset first access condition may include: invoking a target sub-routing service, determining a target resource identifier from a resource access request, performing DNS address resolution on the target resource identifier to obtain an address resolution result, and judging whether the resource service to be accessed is first access or not according to the address resolution result; the address analysis result comprises a target resource number, whether the memory of the target sub-routing service has the associated stored resource service to be accessed and the target resource number is judged, and if the memory of the target sub-routing service does not have the associated stored resource service to be accessed and the target resource number, the target access state is determined to meet the preset first access condition.
If the memory of the target sub-routing service has the associated stored resource service to be accessed and the target resource number, judging whether the request connection condition of the memory, which is associated with the resource service to be accessed and the target resource number, is successful connection, and if the request connection condition of the memory, which is associated with the resource service to be accessed and the target resource number, is successful connection, determining that the target access state does not meet the preset first access condition; if the connection condition of the request stored in the memory in association with the resource service to be accessed and the target resource number is connection failure, determining that the target access state does not meet the preset first access condition.
In a possible implementation manner, the step of calling the service initiator where the resource service to be accessed is located in step a10, and requesting to connect to the target service of the target resource identifier determined from the resource access request includes:
And step A10, calling the service starter to request the target service connected with the target resource identifier according to an address analysis result, wherein the address analysis result is obtained by carrying out address analysis on the target resource identifier in the resource access request based on the target sub-routing service of the resource service to be accessed.
It should be noted that, address resolution is to perform DNS resolution on a target resource identifier, where the address resolution result includes a target resource number of a target service and a target address of the target service, where the target address is an IP address of the target service, and is a real address, and after the address resolution result is obtained by calling the sub-routing server, the address resolution result is sent to the service initiator through the target sub-routing server, and the service initiator attempts to connect the target service through the address resolution result.
Illustratively, after the address resolution result is sent to the service initiator by the target sub-routing server, the service initiator is invoked to determine the target address from the address resolution result, and the service initiator is invoked to attempt to connect to the target service by the target address.
In the embodiment, the service initiator is directly called to try to connect the target service, and when the service initiator can successfully connect the target service, the resource to be accessed can also successfully connect the target service, so that the resource access in the same domain is not needed to be realized through the route forwarding.
In a possible embodiment, after the step of monitoring the resource access request of the resource service to be accessed in the cross-domain resource service grid in step a10, the method further includes steps Y10 to Y20:
step Y10, if the target access state of the resource service to be accessed meets the preset repeated access condition, calling the target sub-routing service, and sending a target address obtained by analyzing the target resource identifier in the resource access request to the resource service to be accessed; the preset repeated access condition comprises a request connection condition that the target resource identifier and the resource service to be accessed are associated together in the target sub-routing service, and the request connection condition is that the request connection is successful;
and step Y20, controlling the resource service to be accessed to access the target service through the target address.
In this embodiment, the preset repeated access condition is satisfied, which may indicate that the resource service to be accessed repeatedly accesses the target service after the cross-domain resource service grid is restarted. The preset repeated access condition comprises the condition that the target resource identifier and the resource service to be accessed are associated together in the target sub-routing service, and the condition of the request connection is that the request connection is successful. When the target access state meets the preset repeated access condition, the condition that the resource service to be accessed, the target service and the request connection condition of the resource service to be accessed and the target service are stored in association in the target sub-route service is indicated, the request connection condition meets the preset connection success condition, and the preset connection success condition comprises the success of the attempted connection. It also shows that the resource service to be accessed accesses the target service in the same domain, so that the mutual access between the resource services in the same domain can be saved.
At the moment, the resource service to be accessed does not need to be forwarded through the target sub-routing service, and the target service is directly accessed through the target address, so that the access flow between the resource accesses in the same domain is simplified, and unnecessary loss in the same domain is reduced.
Step A20, judging whether the request connection condition between the service starter and the target service meets the preset connection success condition;
It should be noted that, the connection request case includes a connection attempt failure, and further includes a connection attempt success, and the preset connection success condition includes a connection attempt success. The service initiator tries to connect with the target service through the target address, and when the situation that the service initiator tries to connect with the request of the target service is that the connection attempt is successful, the target address of the target service is in the domain where the resource service to be accessed is located; when the connection request condition of the service initiator for attempting to connect the target service is that the connection attempt fails, the target address of the target service is not in the domain where the resource service to be accessed is located, it can be understood that in this embodiment, the connection attempt by the service initiator can be used to determine whether the target service is in the same domain as the resource service to be accessed, and then the service initiator can generally succeed in attempting to connect the target service in the same domain, and then forwarding through the target sub-routing service is not needed, so that the efficiency of resource access in the same domain is improved, and the routing resources are saved.
For example, after the service initiator is invoked to attempt to connect to the target service, a connection feedback result is generated, where the connection feedback result is a request connection condition, and when the request connection condition is that the attempt connection is successful, the request connection condition satisfies a preset connection success condition, and when the request connection condition is that the attempt connection is failed, the request connection condition does not satisfy the preset connection success condition.
If the request connection condition does not meet the preset connection success condition, returning a target resource number to the resource service to be accessed through the target sub-routing service, calling a service starter to intercept a return result returned by the target sub-routing service to the resource service to be accessed, namely the target resource number, modifying the target resource number into a proxy service address through the service starter, sending the proxy service address to the resource service to be accessed, controlling the resource service to be accessed to access the target service according to the proxy service address, wherein the proxy service address is a routing service address for accessing the target service, and can be the sub-routing service, the main routing service and the like.
And step A30, if the connection request condition meets the preset connection success condition, controlling the resource service to be accessed to access the target service.
In this embodiment, when the connection request is successful, the resource service to be accessed may directly access the target service without forwarding access through the routing service.
In a possible embodiment, the step a30 further includes steps a31 to a32:
Step A31, calling a target sub-routing service associated with the resource service to be accessed, and sending a target address of the target service to the resource service to be accessed, wherein the target address is determined from an address analysis result, and the address analysis result is obtained by carrying out address analysis on a target resource identifier based on the target sub-routing service;
And step A32, controlling the resource service to be accessed to access the target service through the target address, and storing the resource service to be accessed, the target service and the request connection condition association in the target sub-routing service.
It should be noted that, when the request connection condition meets the preset connection success condition, the target sub-routing service is called to send the target address of the target service to the resource service to be accessed, in this case, the target sub-routing service provides a basis for directly accessing the target service for the resource service to be accessed, the resource service to be accessed is assisted to directly access the target address through the target sub-routing service, the proxy address of the target service is not required to be accessed through the target sub-routing service, and then the target sub-routing service is accessed through the proxy address.
Under the condition that the request connection condition meets the preset connection success condition, the resource service to be accessed, the target service and the request connection condition are stored in the memory of the target sub-routing service in an associated mode, so that when the resource service to be accessed is accessed again next time, whether the resource service to be accessed can directly access the target service or not can be determined by searching the resource service to be accessed, the target service and the request connection condition, and further the process of accessing the target service by the resource service to be accessed can be simplified, and after the cross-domain resource service grid is restarted, the request connection condition, the resource service to be accessed and the target service stored in the memory of the target sub-routing service in the last startup can be lost.
The resource service to be accessed, the target service and the request connection condition are stored in the memory in an associated mode in a mapping table mode, and the target service can exist in the memory in the form of a target resource identifier.
Whether the connection request is failed or successful, the resource service to be accessed, the target service and the connection request are stored in the memory of the target sub-routing service in a correlated manner. When the first attempt request connection condition is failure in connection attempt, the memory in the target sub-routing service is searched to find that the resource service to be accessed is failed in connection attempt to the target service, then the service initiator is not required to be called again to try to connect, the target resource number is returned to the resource service to be accessed directly through the target sub-routing service, the service initiator is called to intercept the returned result returned by the target sub-routing service to the resource service to be accessed, namely the target resource number, the target resource number is modified into a proxy service address through the service initiator, the proxy service address is sent to the resource service to be accessed, the resource service to be accessed is controlled to access the target service according to the proxy service address, and the proxy service address can be the sub-routing service, the main routing service and the like.
Illustratively, a target sub-routing service associated with the resource service to be accessed is invoked, a target address is sent to the resource service to be accessed through the target sub-routing service, and the resource service to be accessed is controlled to access the target service through the target address. Meanwhile, the target service, the resource service to be accessed and the request connection condition are stored in the memory of the target sub-routing service, and in this embodiment, the resource service to be accessed and the request connection condition may also be stored in the service initiator, which is not limited in this embodiment.
According to the method and the device for the resource service access, the service starter is called to try to connect the target service, so that the resource service to be accessed is directly controlled to directly access the target service under the condition that the connection attempt is successful, and the access flow between the resource services in the same domain is simplified. In the prior art, even if the mutual access of the resource services in the same domain can be directly accessed, the resource services can be forwarded through a layer of routing service, so that additional overhead is introduced for establishing the network connection of the resource services in the same domain. Compared with the method, the device and the system for accessing the resource service in the same domain simplify the access flow between the resource services in the same domain and improve the efficiency of accessing the resource service in the same domain.
For a better understanding of the embodiment of the present application, with reference to fig. 4, a description is given of a resource service access procedure in the same domain in this embodiment: the resource service to be accessed is registered in a cross-domain resource service grid, the resource service to be accessed is configured on a service starter, and 1, the resource service is started: the service initiator can be called to drive the resource service to be accessed to initiate the resource access request, 2, the service initiator is called to monitor the resource access request, the resource access request of the resource service to be accessed is intercepted, and the sending address of the resource access request is modified to the target sub-routing service (because the destination of the request is an operating system where the service initiator is located when the resource service to be accessed initiates the resource access request, and the resource server to be accessed cannot actually send the request to the operating system, the sending address of the resource server to be accessed needs to be modified to the target sub-routing service so as to ensure that the resource services can be normally mutually called). 3. Address resolution: DNS analysis is carried out on a target resource identifier in the resource access request through the target sub-routing service; 4. informing the server of the target address of the attempt to access the target service: sending the address resolution result to a service initiator through the target sub-routing service so as to attempt to connect with the target service through the service initiator by the target address in the address resolution result; 5. the service starter feeds back the request connection condition: the request connection condition is sent to the sub-routing service through the service starter; 6. if the connection request condition is that the attempted connection is successful, the destination address is sent to the resource service to be accessed through the destination sub-routing service; 7. and controlling the resource service to be accessed to access the target service according to the target address.
The embodiment of the application also provides a route configuration device, please refer to fig. 5, applied to a cross-domain resource service grid, in which a total route service, a main route service and a sub-route service are deployed, the device comprises:
an obtaining module 10, configured to control the primary routing service, and obtain public resource information of all domains in the cross-domain resource service grid from an auxiliary service deployed in the total routing service;
A public storage module 20, configured to store the public resource information in a main routing table of the main routing service and a respective sub routing table of each sub routing service of a domain where the main routing service is located;
and the private saving module 30 is configured to save private resource information of the domain where the main routing service is located in the main routing table and each sub routing table in the same domain.
The route configuration device provided by the embodiment of the application adopts the route configuration method in the embodiment, and aims to solve the technical problem of high cost of resource service cross-domain calling. Compared with the prior art, the route configuration method provided by the embodiment of the present application has the same beneficial effects as those provided by the foregoing embodiment, and other technical features in the route configuration device are the same as those disclosed by the foregoing embodiment method, which is not described in detail herein.
The embodiment of the application provides electronic equipment, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the routing configuration method of the above embodiment.
Referring now to fig. 6, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic device may include a processing apparatus 1001 (e.g., a central processing unit, a graphics processor, etc.), which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage apparatus 1003 into a Random Access Memory (RAM) 1004. In the RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, the ROM1002, and the RAM1004 are connected to each other by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus.
In general, the following systems may be connected to the I/O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, and the like; an output device 1008 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage device 1003 including, for example, a magnetic tape, a hard disk, and the like; and communication means 1009. The communication means may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While electronic devices having various systems are shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 1009, or installed from the storage device 1003, or installed from the ROM 1002. The above-described functions defined in the method of the embodiment of the present disclosure are performed when the computer program is executed by the processing device 1001.
The electronic device provided by the embodiment of the application adopts the route configuration method in the first embodiment to solve the technical problem of high cost of resource service cross-domain calling. Compared with the prior art, the beneficial effects of the product flow data distribution provided by the embodiment of the application are the same as those of the route configuration method provided by the embodiment, and other technical features in the route configuration device are the same as those disclosed by the method of the embodiment, so that the description is omitted herein.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the embodiment of the present application, and the changes or substitutions are covered by the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.
The present embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon for performing the route configuration method in the first embodiment described above.
The computer readable storage medium provided by the embodiments of the present application may be, for example, a usb disk, but is not limited to, an apparatus or a device of an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor, or a combination of any of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable EPROM (ELECTRICAL PROGRAMMABLE READ ONLY MEMORY) or flash memory, an optical fiber, a portable compact disc CD-ROM (compact disc read-only memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, the computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution apparatus, device, or apparatus. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The above-described computer-readable storage medium may be contained in an electronic device; or may exist alone without being assembled into an electronic device.
The computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: controlling a main routing service, and acquiring public resource information of all domains in a cross-domain resource service grid from auxiliary services deployed in a total routing service; storing the public resource information in a main routing table of the main routing service and a sub routing table of each sub routing service of the domain where the main routing service is located; and storing the private resource information of the domain where the main routing service is located in a main routing table and each sub routing table in the same domain.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a LAN (local area network ) or WAN (Wide Area Network, wide area network), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of devices, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based devices which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The computer readable storage medium provided by the embodiment of the application stores the computer readable program instructions for executing the routing configuration method, and aims to solve the technical problem of high cost of resource service cross-domain calling. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the embodiment of the present application are the same as those of the routing configuration method provided by the above embodiment, and are not described in detail herein.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program realizes the steps of the route configuration method when being executed by a processor.
The computer program product provided by the embodiment of the application aims to solve the technical problem of high cost of cross-domain calling of resource services. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as those of the route configuration method provided by the above embodiment, and are not described herein.
The foregoing description is only the preferred embodiments of the present application, and is not intended to limit the scope of the embodiments of the present application, but rather the equivalent structures or equivalent flow transformations of the descriptions and the drawings of the embodiments of the present application, or direct or indirect application to other related technical fields, are all included in the scope of the embodiments of the present application.

Claims (10)

1. The method for configuring the route is characterized by being applied to a cross-domain resource service grid, wherein a total route service, a main route service and a sub-route service are deployed in the cross-domain resource service grid, and the method comprises the following steps:
Controlling the main routing service, and acquiring public resource information of all domains in the cross-domain resource service grid from auxiliary services deployed in the main routing service;
Storing the public resource information in a main routing table of the main routing service and a sub routing table of each sub routing service of the domain where the main routing service is located;
and storing the private resource information of the domain where the main routing service is located in the main routing table and each sub routing table in the same domain.
2. The method of claim 1, wherein the common resource information comprises domain common resource information, the method further comprising:
And controlling each domain in the cross-domain resource service grid to store the respective domain public resource information in the auxiliary service.
3. The method of claim 1, wherein the step of storing the common resource information in a main routing table of the main routing service and a sub routing table of each sub routing service of a domain in which the main routing service is located comprises:
the public resource information is used as a global route to be stored in a main route table of the main route service;
Based on the main routing service and the main routing table, the global routing is adjacently transferred among all sub routing services of the domain where the main routing service is located;
and storing the global route in a respective sub-route table of each sub-route service.
4. The method of claim 1, wherein the private resource information comprises sub-private service information of a sub-routing service;
the step of storing the private resource information of the domain where the main routing service is located in the main routing table and each sub routing table in the same domain includes:
Controlling the main routing service and each sub routing service of the domain where the main routing service is located, and adjacently transmitting each sub private service information of each sub routing service;
And storing the sub-private service information as local routes in the main routing table and the sub-routing tables of the sub-routing services respectively.
5. The method of claim 1, wherein the method further comprises:
If a resource access request of a resource service to be accessed in the cross-domain resource service grid is monitored, calling a service starter where the resource service to be accessed is located to request connection of a target service of a target resource identifier determined from the resource access request under the condition that a target access state of the resource service to be accessed meets a preset first access condition;
judging whether the request connection condition between the service starter and the target service meets a preset connection success condition or not;
And if the request connection condition meets the preset connection success condition, controlling the resource service to be accessed to access the target service.
6. The method of claim 5, wherein the step of controlling the resource service to be accessed to access the target service comprises:
Invoking a target sub-routing service associated with the resource service to be accessed, and sending a target address of the target service to the resource service to be accessed, wherein the target address is determined from an address resolution result, and the address resolution result is obtained by performing address resolution on a target resource identifier based on the target sub-routing service;
And controlling the resource service to be accessed to access the target service through the target address, and storing the resource service to be accessed, the target service and the request connection condition association in the target sub-routing service.
7. The method of claim 5, further comprising, after the step of if a resource access request for a resource service to be accessed in the cross-domain resource service grid is detected:
if the target access state of the resource service to be accessed meets the preset repeated access condition, the target sub-routing service is called, and a target address obtained by analyzing the target resource identification in the resource access request is sent to the resource service to be accessed; the preset repeated access condition comprises a request connection condition that the target resource identifier and the resource service to be accessed are associated together in the target sub-routing service, and the request connection condition is that the request connection is successful;
and controlling the resource service to be accessed to access the target service through the target address.
8. A route configuration device, applied to a cross-domain resource service grid, where a total route service, a main route service, and a sub-route service are deployed, the device comprising:
the acquisition module is used for controlling the main routing service and acquiring public resource information of all domains in the cross-domain resource service grid from auxiliary services deployed in the total routing service;
The public storage module is used for storing the public resource information in a main routing table of the main routing service and a sub routing table of each sub routing service of the domain where the main routing service is located;
And the private preservation module is used for preserving private resource information of the domain where the main routing service is located in the main routing table and each sub routing table in the same domain.
9. An electronic device, the electronic device comprising:
at least one processor;
and a memory communicatively coupled to the at least one processor;
Wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the route configuration method of any one of claims 1 to 7.
10. A storage medium, characterized in that the storage medium is a computer-readable storage medium, on which a program implementing a route configuration method is stored, the program implementing the route configuration method being executed by a processor to implement the steps of the route configuration method according to any one of claims 1 to 7.
CN202410688904.1A 2024-05-30 2024-05-30 Route configuration method, device, electronic equipment and storage medium Pending CN118660001A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410688904.1A CN118660001A (en) 2024-05-30 2024-05-30 Route configuration method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410688904.1A CN118660001A (en) 2024-05-30 2024-05-30 Route configuration method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN118660001A true CN118660001A (en) 2024-09-17

Family

ID=92701028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410688904.1A Pending CN118660001A (en) 2024-05-30 2024-05-30 Route configuration method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN118660001A (en)

Similar Documents

Publication Publication Date Title
CN109889621B (en) Configuration method and device of virtual private cloud service
WO2020057163A1 (en) Mec platform deployment method and device
CN114025021B (en) Communication method, system, medium and electronic equipment crossing Kubernetes cluster
JP2019528005A (en) Method, apparatus, and system for a virtual machine to access a physical server in a cloud computing system
US10235189B2 (en) Isolating a redirected smart card reader to a remote session
CN111327668B (en) Network management method, device, equipment and storage medium
US20110258318A1 (en) Network device and method for dynamically allocating connection resources
CN112104640B (en) Data processing method, device and equipment of gateway and readable storage medium
CN112333017B (en) Service configuration method, device, equipment and storage medium
JP2019525604A (en) Network function NF management method and NF management apparatus
CN112822061B (en) Method and system for exposing service to outside by edge node
CN111726400A (en) Reverse connection method, device and server-side system
CN113676564A (en) Data transmission method, device and storage medium
CN116389599A (en) Gateway service request processing method and device and cloud native gateway system management method and device
US10135916B1 (en) Integration of service scaling and external health checking systems
CN114938395A (en) Service response method, device, equipment and storage medium
CN112655185B (en) Apparatus, method and storage medium for service allocation in a software defined network
CN114244654B (en) URL forwarding method, device, equipment and computer storage medium
US10594511B2 (en) Address system
CN118660001A (en) Route configuration method, device, electronic equipment and storage medium
CN114760360A (en) Request response method and device, electronic equipment and computer readable storage medium
CN114866854A (en) Video access mode dynamic allocation method, system, electronic equipment and storage medium
EP4057577B1 (en) Addressing method and addressing apparatus
US10824476B1 (en) Multi-homed computing instance processes
CN115412549A (en) Information configuration method and device and request processing method and device

Legal Events

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