Service access method, device and equipment and computer storage medium

CN118945221AActive Publication Date: 2024-11-12CHINA MOBILE M2M +1
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202410634487.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-11-12
Estimated Expiration
2044-05-20

AI Technical Summary

Technical Problem

During the communication between the cloud and the edge gateway, container applications of external business systems and middleware cannot be migrated, resulting in unavailability of services and affecting the user experience.

Method used

By querying the target service information and its corresponding access channel in the service information database, and determining the second access end of the target service without querying the channel, the target service information is sent to establish a data transmission and communication channel, ensuring that the container can Access services in the edge gateway.

Benefits of technology

It realizes service availability between the cloud platform and edge gateway, improves user experience, avoids unavailability of services, and ensures the normal operation of the edge cloud collaborative system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945221A_ABST
    Figure CN118945221A_ABST
Patent Text Reader

Abstract

The invention discloses a service access method, device and equipment and a computer storage medium, and the method comprises the steps: responding to a received access request of a target service, and when the target service is determined to be a service deployed on a second access end, sending the access request to the second access end; querying target service information corresponding to the access request and a target service access channel corresponding to the target service information in a service information base; under the condition that the target service information is queried but the target service access channel is not queried, determining a second target access end corresponding to the target service through the target service information; sending the target service information to a second target access end; receiving a first channel returned by the second access end, and establishing a target service access channel based on the first channel; and accessing the target service based on the target service access channel. According to the embodiment of the invention, the container in the first access end can access the service in the second access end, and the problem of poor user experience caused by unavailability of the service during interaction is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of Internet of Things, and in particular, relates to a service access method, device, equipment and computer storage medium. Background Art

[0002] With the popularization of IoT devices and the improvement of edge computing capabilities, the large amount of data generated by each device in the edge gateway can be transmitted to the cloud for further analysis and storage after preliminary processing, thereby improving the speed and accuracy of data processing, while reducing the cost and bandwidth requirements of data transmission.

[0003] In related technologies, the communication between the cloud and the edge gateway can be achieved through the MQTT (Message Queuing Telemetry Transport) protocol and the WebSocket protocol. Alternatively, the communication between the cloud and the edge gateway can be established by using an open source high-performance remote procedure call gRPC system.

[0004] However, in the related technology, during the communication between the cloud and the edge gateway, the container applications corresponding to the external business systems and middleware in the cloud and the edge gateway cannot be migrated, resulting in the unavailability of the container applications and affecting the user experience. Summary of the invention

[0005] The embodiment of the present application provides a service access method, apparatus, device and computer storage medium. When a first access terminal receives an access request for a target service and determines that the target service is a service deployed on a second access terminal, the target service information corresponding to the access request and its corresponding target service access channel are queried from a service information library. When the target service information is queried but the target service access channel is not queried, the second target access terminal corresponding to the target service is determined, and the target service information is sent to the second target access terminal, so that the second target service terminal can return the first channel based on the target service information, so that the first access terminal can establish an access channel for the target service based on the first channel, and access the target service through the target service channel, so that the container in the first access terminal can access the service in the second access terminal, avoiding the problem of poor user experience caused by service unavailability when the first access terminal interacts with the second access terminal.

[0006] In a first aspect, an embodiment of the present application provides a service access method, which is applied to a first access terminal, and the method includes: in response to receiving an access request for a target service, when it is determined that the target service is a service deployed on a second access terminal, querying the target service information corresponding to the access request and its corresponding target service access channel in a service information library, wherein one of the first access terminal and the second access terminal is a cloud platform and the other is an edge gateway; when the target service information is queried but the target service access channel is not queried, determining the second target access terminal corresponding to the target service through the target service information; sending the target service information to the second target access terminal; receiving the first channel returned by the second access terminal, and establishing the target service access channel based on the first channel, the first channel is obtained by the second target access terminal by binding the data transmission channel and the communication channel of the target service, the data transmission channel of the target service is the data transmission channel established between the second target access terminal and the target service when the second target access terminal receives the target service information, and the communication channel is the communication channel between the second target access terminal and the first access terminal; accessing the target service based on the target service access channel.

[0007] In one embodiment, before responding to receiving an access request for a target service, the method further includes: receiving second service information sent by a second access terminal; and constructing a service information library based on the first service information and the second service information registered in the first access terminal.

