CN110995873A - Gateway service interface discovery method, system, electronic device and storage medium - Google Patents

Gateway service interface discovery method, system, electronic device and storage medium Download PDF

Info

Publication number
CN110995873A
CN110995873A CN201911377689.9A CN201911377689A CN110995873A CN 110995873 A CN110995873 A CN 110995873A CN 201911377689 A CN201911377689 A CN 201911377689A CN 110995873 A CN110995873 A CN 110995873A
Authority
CN
China
Prior art keywords
service
interface
gateway
information
business
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
CN201911377689.9A
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.)
Midea Group Co Ltd
Original Assignee
Midea Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Midea Group Co Ltd filed Critical Midea Group Co Ltd
Priority to CN201911377689.9A priority Critical patent/CN110995873A/en
Publication of CN110995873A publication Critical patent/CN110995873A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to the field of network communication, and provides a gateway service interface discovery method, a system, electronic equipment and a storage medium; the method comprises the following steps: receiving an interface description message of a business service, and updating configuration information of a gateway according to the interface description message; the interface description message of the business service is used for describing the interface required by the business service; and processing the service request according to the configuration information of the gateway. The gateway service business interface discovery method, the system, the electronic device and the storage medium provided by the embodiment of the invention register the configuration information on the gateway by the business service, thereby dynamically storing the configuration information of the interface contained in the business service into the configuration information of the gateway and responding to the update of the business interface more quickly.

Description