[0008] In one implementation, determining that the target service is the second access end service includes: parsing an access request for the target service to obtain domain name information corresponding to the target service; and querying a service information library based on the domain name information to determine that the target service is the second access end service.

[0009] In one implementation, after establishing the target service access channel, the method further includes: storing the target service access channel in a service information library.

[0010] In one embodiment, after responding to receiving an access request for a target service, the method further includes: when determining that the target service is a service deployed on a first access terminal, obtaining target service information corresponding to the access request from a service information library; and accessing the target service based on the target service information.

[0011] In one embodiment, after querying the service information library for the target service information corresponding to the access request and its corresponding target service access channel, the method further includes: accessing the target service based on the target service access channel when the target service information and the target service access channel are queried.

[0012] In a second aspect, an embodiment of the present application provides a service access device, the device comprising:

[0013] A query module, configured to, in response to receiving an access request to a target service, query a service information repository for target service information corresponding to the access request and a target service access channel corresponding to the access request when determining that the target service is a service deployed on a second access terminal, wherein one of the first access terminal and the second access terminal is a cloud platform and the other is an edge gateway;

[0014] A determination module, used to determine a second target access end corresponding to the target service through the target service information when the target service information is found but the target service access channel is not found;

[0015] A sending module, used for sending target service information to the second target access terminal;

[0016] a receiving module, configured to receive a first channel returned by a second access terminal, and establish a target service access channel based on the first channel, wherein the first channel is obtained by the second target access terminal by binding a data transmission channel and a communication channel of a target service, the data transmission channel of the target service is a data transmission channel established between the second target access terminal and the target service when the second target access terminal receives target service information, and the communication channel is a communication channel between the second target access terminal and the first access terminal;

[0017] The access module is used to access the target service based on the target service access channel.

[0018] In a third aspect, an embodiment of the present application provides a service access device, the device comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method in the first aspect or any one of the embodiments of the first aspect is implemented.

[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, a method as in the first aspect or any one of the embodiments of the first aspect is implemented.

[0020] In a fifth aspect, an embodiment of the present application provides a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes a method as in the first aspect or any one of the embodiments of the first aspect.

[0021] The service access method, apparatus, device and computer storage medium of the embodiment of the present application, when a first access terminal receives an access request for a target service and determines that the target service is a service deployed on a second access terminal, queries the target service information corresponding to the access request and its corresponding target service access channel from a service information library. And when the target service information is queried but the target service access channel is not queried, the second target access terminal corresponding to the target service is determined, and the target service information is sent to the second target access terminal, so that the second target service terminal can return the first channel based on the target service information, so that the first access terminal establishes an access channel for the target service based on the first channel, and accesses the target service through the target service channel, so that the container in the first access terminal can access the service in the second access terminal, avoiding the problem of poor user experience caused by service unavailability when the first access terminal interacts with the second access terminal. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0023] Figure 1 A schematic diagram of the structure of an edge-cloud collaborative system provided by an embodiment of the present application is shown;

[0024] Figure 2 A schematic diagram showing a flow chart of a service access method provided by an embodiment of the present application is shown;

[0025] Figure 3 A flow chart showing another service access method provided by an embodiment of the present application is shown;

[0026] Figure 4 A flow chart of another service access method provided by an embodiment of the present application is shown;

[0027] Figure 5 A flow chart showing another service access method provided by an embodiment of the present application is shown;

[0028] Figure 6 A flow chart showing another service access method provided by an embodiment of the present application is shown;

[0029] Figure 7 A schematic diagram showing the structure of a service access device provided by an embodiment of the present application is shown;

[0030] Figure 8 A schematic diagram of the hardware structure of the service access provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0031] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

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

[0033] With the rapid improvement of cloud computing and edge computing capabilities, edge-cloud collaborative systems have gradually become an important part of the Internet of Things industry. In related technologies, edge-cloud collaborative systems are generally composed of cloud platforms and edge gateways. In addition, the cloud platform and the edge gateway can be connected through the MQTT (Message Queuing Telemetry Transport) protocol and the WebSocket protocol. Alternatively, in related technologies, communication between the cloud and the edge gateway can also be established through gRPC. Among them, gRPC is an open source remote procedure call system. The system is based on HTTP / 2 protocol transmission and uses Protocol Buffers as the interface description language. In addition, gRPC has the advantages of supporting bidirectional streams and multiplexing.