Gateway service interface discovery method, system, electronic device and storage medium
Technical Field
The present invention relates to the field of network communications, and in particular, to a method, a system, an electronic device, and a storage medium for discovering a gateway service interface.
Background
With the micro-servering of cloud services, gateway services exposing interfaces to the outside play an increasingly important role. Besides the traditional protocol conversion function, the gateway also provides important basic functions of authorization management, current limiting, load, fusing protection, replay prevention, graph query and the like for various interfaces.
In the prior art, gateways distribute interfaces in a configuration manner. This approach is acceptable when the kind and number of cloud services are small. However, as the gateway hosts more and more services and heavier services, this approach in the prior art becomes increasingly cumbersome and difficult to maintain. For example, some interfaces require authorization, some do not; fusing protection of various interfaces is inconsistent; adding, changing, abandoning and changing service deployment interfaces related to the service. In the above scenario, the configuration of the gateway needs to be changed and restarted, which is complex and error-prone in management process, and also causes short interruption of service and abnormal routing.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the invention provides a gateway service interface discovery method, thereby realizing accurate and efficient configuration of the gateway to the interface.
The invention also provides a gateway service interface discovery method.
The invention also provides a gateway service interface discovery system.
The invention also provides an electronic device.
The invention further proposes a non-transitory computer-readable storage medium.
The gateway service interface discovery method according to the embodiment of the first aspect of the invention comprises the following steps:
receiving an interface description message of a business service, and updating configuration information of a gateway according to the interface description message; the interface description message of the business service is used for describing the interface required by the business service;
and processing the service request according to the configuration information of the gateway.
The gateway service business interface discovery method provided by the embodiment of the invention dynamically stores the configuration information of the interface required by the business service into the configuration information of the gateway, can respond to the update of the business interface more quickly, can overcome the problems of complex process and easy error of the existing interface configuration method, and can effectively avoid the problems of transient interruption and routing abnormity of the service caused by the change and restart of the gateway configuration.
According to one embodiment of the present invention, the interface description message of the business service includes: the identification information of the business service, the identification information of the interface required by the business service and the relevant information of the interface required by the business service when the business service is executed.
According to an embodiment of the present invention, the interface description message of the service specifically includes: service name, service address, service protocol, interface identification information and interface parameter description information; wherein,
the service name is the name of the business service;
the service address comprises an IP address of a server deployed by the business service and an address of a port monitored by the business service;
the service protocol is a protocol type supported by the service;
the interface identification information comprises information for distinguishing different interfaces, including interface names and interface request addresses;
the interface parameter description information is used for describing information of parameters required by the interface.
According to an embodiment of the present invention, the interface description message of the service specifically further includes:
the interface response description information and/or the interface function restriction description information; wherein,
the interface response description information is used for describing the response content of the interface;
the interface function restriction description information is used for describing the restriction of the interface function when the business service is realized.
According to one embodiment of the present invention, the interface function restriction description information includes one or more of the following information: authorization rules, current limit rules, load patterns, fusing rules, and anti-replay rules.
According to an embodiment of the present invention, the receiving the interface description message of the service includes:
receiving an interface description message of a business service relayed through a configuration service; wherein the configuration service is an intermediate proxy that enables the transmission of messages across a local area network.
The gateway service interface discovery method provided by the embodiment of the invention realizes the transfer of the interface description message by adopting the configuration service, and can realize the message transmission across the local area network.
According to an embodiment of the present invention, the receiving the interface description message of the service includes:
and receiving an interface description message of the service transmitted by a broadcasting mode.
According to an embodiment of the present invention, the updating the configuration information of the gateway according to the interface description message includes:
according to the content of the interface description message, performing one or more of the following operations on the configuration information of the gateway: added or deleted or modified.
According to an embodiment of the present invention, the processing the service request according to the configuration information of the gateway includes:
obtaining information of the service to be requested from the configuration information of the gateway, determining that the service request meets the requirement in the information of the service to be requested, and forwarding the service request to the service to be requested; wherein,
the service to be requested is the service requested by the service request.
The gateway service interface discovery method according to the second aspect of the embodiment of the invention comprises the following steps:
generating and sending an interface description message of the service, so that the gateway service updates the configuration information of the gateway according to the interface description message; the interface description message is used for describing an interface required by the business service;
receiving a business service request; the service request is forwarded after the gateway service detection is passed, and the gateway service detects the service request according to the configuration information of the gateway.
The gateway service interface discovery method provided by the embodiment of the invention realizes dynamic update of gateway configuration information by registering the configuration information on the gateway by the service, can respond to update of the service interface more quickly, can overcome the problems of complex process and easy error of the existing interface configuration method, and can effectively avoid the problems of transient service interruption, routing abnormity and the like caused by change and restart of gateway configuration.
The gateway service interface discovery system according to the third aspect of the present invention includes: the gateway service device is in communication connection with the business service device;
the gateway service apparatus is configured to execute the gateway service interface discovery method according to the embodiment of the first aspect of the present invention;
the service device is configured to execute the gateway service interface discovery method according to the embodiment of the second aspect of the present invention.
The gateway service interface discovery system provided by the embodiment of the invention automatically registers the configuration information on the gateway by the service, thereby dynamically storing the configuration information of the interface contained in the service into the configuration information of the gateway, being capable of responding to the update of the service interface more quickly, overcoming the problems of complex process and easy error of the existing interface configuration method, and effectively avoiding the problems of transient interruption of service, routing abnormity and the like caused by the change and restart of the gateway configuration.
An electronic device according to an embodiment of the fourth aspect of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the gateway service interface discovery method according to the embodiment of the first aspect of the present invention or implements the steps of the gateway service interface discovery method according to the embodiment of the second aspect of the present invention when executing the program.
A non-transitory computer readable storage medium according to an embodiment of the fifth aspect of the present invention has stored thereon a computer program that, when executed by a processor, implements the steps of the gateway service traffic interface discovery method according to an embodiment of the first aspect of the present invention, or implements the steps of the gateway service traffic interface discovery method according to an embodiment of the second aspect of the present invention.
One or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: the business service registers the configuration information on the gateway by itself, thereby dynamically storing the configuration information of the interface contained in the business service into the configuration information of the gateway and responding to the update of the business interface more quickly.
Furthermore, the problems of complex process and easy error of the existing interface configuration method can be solved.
Furthermore, the problems of short interruption of service and abnormal routing caused by change of gateway configuration and restart can be effectively avoided.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a gateway service interface discovery method according to an embodiment of the present invention
Fig. 2 is a flowchart of a gateway service interface discovery method according to another embodiment of the present invention;
fig. 3 is a schematic diagram of a gateway service device in a gateway service interface discovery system according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a service device in a gateway service interface discovery system according to an embodiment of the present invention;
fig. 5 illustrates a physical structure diagram of an electronic device.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of an embodiment of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Fig. 1 is a flowchart of a gateway service interface discovery method provided in an embodiment of the present invention, and as shown in fig. 1, the gateway service interface discovery method provided in the embodiment of the present invention is applied to a gateway side, and the method includes:
step 101, the gateway service receives an interface description message of the service, and updates the configuration information of the gateway according to the interface description message.
In the embodiment of the present invention, the service refers to a service (server) for executing a certain service, such as a service for providing video content playing, a service for providing an online entry, and a service for providing user identity authentication.
The interface description message is used to describe the interfaces required for the business service. When the service provides the service to the outside, the interface is required to participate in the corresponding work. However, the types and the number of interfaces required for different service services are different, and the restrictions on the functions of the interfaces in different service services are also different. The requirements of the service on the interface are thus described by the interface description message.
The interface description messages for a business service generally include: the identification information of the business service, the identification information of the interface required by the business service and the execution of the business service. The identification information of the service can be used to specify which service the interface describes the message is. The identification information of the interface required for the business service can be used to specify which interface is described. The information about the interface required by the business service when the business service is executed can be used for explaining which information is used by the interface required by the business service when the business service is executed.
In the embodiment of the present invention, the interface description message specifically includes the following contents: service name, service address, service protocol, interface identification information, interface parameter description information, interface response description information and interface function limitation description information.
The service name refers to the name of the business service to which the interface description message belongs. The name of the business service has uniqueness, namely: the same business service, no matter which server it is deployed on, is named the same.
The service address includes an IP address of a server deployed by the business service and an address of a port listened to by the business service.
The service protocol refers to a protocol supported by a service, such as http, grpc, thrift, and the like.
The interface identification information is used to describe basic information of an interface required by a business service, such as an interface name, an interface request address and an interface submission mode, where the interface request address can support multiple protocols, such as: http, grpc, thrift, etc.
The parameter description information is used to describe information of parameters required by the interface, such as parameter names, parameter types, locations of the parameters, and the like. The parameter description information of different interfaces may differ.
The response description information is used for describing the response content of the interface. The response description information is agreed by the interfaces, and the response description information of different interfaces can have difference. The response description information supports json, text, etc. formats.
The function restriction description information reflects the restriction that the function of the interface is subjected to when implementing the service. It will be appreciated by those skilled in the art that the same interface may have different functionality in different business services, and therefore the functionality of the interface needs to be limited according to the particular business service category. Common limitations on interface functionality include: authorization, current limiting, loading, fusing, replay prevention, etc. In the embodiment of the present invention, the interface function restriction description information includes one or more of the following information: authorization rules, current limit rules, load patterns, fusing rules, and anti-replay rules. Wherein the authorization rules describe whether access to the interface requires authorization. The current limit rule describes the maximum number of accesses that the interface can accept per unit time, such as specifying that the current limit accesses 20 requests per second. The load mode describes a load balancing mode, such as random, round robin, consistent hashing, weighting and the like. The fusing rules describe rules for fusing protection. Anti-replay rules describe the means taken to prevent replay attacks.
It should be understood by those skilled in the art that the specific content of the functional limitation description is related to the corresponding interface, and the interface implementer of the business service determines the functional limitation description of the interface according to the characteristics of the business service or the supply capability of the resource or other factors. The specific content of the function limitation description may be one or more of the aforementioned authorization rule, current limiting rule, load mode, fusing rule and anti-replay rule, and may also be other content not mentioned in the embodiment of the present invention.
In other embodiments of the present invention, the content in the interface description message may be different according to the capability of the gateway. For example, in one embodiment of the invention, the interface description message includes: the service name, the service address, the service protocol, the interface identification information, and the interface parameter description information, that is, the interface response description information and the interface function restriction description information in the foregoing embodiment of the present invention are not included. For another example, in another embodiment of the present invention, the interface description message includes not only: the service system comprises a service name, a service address, a service protocol, interface identification information and interface parameter description information, and further comprises one of interface response description information and interface function limitation description information.
Since a business service may require more than one interface, the interface description message for a business service may include information about multiple interfaces of the business service. The following is an example of an interface description message for a business service, which is described in JSON format.
Figure BDA0002341429050000081
Figure BDA0002341429050000091
Figure BDA0002341429050000101
In this example of the interface description message, only the information of one interface is described, but the information of a plurality of interfaces may be included according to the actual situation of the service.
The gateway service may have a plurality of receiving modes when receiving the interface description message of the service. In one embodiment of the invention, the gateway service receives the interface description message of the traffic in a broadcast manner. However, the broadcast mode is only suitable for message transmission in the same local area network, and cannot realize message transmission across local area networks.
In order to implement the cross-lan transmission of the message, in the embodiment of the present invention, a configuration service is used to implement the relay of the interface description message. The gateway service receives interface description messages for the business service via the configuration service. The configuration service is equivalent to an intermediate agent, can realize message transmission across the local area network, and can be realized by etcd, consul, zookeeper and the like in the prior art. Obviously, the implementation of the configuration service has wider applicability than the broadcast approach.
After receiving the interface description message of the service, the gateway service extracts corresponding content from the interface description message, and updates local configuration information according to the extracted content.
In the embodiment of the invention, the updating of the gateway local configuration information is divided into a plurality of cases. If the interface description message comprises the information of the newly added interface, adding the information of the newly added interface for the local configuration information; if the information of the existing interface is indicated to be deleted in the interface description message, deleting the information of the existing interface in the local configuration information; if the updated information of the existing interface is described in the interface description message, the information is updated for the existing interface in the local configuration information. The update of the gateway local configuration information may also be one or a combination of more of the above-mentioned addition of the new interface information, deletion of the existing interface information, and update of the existing interface information.
In other embodiments of the present invention, the updating of the gateway local configuration information may also be a total updating of information of corresponding service in the gateway local configuration information by using the latest information of all interfaces included in a certain service. Particularly, when the latest information of all interfaces included in the service is empty, it means that the updated gateway local configuration information no longer includes the interface information of the service, that is, the service is removed from the network. The full-quantity updating mode is beneficial to reducing the logic judgment of the updating condition and avoiding errors in updating.
It should be noted that the gateway service related in the embodiment of the present invention is not limited to the gateway service of one gateway. If a gateway serving as an access end of a certain cloud network is a gateway cluster, the gateway service described in the embodiment of the present invention refers to a gateway service of the gateway cluster, that is, a gateway service cluster. When updating the local configuration information, the gateway service needs to update the configuration information of each gateway in the gateway cluster.
And 102, the gateway service processes the service request according to the configuration information of the gateway.
After a user initiates a request for a first service, the request is transmitted to a gateway, and the gateway service in the gateway processes the request for the first service according to the local configuration information. During processing, the basic information of the first service, such as a service name, included in the request needs to be compared with the basic information of the service stored in the local configuration information, if the basic information of the first service cannot be found, the request is rejected, and if the basic information of the first service can be found, the request of the first service is further processed according to the content in the function restriction description of each interface related to the first service.
For example, according to the authorization rule in the functional restriction description, if the access to the first business service needs to be authorized, the gateway service checks the request initiated by the user for the first business service, determines whether the user is an authorized user, and if the user is an authorized user, forwards the request to the server where the first business service is located (assuming that no other functional restriction condition exists or other functional restriction conditions are met), and if the user is not an authorized user, denies the request of the user for the first business service. As another example, there may be a flow limit for an interface to a business service, such as specifying that the flow limit accesses 20 requests per second, according to the flow limit rules in the functional limit description. The gateway service calculates the number of requests for the interface within 1 second from the current time according to this current limit rule, and if it has reached 20 times, the user's request is rejected.
The gateway service business interface discovery method provided by the embodiment of the invention dynamically stores the configuration information of the interface required by the business service into the configuration information of the gateway, can respond to the update of the business interface more quickly, can overcome the problems of complex process and easy error of the existing interface configuration method, and can effectively avoid the problems of transient interruption and routing abnormity of the service caused by the change and restart of the gateway configuration.
Based on any of the above embodiments, fig. 2 is a flowchart of a gateway service interface discovery method provided by another embodiment of the present invention, and as shown in fig. 2, the gateway service interface discovery method provided by another embodiment of the present invention is applied to a server, and the method includes:
step 201, the service generates and sends an interface description message of the service, so that the gateway service updates the configuration information of the gateway according to the interface description message.
When the state of the interface required by the business service changes, the business service generates an interface description message and sends the interface description message to the gateway.
The state of the interface required by the service is changed, so that various possible situations exist, and firstly, the service needs to be added with an interface; secondly, the interface occupied before the service deletion; and thirdly, the interface required by the service is updated, for example, the parameters of the interface or the function limitation description information of the interface are changed.
The interface state change caused by the change of the business service is essentially one or a combination of the three interface state change situations. For example, a new service access network is a special case where a new interface is needed for a service, that is, when the service is newly accessed to the network, the interfaces needed for the service are all the new interfaces; for another example, the deletion of the service from the network is a special case of the interface occupied before the deletion of the service, that is, when the service is removed from the network, the service deletes all the interfaces occupied before; for another example, the service update may be to add an interface, delete a part of the previously occupied interfaces, update one or some of the included interfaces, or add, delete, and update an interface. Therefore, the description of the interface state change condition can reflect the change condition of the corresponding interface when the service changes.
No matter which of the three situations the state of the interface required by the service changes, the service generates an interface description message.
In the embodiment of the present invention, the specific content of the interface description message may be different according to the different interface state change situations.
For the case that the service needs to add a new interface, in the embodiment of the present invention, the interface description message includes information of the interface to be added, such as identification information of the new interface, parameter description information of the new interface, response description information of the new interface, and function restriction description information of the new interface. The interface description message should also have an increment flag to indicate that the interface information included in the interface description message is information of the newly added interface. When the gateway service updates the local configuration information, a new interface can be added to the corresponding service in the local configuration information according to the interface description message.
For the case that the service needs to delete an interface, in the embodiment of the present invention, the interface description message includes information of the interface to be deleted, such as identification information of the interface to be deleted. The interface description message should also have a decrement flag indicating that the interface information contained in the interface description message is the information of the interface to be deleted. When the gateway service updates the local configuration information, the gateway service can delete the corresponding interface for the corresponding service in the local configuration information according to the interface description message.
For the case that the interface required by the service is updated, in the embodiment of the present invention, the interface description message includes information of the interface to be updated, such as identification information of the interface to be updated, parameter description information of the interface to be updated, response description information of the interface to be updated, and function restriction description information of the interface to be updated. The interface description message should also have an update flag to indicate that the interface information contained in the interface description message is information of the interface to be updated. When the gateway service updates the local configuration information, the gateway service can update the information of the interface for the corresponding service in the local configuration information according to the interface description message.
The contents of the interface description message are not limited to those described above in the embodiments of the present invention. In another embodiment of the present invention, the interface description message does not specifically distinguish the change of the interface status, i.e. the interface description message describes the information of all the interfaces required by the latest business service. When the gateway service updates the local configuration information, the gateway service can update the service fully according to the interface description message.
The interface description message generated by the service may be generated by the service in various ways, such as sending the interface description message to the configuration service, forwarding the interface description message to the gateway service by the configuration service, or sending the interface description message to the gateway service by broadcasting. This is described in more detail in the previous embodiment of the invention and is therefore not repeated here.
Step 202, receiving a service request.
After the user initiates the service request, the gateway service at the gateway side detects the service request according to the configuration information of the gateway, and if the service request can pass the detection, the service request is forwarded to the service. The business service receives the detected business service requests and responds to the business service requests.
The gateway service interface discovery method provided by the embodiment of the invention realizes dynamic update of gateway configuration information by registering the configuration information on the gateway by the service, can respond to update of the service interface more quickly, can overcome the problems of complex process and easy error of the existing interface configuration method, and can effectively avoid the problems of transient service interruption, routing abnormity and the like caused by change and restart of gateway configuration.
Based on any of the above embodiments, an embodiment of the present invention provides a gateway service interface discovery system, which includes a gateway service device and a service device, where the gateway service device and the service device are connected through communication.
Fig. 3 is a schematic diagram of a gateway service device in a gateway service interface discovery system according to an embodiment of the present invention, where as shown in fig. 3, the gateway service device includes:
a configuration information updating module 301, configured to receive an interface description message of a service, and update configuration information of a gateway according to the interface description message; the interface description message of the business service is used for describing the interface required by the business service;
a service request processing module 302, configured to process the service request according to the configuration information of the gateway.
Fig. 4 is a schematic diagram of a service device in a gateway service interface discovery system according to an embodiment of the present invention, and as shown in fig. 4, the service device includes:
an interface description message generating and sending module 401, configured to generate and send an interface description message of the service, so that the gateway service updates configuration information of a gateway according to the interface description message; the interface description message is used for describing an interface required by the business service;
a service request receiving module 402, configured to receive a service request; the service request is forwarded after the gateway service detection is passed, and the gateway service detects the service request according to the configuration information of the gateway.
The gateway service interface discovery system provided by the embodiment of the invention automatically registers the configuration information on the gateway by the service, thereby dynamically storing the configuration information of the interface contained in the service into the configuration information of the gateway, being capable of responding to the update of the service interface more quickly, overcoming the problems of complex process and easy error of the existing interface configuration method, and effectively avoiding the problems of transient interruption of service, routing abnormity and the like caused by the change and restart of the gateway configuration.
Fig. 5 illustrates a physical structure diagram of an electronic device, which may include, as shown in fig. 5: a processor (processor)510, a communication Interface (Communications Interface)520, a memory (memory)530 and a communication bus 540, wherein the processor 510, the communication Interface 520 and the memory 530 communicate with each other via the communication bus 540. Processor 510 may call logic instructions in memory 530 to perform the following method: the gateway service receives the interface description message of the service and updates the configuration information of the gateway according to the interface description message; and processing the service request according to the configuration information of the gateway. Or performing the following method: the service generates and sends an interface description message of the service so that the gateway service updates the configuration information of the gateway according to the interface description message; a business service request is received.
Furthermore, the logic instructions in the memory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Further, embodiments of the present invention disclose a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which when executed by a computer, the computer is capable of performing the methods provided by the above-mentioned method embodiments, for example, comprising: the gateway service receives the interface description message of the service and updates the configuration information of the gateway according to the interface description message; and processing the service request according to the configuration information of the gateway. Or for example, include: the service generates and sends an interface description message of the service so that the gateway service updates the configuration information of the gateway according to the interface description message; a business service request is received.
In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented by a processor to perform the method provided by the foregoing embodiments, for example, including: the gateway service receives the interface description message of the service and updates the configuration information of the gateway according to the interface description message; and processing the service request according to the configuration information of the gateway. Or for example, include: the service generates and sends an interface description message of the service so that the gateway service updates the configuration information of the gateway according to the interface description message; a business service request is received.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
The above embodiments are merely illustrative of the present invention and are not to be construed as limiting the invention. Although the present invention has been described in detail with reference to the embodiments, it should be understood by those skilled in the art that various combinations, modifications or equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention, and the technical solution of the present invention is covered by the claims of the present invention.