[0034] However, with the continuous development of technology, more and more middleware and external systems need to be connected to cloud platforms or edge gateways. In related technologies, due to the lack of consistent access methods for container applications that rely on external systems or middleware, cloud platform applications cannot be normally migrated to edge gateways, or edge gateway applications cannot be normally migrated to cloud platforms, resulting in unavailability of services corresponding to container applications, affecting user experience.

[0035] Therefore, the embodiments of the present application provide a service access method, apparatus, device and computer storage medium. The service access method provided by the embodiments of the present application is introduced below.

[0036] The service access method provided in the embodiment of the present application can be applied to an edge-cloud collaborative system, wherein the edge-cloud collaborative system includes at least a cloud platform and an edge gateway, and both the cloud platform and the edge gateway can access one or more external systems and / or middleware.

[0037] Furthermore, the cloud platform and the edge gateway in the edge-cloud collaborative system in the embodiment of the present application may include a communication module, a protocol proxy module and a service management module. Among them, the communication module can be used to establish an edge-cloud connection and realize edge-cloud communication. Among them, it can be understood that the communication module can rely on the communication protocol to realize that the edge protocol proxy module can be used to receive service access requests sent by an external system or middleware. The service management module can be used to provide an external system or middleware with the ability to register as a service, and can be used to store service information corresponding to the external system or middleware.

[0038] In one example, Figure 1 A schematic diagram of the structure of an edge-cloud collaborative system provided by an embodiment of the present application is shown. Figure 1 As shown, the edge-cloud collaborative system 100 includes a cloud platform 110 and an edge gateway 120. The cloud platform 110 includes a first container application 111, a first protocol proxy module 112, a first service management module 113, and a communication service end 114. The first container application 111 is an application based on the cloud platform.

[0039] The first protocol proxy module 112 may include a resolver for resolving the service access request sent by the first container application 111. For example, the resolver may be a Domain Name System (DNS) resolver. In one example, when the protocol proxy module receives a domain name resolution request sent by the container application, the domain name resolution request may be resolved by the DNS resolver.

[0040] Among them, the first service management module 113 can be used to provide the ability to register as a service for the external system or middleware connected to the cloud platform, and can be used to store the service information corresponding to the external system or middleware. Among them, the service management module can provide at least two registration methods: page and application programming interface (Application Programming Interface, API). And the registration parameters at least include information such as service name, local Internet Protocol (Internet Protocol, IP) and port. The service information stored in the service management module includes at least information such as service name, local IP, port, environment, protocol, gateway IP, etc., among which the environment can be used to indicate whether the environment in which the service is located is located at the edge gateway or at the cloud platform.

[0041] The communication server 114 may be a gRPC server, and the edge gateway may use a gRPC client to connect to the server to implement edge-cloud communication based on the gRPC protocol.

[0042] In the embodiment of the present application, the edge gateway 120 may include a second container application 121, a second protocol proxy module 122, a second service management module 123, and a communication client 124. The container application 121 may be an application program in the edge gateway.

[0043] The second protocol proxy module 122 and the second service management module 123 have the same functions as the first protocol proxy module 112 and the first service management module 113, and will not be described in detail here. The communication client 124 can be a gRPC client, which connects to the tunnel server using the gRPC protocol to achieve cloud-edge communication.

[0044] Further, it can be understood that the service access method provided in the embodiments of the present application can be applied to the above-mentioned edge-cloud collaborative system, so as to achieve normal migration of applications.

[0045] The following is an introduction to the service access method provided in the embodiment of the present application.

[0046] Figure 2 FIG. 1 is a flow chart showing a service access method provided by an embodiment of the present application. Figure 2 As shown, the service access method is applied to the first access terminal, and the service access method provided in the embodiment of the present application includes the following steps:

[0047] S210. In response to receiving an access request for a target service, when it is determined that the target service is a service deployed on the second access terminal, query the service information library for target service information corresponding to the access request and its corresponding target service access channel.

[0048] Among them, one of the first access terminal and the second access terminal is a cloud platform and the other is an edge gateway. In one example, when the first access terminal is a cloud platform, the second access terminal can be an edge gateway. In another example, when the first access terminal is an edge gateway, the second access terminal can be a cloud platform.