Claims (13)

1. A gateway service interface discovery method is characterized by comprising the following steps:
receiving an interface description message of a business service, and updating configuration information of a gateway according to the interface description message; the interface description message of the business service is used for describing the interface required by the business service;
and processing the service request according to the configuration information of the gateway.
2. The gateway service traffic interface discovery method of claim 1, wherein said traffic service interface description message comprises: the identification information of the business service, the identification information of the interface required by the business service and the relevant information of the interface required by the business service when the business service is executed.
3. The gateway service interface discovery method according to claim 2, wherein the service interface description message specifically includes: service name, service address, service protocol, interface identification information and interface parameter description information; wherein,
the service name is the name of the business service;
the service address comprises an IP address of a server deployed by the business service and an address of a port monitored by the business service;
the service protocol is a protocol type supported by the service;
the interface identification information comprises information for distinguishing different interfaces, including interface names and interface request addresses;
the interface parameter description information is used for describing information of parameters required by the interface.
4. The gateway service interface discovery method according to claim 3, wherein the service interface description message further specifically includes:
the interface response description information and/or the interface function restriction description information; wherein,
the interface response description information is used for describing the response content of the interface;
the interface function restriction description information is used for describing the restriction of the interface function when the business service is realized.
5. The method of claim 4, wherein the interface function restriction description information comprises one or more of the following information: authorization rules, current limit rules, load patterns, fusing rules, and anti-replay rules.
6. The gateway service traffic interface discovery method of claim 1, wherein said receiving an interface description message for a traffic service comprises:
receiving an interface description message of a business service relayed through a configuration service; wherein the configuration service is an intermediate proxy that enables the transmission of messages across a local area network.
7. The gateway service traffic interface discovery method of claim 1, wherein said receiving an interface description message for a traffic service comprises:
and receiving an interface description message of the service transmitted by a broadcasting mode.
8. The method of claim 1, wherein the updating the configuration information of the gateway according to the interface description message comprises:
according to the content of the interface description message, performing one or more of the following operations on the configuration information of the gateway: added or deleted or modified.
9. The method of claim 1, wherein the processing the service request according to the configuration information of the gateway comprises:
obtaining information of the service to be requested from the configuration information of the gateway, determining that the service request meets the requirement in the information of the service to be requested, and forwarding the service request to the service to be requested; wherein,
the service to be requested is the service requested by the service request.
10. A gateway service interface discovery method is characterized by comprising the following steps:
generating and sending an interface description message of the service, so that the gateway service updates the configuration information of the gateway according to the interface description message; the interface description message is used for describing an interface required by the business service;
receiving a business service request; the service request is forwarded after the gateway service detection is passed, and the gateway service detects the service request according to the configuration information of the gateway.
11. A gateway services service interface discovery system, comprising: the gateway service device is in communication connection with the business service device;
the gateway service apparatus, configured to perform the gateway service interface discovery method according to any one of claims 1 to 9;
the service device, configured to perform the gateway service interface discovery method according to claim 10.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of the gateway service interface discovery method according to any one of claims 1 to 9 or the steps of the gateway service interface discovery method according to claim 10.
13. A non-transitory computer readable storage medium, having stored thereon a computer program, which, when being executed by a processor, performs the steps of the gateway service traffic interface discovery method according to any one of claims 1 to 9, or the steps of the gateway service traffic interface discovery method according to claim 10.
CN201911377689.9A 2019-12-27 2019-12-27 Gateway service interface discovery method, system, electronic device and storage medium Pending CN110995873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911377689.9A CN110995873A (en) 2019-12-27 2019-12-27 Gateway service interface discovery method, system, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911377689.9A CN110995873A (en) 2019-12-27 2019-12-27 Gateway service interface discovery method, system, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN110995873A true CN110995873A (en) 2020-04-10

Family

ID=70078124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911377689.9A Pending CN110995873A (en) 2019-12-27 2019-12-27 Gateway service interface discovery method, system, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN110995873A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611581A (en) * 2020-05-14 2020-09-01 陈洋洋 Internet of things-based network big data information anti-disclosure method and cloud communication server
CN111935272A (en) * 2020-08-03 2020-11-13 高新现代智能系统股份有限公司 AFC (automatic frequency control) deployment method and device and computer-readable storage medium
CN112202598A (en) * 2020-09-10 2021-01-08 青岛海信网络科技股份有限公司 Log recording method and device
CN112560089A (en) * 2020-12-15 2021-03-26 泰康保险集团股份有限公司 Sensitive information early warning device and method of interface service
CN114051058A (en) * 2021-09-27 2022-02-15 北京旷视科技有限公司 Interface calling method, platform, electronic equipment and computer storage medium
CN114285793A (en) * 2021-12-21 2022-04-05 中国农业银行股份有限公司 Distribution method, distribution device, distribution equipment and storage medium
WO2022068761A1 (en) * 2020-09-29 2022-04-07 京东科技控股股份有限公司 Data processing method and apparatus, electronic device, and storage medium
CN116192933A (en) * 2022-12-12 2023-05-30 北京领雁科技股份有限公司 Method and system for dynamically expanding non-HTTP protocol based on micro-service gateway
CN116233239A (en) * 2022-12-30 2023-06-06 北京白驹易行科技有限公司 Comment-based configured gateway registration method and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012004503A1 (en) * 2010-07-09 2012-01-12 Softathome Method of self-configuration of a domestic gateway in the presence of various external networks, and gateway implementing such a method
CN108429645A (en) * 2018-03-05 2018-08-21 深圳乐信软件技术有限公司 A kind of configuration method of API gateway, device, storage medium and API gateway
CN108512748A (en) * 2018-03-21 2018-09-07 上海艾融软件股份有限公司 A kind of implementation method of micro services gateway
CN108965007A (en) * 2018-07-19 2018-12-07 北京车和家信息技术有限公司 API gateway interface configures update method and device
CN109818902A (en) * 2017-11-21 2019-05-28 中国电信股份有限公司 Automatic service deployment method, service dispatch management module and EPG platform
CN110149364A (en) * 2019-04-15 2019-08-20 厦门市美亚柏科信息股份有限公司 Method, apparatus, the storage medium of micro services are provided based on data service platform
CN110493067A (en) * 2019-09-05 2019-11-22 中国银联股份有限公司 A kind of method and device that API gateway service updates

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012004503A1 (en) * 2010-07-09 2012-01-12 Softathome Method of self-configuration of a domestic gateway in the presence of various external networks, and gateway implementing such a method
CN109818902A (en) * 2017-11-21 2019-05-28 中国电信股份有限公司 Automatic service deployment method, service dispatch management module and EPG platform
CN108429645A (en) * 2018-03-05 2018-08-21 深圳乐信软件技术有限公司 A kind of configuration method of API gateway, device, storage medium and API gateway
CN108512748A (en) * 2018-03-21 2018-09-07 上海艾融软件股份有限公司 A kind of implementation method of micro services gateway
CN108965007A (en) * 2018-07-19 2018-12-07 北京车和家信息技术有限公司 API gateway interface configures update method and device
CN110149364A (en) * 2019-04-15 2019-08-20 厦门市美亚柏科信息股份有限公司 Method, apparatus, the storage medium of micro services are provided based on data service platform
CN110493067A (en) * 2019-09-05 2019-11-22 中国银联股份有限公司 A kind of method and device that API gateway service updates

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111611581B (en) * 2020-05-14 2021-01-26 深圳万物安全科技有限公司 Internet of things-based network big data information anti-disclosure method and cloud communication server
CN111611581A (en) * 2020-05-14 2020-09-01 陈洋洋 Internet of things-based network big data information anti-disclosure method and cloud communication server
CN111935272A (en) * 2020-08-03 2020-11-13 高新现代智能系统股份有限公司 AFC (automatic frequency control) deployment method and device and computer-readable storage medium
CN111935272B (en) * 2020-08-03 2023-03-28 高新现代智能系统股份有限公司 AFC (automatic frequency control) deployment method and device and computer-readable storage medium
CN112202598A (en) * 2020-09-10 2021-01-08 青岛海信网络科技股份有限公司 Log recording method and device
CN112202598B (en) * 2020-09-10 2022-12-27 青岛海信网络科技股份有限公司 Log recording method and device
WO2022068761A1 (en) * 2020-09-29 2022-04-07 京东科技控股股份有限公司 Data processing method and apparatus, electronic device, and storage medium
CN112560089A (en) * 2020-12-15 2021-03-26 泰康保险集团股份有限公司 Sensitive information early warning device and method of interface service
CN112560089B (en) * 2020-12-15 2024-03-01 泰康保险集团股份有限公司 Sensitive information early warning device and method for interface service
CN114051058A (en) * 2021-09-27 2022-02-15 北京旷视科技有限公司 Interface calling method, platform, electronic equipment and computer storage medium
CN114051058B (en) * 2021-09-27 2024-03-26 北京旷视科技有限公司 Interface calling method, platform, electronic equipment and computer storage medium
CN114285793A (en) * 2021-12-21 2022-04-05 中国农业银行股份有限公司 Distribution method, distribution device, distribution equipment and storage medium
CN114285793B (en) * 2021-12-21 2024-06-18 中国农业银行股份有限公司 Distribution method, distribution device, distribution equipment and storage medium
CN116192933A (en) * 2022-12-12 2023-05-30 北京领雁科技股份有限公司 Method and system for dynamically expanding non-HTTP protocol based on micro-service gateway
CN116192933B (en) * 2022-12-12 2023-09-19 北京领雁科技股份有限公司 Method and system for dynamically expanding non-HTTP protocol based on micro-service gateway
CN116233239A (en) * 2022-12-30 2023-06-06 北京白驹易行科技有限公司 Comment-based configured gateway registration method and system
CN116233239B (en) * 2022-12-30 2023-11-21 北京白驹易行科技有限公司 Comment-based configured gateway registration method and system