[0049] In the embodiment of the present application, the target service may be a service that an application in the first access terminal needs to access.

[0050] In the embodiment of the present application, after the first access terminal receives the target service access request sent by the application in the first access terminal, it is determined whether the target service in the access request is a service deployed on the second access terminal. In the case where it is determined that the target service is a service deployed on the second access terminal, the target service information corresponding to the access request and its corresponding target service access channel are queried in the service information library.

[0051] In one example, when the first access end is a cloud platform and the second access end can be an edge gateway, when the protocol proxy module in the cloud platform receives a target service access request sent by an application in the cloud platform, it is determined whether the target service is a service deployed on the edge gateway. When it is determined that the target service is a service deployed on the edge gateway, the target service information and its corresponding target service access channel are queried in the service information library in the service management.

[0052] Furthermore, the domain name information corresponding to the target service can be obtained by parsing the access request of the target service, and the service information database can be queried based on the domain name information to determine that the target service is the second access terminal service.

[0053] In one example, when the first access end is a cloud platform and the second access end can be an edge gateway, the access request of the target service can be parsed by the protocol proxy module of the cloud platform to obtain the domain name information corresponding to the target service, and query the service information library based on the domain name information to determine that the target service is the second access end service.

[0054] It can be understood that in the embodiment of the present application, there may be one or more second access terminals communicating with the first access terminal.

[0055] In an embodiment of the present application, by parsing the access request of the target service, the domain name information corresponding to the target service is obtained, and the service information library is queried based on the domain name information to determine that the target service is a second access terminal service, thereby enabling the second target access terminal where the target service is located to be quickly and accurately determined.

[0056] S220: When the target service information is found but the target service access channel is not found, determine a second target access end corresponding to the target service through the target service information.

[0057] In the embodiment of the present application, the second target access terminal may be the second access terminal for deploying the target service.

[0058] In an embodiment of the present application, when the target service information is found in the service information database but the target service access channel is not found, the second target access end corresponding to the target service is determined through the target service information.

[0059] S230. Send target service information to the second target access terminal.

[0060] In an embodiment of the present application, target service information can be sent to a second target access terminal through a first access terminal.

[0061] In one example, the gRPC server of the cloud platform may send target service information to the gRPC client of the edge gateway. For example, a channel establishment message may be sent to the gRPC client, wherein the channel establishment message includes the target service information and a channel establishment request.

[0062] S240: Receive the first channel returned by the second access end, and establish a target service access channel based on the first channel.

[0063] The first channel is obtained by the second target access terminal by binding the data transmission channel and the communication channel of the target service. The data transmission channel of the target service is the data transmission channel established between the second target access terminal and the target service when the second target access terminal receives the target service information, and the communication channel is the communication channel between the second target access terminal and the first access terminal.

[0064] It is understandable that when the second target access terminal receives the target service information sent by the first access terminal, the second target access terminal can determine the target service through the target service information and establish a connection between the second target access terminal and the target service. It is understandable that the connection between the second target access terminal and the target service is used to transmit data of the target service. In addition, the second target access terminal can also establish a connection with the first access terminal, bind the connection with the connection between the target access terminal and the target service, and feed it back to the first access terminal. After the first access terminal receives the bound connection channel sent by the second target access terminal, it establishes a target service access channel by combining it with the access request.

[0065] S250: Access the target service based on the target service access channel.

[0066] In the embodiment of the present application, the application on the first server can access the target service through the established target service access channel.

[0067] When the first access terminal receives an access request for the target service and determines that the target service is a service deployed on the second access terminal, the target service information corresponding to the access request and its corresponding target service access channel are queried from the service information library. When the target service information is queried but the target service access channel is not queried, the second target access terminal corresponding to the target service is determined, and the target service information is sent to the second target access terminal, so that the second target service terminal can return the first channel based on the target service information, so that the first access terminal can establish an access channel for the target service based on the first channel, and access the target service through the target service channel, so that the container in the first access terminal can access the service in the second access terminal, avoiding the problem of poor user experience caused by service unavailability when the first access terminal interacts with the second access terminal.

[0068] As another implementation of the present application, in order to enable the first access terminal to query the target service information corresponding to the target service, the present application also provides another implementation of the service access method, please refer to the following embodiments for details.

[0069] See also Figure 3 , Figure 3 A flow chart of another service access method provided by an embodiment of the present application is shown, comprising the following steps:

[0070] S310: Receive second service information sent by a second access terminal.

[0071] In the embodiment of the present application, the second service information may be information corresponding to one or more external systems and / or one or more middleware deployed in the second access terminal. It is understandable that before the second access terminal sends the second service information to the first access terminal, the external system or middleware in the second access terminal may be registered through the service management module in the second access terminal, and the registration information may be stored in the service management module.

[0072] In the embodiment of the present application, the transmission of service information can be achieved through the communication module in the second access terminal.

[0073] S320: Build a service information library based on the first service information and the second service information registered in the first access terminal.

[0074] In the embodiment of the present application, the first service information is information corresponding to one or more external systems and / or one or more middlewares deployed in the first access terminal.

[0075] In the embodiment of the present application, the first access terminal can establish a service information library in combination with the first service information and the second service information.

[0076] S330. In response to receiving an access request for a target service, when it is determined that the target service is a service deployed on the second access terminal, query the service information library for target service information corresponding to the access request and its corresponding target service access channel.

[0077] S340: When the target service information is found but the target service access channel is not found, determine the second target access end corresponding to the target service through the target service information.

[0078] S350. Send target service information to the second target access terminal.

[0079] S360: Receive the first channel returned by the second access end, and establish a target service access channel based on the first channel.

[0080] S370. Access the target service based on the target service access channel.

[0081] In the embodiment of the present application, S320 to S370 are the same as S210 to S250 in the above embodiment, and for the sake of brevity, they are not described in detail here.

[0082] In the embodiment of the present application, by receiving the second service information sent by the second access terminal and combining it with the first service information registered by the external system or middleware in the first access terminal, a service information library is established, so that when the first access terminal receives an access request, it can determine whether the target service is a service deployed on the second access terminal based on the service information library. In addition, by synchronizing the service information library constructed by the second service information of the second access terminal, it is also possible to obtain the target service information of the target service and send it to the second access terminal when the target service is a service deployed on the second terminal, so that the second access terminal can determine the target service through the target service information, and then establish an access channel for the target service.

[0083] Furthermore, in order to improve the communication efficiency of the edge-cloud collaborative system and save communication resources, the present application also provides another implementation method of the service access method, please refer to the following embodiments for details.

[0084] See also Figure 4 , Figure 4 A flow chart of another service access method provided by an embodiment of the present application is shown, comprising the following steps:

[0085] S410. In response to receiving an access request for a target service, when it is determined that the target service is a service deployed on the second access terminal, query the service information library for target service information corresponding to the access request and its corresponding target service access channel.

[0086] S420: When the target service information is found but the target service access channel is not found, determine the second target access end corresponding to the target service through the target service information.

[0087] S430. Send target service information to the second target access terminal.

[0088] S440: Receive the first channel returned by the second access end, and establish a target service access channel based on the first channel.

[0089] S450: Access the target service based on the target service access channel.

[0090] S460: Store the target service access channel in the service information library.

[0091] In the embodiment of the present application, S410 to S450 are the same as S210 to S250 in the above embodiment, and for the sake of brevity, they are not described in detail here.

[0092] In an embodiment of the present application, the first access end stores the target service access channel in the service information library, so that when the first access end receives an access request to access the target service again, it can access it through the established access channel, which not only improves access efficiency but also saves resources.

[0093] In the embodiment of the present application, after the first access terminal receives the access request of the target service, the first access terminal can also determine through the service information library that the target service is a service deployed on the first access terminal. Further, the present application also provides another implementation of the service access method, see the following embodiment for details.

[0094] See also Figure 5 , Figure 5 A flow chart of another service access method provided by an embodiment of the present application is shown, comprising the following steps:

[0095] S510. In response to receiving an access request for a target service, if it is determined that the target service is a service deployed on the first access terminal, obtain target service information corresponding to the access request from a service information repository.

[0096] S520: Access the target service based on the target service information.

[0097] In an embodiment of the present application, the first access terminal can determine the domain name information corresponding to the target service by parsing the access request of the target service, and query the service information library through the parsed domain name information, so as to determine that the target service is deployed on the first access terminal.

[0098] In an embodiment of the present application, when it is determined that the target service is a service deployed on the first access end, the first access end can obtain the target service information corresponding to the access request from the service information library, and establish a connection with the target service based on the target service information, thereby achieving access to the target service.