Similar Documents

Publication Publication Date Title
CN110995873A (en) Gateway service interface discovery method, system, electronic device and storage medium
CN112868206B (en) Method, system and computer readable medium for providing service broker functionality
US11277306B2 (en) Sending information of a network repository function instance storing network function instance information
CN109842906B (en) Communication method, device and system
US11075948B2 (en) Method and system for virtual machine aware policy management
EP2583415B1 (en) Method, diameter node, and computer readable medium for providing dynamic origination-based routing key registration in a diameter network
CN105610632B (en) Virtual network equipment and related method
EP3313027B1 (en) Routing rule acquisition method and system
US10542433B2 (en) Connection establishment method, device, and system
CN107404512B (en) Resource subscription method, resource subscription device and resource subscription system
CN111200611B (en) Method and device for verifying intra-domain source address based on boundary interface equivalence class
CN113630266B (en) Method and device for instantiating edge application server
JP2019525604A (en) Network function NF management method and NF management apparatus
CN103414641B (en) Neighbor table item release, device and the network equipment
US20190028880A1 (en) Method for accessing context data by network service component, apparatus, and system
CN101873330A (en) Access control method and server for supporting IPv6/IPv4 dual stack access
CN109698869B (en) Private network crossing method, communication node and storage medium
CN114338809B (en) Access control method, device, electronic equipment and storage medium
WO2018082574A1 (en) Information sending method, unit and system
US20230102122A1 (en) Methods, systems, and computer readable media for identifying alternate delivery endpoints for mobile originated data and monitoring reports in a communications network
CN114911577A (en) Method, device, equipment and storage medium for setting network isolation rule
JP2024518157A (en) Method, system and computer readable medium for platform firewall management by a network function (NF) repository function (NRF) or service communication proxy (SCP) - Patents.com
CN110572290B (en) Master device determination method, master device determination device, electronic device, storage medium, and network system
CN114221959A (en) Service sharing method, device and system
EP3688963B1 (en) First front-end node, client node, load balancer node, and methods performed thereby, for supporting data communication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200410