[0099] In an embodiment of the present application, by determining that the target service is a service deployed on the first access end, obtaining the target service information corresponding to the access request from the service information library, and establishing a connection with the target service based on the target service information, access to the target service is achieved, so that the application of the first access end can access the service corresponding to the external system or middleware deployed on the first access end in a simple and efficient manner.

[0100] In an embodiment of the present application, in order to improve the communication efficiency of the edge-cloud collaborative system and save communication resources, the present application also provides another implementation method of the service access method, please refer to the following embodiment for details.

[0101] See also Figure 6 , Figure 6 A flow chart of another service access method provided by an embodiment of the present application is shown, comprising the following steps:

[0102] S610. In response to receiving an access request for a target service, when it is determined that the target service is a service deployed on the second access terminal, query the service information library for target service information corresponding to the access request and its corresponding target service access channel.

[0103] S620: When the target service information and the target service access channel are found, access the target service based on the target service access channel.

[0104] In the embodiment of the present application, S610 is the same as S210 in the above embodiment and will not be described in detail here for the sake of brevity.

[0105] In an embodiment of the present application, when the target service is determined to be a service deployed on the second access end, and the target service information and the target service access channel are queried in the service information library, the target service can be accessed directly through the target access channel, thereby saving resources while also improving the access speed of the target service.

[0106] In the present application embodiment, combined Figure 1 The edge cloud collaborative system involved in the invention and the following examples illustrate the service access method. It can be understood that in the following examples of this application, the cloud platform is used as the first access terminal and the edge gateway is used as the second access terminal for illustration.

[0107] In an embodiment of the present application, edge-cloud communication can be established between the cloud platform and the edge gateway by defining a gRPC protocol interface. In one example, a gRPC service containing two interfaces can be defined, where the two interfaces can be a Tunnel interface and a Stream interface. Moreover, both interface parameters and return types are streams, which can be used to indicate that both interfaces can perform streaming communication between the gRPC client and the gRPC server in the edge-cloud collaborative system. Among them, the Tunnel interface can be used for the edge gateway to connect to the cloud platform as the initial communication channel. The Stream interface can be used for the edge gateway to establish a new communication channel to the cloud platform, specifically as a communication channel between applications in the cloud platform and the services corresponding to the edge gateway, and is used to carry and forward Transmission Control Protocol (TCP) communications.

[0108] In the embodiment of the present application, the gRPC service client can be connected to the cloud platform gRPC server, and the gRPC client calls the Tunnel method to establish an initial communication channel between the edge gateway and the cloud platform. And the service information is synchronized through the initial communication channel.

[0109] It is understandable that before synchronizing the service information, the service information may be registered through the first service management module and the second service management module in the cloud platform and the edge gateway.

[0110] In the embodiment of the present application, the cloud platform can register the external system and middleware deployed on the first access terminal through the registration capability provided by the first service management module, and store the corresponding first service information. The edge gateway can register the external system and middleware deployed on the second access terminal through the registration capability provided by the second service management module, and store the corresponding second service information.

[0111] Among them, it can be understood that the external systems or middleware deployed in the cloud platform or edge gateway usually communicate based on the TCP protocol. Therefore, in the embodiment of the present application, it can be judged whether the target service in the access request is based on the TCP protocol communication, so as to judge whether the target service is the service corresponding to the external system or middleware. Further, it can be understood that in the embodiment of the present application, for external systems or middleware that use other protocols for communication, such as Hypertext Transfer Protocol (HTTP) or Kafka, MySQL can also be registered through the service management module. Among them, Kafka can represent data publishing and subscription processing, and MySQL can represent data persistence storage.

[0112] In an embodiment of the present application, the registration parameters for the external system or middleware include at least information such as the service name, the local Internet Protocol (IP), and the port. The service information stored in the service management module includes at least information such as the service name, local IP, port, environment, protocol, gateway IP, etc., wherein the environment can be used to indicate whether the environment in which the service is located is located at the edge gateway or at the cloud platform. In addition, in an embodiment of the present application, the gateway ID can be set to a namespace to distinguish services between different gateways. It can be understood that in the embodiment of the present application, the principle of free communication between cloud-edge applications and services under the same namespace is followed to simplify the communication process and ensure resource isolation.

[0113] Furthermore, the edge gateway synchronizes the second service information to the cloud platform through the initial communication channel. The first service management module in the cloud platform establishes a service information library based on the second service information and the first service information.

[0114] In the embodiment of the present application, when the cloud platform receives the access request sent by the first container application 111, the access request is parsed based on the first protocol proxy module, the domain name information corresponding to the target service in the access request is determined, and the service information library stored in the first service management module 113 is queried to determine whether it is a service in the edge gateway and whether it is a TCP protocol. Among them, the Kubernetes mechanism can be used to set the DNS to the address of the first protocol proxy module, that is, the domain name resolution is performed by the first protocol proxy module.

[0115] In an embodiment of the present application, if the target service is a service in an edge gateway or is not a TCP protocol, the original kubernetes domain name resolution server is requested to obtain the domain name resolution result and return it to the first container application 111.

[0116] In an embodiment of the present application, if the target service is a service in an edge gateway and is also a TCP protocol, the first protocol proxy module 112 can send a message to the gPRC client of the edge gateway on the Tunnel information channel based on the gPRC connection between the cloud platform and the edge gateway, wherein the message includes at least: service name and new stream. After receiving the message, the gPRC client forwards the service name to the second protocol proxy module 122. The second protocol proxy module 122 obtains the target service information, including IP, port, and TCP protocol, based on the service name, and initiates a TCP connection to the target service. After the TCP connection is successful, a new information stream is created using the stream interface, and the information stream is bound to the TCP connection stream. After the binding is successful, the stream interface returns normally.

[0117] In the embodiment of the present application, the first protocol proxy module 112 receives a new stream created by a stream interface, connects the access request with the stream information flow, and thus establishes an access channel to the target service.

[0118] In the embodiment of the present application, the first access end is an edge gateway, and the second access end is a cloud embodiment. The process is the same as the above embodiment, and will not be elaborated here.

[0119] Based on the service access method provided in the above embodiment, the present application also provides a specific implementation of the service access device. Please refer to the following embodiment.

[0120] See first Figure 7 , Figure 7 The schematic diagram of the structure of a service access device provided by an embodiment of the present application is shown. The service access device 700 includes the following modules:

[0121] The query module 710 is used to respond to receiving an access request for a target service. When it is determined that the target service is a service deployed on a second access end, query the service information corresponding to the access request and its corresponding target service access channel in the service information library, wherein one of the first access end and the second access end is a cloud platform and the other is an edge gateway.

[0122] The determination module 720 is used to determine the second target access end corresponding to the target service through the target service information when the target service information is found but the target service access channel is not found.

[0123] The sending module 730 is used to send the target service information to the second target access terminal.

[0124] The receiving module 740 is used to receive the first channel returned by the second access terminal and establish a target service access channel based on the first channel. The first channel is obtained by the second target access terminal by binding the data transmission channel and the communication channel of the target service. The data transmission channel of the target service is a data transmission channel established between the second target access terminal and the target service when the second target access terminal receives the target service information. The communication channel is a communication channel between the second target access terminal and the first access terminal.

[0125] The access module 750 is used to access the target service based on the target service access channel.

[0126] In one embodiment, in order to enable the first access terminal to query the target service information corresponding to the target service, the above-mentioned device may also include: a storage module for receiving the second service information sent by the second access terminal; and constructing a service information library based on the first service information and the second service information registered in the first access terminal.

[0127] In one implementation, the determination module 720 determines that the target service is the second access end service by: parsing the access request of the target service to obtain the domain name information corresponding to the target service; querying the service information library based on the domain name information to determine that the target service is the second access end service.

[0128] In one implementation, the storage module is further used to: store the target service access channel in a service information library.

[0129] In one embodiment, the query module 710 is further configured to: when determining that the target service is a service deployed on the first access terminal, obtain target service information corresponding to the access request from the service information library. The access module 750 is further configured to access the target service based on the target service information.

[0130] In one embodiment, in order to improve the communication efficiency of the edge-cloud collaborative system and save communication resources, the access module 750 is also used to: access the target service based on the target service access channel when the target service information and the target service access channel are queried.

[0131] Figure 8 A schematic diagram of the hardware structure of the service access provided by an embodiment of the present application is shown.

[0132] The in-service access device may include a processor 801 and a memory 802 storing computer program instructions.

[0133] Specifically, the processor 801 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0134] The memory 802 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 802 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 802 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 802 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 802 is a non-volatile solid-state memory.

[0135] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.

[0136] The processor 801 implements any one of the service access methods in the above embodiments by reading and executing computer program instructions stored in the memory 802 .

[0137] In one example, the service access device may further include a communication interface 803 and a bus 810. Figure 8 As shown, the processor 801, the memory 802, and the communication interface 803 are connected via a bus 810 and communicate with each other.

[0138] The communication interface 803 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0139] Bus 810 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 810 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0140] The service access device can receive the target service access request and execute the service access method in the embodiment of the present application, thereby realizing the combination Figure 2 and Figure 7 Described is a service access method and apparatus.

[0141] In addition, in combination with the in-service access method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the online data traffic billing methods in the above embodiment is implemented.

[0142] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0143] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0144] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0145] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0146] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A service access method, characterized in that: Applied to a first access terminal, the method includes: In response to receiving an access request for a target service, when determining that the target service is a service deployed on a second access terminal, querying a service information library for target service information corresponding to the access request and a target service access channel corresponding to the target service information, wherein one of the first access terminal and the second access terminal is a cloud platform and the other is an edge gateway; In the case where the target service information is found but the target service access channel is not found, determining a second target access end corresponding to the target service through the target service information; Sending the target service information to the second target access terminal; receiving the first channel returned by the second access end, and establishing a target service access channel based on the first channel, wherein the first channel is obtained by the second target access end by binding the data transmission channel and the communication channel of the target service, the data transmission channel of the target service is a data transmission channel established between the second target access end and the target service when the second target access end receives the target service information, and the communication channel is a communication channel between the second target access end and the first access end; The target service is accessed based on the target service access channel.

2. The service access method according to claim 1, characterized in that: Before the responding to receiving the access request of the target service, the method further includes: receiving second service information sent by the second access terminal; A service information library is constructed based on the first service information registered in the first access terminal and the second service information.

3. The method according to any one of claims 1 or 2, characterized in that The determining that the target service is a second access terminal service includes: Parse the access request of the target service and obtain the domain name information corresponding to the target service; The service information database is queried based on the domain name information to determine that the target service is a second access terminal service.

4. The service access method according to claim 1, characterized in that: After establishing the target service access channel, the method further includes: The target service access channel is stored in the service information library.

5. The service access method according to claim 1, characterized in that: After receiving the access request to the target service in response, the method further includes: In the case where it is determined that the target service is a service deployed on the first access terminal, obtaining target service information corresponding to the access request from a service information library; The target service is accessed based on the target service information.

6. The service access method according to claim 1, characterized in that: After querying the service information library for the target service information corresponding to the access request and the target service access channel corresponding to the access request, the method further includes: When the target service information and the target service access channel are found, the target service is accessed based on the target service access channel.

7. A service access device, characterized in that: Applied to a first access terminal, the device comprises: a query module, configured to, in response to receiving an access request for a target service, query a service information repository for target service information corresponding to the access request and a target service access channel corresponding to the access request when determining that the target service is a service deployed on a second access terminal, wherein one of the first access terminal and the second access terminal is a cloud platform and the other is an edge gateway; A determination module, configured to determine a second target access end corresponding to the target service through the target service information when the target service information is found but the target service access channel is not found; A sending module, used for sending the target service information to the second target access terminal; a receiving module, configured to receive a first channel returned by the second access terminal, and establish a target service access channel based on the first channel, wherein the first channel is obtained by the second target access terminal by binding a data transmission channel and a communication channel of a target service, the data transmission channel of the target service is a data transmission channel established between the second target access terminal and the target service when the second target access terminal receives the target service information, and the communication channel is a communication channel between the second target access terminal and the first access terminal; An access module is used to access the target service based on the target service access channel.

8. A service access device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the in-service access method as described in any one of claims 1-6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the service access method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the service access method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data transmission method and device based on gateway cascade, equipment and storage medium

    CN112152996A

  • Node access method, device and apparatus and computer readable storage medium

    CN112165532A

  • QUIC protocol-based cloud edge service access method and system

    CN112887433A

  • Data processing method and equipment

    CN113259479A

  • Secure communication method of cloud edge collaborative tunnel

    CN115529193A